diff --git a/assets/js/demo.min.js.LICENSE.txt b/assets/js/demo.min.js.LICENSE.txt index ac5bcda45..032248254 100644 --- a/assets/js/demo.min.js.LICENSE.txt +++ b/assets/js/demo.min.js.LICENSE.txt @@ -1,5 +1,5 @@ /*! * jQuery demo: https://formbuilder.online/ - * Version: 3.19.9 + * Version: 3.19.10 * Author: Kevin Chappell */ diff --git a/assets/js/form-builder.min.js b/assets/js/form-builder.min.js index 18220b11e..791844d16 100644 --- a/assets/js/form-builder.min.js +++ b/assets/js/form-builder.min.js @@ -1,2 +1,2 @@ /*! For license information please see form-builder.min.js.LICENSE.txt */ -!function(e){"use strict";!function(){var t={424:function(e,t,r){r.r(t);var o=r(933),i=r.n(o),n=r(476),l=r.n(n),a=r(678),s=r.n(a),d=new URL(r(971),r.b),c=new URL(r(525),r.b),f=new URL(r(658),r.b),u=l()(i()),p=s()(d),m=s()(c),b=s()(f);u.push([e.id,'@font-face{font-family:"formbuilder-icons";src:url('+p+') format("woff")}[class^=formbuilder-icon-]:before,[class*=" formbuilder-icon-"]:before{font-family:"formbuilder-icons";font-style:normal;font-weight:normal;speak:never;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.formbuilder-icon-autocomplete:before{content:""}.formbuilder-icon-date:before{content:""}.formbuilder-icon-checkbox:before{content:""}.formbuilder-icon-checkbox-group:before{content:""}.formbuilder-icon-radio-group:before{content:""}.formbuilder-icon-rich-text:before{content:""}.formbuilder-icon-select:before{content:""}.formbuilder-icon-textarea:before{content:""}.formbuilder-icon-text:before{content:""}.formbuilder-icon-pencil:before{content:""}.formbuilder-icon-file:before{content:""}.formbuilder-icon-hidden:before{content:""}.formbuilder-icon-cancel:before{content:""}.formbuilder-icon-button:before{content:""}.formbuilder-icon-header:before{content:""}.formbuilder-icon-paragraph:before{content:""}.formbuilder-icon-number:before{content:""}.formbuilder-icon-copy:before{content:""}.formbuilder-icon-grid:before{content:url('+m+")}.formbuilder-icon-plus:before{content:url("+b+')}.formbuilder-icon-sort-lower:before{content:""}.formbuilder-icon-sort-higher:before{content:""}.form-wrap.form-builder{position:relative;display:flex;flex-direction:row}.form-wrap.form-builder *{box-sizing:border-box}.form-wrap.form-builder.formbuilder-embedded-bootstrap button,.form-wrap.form-builder.formbuilder-embedded-bootstrap input,.form-wrap.form-builder.formbuilder-embedded-bootstrap select,.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.form-wrap.form-builder.formbuilder-embedded-bootstrap input{line-height:normal}.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea{overflow:auto}.form-wrap.form-builder.formbuilder-embedded-bootstrap button,.form-wrap.form-builder.formbuilder-embedded-bootstrap input,.form-wrap.form-builder.formbuilder-embedded-bootstrap select,.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group{position:relative;display:inline-block;vertical-align:middle}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn{position:relative;float:left}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn-group,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn-group{margin-left:-1px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:last-child:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.dropdown-toggle:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:focus,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:hover{z-index:2}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-image:none;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn:active{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn{display:table-cell}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group{position:relative;display:table;border-collapse:separate}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap output{font-size:14px;line-height:1.42857143;display:block}.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea.form-control{height:auto}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{height:34px;display:block;width:100%;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control:focus{outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-group{margin-left:0px;margin-bottom:15px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-right{float:right}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-left{float:left}.form-wrap.form-builder .formbuilder-required,.form-wrap.form-builder .required-asterisk{color:#c10000}.form-wrap.form-builder .formbuilder-checkbox-group input[type=checkbox],.form-wrap.form-builder .formbuilder-checkbox-group input[type=radio],.form-wrap.form-builder .formbuilder-radio-group input[type=checkbox],.form-wrap.form-builder .formbuilder-radio-group input[type=radio]{margin:0 4px 0 0}.form-wrap.form-builder .formbuilder-checkbox-inline,.form-wrap.form-builder .formbuilder-radio-inline{margin-right:8px;display:inline-block;vertical-align:middle;padding-left:0}.form-wrap.form-builder .formbuilder-checkbox-inline label input[type=text],.form-wrap.form-builder .formbuilder-radio-inline label input[type=text]{margin-top:0}.form-wrap.form-builder .formbuilder-checkbox-inline:first-child,.form-wrap.form-builder .formbuilder-radio-inline:first-child{padding-left:0}.form-wrap.form-builder .formbuilder-autocomplete-list{background-color:#fff;display:none;list-style:none;padding:0;border:1px solid #ccc;border-width:0 1px 1px;position:absolute;z-index:20;max-height:200px;overflow-y:auto}.form-wrap.form-builder .formbuilder-autocomplete-list li{display:none;cursor:default;padding:5px;margin:0;transition:background-color 200ms ease-in-out}.form-wrap.form-builder .formbuilder-autocomplete-list li:hover,.form-wrap.form-builder .formbuilder-autocomplete-list li.active-option{background-color:rgba(0,0,0,.075)}@keyframes PLACEHOLDER{0%{height:1px}100%{height:15px}}.form-wrap.form-builder .cb-wrap{width:26%;max-width:-moz-fit-content;max-width:fit-content;transition:transform 250ms}.form-wrap.form-builder .cb-wrap.sticky-controls{position:sticky;align-self:flex-start;top:0}.form-wrap.form-builder .cb-wrap h4{margin-top:0;color:#666}@media(max-width: 481px){.form-wrap.form-builder .cb-wrap{width:64px}.form-wrap.form-builder .cb-wrap h4{display:none}}.form-wrap.form-builder .cb-wrap .form-actions{float:right;margin-top:5px}.form-wrap.form-builder .cb-wrap .form-actions button{border:0 none}.form-wrap.form-builder .frmb-control{margin:0;padding:0;border-radius:5px}.form-wrap.form-builder .frmb-control li{cursor:move;list-style:none;margin:0 0 -1px 0;padding:10px;text-align:left;background:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;box-shadow:inset 0 0 0 1px #c5c5c5}.form-wrap.form-builder .frmb-control li .control-icon{width:16px;height:auto;margin-right:10px;margin-left:.2em;display:inline-block}.form-wrap.form-builder .frmb-control li .control-icon img,.form-wrap.form-builder .frmb-control li .control-icon svg{max-width:100%;height:auto}.form-wrap.form-builder .frmb-control li:first-child{border-radius:5px 5px 0 0;margin-top:0}.form-wrap.form-builder .frmb-control li:last-child{border-radius:0 0 5px 5px}.form-wrap.form-builder .frmb-control li::before{margin-right:10px;font-size:16px}.form-wrap.form-builder .frmb-control li:hover{background-color:#f2f2f2}.form-wrap.form-builder .frmb-control li.ui-sortable-helper{border-radius:5px;transition:box-shadow 250ms;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff}.form-wrap.form-builder .frmb-control li.ui-state-highlight{width:0;overflow:hidden;padding:0;margin:0;border:0 none}.form-wrap.form-builder .frmb-control li.moving{opacity:.6}.form-wrap.form-builder .frmb-control li.formbuilder-separator{background-color:rgba(0,0,0,0);box-shadow:none;padding:0;cursor:default}.form-wrap.form-builder .frmb-control li.formbuilder-separator hr{margin:10px 0}@media(max-width: 481px){.form-wrap.form-builder .frmb-control li::before{font-size:30px}.form-wrap.form-builder .frmb-control li{text-overflow:clip}.form-wrap.form-builder .frmb-control li span{visibility:hidden}.form-wrap.form-builder .frmb-control li span span{visibility:visible;font-size:30px;width:auto !important}}.form-wrap.form-builder .frmb-control.sort-enabled li.ui-state-highlight{box-shadow:none;height:0;width:100%;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;-webkit-clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin:1px 0 3px;animation:PLACEHOLDER 250ms forwards}.controls-left.form-wrap.form-builder .form-actions{float:left}.formbuilder-mobile.form-wrap.form-builder .form-actions{width:100%}.formbuilder-mobile.form-wrap.form-builder .form-actions button{width:100%;font-size:.85em !important;display:block !important;border-radius:0 !important;margin-top:-1px;margin-left:0 !important}.formbuilder-mobile.form-wrap.form-builder .form-actions button:first-child{border-radius:5px 5px 0 0 !important;margin-top:0 !important;border-bottom:0 none}.formbuilder-mobile.form-wrap.form-builder .form-actions button:last-child{border-radius:0 0 5px 5px !important}.form-wrap.form-builder .stage-wrap{flex-grow:1;display:flex;flex-direction:column;position:relative;padding:0;margin:0;width:calc(74% - 5px)}@media(max-width: 481px){.form-wrap.form-builder .stage-wrap{width:calc(100% - 64px)}}.form-wrap.form-builder .stage-wrap.empty{border:3px dashed #ccc;background-color:rgba(255,255,255,.25)}.form-wrap.form-builder .stage-wrap.empty::after{content:attr(data-content);position:absolute;text-align:center;top:50%;left:0;width:100%;margin-top:-1em}.form-wrap.form-builder .frmb{list-style-type:none;min-height:200px;transition:background-color 500ms ease-in-out}.form-wrap.form-builder .frmb .formbuilder-required{color:#c10000}.form-wrap.form-builder .frmb.removing{overflow:hidden}.form-wrap.form-builder .frmb li.form-field:hover{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder .frmb li.form-field:hover .field-actions{opacity:1}.form-wrap.form-builder .frmb li.form-field:hover li :hover{background:#fefefe}.form-wrap.form-builder .frmb li.form-field{position:relative;padding:6px;clear:both;margin-left:0;margin-bottom:3px;background-color:#fff;transition:background-color 250ms ease-in-out,margin-top 400ms}.form-wrap.form-builder .frmb li.form-field.hidden-field{background-color:rgba(255,255,255,.6)}.form-wrap.form-builder .frmb li.form-field:first-child{border-top-right-radius:5px;border-top-left-radius:5px}.form-wrap.form-builder .frmb li.form-field:first-child .field-actions .btn:last-child{border-radius:0 5px 0 0}.form-wrap.form-builder .frmb li.form-field:last-child{border-bottom-right-radius:5px;border-bottom-left-radius:5px}.form-wrap.form-builder .frmb li.form-field.no-fields label{font-weight:400}@keyframes PLACEHOLDER{0%{height:0}100%{height:15px}}.form-wrap.form-builder .frmb li.form-field.frmb-placeholder,.form-wrap.form-builder .frmb li.form-field.ui-state-highlight{height:0;padding:0;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;-webkit-clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin-bottom:3px;animation:PLACEHOLDER 250ms forwards}.form-wrap.form-builder .frmb li.form-field.moving,.form-wrap.form-builder .frmb li.form-field.ui-sortable-helper{transition:box-shadow 500ms ease-in-out;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff;border-radius:5px}.form-wrap.form-builder .frmb li.form-field.disabled-field{z-index:1;position:relative;overflow:visible}.form-wrap.form-builder .frmb li.form-field.disabled-field:hover .frmb-tt{display:inline-block}.form-wrap.form-builder .frmb li.form-field.disabled-field [type=checkbox]{float:left;margin-right:10px}.form-wrap.form-builder .frmb li.form-field.disabled-field h2{border-bottom:0 none}.form-wrap.form-builder .frmb li.form-field.disabled-field label{font-size:12px;font-weight:400;color:#666}.form-wrap.form-builder .frmb li.form-field.disabled-field .prev-holder{cursor:default;line-height:28px;padding-left:5px}.form-wrap.form-builder .frmb li.form-field .close-field{position:absolute;color:#666;left:50%;bottom:6px;background:#fff;border-top:1px solid #c5c5c5;border-left:1px solid #c5c5c5;border-right:1px solid #c5c5c5;transform:translateX(-50%);padding:0 5px;border-top-right-radius:3px;border-top-left-radius:3px;cursor:pointer;transition:background-color 250ms ease-in-out}.form-wrap.form-builder .frmb li.form-field .close-field:hover{text-decoration:none}.form-wrap.form-builder .frmb li.form-field.header-field h1,.form-wrap.form-builder .frmb li.form-field.header-field h2,.form-wrap.form-builder .frmb li.form-field.header-field h3,.form-wrap.form-builder .frmb li.form-field.header-field h4,.form-wrap.form-builder .frmb li.form-field.header-field h5,.form-wrap.form-builder .frmb li.form-field.header-field h6{word-break:break-word}.form-wrap.form-builder .frmb li.form-field.paragraph-field p{word-break:break-word}.form-wrap.form-builder .frmb li.form-field .field-label{display:block;overflow-wrap:break-word}.form-wrap.form-builder .frmb li.form-field.button-field h1,.form-wrap.form-builder .frmb li.form-field.button-field h2,.form-wrap.form-builder .frmb li.form-field.button-field h3,.form-wrap.form-builder .frmb li.form-field.button-field p,.form-wrap.form-builder .frmb li.form-field.button-field canvas,.form-wrap.form-builder .frmb li.form-field.button-field output,.form-wrap.form-builder .frmb li.form-field.button-field address,.form-wrap.form-builder .frmb li.form-field.button-field blockquote,.form-wrap.form-builder .frmb li.form-field.button-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.header-field h1,.form-wrap.form-builder .frmb li.form-field.header-field h2,.form-wrap.form-builder .frmb li.form-field.header-field h3,.form-wrap.form-builder .frmb li.form-field.header-field p,.form-wrap.form-builder .frmb li.form-field.header-field canvas,.form-wrap.form-builder .frmb li.form-field.header-field output,.form-wrap.form-builder .frmb li.form-field.header-field address,.form-wrap.form-builder .frmb li.form-field.header-field blockquote,.form-wrap.form-builder .frmb li.form-field.header-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.paragraph-field h1,.form-wrap.form-builder .frmb li.form-field.paragraph-field h2,.form-wrap.form-builder .frmb li.form-field.paragraph-field h3,.form-wrap.form-builder .frmb li.form-field.paragraph-field p,.form-wrap.form-builder .frmb li.form-field.paragraph-field canvas,.form-wrap.form-builder .frmb li.form-field.paragraph-field output,.form-wrap.form-builder .frmb li.form-field.paragraph-field address,.form-wrap.form-builder .frmb li.form-field.paragraph-field blockquote,.form-wrap.form-builder .frmb li.form-field.paragraph-field .prev-holder{margin:0}.form-wrap.form-builder .frmb li.form-field.button-field .field-label,.form-wrap.form-builder .frmb li.form-field.header-field .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field .field-label{display:none}.form-wrap.form-builder .frmb li.form-field.button-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.header-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field.editing .field-label{display:block}.form-wrap.form-builder .frmb li.form-field.paragraph-field .fld-label{min-height:150px;overflow-y:auto}.form-wrap.form-builder .frmb li.form-field.checkbox-field .field-label{display:none}.form-wrap.form-builder .frmb li.deleting,.form-wrap.form-builder .frmb li.delete:hover,.form-wrap.form-builder .frmb li:hover li.delete:hover{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting .close-field,.form-wrap.form-builder .frmb li.delete:hover .close-field,.form-wrap.form-builder .frmb li:hover li.delete:hover .close-field{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting{z-index:20;pointer-events:none}.form-wrap.form-builder .frmb.disabled-field{padding:0 5px}.form-wrap.form-builder .frmb.disabled-field :hover{border-color:rgba(0,0,0,0)}.form-wrap.form-builder .frmb.disabled-field .form-element{float:none;margin-bottom:10px;overflow:visible;padding:5px 0;position:relative}.form-wrap.form-builder .frmb .frm-holder{display:none}.form-wrap.form-builder .frmb .tooltip{left:20px}.form-wrap.form-builder .frmb .prev-holder{display:block}.form-wrap.form-builder .frmb .prev-holder .form-group{margin:0}.form-wrap.form-builder .frmb .prev-holder .ql-editor{min-height:125px}.form-wrap.form-builder .frmb .prev-holder .form-group>label:not([class=formbuilder-checkbox-label]){display:none}.form-wrap.form-builder .frmb .prev-holder select,.form-wrap.form-builder .frmb .prev-holder input[type=text],.form-wrap.form-builder .frmb .prev-holder textarea,.form-wrap.form-builder .frmb .prev-holder input[type=number]{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .prev-holder input[type=date]{width:auto}.form-wrap.form-builder .frmb .prev-holder select[multiple]{height:auto}.form-wrap.form-builder .frmb .prev-holder label{font-weight:normal}.form-wrap.form-builder .frmb .prev-holder input[type=number]{width:auto;max-width:100%}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .required-asterisk{display:none}.form-wrap.form-builder .frmb .field-label,.form-wrap.form-builder .frmb .legend{color:#666;margin-bottom:5px;line-height:27px;font-size:16px;font-weight:normal}.form-wrap.form-builder .frmb .disabled-field .field-label{display:block}.form-wrap.form-builder .frmb .other-option:checked+label input{display:inline-block}.form-wrap.form-builder .frmb .other-val{margin-left:5px;display:none}.form-wrap.form-builder .frmb .field-actions{position:absolute;top:0;right:0;opacity:0}.form-wrap.form-builder .frmb .field-actions a::before{margin:0}.form-wrap.form-builder .frmb .field-actions a:hover{text-decoration:none;color:#000}.form-wrap.form-builder .frmb .field-actions .btn{display:inline-block;width:32px;height:32px;padding:0 6px;border-radius:0;border-color:#c5c5c5;background-color:#fff;color:#c5c5c5;line-height:32px;font-size:16px;border-width:0 0 1px 1px}.form-wrap.form-builder .frmb .field-actions .btn:first-child{border-bottom-left-radius:5px}.form-wrap.form-builder .frmb .field-actions .toggle-form:hover{border-color:#ccc;background-color:#65aac6;color:#fff}.form-wrap.form-builder .frmb .field-actions .toggle-form::before{margin:0}.form-wrap.form-builder .frmb .field-actions .copy-button:hover{background-color:#6fc665;color:#fff}.form-wrap.form-builder .frmb .field-actions .del-button:hover{background-color:#c66865;color:#fff}.form-wrap.form-builder .frmb .option-actions{text-align:right;margin-top:10px;width:100%;margin-left:2%}.form-wrap.form-builder .frmb .option-actions button,.form-wrap.form-builder .frmb .option-actions a{background:#fff;padding:5px 10px;border:1px solid #c5c5c5;font-size:14px;border-radius:5px;cursor:default}.form-wrap.form-builder .frmb .sortable-options-wrap{width:81.33333333%;display:inline-block}.form-wrap.form-builder .frmb .sortable-options-wrap label{font-weight:normal}@media(max-width: 481px){.form-wrap.form-builder .frmb .sortable-options-wrap{display:block;width:100%}}.form-wrap.form-builder .frmb .radio-group-field .sortable-options li:nth-child(2) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options{display:inline-block;width:100%;margin-left:2%;background:#c5c5c5;margin-bottom:0;border-radius:2px;list-style:none;padding:0}.form-wrap.form-builder .frmb .sortable-options>li{cursor:move;margin:1px;padding:6px;background-color:#fff}.form-wrap.form-builder .frmb .sortable-options>li:nth-child(1) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options>li .remove{position:relative;opacity:1;float:right;right:14px;height:18px;width:18px;top:8px;font-size:12px;padding:0;color:#c10000}.form-wrap.form-builder .frmb .sortable-options>li .remove::before{margin:0}.form-wrap.form-builder .frmb .sortable-options>li .remove:hover{background-color:#c10000 !important;text-decoration:none;color:#fff}.form-wrap.form-builder .frmb .sortable-options .option-selected{margin:0;width:5%}.form-wrap.form-builder .frmb .sortable-options input[type=text]{width:calc(44.5% - 17px);margin:0 3px;float:none}.form-wrap.form-builder .frmb .form-field .form-group{width:100%;clear:left;float:none}.form-wrap.form-builder .frmb .col-md-6 .form-elements,.form-wrap.form-builder .frmb .col-md-8 .form-elements{width:100%}.form-wrap.form-builder .frmb .field-options .add-area .add{clear:both}.form-wrap.form-builder .frmb .style-wrap button.selected{border:1px solid #000;margin-top:0;margin-right:1px;box-shadow:0 0 0 1px #fff inset;padding:1px 5px}.form-wrap.form-builder .frmb .form-elements{padding:10px 5px;background:#f7f7f7;border-radius:3px;margin:0;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements .input-wrap{width:81.33333333%;margin-left:2%;float:left}.form-wrap.form-builder .frmb .form-elements .input-wrap>input[type=checkbox]{margin-top:8px}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.form-wrap.form-builder .frmb .form-elements .add{clear:both}.form-wrap.form-builder .frmb .form-elements [contenteditable],.form-wrap.form-builder .frmb .form-elements select[multiple]{height:auto}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control{display:inline-block}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control,.form-wrap.form-builder .frmb .form-elements input[type=text],.form-wrap.form-builder .frmb .form-elements input[type=number],.form-wrap.form-builder .frmb .form-elements input[type=date],.form-wrap.form-builder .frmb .form-elements input[type=color],.form-wrap.form-builder .frmb .form-elements textarea,.form-wrap.form-builder .frmb .form-elements select{transition:background 250ms ease-in-out;padding:6px 12px;border:1px solid #c5c5c5;background-color:#fff}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .input-wrap{width:100%;margin-left:0;float:none}}.form-wrap.form-builder .frmb .form-elements input[type=number]{width:auto}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.col-md-6 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-8 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-6 .form-wrap.form-builder .frmb .form-elements label,.col-md-8 .form-wrap.form-builder .frmb .form-elements label{display:block}.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{width:16.66666667%;padding-top:7px;margin-bottom:0;text-align:right;font-weight:700;float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{display:block;width:auto;float:none;text-align:left}.form-wrap.form-builder .frmb .form-elements .false-label:first-child.empty-label,.form-wrap.form-builder .frmb .form-elements label:first-child.empty-label{display:none}}.form-wrap.form-builder .frmb .form-elements .false-label.multiple,.form-wrap.form-builder .frmb .form-elements .false-label.required-label,.form-wrap.form-builder .frmb .form-elements .false-label.toggle-label,.form-wrap.form-builder .frmb .form-elements .false-label.roles-label,.form-wrap.form-builder .frmb .form-elements .false-label.other-label,.form-wrap.form-builder .frmb .form-elements label.multiple,.form-wrap.form-builder .frmb .form-elements label.required-label,.form-wrap.form-builder .frmb .form-elements label.toggle-label,.form-wrap.form-builder .frmb .form-elements label.roles-label,.form-wrap.form-builder .frmb .form-elements label.other-label{text-align:left;float:none;margin-bottom:-3px;font-weight:400;width:calc(81.3333% - 23px)}.form-wrap.form-builder .frmb .form-elements input.error{border:1px solid #c10000}.form-wrap.form-builder .frmb .form-elements input.fld-maxlength,.form-wrap.form-builder .frmb .form-elements input.fld-rows{width:75px}.form-wrap.form-builder .frmb .form-elements input.field-error{background:#fefefe;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements label em{display:block;font-weight:400;font-size:.75em}.form-wrap.form-builder .frmb .form-elements label.maxlength-label{line-height:1em}.form-wrap.form-builder .frmb .form-elements .available-roles{display:none;padding:10px;margin:10px 0;background:#e6e6e6;box-shadow:inset 0 0 2px 0 #b3b3b3}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .available-roles{margin-left:0}}.form-wrap.form-builder .frmb .form-elements .available-roles label{font-weight:400;width:auto;float:none;display:inline}.form-wrap.form-builder .frmb .form-elements .available-roles input{display:inline;top:auto}.form-wrap.form-builder .autocomplete-field .sortable-options .option-selected{display:none}.formbuilder-mobile.form-wrap.form-builder .field-actions{opacity:1}.form-wrap.form-builder .snackbar{visibility:hidden;min-width:250px;margin-left:-125px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:16px;position:fixed;z-index:1;left:50%;bottom:30px}.form-wrap.form-builder .snackbar.show{visibility:visible;animation:fadein .5s,fadeout .5s 2.5s}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:30px;opacity:1}}@keyframes fadeout{from{bottom:30px;opacity:1}to{bottom:0;opacity:0}}.form-wrap.form-builder .ui-state-highlight{border-radius:3px;border:1px dashed #0d99f2;background-color:#e5f5f8;width:12px}.form-wrap.form-builder .moveHighlight{border:1px dashed #0d99f2 !important;background-color:#e5f5f8 !important}.form-wrap.form-builder .currentGridModeFieldHighlight{background-color:#e5f5f8 !important}.form-wrap.form-builder .grid-mode-help{background-color:#fff;border-top-left-radius:5px;border-top-right-radius:5px}.form-wrap.form-builder .grid-mode-help-row1{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:1px}.form-wrap.form-builder .grid-mode-help-row2{white-space:nowrap}.form-wrap.form-builder .colWithInsertButtons{padding-left:0 !important;padding-right:0 !important;flex:95 1 0% !important}.form-wrap.form-builder .rowWrapper{margin-left:0 !important;margin-right:0 !important}.form-wrap.form-builder .rowWrapper:last-child{flex-grow:1}.form-wrap.form-builder .rowWrapper:not(.tempRowWrapper){padding-top:1em;padding-bottom:1em}.form-wrap.form-builder .btnAddControl{border:0;background-color:unset}.form-wrap.form-builder .hoverColumnDropStyle{border:1px dashed #0d99f2;border-radius:3px;background-color:#e5f5f8;width:20px;position:fixed;margin-left:40px}.form-wrap.form-builder .hoverDropStyleInverse{background-color:#0d99f2;border:1px dashed #e5f5f8;min-height:20px}.form-wrap.form-builder .hoverDropStyleInverse .colWrapper{max-width:calc(100% - 40px)}.form-wrap.form-builder .stage-wrap>.hoverDropStyleInverse{width:100%}.form-wrap.form-builder .rowWrapper>.hoverDropStyleInverse{min-width:40px;flex-grow:1}.form-wrap.form-builder .hoverDropStyleInverse:last-child{flex-grow:1}.form-wrap.form-builder .invisibleRowPlaceholder{width:0 !important;position:fixed !important;left:-100px !important}.form-wrap.form-builder *[tooltip]{position:relative}.form-wrap.form-builder *[tooltip]:hover::after{background:rgba(0,0,0,.9);border-radius:5px 5px 5px 0;bottom:23px;color:#fff;content:attr(tooltip);padding:10px 5px;position:absolute;z-index:98;left:2px;width:230px;text-shadow:none;font-size:12px;line-height:1.5em;cursor:default}.form-wrap.form-builder *[tooltip]:hover::before{border:solid;border-color:#222 rgba(0,0,0,0);border-width:6px 6px 0;bottom:17px;content:"";left:2px;position:absolute;z-index:99;cursor:default}.form-wrap.form-builder .tooltip-element{visibility:visible;color:#fff;background:#000;width:16px;height:16px;border-radius:8px;display:inline-block;text-align:center;line-height:16px;margin:0 5px;font-size:12px;cursor:default}.form-wrap.form-builder .kc-toggle{padding-left:0 !important}.form-wrap.form-builder .kc-toggle span{position:relative;width:48px;height:24px;background:#e6e6e6;display:inline-block;border-radius:4px;border:1px solid #ccc;padding:2px;overflow:hidden;float:left;margin-right:5px;will-change:transform}.form-wrap.form-builder .kc-toggle span::after,.form-wrap.form-builder .kc-toggle span::before{position:absolute;display:inline-block;top:0}.form-wrap.form-builder .kc-toggle span::after{position:relative;content:"";width:50%;height:100%;left:0;border-radius:3px;background:linear-gradient(to bottom, white 0%, #ccc 100%);border:1px solid #999;transition:transform 100ms;transform:translateX(0)}.form-wrap.form-builder .kc-toggle span::before{border-radius:4px;top:2px;left:2px;content:"";width:calc(100% - 4px);height:18px;box-shadow:0 0 1px 1px #b3b3b3 inset;background-color:rgba(0,0,0,0)}.form-wrap.form-builder .kc-toggle input{height:0;overflow:hidden;width:0;opacity:0;pointer-events:none;margin:0}.form-wrap.form-builder .kc-toggle input:checked+span::after{transform:translateX(100%)}.form-wrap.form-builder .kc-toggle input:checked+span::before{background-color:#6fc665}.form-wrap.form-builder.controls-left{flex-direction:row-reverse}.form-wrap.form-builder::after{content:"";display:table;clear:both}.form-wrap.form-builder .cb-wrap,.form-wrap.form-builder .stage-wrap{vertical-align:top}.form-wrap.form-builder .form-elements,.form-wrap.form-builder .form-group,.form-wrap.form-builder .multi-row span,.form-wrap.form-builder textarea{display:block}.form-wrap.form-builder .form-elements::after,.form-wrap.form-builder .form-group::after{content:".";display:block;height:0;clear:both;visibility:hidden}.form-wrap.form-builder .form-elements .field-options div:hover,.form-wrap.form-builder .frmb .legend,.form-wrap.form-builder .frmb .prev-holder{cursor:move}.form-wrap.form-builder .frmb-tt{display:none;position:absolute;top:0;left:0;border:1px solid #262626;background-color:#666;border-radius:5px;padding:5px;color:#fff;z-index:20;text-align:left;font-size:12px;pointer-events:none}.form-wrap.form-builder .frmb-tt::before{border-color:#262626 rgba(0,0,0,0);bottom:-11px}.form-wrap.form-builder .frmb-tt::before,.form-wrap.form-builder .frmb-tt::after{content:"";position:absolute;border-style:solid;border-width:10px 10px 0;border-color:#666 rgba(0,0,0,0);display:block;width:0;z-index:1;margin-left:-10px;bottom:-10px;left:20px}.form-wrap.form-builder .frmb-tt a{text-decoration:underline;color:#fff}.form-builder-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:none;z-index:10}.form-builder-overlay.visible{display:block}.form-builder-dialog{position:absolute;border-radius:5px;background:#fff;z-index:20;transform:translate(-50%, -50%);top:0;left:0;padding:10px;box-shadow:0 3px 10px #000;min-width:166px;max-height:80%;overflow-y:scroll}.form-builder-dialog h3{margin-top:0}.form-builder-dialog.data-dialog{width:65%;background-color:#23241f}.form-builder-dialog.data-dialog pre{background:none;border:0 none;box-shadow:none;margin:0;color:#f2f2f2}.form-builder-dialog.positioned{transform:translate(-50%, -100%)}.form-builder-dialog.positioned .button-wrap::before{content:"";width:0;height:0;border-left:15px solid rgba(0,0,0,0);border-right:15px solid rgba(0,0,0,0);border-top:10px solid #fff;position:absolute;left:50%;top:100%;transform:translate(-50%, 10px)}.form-builder-dialog .button-wrap{position:relative;margin-top:10px;text-align:right;clear:both}.form-builder-dialog .button-wrap .btn{margin-left:10px}',""]),t.default=u},476:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",o=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),o&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),o&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,o,i,n){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=n),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},678:function(e){e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},933:function(e){e.exports=function(e){return e[1]}},539:function(e,t,r){var o=r(400).Symbol;e.exports=o},736:function(e,t,r){var o=r(539),i=r(840),n=r(258),l=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?i(e):n(e)}},833:function(e,t,r){var o=r(127),i=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(i,""):e}},120:function(e){var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},840:function(e,t,r){var o=r(539),i=Object.prototype,n=i.hasOwnProperty,l=i.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=n.call(e,a),r=e[a];try{e[a]=void 0;var o=!0}catch(e){}var i=l.call(e);return o&&(t?e[a]=r:delete e[a]),i}},258:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},400:function(e,t,r){var o=r(120),i="object"==typeof self&&self&&self.Object===Object&&self,n=o||i||Function("return this")();e.exports=n},127:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},726:function(e,t,r){var o=r(611),i=r(846),n=r(936),l=Math.max,a=Math.min;e.exports=function(e,t,r){var s,d,c,f,u,p,m=0,b=!1,h=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var r=s,o=d;return s=d=void 0,m=t,f=e.apply(o,r)}function v(e){var r=e-p;return void 0===p||r>=t||r<0||h&&e-m>=c}function y(){var e=i();if(v(e))return x(e);u=setTimeout(y,function(e){var r=t-(e-p);return h?a(r,c-(e-m)):r}(e))}function x(e){return u=void 0,g&&s?w(e):(s=d=void 0,f)}function A(){var e=i(),r=v(e);if(s=arguments,d=this,p=e,r){if(void 0===u)return function(e){return m=e,u=setTimeout(y,t),b?w(e):f}(p);if(h)return clearTimeout(u),u=setTimeout(y,t),w(p)}return void 0===u&&(u=setTimeout(y,t)),f}return t=n(t)||0,o(r)&&(b=!!r.leading,c=(h="maxWait"in r)?l(n(r.maxWait)||0,t):c,g="trailing"in r?!!r.trailing:g),A.cancel=function(){void 0!==u&&clearTimeout(u),m=0,s=p=d=u=void 0},A.flush=function(){return void 0===u?f:x(i())},A}},611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},360:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},193:function(e,t,r){var o=r(736),i=r(360);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==o(e)}},846:function(e,t,r){var o=r(400);e.exports=function(){return o.Date.now()}},783:function(e,t,r){var o=r(726),i=r(611);e.exports=function(e,t,r){var n=!0,l=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(r)&&(n="leading"in r?!!r.leading:n,l="trailing"in r?!!r.trailing:l),o(e,t,{leading:n,maxWait:t,trailing:l})}},936:function(e,t,r){var o=r(833),i=r(611),n=r(193),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(n(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var r=a.test(e);return r||s.test(e)?d(e.slice(2),r?2:8):l.test(e)?NaN:+e}},747:function(e){e.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(o,i,function(t){return e[t]}.bind(null,i));return o},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="",r(r.s=7)}([function(e,t,r){var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(2),n=r(10),l=Object.prototype.toString;function a(e){return"[object Array]"===l.call(e)}function s(e){return null!==e&&"object"===(void 0===e?"undefined":o(e))}function d(e){return"[object Function]"===l.call(e)}function c(e,t){if(null!=e)if("object"!==(void 0===e?"undefined":o(e))&&(e=[e]),a(e))for(var r=0,i=e.length;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){a.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){a.headers[e]=o.merge(n)})),e.exports=a}).call(this,r(12))},function(e,t,r){e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),o=0;o0&&void 0!==arguments[0]?arguments[0]:l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}return e.prototype.processConfig=function(e){var t=this,r=Object.assign({},l,e),o=r.location,i=function(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}(r,["location"]),n=o.replace(/\/?$/,"/");this.config=Object.assign({},{location:n},i);var a=this.config,s=a.override,d=a.preloaded,c=void 0===d?{}:d,f=Object.entries(this.langs).concat(Object.entries(s||c));this.langs=f.reduce((function(e,r){var o=r[0],i=r[1];return e[o]=t.applyLanguage.call(t,o,i),e}),{}),this.locale=this.config.locale||this.config.langs[0]},e.prototype.init=function(e){return this.processConfig.call(this,Object.assign({},this.config,e)),this.setCurrent(this.locale)},e.prototype.addLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t="string"==typeof t?this.processFile.call(this,t):t,this.applyLanguage.call(this,e,t),this.config.langs.push("locale")},e.prototype.getValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.locale;return this.langs[t]&&this.langs[t][e]||this.getFallbackValue(e)},e.prototype.getFallbackValue=function(e){var t=Object.values(this.langs).find((function(t){return t[e]}));return t&&t[e]},e.prototype.makeSafe=function(e){var t={"{":"\\{","}":"\\}","|":"\\|"};return e=e.replace(/\{|\}|\|/g,(function(e){return t[e]})),new RegExp(e,"g")},e.prototype.put=function(e,t){return this.current[e]=t},e.prototype.get=function(e,t){var r=this.getValue(e);if(r){var i=r.match(/\{[^}]+?\}/g),n=void 0;if(t&&i)if("object"===(void 0===t?"undefined":o(t)))for(var l=0;l1&&void 0!==arguments[1])||arguments[1],r=this;return new Promise((function(o,i){if(-1!==r.loaded.indexOf(e)&&t)return r.applyLanguage.call(r,r.langs[e]),o(r.langs[e]);var l=[r.config.location,e,r.config.extension].join("");return(0,n.get)(l).then((function(t){var i=t.data,n=r.processFile(i);return r.applyLanguage.call(r,e,n),r.loaded.push(e),o(r.langs[e])})).catch((function(){var t=r.applyLanguage.call(r,e);o(t)}))}))},e.prototype.applyLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.config.override[e]||{},o=this.langs[e]||{};return this.langs[e]=Object.assign({},o,t,r),this.langs[e]},e.prototype.setCurrent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return this.loadLang(t).then((function(){return e.locale=t,e.current=e.langs[t],e.current}))},i(e,[{key:"getLangs",get:function(){return this.config.langs}}]),e}();t.default=new a},function(e,t,r){e.exports=r(9)},function(e,t,r){var o=r(0),i=r(2),n=r(11),l=r(1);function a(e){var t=new n(e),r=i(n.prototype.request,t);return o.extend(r,n.prototype,t),o.extend(r,t),r}var s=a(l);s.Axios=n,s.create=function(e){return a(o.merge(l,e))},s.Cancel=r(6),s.CancelToken=r(26),s.isCancel=r(5),s.all=function(e){return Promise.all(e)},s.spread=r(27),e.exports=s,e.exports.default=s},function(e,t,r){function o(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(o(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&o(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){var o=r(1),i=r(0),n=r(21),l=r(22);function a(e){this.defaults=e,this.interceptors={request:new n,response:new n}}a.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(o,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[l,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],(function(e){a.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}})),i.forEach(["post","put","patch"],(function(e){a.prototype[e]=function(t,r,o){return this.request(i.merge(o||{},{method:e,url:t,data:r}))}})),e.exports=a},function(e,t,r){var o,i,n=e.exports={};function l(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(o===setTimeout)return setTimeout(e,0);if((o===l||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:l}catch(e){o=l}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var d,c=[],f=!1,u=-1;function p(){f&&d&&(f=!1,d.length?c=d.concat(c):u=-1,c.length&&m())}function m(){if(!f){var e=s(p);f=!0;for(var t=c.length;t;){for(d=c,c=[];++u1)for(var r=1;r=0)return;l[t]="set-cookie"===t?(l[t]?l[t]:[]).concat([r]):l[t]?l[t]+", "+r:r}})),l):l}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var o=e;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=o.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,i=String(e),n="",l=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.charAt(0|l)||(a="=",l%1);n+=a.charAt(63&t>>8-l%1*8)){if((r=i.charCodeAt(l+=.75))>255)throw new o;t=t<<8|r}return n}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,r,i,n,l){var a=[];a.push(e+"="+encodeURIComponent(t)),o.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),o.isString(i)&&a.push("path="+i),o.isString(n)&&a.push("domain="+n),!0===l&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){var o=r(0);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){o.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,r){var o=r(0),i=r(23),n=r(5),l=r(1),a=r(24),s=r(25);function d(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return d(e),e.baseURL&&!a(e.url)&&(e.url=s(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||l.adapter)(e).then((function(t){return d(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return n(t)||(d(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){var o=r(0);e.exports=function(e,t,r){return o.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){var o=r(6);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new o(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,r){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},54:function(e){e.exports=function(e){try{var t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(e){return!1}}},978:function(e,t,r){var o=r(892),i=r(424);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);o(i,{attributes:{class:"formBuilder-injected-style"},insert:"head",singleton:!1}),e.exports=i.locals||{}},892:function(e,t,r){var o,i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),n=[];function l(e){for(var t=-1,r=0;r"},658:function(e){e.exports="data:image/svg+xml; utf8,"}},r={};function o(e){var i=r[e];if(void 0!==i)return i.exports;var n=r[e]={id:e,exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.b=document.baseURI||self.location.href,o.nc=void 0,function(){o(978);var t=o(783),r=o.n(t);function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const n={},l={text:["text","password","email","color","tel"],header:["h1","h2","h3"],button:["button","submit","reset"],paragraph:["p","address","blockquote","canvas","output"],textarea:["textarea","quill"]},a=e=>{e.parentNode&&e.parentNode.removeChild(e)},s=e=>{for(;e.firstChild;)e.removeChild(e.firstChild);return e},d=function(e,t,r){void 0===r&&(r=!0);const o=[];let i=["none","block"];r&&(i=i.reverse());for(let r=e.length-1;r>=0;r--)-1!==e[r].textContent.toLowerCase().indexOf(t.toLowerCase())?(e[r].style.display=i[0],o.push(e[r])):e[r].style.display=i[1];return o},c=["select","checkbox-group","checkbox","radio-group","autocomplete"],f=new RegExp(`(${c.join("|")})`);class u{constructor(e){return i(this,"stage",void 0),i(this,"controls",void 0),i(this,"formActions",void 0),i(this,"editorWrap",void 0),this.optionFields=c,this.optionFieldsRegEx=f,this.subtypes=l,this.empty=s,this.filter=d,n[e]=this,n[e]}onRender(e,t){e.parentElement?t(e):window.requestAnimationFrame((()=>this.onRender(e,t)))}}const p={};class m{constructor(e){this.formData={},this.formID=e,p[e]=this}}var b=o(747),h=o.n(b);function g(e){let t;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}var w={loaded:g("loaded"),viewData:g("viewData"),userDeclined:g("userDeclined"),modalClosed:g("modalClosed"),modalOpened:g("modalOpened"),formSaved:g("formSaved"),fieldAdded:g("fieldAdded"),fieldRemoved:g("fieldRemoved"),fieldRendered:g("fieldRendered"),fieldEditOpened:g("fieldEditOpened"),fieldEditClosed:g("fieldEditClosed"),stageEmptied:g("stageEmptied")};const v={clobberingProtection:{document:!0,form:!0,namespaceAttributes:!1},backendOrder:["dompurify","sanitizer","fallback"],backends:{sanitizer:"function"==typeof window.Sanitizer&&new window.Sanitizer,dompurify:!!window.DOMPurify&&(y=window.DOMPurify,y.setConfig({SANITIZE_DOM:!1,ADD_ATTR:["contenteditable"]}),y),fallback:e=>e}};var y;const x=(e,t)=>{if(0===v.backendOrder.length)return!1;const r=e.toLowerCase();return t=t?t+"":"",r.startsWith("on")||["form","formaction"].includes(r)||t.trim().toLowerCase().startsWith("javascript:")};v.backends.fallback=function(t){const r=document.implementation.createHTMLDocument(""),o=r.createElement("base");o.href=document.location.href,r.head.appendChild(o);const i=["applet","comment","embed","iframe","link","listing","meta","noscript","object","plaintext","script","style","xmp"],n=e.parseHTML(t,r,!1);e(n).find("*").addBack().each(((t,r)=>{"#text"!==r.nodeName&&(r.tagName&&i.includes(r.tagName.toLowerCase())?r.parentElement?r.parentElement.removeChild(r):n.includes(r)&&n.splice(n.indexOf(r),1):r.attributes&&Array.from(r.attributes).forEach((t=>{x(t.name,t.value)&&e(r).removeAttr(t.name)})))}));const l=r.createElement("div");return e(l).html(n),l.innerHTML};const A=e=>{const t=!!v.clobberingProtection.document&&document,r=!!v.clobberingProtection.form&&document.createElement("form");return t&&e in t||r&&e in r?v.clobberingProtection.namespaceAttributes?"user-content-"+e:void 0:e},C={fallback:(e,t)=>{const r=v.backends.fallback,o="function"==typeof r;return o&&(t=r(t)),e.innerHTML=t,o},dompurify:(e,t)=>{const r=v.backends.dompurify;return!(!1===r||!r.isSupported||(e.innerHTML=r.sanitize(t),0))},sanitizer:(e,t)=>{const r=v.backends.sanitizer;return!!r&&(e.setHTML(t,{sanitizer:r}),!0)}},O=function(t,r,o){if(void 0===o&&(o=!1),!o){const o=document.createElement(t.tagName);return void 0!==v.backendOrder.find((e=>C[e](o,r)))?((t=>{e(t).find("*").each(((e,t)=>{["embed","form","iframe","image","img","object"].includes(t.tagName.toLowerCase())&&t.removeAttribute("name"),["id","name"].forEach((e=>{if(t.hasAttribute(e)){const r=A(t.getAttribute(e));void 0===r?t.removeAttribute(e):t.setAttribute(e,r)}}))}))})(o),t.innerHTML=o.innerHTML,t):(t.innerHTML=r,t)}t.textContent=r},k=["events"],j=["tag","content"];function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function S(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};const T=function(e,t){if(void 0===t&&(t=!1),null==e||"object"!=typeof e)return e;const r="function"==typeof window.structuredClone?window.structuredClone(e):Object.assign({},e),o=[null,void 0,""];t&&o.push(!1);for(const e in r)o.includes(r[e])?delete r[e]:Array.isArray(r[e])&&(r[e].length||delete r[e]);return r},D=function(e){return!["values","enableOther","other","label","subtype"].includes(e)},L=e=>Object.entries(e).map((e=>{let[t,r]=e;return D(t)&&Object.values(R(t,r)).join("")})).filter(Boolean).join(" "),R=(e,t)=>{let r;return e=M(e),t&&(Array.isArray(t)?r=G(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),r=G(t.trim()))),{name:e,value:t=t?`="${r}"`:""}},I=e=>e.reduce(((e,t)=>e.concat(Array.isArray(t)?I(t):t)),[]),M=e=>({className:"class"}[e]||P(e)),P=e=>(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))).replace(/\s/g,"-").replace(/^-+/g,""),B=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),F=function(){let e,t=0;return function(r){const o=Date.now();return o===e?++t:(t=0,e=o),(r.type||P(r.label))+"-"+o+"-"+t}}(),H=e=>void 0===e?e:[["array",e=>Array.isArray(e)],["node",e=>e instanceof window.Node||e instanceof window.HTMLElement],["component",()=>e&&e.dom],[typeof e,()=>!0]].find((t=>t[1](e)))[0],q=function(e,t,r){void 0===t&&(t=""),void 0===r&&(r={});let o=H(t);const{events:i}=r,n=N(r,k),l=document.createElement(e),a={string:e=>{O(l,l.innerHTML+e)},object:e=>{const{tag:t,content:r}=e,o=N(e,j);return l.appendChild(q(t,r,o))},node:e=>l.appendChild(e),array:e=>{for(let t=0;t{e=e(),o=H(e),a[o](e)},undefined:()=>{}};for(const e in n)if(n.hasOwnProperty(e)){const t=M(e);let r=Array.isArray(n[e])?Q(n[e].join(" ").split(" ")).join(" "):n[e];if(x(t,r))continue;if("boolean"==typeof r){if(!0===r){const e="contenteditable"===t||t;l.setAttribute(t,e)}}else"id"!==t&&"name"!==t||(r=A(r)),void 0!==r&&l.setAttribute(t,r)}return t&&a[o](t),((e,t)=>{if(t)for(const r in t)t.hasOwnProperty(r)&&e.addEventListener(r,(e=>t[r](e)))})(l,i),l},z=e=>{const t=e.attributes,r={};return X(t,(e=>{let o=t[e].value||"";o.match(/false|true/g)?o="true"===o:o.match(/undefined/g)&&(o=void 0),o&&(r[B(t[e].name)]=o)})),r},U=e=>{const t=[];for(let r=0;r{const t=[];if(e.length){const r=e[0].getElementsByTagName("value");for(let e=0;e{const t=(new window.DOMParser).parseFromString(e,"text/xml"),r=[];if(t){const e=t.getElementsByTagName("field");for(let t=0;t{const t=document.createElement("textarea");return t.innerHTML=e,t.textContent},J=e=>{const t=document.createElement("textarea");return t.textContent=e,t.innerHTML},G=e=>{const t={'"':""","&":"&","<":"<",">":">"};return"string"==typeof e?e.replace(/["&<>]/g,(e=>t[e]||e)):e},X=function(e,t,r){for(let o=0;oe.filter(((e,t,r)=>r.indexOf(e)===t)),Z=(e,t)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Y=function(e,t){void 0===t&&(t="");const r=jQuery;let o=[];return Array.isArray(e)||(e=[e]),K(e)||(o=jQuery.map(e,(e=>{const r={dataType:"script",cache:!0,url:(t||"")+e};return jQuery.ajax(r).done((()=>window.fbLoaded.js.push(e)))}))),o.push(jQuery.Deferred((e=>r(e.resolve)))),jQuery.when(...o)},K=function(e,t){void 0===t&&(t="js");const r=window.fbLoaded[t];return Array.isArray(e)?e.every((e=>r.includes(e))):r.includes(e)},_=function(t,r){void 0===r&&(r=""),Array.isArray(t)||(t=[t]),t.forEach((t=>{let o="href",i=t,n="";if("object"==typeof t&&(o=t.type||(t.style?"inline":"href"),n=t.id,i=n||t.href||t.style,t="inline"===o?t.style:t.href),!K(i,"css")){if("href"===o){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=(r||"")+t,document.head.appendChild(e)}else e(``).attr("id",n).appendTo(e(document.head));window.fbLoaded.css.push(i)}}))},ee=e=>e.replace(/\b\w/g,(function(e){return e.toUpperCase()})),te=(e,t)=>{const r=Object.assign({},e,t);for(const o in t)r.hasOwnProperty(o)&&(Array.isArray(t[o])?r[o]=Array.isArray(e[o])?Q(e[o].concat(t[o])):t[o]:"object"==typeof t[o]?r[o]=te(e[o],t[o]):r[o]=t[o]);return r},re=(e,t,r)=>t.split(" ").forEach((t=>e.addEventListener(t,r,!1))),oe=(e,t)=>{const r=t.replace(".","");for(;(e=e.parentElement)&&!e.classList.contains(r););return e},ie=()=>{let e="";var t;return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e="formbuilder-mobile"),e},ne=e=>e.replace(/\s/g,"-").replace(/[^a-zA-Z0-9[\]_-]/g,""),le=e=>e.replace(/[^0-9]/g,""),ae=(e,t)=>t.filter((function(e){return!~this.indexOf(e)}),e),se=/^col-(xs|sm|md|lg)-([^\s]+)/,de=e=>"string"==typeof e?e.split(" ").filter((e=>se.test(e)||e.startsWith("row-"))):[];function ce(){for(var e=arguments.length,t=new Array(e),r=0;r"number"==typeof e))}const fe={addEventListeners:re,attrString:L,camelCase:B,capitalize:ee,closest:oe,getContentType:H,escapeAttr:G,escapeAttrs:e=>{for(const t in e)e.hasOwnProperty(t)&&(e[t]=G(e[t]));return e},escapeHtml:J,forceNumber:le,forEach:X,getScripts:Y,getStyles:_,hyphenCase:P,isCached:K,markup:q,merge:te,mobileClass:ie,nameAttr:F,parsedHtml:V,parseXML:$,removeFromArray:Z,safeAttr:R,safeAttrName:M,safename:ne,subtract:ae,trimObj:T,unique:Q,validAttr:D,titleCase:function(e){const t=["a","an","and","as","at","but","by","for","for","from","in","into","near","nor","of","on","onto","or","the","to","with"].map((e=>`\\s${e}\\s`)),r=new RegExp(`(?!${t.join("|")})\\w\\S*`,"g");return`${e}`.replace(r,(e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/[A-Z]/g,(e=>` ${e}`))))},firstNumberOrUndefined:ce,splitObject:(e,t)=>{const r=e=>(t,r)=>(t[r]=e[r],t);return[Object.keys(e).filter((e=>t.includes(e))).reduce(r(e),{}),Object.keys(e).filter((e=>!t.includes(e))).reduce(r(e),{})]}};e.fn.swapWith=function(t){const r=this,o=e(t),i=e("
");return r.before(i),o.before(r),i.before(o).remove(),r};var ue=fe;const pe=["label","type"];class me{constructor(e,t){this.rawConfig=jQuery.extend({},e),e=jQuery.extend({},e),this.preview=t,delete e.isPreview,this.preview&&delete e.required;const r=["label","description","subtype","required","disabled"];for(const t of r)this[t]=e[t],delete e[t];e.id||(e.name?e.id=e.name:e.id="control-"+Math.floor(1e7*Math.random()+1)),this.id=e.id,this.type=e.type,this.description&&(e.title=this.description),me.controlConfig||(me.controlConfig={});const o=this.subtype?this.type+"."+this.subtype:this.type;this.classConfig=jQuery.extend({},me.controlConfig[this.type]||{},me.controlConfig[o]||{}),this.subtype&&(e.type=this.subtype),this.required&&(e.required="required",e["aria-required"]="true"),this.disabled&&(e.disabled="disabled"),this.config=e,this.configure()}static get definition(){return{}}static register(e,t,r){const o=r?r+".":"";me.classRegister||(me.classRegister={}),Array.isArray(e)||(e=[e]);for(const r of e)-1===r.indexOf(".")?me.classRegister[o+r]=t:me.error(`Ignoring type ${r}. Cannot use the character '.' in a type name.`)}static getRegistered(e){void 0===e&&(e=!1);const t=Object.keys(me.classRegister);return t.length?t.filter((t=>e?t.indexOf(e+".")>-1:-1===t.indexOf("."))):t}static getRegisteredSubtypes(){const e={};for(const t in me.classRegister)if(me.classRegister.hasOwnProperty(t)){const[r,o]=t.split(".");if(!o)continue;e[r]||(e[r]=[]),e[r].push(o)}return e}static getClass(e,t){const r=t?e+"."+t:e;return me.classRegister[r]||me.classRegister[e]||me.error("Invalid control type. (Type: "+e+", Subtype: "+t+"). Please ensure you have registered it, and imported it correctly.")}static loadCustom(e){let t=[];if(e&&(t=t.concat(e)),window.fbControls&&(t=t.concat(window.fbControls)),!this.fbControlsLoaded){for(const e of t)e(me,me.classRegister);this.fbControlsLoaded=!0}}static mi18n(e,t){const r=this.definition;let o=r.i18n||{};o=o[h().locale]||o.default||o;const i=this.camelCase(e),n="object"==typeof o?o[i]||o[e]:o;if(n)return n;let l=r.mi18n;return"object"==typeof l&&(l=l[i]||l[e]),l||(l=i),h().get(l,t)}static active(e){return!Array.isArray(this.definition.inactive)||-1===this.definition.inactive.indexOf(e)}static label(e){return this.mi18n(e)}static icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}configure(){}build(){const e=this.config,{label:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,pe);return this.markup(r,V(t),o)}on(e){const t={prerender:e=>e,render:e=>{const t=()=>{this.onRender&&this.onRender(e)};this.css&&_(this.css),this.js&&!K(this.js)?Y(this.js).done(t):t()}};return e?t[e]:t}static error(e){throw new Error(e)}markup(e,t,r){return void 0===t&&(t=""),void 0===r&&(r={}),this.element=q(e,t,r),this.element}parsedHtml(e){return V(e)}static camelCase(e){return B(e)}}const be=(e,t)=>{let r=e.id?`formbuilder-${e.type} form-group field-${e.id}`:"";if(e.className){const o=de(e.className);o&&o.length>0&&(r+=` ${o.join(" ")}`,Array.isArray(t)||(t=[t]),t.forEach((e=>{e.classList&&e.classList.remove(...o),e.querySelectorAll("[class*=row-],[class*=col-]").forEach((e=>{e.classList&&e.classList.remove(...o)}))})))}return r};class he{constructor(e,t,r,o){var i,n,l;void 0===t&&(t=!1),void 0===r&&(r=!1),void 0===o&&(o={}),this.preview=null!==(i=t)&&void 0!==i&&i,this.disableHTMLLabels=null!==(n=r)&&void 0!==n&&n,this.controlConfig=null!==(l=o)&&void 0!==l?l:{},this.templates={label:null,help:null,default:(e,t,r,o)=>(r&&t.appendChild(r),this.markup("div",[t,e],{className:be(o,e)})),noLabel:(e,t,r,o)=>this.markup("div",e,{className:be(o,e)}),hidden:e=>e},e&&(this.templates=jQuery.extend(this.templates,e)),this.configure()}configure(){}build(e,t,r){this.preview&&(t.name?t.name=t.name+"-preview":t.name=ue.nameAttr(t)+"-preview"),t.id=t.name,this.data=jQuery.extend({},t),me.controlConfig=this.controlConfig;const o=new e(t,this.preview);let i=o.build();if("object"==typeof i&&i.field||(i={field:i}),"string"==typeof i.field){const e=this.markup("div",i.field,{});1===e.childElementCount?i.field=e.children.item(0):i.field=Array.from(e.children)}const n=this.label(),l=this.help();let a;a=r&&this.isTemplate(r)?r:this.isTemplate(i.layout)?i.layout:"default";const s=this.processTemplate(a,i.field,n,l);return o.on("prerender")(s),s.addEventListener("fieldRendered",o.on("render")),s}label(){const e=this.data.label||"",t=[this.disableHTMLLabels?document.createTextNode(e):ue.parsedHtml(e)];return this.data.required&&t.push(this.markup("span","*",{className:"formbuilder-required"})),this.isTemplate("label")?this.processTemplate("label",t):this.markup("label",t,{for:this.data.id,className:`formbuilder-${this.data.type}-label`})}help(){return this.data.description?this.isTemplate("help")?this.processTemplate("help",this.data.description):this.markup("span","?",{className:"tooltip-element",tooltip:this.data.description}):null}isTemplate(e){return"function"==typeof this.templates[e]}processTemplate(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;onull;h().addLanguage("en-US",{NATIVE_NAME:"English (US)",ENGLISH_NAME:"English",addOption:"Add Option +",allFieldsRemoved:"All fields were removed.",allowMultipleFiles:"Allow users to upload multiple files",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",checkboxGroup:"Checkbox Group",checkbox:"Checkbox",checkboxes:"Checkboxes",className:"Class",clearAllMessage:"Are you sure you want to clear all fields?",clear:"Clear",close:"Close",content:"Content",copy:"Copy To Clipboard",copyButton:"+",copyButtonTooltip:"Copy",dateField:"Date Field",description:"Help Text",descriptionField:"Description",devMode:"Developer Mode",editNames:"Edit Names",editorTitle:"Form Elements",editXML:"Edit XML",enableOther:"Enable "Other"",enableOtherMsg:"Let users enter an unlisted option",fieldDeleteWarning:"false",fieldVars:"Field Variables",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to this area",header:"Header",hide:"Edit",hidden:"Hidden Input",inline:"Inline",inlineDesc:"Display {type} inline",label:"Label",labelEmpty:"Field Label cannot be empty",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length",minOptionMessage:"This field requires a minimum of 2 options",minSelectionRequired:"Minimum {min} selections required",multipleFiles:"Multiple Files",name:"Name",no:"No",noFieldsToClear:"There are no fields to clear",number:"Number",off:"Off",on:"On",option:"Option",optionCount:"Option {count}",options:"Options",optional:"optional",optionLabelPlaceholder:"Label",optionValuePlaceholder:"Value",optionEmpty:"Option value required",other:"Other",paragraph:"Paragraph",placeholder:"Placeholder","placeholders.value":"Value","placeholders.label":"Label","placeholders.email":"Enter your email","placeholders.className":"space separated classes","placeholders.password":"Enter your password",preview:"Preview",radioGroup:"Radio Group",radio:"Radio",removeMessage:"Remove Element",removeOption:"Remove Option",remove:"×",required:"Required",requireValidOption:"Only accept a pre-defined Option",richText:"Rich Text Editor",roles:"Access",rows:"Rows",save:"Save",selectOptions:"Options",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",size:"Size","size.xs":"Extra Small","size.sm":"Small","size.m":"Default","size.lg":"Large",style:"Style","styles.btn.default":"Default","styles.btn.danger":"Danger","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",text:"Text Field",textArea:"Text Area",toggle:"Toggle",warning:"Warning!",value:"Value",viewJSON:"[{…}]",viewXML:"</>",yes:"Yes"});const we={actionButtons:[],allowStageSort:!0,append:!1,controlOrder:["autocomplete","button","checkbox-group","checkbox","date","file","header","hidden","number","paragraph","radio-group","select","text","textarea"],controlPosition:"right",dataType:"json",defaultFields:[],disabledActionButtons:[],disabledAttrs:[],disabledFieldButtons:{},disabledSubtypes:{},disableFields:[],disableHTMLLabels:!1,disableInjectedStyle:!1,editOnAdd:!1,fields:[],fieldRemoveWarn:!1,fieldEditContainer:null,inputSets:[],notify:{error:e=>{console.log(e)},success:e=>{console.log(e)},warning:e=>{console.warn(e)}},onAddField:(e,t)=>t,onAddFieldAfter:(e,t)=>t,onAddOption:e=>e,onClearAll:ge,onCloseFieldEdit:ge,onOpenFieldEdit:ge,onSave:ge,persistDefaultFields:!1,prepend:!1,replaceFields:[],roles:{1:"Administrator"},sanitizerOptions:{clobberingProtection:{document:!1,form:!1},backendOrder:[]},scrollToFieldOnAdd:!0,showActionButtons:!0,sortableControls:!1,stickyControls:{enable:!0,offset:{top:5,bottom:"auto",right:"auto"}},subtypes:{},templates:{},typeUserAttrs:{},typeUserDisabledAttrs:{},typeUserEvents:{},defaultGridColumnClass:"col-md-12",cancelGridModeDistance:100,enableColumnInsertMenu:!1,enableEnhancedBootstrapGrid:!1},ve={btn:["default","danger","info","primary","success","warning"]},ye={location:"assets/lang/"},xe={},Ae={rowWrapperClass:"rowWrapper",colWrapperClass:"colWrapper",tmpRowPlaceholderClass:"tempRowWrapper",invisibleRowPlaceholderClass:"invisibleRowPlaceholder"};var Ce=o(54),Oe=o.n(Ce);const ke=["values"],je=["label","events"],Ee=["actionButtons","replaceFields"];function Se(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}class Ne{constructor(e,t,r){this.data=p[e],this.d=n[e],this.config=xe[e],this.doCancel=!1,this.layout=t,this.handleKeyDown=this.handleKeyDown.bind(this),this.formBuilder=r,this.toastTimer=null}startMoving(e,t){t.item.show().addClass("moving"),this.doCancel=!0,this.from=t.item.parent()}stopMoving(t,r){const o=this;r.item.removeClass("moving"),o.doCancel&&(r.sender&&e(r.sender).sortable("cancel"),this.from.closest(".frmb-control").sortable("cancel")),o.save(),o.doCancel=!1}beforeStop(e,t){const r=this,o=this.config.opts,i=r.d.stage.childNodes.length-1,n=[];r.stopIndex=t.placeholder.closest("ul.stage-wrap > *").index()-1,!o.sortableControls&&t.item.parent().hasClass("frmb-control")&&n.push(!0),n.push(t.item.is(":not(li.input-control,li.input-set-control)")&&!t.item.parent().hasClass("frmb-control")),o.prepend&&n.push(0===r.stopIndex),o.append&&n.push(r.stopIndex+1===i),r.doCancel=n.some((e=>!0===e))}getTypes(t){const r={type:t.attr("type")},o=e(".fld-subtype",t).val();return o!==r.type&&(r.subtype=o),r}fieldOptionData(t){const r=[],o=e(".sortable-options li",t);return o.each((e=>{const t=o[e],i=t.querySelectorAll("input[type=text], input[type=number], select"),n=t.querySelectorAll("input[type=checkbox], input[type=radio]"),l={};X(i,(e=>{const t=i[e],r=t.dataset.attr;l[r]=t.value})),X(n,(e=>{const t=n[e],r=t.getAttribute("data-attr");l[r]=t.checked})),r.push(l)})),r}xmlSave(e){const t=this.prepData(e),r=new XMLSerializer,o=[""];t.forEach((e=>{const{values:t}=e;let r=[`{let[t,r]=e;return`${P(t)}="${r}"`})).join(" ")}>`];var i;if(c.includes(e.type)){const e=t.map((e=>q("option",e.label,e).outerHTML));r=r.concat(e)}r.push(""),o.push(r)})),o.push("");const i=q("form-template",I(o).join(""));return r.serializeToString(i)}prepData(t){const r=[],o=this.d,i=this,n=this.config;if(0!==t.childNodes.length){const l=[];X(t.childNodes,(function(t,r){e(r).find("li.form-field").each((function(e,t){l.push(t)}))})),X(t.childNodes,(function(t,r){const o=e(r);o.is("li")&&o.hasClass("form-field")&&l.push(r)})),l.length&&l.forEach((t=>{const l=e(t);if(!l.hasClass("disabled-field")){let a=i.getTypes(l);const s=e(".roles-field:checked",t),d=s.map((e=>s[e].value)).get();if(a=Object.assign({},a,i.getAttrVals(t)),a.subtype)if("quill"===a.subtype){const e=`${a.name}-preview`;if(window.fbEditors.quill[e]){const t=window.fbEditors.quill[e].instance.getContents();a.value=window.JSON.stringify(t.ops)}}else if("tinymce"===a.subtype&&window.tinymce){const e=`${a.name}-preview`,t=window.tinymce.get(e);t&&(a.value=t.getContent())}if(d.length&&(a.role=d.join(",")),a.className=a.className||a.class,a.className&&"true"==l.attr("addeddefaultcolumnclass")&&1==l.closest(this.formBuilder.rowWrapperClassSelector).children().length&&a.className.includes(n.opts.defaultGridColumnClass)){const e=de(a.className);e&&e.length>0&&e.forEach((e=>{a.className=a.className.replace(e,"").trim()}))}if(a.className){const e=new RegExp("(?:^|\\s)btn-("+ve.btn.join("|")+")(?:\\s|$)","g").exec(a.className);e&&(a.style=e[1])}a=T(a),a.type&&a.type.match(o.optionFieldsRegEx)&&(a.values=i.fieldOptionData(l)),r.push(a)}}))}return r}getData(e){const t=this.data;if(e||(e=this.config.opts.formData),!e)return!1;const r={xml:e=>Array.isArray(e)?e:$(e),json:e=>"string"==typeof e?window.JSON.parse(e):e};return t.formData=r[this.config.opts.dataType](e)||[],t.formData}save(e){void 0===e&&(e=!1);const t=this,r=this.data,o=this.d.stage,i={xml:()=>t.xmlSave(o),json:e=>window.JSON.stringify(t.prepData(o),null,e&&" ")};return r.formData=i[this.config.opts.dataType](e),document.dispatchEvent(w.formSaved),r.formData}incrementId(e){const t=e.lastIndexOf("-"),r=parseInt(e.substring(t+1))+1;return`${e.substring(0,t)}-${r}`}getAttrVals(t){const r=this.config,o=Object.create(null),i=t.querySelectorAll('[class*="fld-"]');return X(i,(t=>{const n=i[t],l=B(n.getAttribute("name"));o[l]=[[n.attributes.contenteditable,()=>"xml"===r.opts.dataType?J(n.innerHTML):n.innerHTML],["checkbox"===n.type,()=>n.checked],["number"===n.type&&""!==n.value,()=>Number(n.value)],[n.attributes.multiple,()=>e(n).val()],[!0,()=>n.value]].find((e=>{let[t]=e;return!!t}))[1]()})),o}updatePreview(t){const r=this,o=this.d,i=t.attr("class"),n=t[0];if(i.includes("input-control"))return;const l=t.attr("type"),a=e(".prev-holder",n);let d=Object.assign({},r.getAttrVals(n),{type:l});l.match(o.optionFieldsRegEx)&&(d.values=[],d.multiple=e('[name="multiple"]',n).is(":checked"),e(".sortable-options li",n).each((function(t,r){const o={selected:e(".option-selected",r).is(":checked"),value:e(".option-value",r).val(),label:e(".option-label",r).val()};d.values.push(o)}))),d=T(d,!0),d.className=r.classNames(n,d),t.data("fieldData",d);const c=r.formBuilder.controls.custom.lookup(d.type),f=r.formBuilder.controls.custom.getClass(d.type),u=c?c.class:f||me.getClass(d.type,d.subtype),p=this.layout.build(u,d);s(a[0]),a[0].appendChild(p),p.dispatchEvent(w.fieldRendered)}disabledTT(e){const t=e.querySelectorAll(".disabled-field");X(t,(e=>{const r=t[e],o=h().get("fieldNonEditable");if(o){const e=q("p",o,{className:"frmb-tt"});r.appendChild(e),r.addEventListener("mousemove",(t=>((e,t)=>{const r=t.field.getBoundingClientRect(),o=e.clientX-r.left-21,i=e.clientY-r.top-t.tt.offsetHeight-12;t.tt.style.transform=`translate(${o}px, ${i}px)`})(t,{tt:e,field:r})))}}))}classNames(t,r){const o=t.querySelector(".fld-className"),i=t.querySelector(".btn-style"),n=i&&i.value;if(!o)return;const{type:l}=r,a=o.multiple?e(o).val():o.value.trim().split(" "),s={button:"btn",submit:"btn"}[l];if(s&&n){for(let e=0;e{let{target:t}=e;return this.closeConfirm(t)}),!1),document.addEventListener("keydown",this.handleKeyDown,!1),e}confirm(e,t,r,o){void 0===r&&(r=!1),void 0===o&&(o="");const i=this,n=h().current,l=i.showOverlay(),a=q("button",n.yes,{className:"yes btn btn-success btn-sm"}),s=q("button",n.no,{className:"no btn btn-danger btn-sm"});s.onclick=function(){i.closeConfirm(l)},a.onclick=function(){t(),i.closeConfirm(l)};const d=q("div",[s,a],{className:"button-wrap"}),c=q("div",[e,d],{className:o="form-builder-dialog "+o});if(r)c.classList.add("positioned");else{const e=document.documentElement;r={pageX:Math.max(e.clientWidth,window.innerWidth||0)/2,pageY:Math.max(e.clientHeight,window.innerHeight||0)/2},c.style.position="fixed"}return c.style.left=r.pageX+"px",c.style.top=r.pageY+"px",document.body.appendChild(c),a.focus(),c}dialog(e,t,r){void 0===t&&(t=!1),void 0===r&&(r="");const o=document.documentElement.clientWidth,i=document.documentElement.clientHeight;this.showOverlay();const n=q("div",e,{className:r="form-builder-dialog "+r});return t?n.classList.add("positioned"):(t={pageX:Math.max(o,window.innerWidth||0)/2,pageY:Math.max(i,window.innerHeight||0)/2},n.style.position="fixed"),n.style.left=t.pageX+"px",n.style.top=t.pageY+"px",document.body.appendChild(n),document.dispatchEvent(w.modalOpened),-1!==r.indexOf("data-dialog")&&document.dispatchEvent(w.viewData),n}confirmRemoveAll(t){const r=this,o=this.config,i=t.target.id.match(/frmb-\d{13}/)[0],n=document.getElementById(i),l=h().current,a=e("li.form-field",n),s=t.target.getBoundingClientRect(),d=document.body.getBoundingClientRect(),c={pageX:s.left+s.width/2,pageY:s.top-d.top-12};a.length?r.confirm(l.clearAllMessage,(()=>{r.removeAllFields.call(r,n),o.opts.persistDefaultFields&&o.opts.defaultFields?this.addDefaultFields():o.opts.notify.success(l.allFieldsRemoved),o.opts.onClearAll()}),c):r.dialog(l.noFieldsToClear,c)}addDefaultFields(){this.config.opts.defaultFields.forEach((e=>this.formBuilder.prepFieldVars(e))),this.d.stage.classList.remove("empty")}removeAllFields(e){const t=h().current,r=this.config.opts,o=[];e.querySelectorAll(this.formBuilder.fieldSelector).length&&(r.prepend&&o.push(!0),r.append&&o.push(!0),o.some(Boolean)||(e.classList.add("empty"),e.dataset.content=t.getStarted),this.emptyStage(e))}emptyStage(e){s(e).classList.remove("removing"),e.dispatchEvent(w.stageEmptied),this.save()}stageIsEmpty(){return 0===e(this.d.stage).find("li").length}setFieldOrder(t){if(!this.config.opts.sortableControls)return!1;const r=window.JSON,o=[];return t.children().each(((t,r)=>{const i=e(r).data("type");i&&o.push(i)})),Oe()("sessionStorage")&&window.sessionStorage.setItem("fieldOrder",r.stringify(o)),o}closeAllEdit(){e(this.d.stage).find("li.form-field").each(((e,t)=>{this.closeField(t.id,!1)}))}toggleEdit(t,r){void 0===r&&(r=!0);const o=document.getElementById(t);if(o)return e(o).hasClass("editing")?this.closeField(t,r):this.openField(t,r)}closeField(t,r){void 0===r&&(r=!0);const o=this,i=document.getElementById(t);if(!i)return i;const n=e(".frm-holder",i),l=e(".prev-holder",i);let a=!1;if(e(i).hasClass("editing")&&(a=!0),!a)return i;i.classList.toggle("editing"),e(".toggle-form",i).toggleClass("open"),r?(l.slideToggle(250),n.slideToggle(250)):(l.toggle(),n.toggle()),this.updatePreview(e(i));const s=e(`#${t}`),d=e(`#${t}-cont`);d.append(s),this.removeContainerProtection(d.attr("id")),this.config.opts.onCloseFieldEdit(n[0]),document.dispatchEvent(w.fieldEditClosed);const c=s.find(".prev-holder"),f=setTimeout((()=>{clearTimeout(f),o.tmpCleanPrevHolder(c).forEach((e=>{if(e.columnInfo.columnSize){const t=o.getBootstrapColumnClass(d.attr("class"));t!==e.columnInfo.columnSize&&(d.removeClass(t).addClass(e.columnInfo.columnSize),o.tmpCleanPrevHolder(c))}}))}),300);return i}openField(t,r){void 0===r&&(r=!0);const o=document.getElementById(t);if(!o)return o;const i=e(".frm-holder",o),n=e(".prev-holder",o);let l=!1;if(e(o).hasClass("editing")&&(l=!0),l)return o;o.classList.toggle("editing"),e(".toggle-form",o).toggleClass("open"),r?(n.slideToggle(250),i.slideToggle(250)):(n.toggle(),i.toggle()),this.updatePreview(e(o));const a=e(`#${t}`),s=e(`#${t}-cont`),d=s.closest(this.formBuilder.rowWrapperClassSelector);return this.formBuilder.preserveTempContainers.push(s.attr("id")),a.insertAfter(d),this.formBuilder.currentEditPanel=i[0],this.config.opts.onOpenFieldEdit(i[0]),document.dispatchEvent(w.fieldEditOpened),e(document).trigger("fieldOpened",[{rowWrapperID:d.attr("id")}]),o}getStyle(e,t){let r;return void 0===t&&(t=!1),window.getComputedStyle?r=window.getComputedStyle(e,null):e.currentStyle&&(r=e.currentStyle),t?r[t]:r}showData(){const e=J(this.getFormData(this.config.opts.dataType,!0)),t=q("code",e,{className:`formData-${this.config.opts.dataType}`});this.dialog(q("pre",t),!1,"data-dialog")}removeField(t,r){void 0===r&&(r=250);let o=!1;const i=this,n=this.d.stage,l=n.getElementsByClassName("form-field");if(!l.length)return this.config.opts.notify.warning("No fields to remove"),!1;if(!t){const e=[].slice.call(l).map((e=>e.id));this.config.opts.notify.warning("fieldID required to remove specific fields."),this.config.opts.notify.warning("Removing last field since no ID was supplied."),this.config.opts.notify.warning("Available IDs: "+e.join(", ")),t=e[e.length-1]}const a=document.getElementById(t);if(!a)return this.config.opts.notify.warning("Field not found"),!1;const s=e(a),d=s.closest(this.formBuilder.rowWrapperClassSelector);s.slideUp(r,(function(){s.removeClass("deleting"),s.remove(),o=!0,i.save(),n.childNodes.length||(n.classList.add("empty"),n.dataset.content=h().current.getStarted)}));const c=Object.assign({},this.config.opts.typeUserEvents["*"],this.config.opts.typeUserEvents[a.type]);if(c&&c.onremove&&c.onremove(a),document.dispatchEvent(w.fieldRemoved),d.length){this.removeContainerProtection(`${t}-cont`);const r=setTimeout((()=>{clearTimeout(r),e(document).trigger("checkRowCleanup",[{rowWrapperID:d.attr("id")}])}),333)}return o}processActionButtons(e){const{label:t,events:r}=e,o=Se(e,je);let i=t;const n=this.data;i=i?h().current[i]||i:o.id?h().current[o.id]||ee(o.id):"",o.id?o.id=`${n.formID}-${o.id}-action`:o.id=`${n.formID}-action-${Math.round(1e3*Math.random())}`;const l=q("button",i,o);if(r)for(const e in r)r.hasOwnProperty(e)&&l.addEventListener(e,(t=>r[e](t)));return l}processSubtypes(e){const t=this.config.opts.disabledSubtypes;for(const t in e)e.hasOwnProperty(t)&&me.register(e[t],me.getClass(t),t);const r=me.getRegisteredSubtypes(),o=Object.entries(r).reduce(((e,r)=>{let[o,i]=r;return e[o]=t[o]&&ae(t[o],i)||i,e}),{}),i={};for(const e in o)if(o.hasOwnProperty(e)){const t=[];for(const r of o[e]){const o=me.getClass(e,r),i=o.mi18n(`subtype.${r}`)||o.mi18n(r)||r;t.push({label:i,value:r})}i[e]=t}return i}editorUI(e,t){const r=this.d,o=this.data,i=e||o.formID,n="left"===(t||"")?"controls-left":"controls-right";r.editorWrap=q("div",null,{id:`${o.formID}-form-wrap`,className:`form-wrap form-builder formbuilder-embedded-bootstrap ${ie()} ${n}`}),r.stage=q("ul",null,{id:i,className:"frmb stage-wrap"}),r.controls=q("ul",null,{id:`${i}-control-box`,className:"frmb-control"});const l=this.formActionButtons();r.formActions=q("div",l,{className:"form-actions btn-group"})}formActionButtons(){const e=this.config.opts;return e.actionButtons.map((t=>{if(t.id&&-1===e.disabledActionButtons.indexOf(t.id))return this.processActionButtons(t)})).filter(Boolean)}processOptions(e){const t=this,{actionButtons:r,replaceFields:o}=e,i=Se(e,Ee);let n=i.fieldEditContainer;"string"==typeof i.fieldEditContainer&&(n=document.querySelector(i.fieldEditContainer));const l=[{type:"button",id:"clear",className:"clear-all btn btn-danger",events:{click:t.confirmRemoveAll.bind(t)}},{type:"button",label:"viewJSON",id:"data",className:"btn btn-default get-data",events:{click:t.showData.bind(t)}},{type:"button",id:"save",className:"btn btn-primary save-template",events:{click:e=>{t.save(),t.config.opts.onSave(e,t.data.formData)}}}].concat(r);return i.fields=i.fields.concat(o),i.disableFields=i.disableFields.concat(o.map((e=>{let{type:t}=e;return t&&t}))),"xml"===i.dataType&&(i.disableHTMLLabels=!0),t.config.opts=Object.assign({},{actionButtons:l},{fieldEditContainer:n},i),t.config.opts}input(e){return void 0===e&&(e={}),q("input",null,e)}getFormData(e,t){void 0===e&&(e="js"),void 0===t&&(t=!1);const r=this,o={js:()=>r.prepData(r.d.stage),xml:()=>r.xmlSave(r.d.stage),json:e=>window.JSON.stringify(r.prepData(r.d.stage),null,e&&" ")};return o[e](t)}tmpCleanPrevHolder(t){const r=this,o=[],i=t.find(".form-group");function n(e){const t=e.attr("class");if(void 0!==t&&!1!==t){const t=r.tryParseColumnInfo(e[0]);e.attr("class",e.attr("class").replace("__fb-tmp-col-","col-")),e.attr("class",e.attr("class").replace("__fb-tmp-row-","row-")),e.attr("class",e.attr("class").replace("col-","__fb-tmp-col-")),e.attr("class",e.attr("class").replace("row-","__fb-tmp-row-"));const i={};i.field=e,i.columnInfo=t,o.push(i)}}return n(i),i.find("*").each((function(t,r){n(e(r))})),o}tryParseColumnInfo(e){const t={};if(e.className){const r=de(e.className);r&&r.length>0&&r.forEach((e=>{e.startsWith("row-")?t.rowUniqueId=e.replace("row-","").trim():t.columnSize=e}))}return t}removeContainerProtection(e){const t=this.formBuilder.preserveTempContainers.indexOf(e);-1!==t&&this.formBuilder.preserveTempContainers.splice(t,1)}toggleHighlight(e,t){void 0===t&&(t=600),e.addClass("moveHighlight"),setTimeout((function(){e.removeClass("moveHighlight")}),t)}showToast(t,r){void 0===r&&(r=3e3),null!=this.toastTimer&&(window.clearTimeout(this.toastTimer),this.toastTimer=null),this.toastTimer=setTimeout((function(){e(".snackbar").removeClass("show")}),r),e(".snackbar").addClass("show").html(t)}getDistanceBetweenPoints(e,t,r,o){const i=r-e,n=o-t;return Math.floor(Math.sqrt(n*n+i*i))}getRowClass(e){if(e){const t=e.split(" ").filter((e=>e.startsWith("row-")));if(t&&t.length>0)return t[0]}return""}getRowValue(e){if(e){const t=this.getRowClass(e);if(t)return t.split("-")[1]}return"0"}changeRowClass(e,t){const r=this.getRowClass(e);return e.replace(r,`row-${t}`)}getBootstrapColumnValue(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return parseInt(t.split("-")[2])}return 0}getBootstrapColumnPrefix(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return`${t.split("-")[0]}-${t.split("-")[1]}`}return""}getBootstrapColumnClass(e){if(e){const t=e.split(" ").filter((e=>se.test(e)));if(t&&t.length>0)return t[0]}return""}changeBootstrapClass(e,t){const r=this.getBootstrapColumnClass(e);return e.replace(r,`${this.getBootstrapColumnPrefix(e)}-${t}`)}syncBootstrapColumnWrapperAndClassProperty(t,r){const o=e(`#${t}-cont`);o.attr("class",this.changeBootstrapClass(o.attr("class"),r));const i=e(`#className-${t}`);i.val()&&i.val(this.changeBootstrapClass(i.val(),r))}}const Te=["values","type"];me.register("autocomplete",class extends me{static get definition(){return{mi18n:{requireValidOption:"requireValidOption"}}}build(){const e=this.config,{values:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Te),i=e=>{const t=e.target.nextSibling.nextSibling,r=e.target.nextSibling,o=this.getActiveOption(t);let i=new Map([[38,()=>{const e=this.getPreviousOption(o);e&&this.selectOption(t,e)}],[40,()=>{const e=this.getNextOption(o);e&&this.selectOption(t,e)}],[13,()=>{o?(e.target.value=o.innerHTML,r.value=o.getAttribute("value"),"none"===t.style.display?this.showList(t,o):this.hideList(t)):this.config.requireValidOption&&(this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")),e.preventDefault()}],[27,()=>{this.hideList(t)}]]).get(e.keyCode);return i||(i=()=>!1),i()},n={focus:e=>{const t=e.target.nextSibling.nextSibling,r=d(t.querySelectorAll("li"),e.target.value);if(e.target.addEventListener("keydown",i),e.target.value.length>0){const e=r.length>0?r[r.length-1]:null;this.showList(t,e)}},blur:e=>{e.target.removeEventListener("keydown",i);const t=setTimeout((()=>{e.target.nextSibling.nextSibling.style.display="none",clearTimeout(t)}),200);if(this.config.requireValidOption){const t=e.target.nextSibling.nextSibling;this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")}},input:e=>{const t=e.target.nextSibling.nextSibling;e.target.nextSibling.value=e.target.value;const r=d(t.querySelectorAll("li"),e.target.value);if(0==r.length)this.hideList(t);else{let e=this.getActiveOption(t);e||(e=r[r.length-1]),this.showList(t,e)}}},l=Object.assign({},o,{id:`${o.id}-input`,autocomplete:"off",events:n}),a=Object.assign({},o,{type:"hidden"});delete l.name;const s=[this.markup("input",null,l),this.markup("input",null,a)],c=t.map((e=>{const t=e.label,r={events:{click:t=>{const r=t.target.parentElement,o=r.previousSibling.previousSibling;o.value=e.label,o.nextSibling.value=e.value,this.hideList(r)}},value:e.value};return this.markup("li",t,r)}));return s.push(this.markup("ul",c,{id:`${o.id}-list`,className:`formbuilder-${r}-list`})),s}hideList(e){this.selectOption(e,null),e.style.display="none"}showList(e,t){this.selectOption(e,t),e.style.display="block",e.style.width=e.parentElement.offsetWidth+"px"}getActiveOption(e){const t=e.getElementsByClassName("active-option")[0];return t&&"none"!==t.style.display?t:null}getPreviousOption(e){let t=e;do{t=t?t.previousSibling:null}while(null!=t&&"none"===t.style.display);return t}getNextOption(e){let t=e;do{t=t?t.nextSibling:null}while(null!=t&&"none"===t.style.display);return t}selectOption(e,t){const r=e.querySelectorAll("li");for(let e=0;e=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Re);let o=t;const i={paragraph:"p",header:this.subtype};return i[t]&&(o=i[t]),{field:this.markup(o,ue.parsedHtml(this.label),r),layout:"noLabel"}}}me.register(["paragraph","header"],Ie),me.register(["p","address","blockquote","canvas","output"],Ie,"paragraph"),me.register(["h1","h2","h3","h4","h5","h6"],Ie,"header");const Me=["values","value","placeholder","type","inline","other","toggle"],Pe=["label"];function Be(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}me.register(["select","checkbox-group","radio-group","checkbox"],class extends me{static get definition(){return{inactive:["checkbox"],mi18n:{minSelectionRequired:"minSelectionRequired"}}}build(){const e=[],t=this.config,{values:r,value:o,placeholder:i,type:n,inline:l,other:a,toggle:s}=t,d=Be(t,Me),c=n.replace("-group",""),f="select"===n;if((d.multiple||"checkbox-group"===n)&&(d.name=d.name+"[]"),"checkbox-group"===n&&d.required){const e=this,t=this.onRender.bind(this);this.onRender=function(){t(),e.groupRequired()}}if(delete d.title,r){i&&f&&e.push(this.markup("option",i,{disabled:!0,selected:!0,value:""}));for(let t=0;t{const t=e.target;t.parentElement.previousElementSibling.value=t.value}},id:`${t.id}-value`,className:"other-val"},n=this.markup("input",null,o),a=[document.createTextNode(me.mi18n("other")),this.markup("input",null,i)],s=this.markup("label",a,{for:o.id}),f=this.markup("div",[n,s],{className:r});e.push(f)}}return this.dom="select"==n?this.markup(c,e,T(d,!0)):this.markup("div",e,{className:n}),this.dom}groupRequired(){const e=this.element.getElementsByTagName("input"),t=()=>{const t=[].some.call(e,(e=>e.checked));((e,t)=>{[].forEach.call(e,(e=>{t?e.removeAttribute("required"):e.setAttribute("required","required"),((e,t)=>{const r=me.mi18n("minSelectionRequired",1);t?e.setCustomValidity(""):e.setCustomValidity(r)})(e,t)}))})(e,t)};for(let r=e.length-1;r>=0;r--)e[r].addEventListener("change",t);t()}onRender(){if(this.config.userData){const t=this.config.userData.slice();"select"===this.config.type?e(this.dom).val(t).prop("selected",!0):this.config.type.endsWith("-group")&&("checkbox-group"===this.config.type&&this.dom.querySelectorAll("input[type=checkbox]").forEach((e=>{e.removeAttribute("checked")})),this.dom.querySelectorAll("input").forEach((e=>{if(!e.classList.contains("other-val")){for(let r=0;r0){const r=this.dom.querySelector(`#${e.id}-value`);e.setAttribute("checked","checked"),r.value=e.value=t[0],r.style.display="inline-block"}}})))}}});class Fe extends me{static get definition(){return{mi18n:{date:"dateField",file:"fileUpload"}}}build(){let{name:e}=this.config;e=this.config.multiple?`${e}[]`:e;const t=Object.assign({},this.config,{name:e});return this.dom=this.markup("input",null,t),this.dom}onRender(){this.config.userData&&e(this.dom).val(this.config.userData[0])}}me.register(["text","file","date","number"],Fe),me.register(["text","password","email","color","tel"],Fe,"text"),me.register(["date","time","datetime-local"],Fe,"date"),me.register(["number","range"],Fe,"number");const He=["value"];class qe extends me{static get definition(){return{mi18n:{textarea:"textArea"}}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,He);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),this.field}onRender(){this.config.userData&&e(this.field).val(this.config.userData[0])}on(t){return"prerender"==t&&this.preview?t=>{this.field&&(t=this.field),e(t).on("mousedown",(e=>{e.stopPropagation()}))}:super.on(t)}}me.register("textarea",qe),me.register("textarea",qe,"textarea");const ze=["value"];qe.register("tinymce",class extends qe{configure(){if(this.js=[],window.tinymce||this.js.push("https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js"),this.classConfig.js){let e=this.classConfig.js;Array.isArray(e)||(e=new Array(e)),this.js=this.js.concat(e),delete this.classConfig.js}this.classConfig.css&&(this.css=this.classConfig.css),this.editorOptions={height:250,paste_data_images:!0,plugins:["advlist","autolink","lists","link","image","charmap","print","preview","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","contextmenu","paste","code"],toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | table"}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ze);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),r.disabled&&(this.editorOptions.readonly=!0),this.field}onRender(){const e=window.tinymce.get(this.id);e&&window.tinymce.remove(e);const t=jQuery.extend(this.editorOptions,this.classConfig);t.target=this.field;const r=[];Number(window.tinymce.majorVersion)>=5&&r.push("contextmenu"),Number(window.tinymce.majorVersion)>=6&&r.push("paste","print"),t.plugins=t.plugins.filter((e=>-1===r.indexOf(e)));const o=this.config.userData?this.parsedHtml(this.config.userData[0]):void 0,i=window.lastFormBuilderCopiedTinyMCE?this.parsedHtml(window.lastFormBuilderCopiedTinyMCE):void 0;window.lastFormBuilderCopiedTinyMCE=null;const n=function(e){i?e[0].setContent(i):o&&e[0].setContent(o)};setTimeout((()=>{window.tinymce.init(t).then(n)}),0)}},"textarea");const Ue=["value"];function We(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function $e(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Ue);return delete r.type,this.field=this.markup("div",null,r),this.field.classList.contains("form-control")&&this.field.classList.remove("form-control"),this.field}onRender(e){const t=this.config.value||"",r=window.Quill.import("delta");window.fbEditors.quill[this.id]={};const o=window.fbEditors.quill[this.id];return o.instance=new window.Quill(this.field,this.editorConfig),o.data=new r,t&&o.instance.setContents(window.JSON.parse(this.parsedHtml(t))),o.instance.on("text-change",(function(e){o.data=o.data.compose(e)})),e}},"textarea");class Ve{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),this.customRegister={},this.templateControlRegister={},this.def={icon:{},i18n:{}},this.register(e,t)}register(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);const r=h().locale;this.def.i18n[r]||(this.def.i18n[r]={});const o=this;Object.keys(e).forEach((t=>{const r=function(r,o){this.customControl=new Le(r,o,e[t]),this.build=function(){return this.customControl.build()},this.on=function(e){return this.customControl.on(e)}};r.definition={},r.label=e=>o.label(e),r.icon=e=>o.icon(e),this.templateControlRegister[t]=r}));for(const o of t){let t=o.type;if(o.attrs=o.attrs||{},!t){if(!o.attrs.type){me.error("Ignoring invalid custom field definition. Please specify a type property.");continue}t=o.attrs.type}let i=o.subtype||t;if(e[t]){const e=this.templateControlRegister[t];e.definition=o,this.customRegister[i]=jQuery.extend(o,{type:t,class:e})}else{const e=me.getClass(t,o.subtype);if(!e){super.error("Error while registering custom field: "+t+(o.subtype?":"+o.subtype:"")+". Unable to find any existing defined control or template for rendering.");continue}i=o.datatype?o.datatype:`${t}-${Math.floor(9e3*Math.random()+1e3)}`,this.customRegister[i]=jQuery.extend(o,{type:t,class:e})}this.def.i18n[r][i]=o.label,this.def.icon[i]=o.icon}}label(e){const t=this.definition;let r=t.i18n||{};r=r[h().locale]||r.default||r;const o=me.camelCase(e),i="object"==typeof r?r[o]||r[e]:r;if(i)return i;{let r=t.mi18n;return"object"==typeof r&&(r=r[o]||r[e]),r||(r=o),h().get(r)}}get definition(){return{}}icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}getRegistered(e){var t;return void 0===e&&(e=!1),e?null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0:Object.keys(this.customRegister)}getClass(e){var t;return null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0}lookup(e){return this.customRegister[e]}}var Je=JSON.parse('{"Rp":"formbuilder-icon-"}');const Ge=Je.Rp;class Xe{constructor(e,t){this.opts=e,this.dom=t.controls,this.getRegistered=me.getRegistered,this.init()}init(){this.setupControls(),this.appendControls()}setupControls(){const e=this.opts;me.loadCustom(e.controls),this.custom=new Ve(e.templates,e.fields);const t=me.getRegistered(),r=this.custom.getRegistered();r&&jQuery.merge(t,r),this.registeredSubtypes=me.getRegisteredSubtypes(),e.sortableControls&&this.dom.classList.add("sort-enabled"),this.controlList=[],this.allControls={};for(let e=0;e${n}${l}`);const s=q("li",q("span",l),{className:`${a} input-control input-control-${e}`});s.dataset.type=r,this.controlList.push(r),this.allControls[r]=s}e.inputSets.length&&e.inputSets.forEach(((e,t)=>{let{name:r,label:o}=e;r=r||P(o),e.icon&&(o=`${e.icon}${o}`);const i=q("li",q("span",o),{className:`input-set-control input-set-${t}`});i.dataset.type=r,this.controlList.push(r),this.allControls[r]=i}))}orderFields(e){const t=this.opts,r=t.controlOrder.concat(e);let o;return Oe()("sessionStorage")&&(t.sortableControls?o=window.sessionStorage.getItem("fieldOrder"):window.sessionStorage.removeItem("fieldOrder")),o?(o=window.JSON.parse(o),o=Q(o.concat(e)),o=Object.keys(o).map((e=>o[e]))):o=Q(r),o.forEach((e=>{const t=new RegExp("-[\\d]{4}$");if(e.match(t)){const r=o.indexOf(e.replace(t,""));-1!==r&&(o.splice(o.indexOf(e),1),o.splice(r+1,o.indexOf(e),e))}})),t.disableFields.length&&(o=o.filter((e=>!t.disableFields.includes(e)))),o.filter(Boolean)}appendControls(){const e=document.createDocumentFragment();s(this.dom),this.orderFields(this.controlList).forEach((t=>{const r=this.allControls[t];r&&e.appendChild(r)})),this.dom.appendChild(e)}getClass(e,t){return this.custom.getClass(e)||me.getClass(e,t)}}const Qe=["class","className"],Ze=["multiple","options","label","value","class","className"],Ye=["class","className"],Ke=["tag","content"],_e=["i18n"];function et(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function rt(e){for(var t=1;t{let[r,o]=t;return S(S({},e),{},{[`${r}Selector`]:`.${o}`})}),{}));var ut;function pt(e,t,o){const i=this,n=h().current,l=`frmb-${Date.now()}`,s=new m(l),d=new u(l),c=xe[l]={};let f=[];i.preserveTempContainers=[],i.rowWrapperClassSelector=st,i.colWrapperClassSelector=dt,i.colWrapperClass=nt,i.fieldSelector=e.enableEnhancedBootstrapGrid?st:"li.form-field",(e=>{if("object"!=typeof e)throw"Invalid value given to setSanitizerConfig, expected config object";if(e.hasOwnProperty("clobberingProtection")&&["document","form","namespaceAttributes"].forEach((t=>{e.clobberingProtection.hasOwnProperty(t)&&"boolean"==typeof e.clobberingProtection[t]&&(v.clobberingProtection[t]=e.clobberingProtection[t])})),e.hasOwnProperty("backends")){if("object"!=typeof e.backends)throw"backends config expected to be an Object";Object.keys(e.backends).forEach((t=>v.backends[t]=e.backends[t]))}if(e.hasOwnProperty("backendOrder")){if(v.backendOrder=[],!Array.isArray(e.backendOrder))throw"backendOrder config expected to be an Array of backend keys as strings";e.backendOrder.forEach((e=>{if(!v.backends.hasOwnProperty(e))throw"unknown sanitizer backend "+e;v.backendOrder.push(e)}))}})(e.sanitizerOptions),o(t).closest("form").length&&e.notify.warning("WARNING: FormBuilder does not support being contained with a
Element"),e.layout||(e.layout=he);const p=new e.layout(e.layoutTemplates,!0,e.disableHTMLLabels,e.controlConfig),b=new Ne(l,p,i),g=q;e=b.processOptions(e),b.editorUI(l,e.controlPosition),s.formID=l,s.lastID=`${s.formID}-fld-0`;const y=new Xe(e,d);i.controls=y;const x=c.subtypes=b.processSubtypes(e.subtypes),A=o(d.stage),C=o(d.controls);let k,j,E=!1,S=!1,N=!1;function D(){return!!e.enableEnhancedBootstrapGrid}A.sortable({cursor:"move",opacity:.9,revert:150,beforeStop:(e,t)=>b.beforeStop.call(b,e,t),start:(e,t)=>b.startMoving.call(b,e,t),stop:(e,t)=>b.stopMoving.call(b,e,t),change:function(t,r){e.prepend&&r.placeholder.index()<1?o("li.form-prepend").after(r.placeholder):e.append&&r.placeholder.index()>=A.children("li").length-1&&o("li.form-append").before(r.placeholder)},cancel:["input","select","textarea",".disabled-field",".form-elements",".btn","button",".is-locked"].join(", "),placeholder:"frmb-placeholder hoverDropStyleInverse"}),e.allowStageSort||A.sortable("disable"),C.sortable({helper:"clone",opacity:.9,connectWith:`#${l}, ${st}`,cancel:".formbuilder-separator",cursor:"move",scroll:!1,placeholder:"hoverDropStyleInverse ui-state-highlight",tolerance:"pointer",start:(e,t)=>b.startMoving.call(b,e,t),stop:(e,t)=>{b.stopMoving.call(b,e,t)},revert:150,beforeStop:(e,t)=>b.beforeStop.call(b,e,t),distance:3,change:function(t,r){e.prepend&&r.placeholder.index()<1?o("li.form-prepend").after(r.placeholder):e.append&&r.placeholder.index()>=A.children("li").length-1&&o("li.form-append").before(r.placeholder)},update:function(t,r){if(b.doCancel)return!1;o(r.item).closest(".stage-wrap").length&&0===o(r.item).closest(st).length?(b.doCancel=!0,R(r.item)):(D()&&ge(),b.setFieldOrder(C),b.doCancel=!e.sortableControls)}}),C.on("mouseenter",(function(){b.stageIsEmpty()||A.children(ct+":not(:last-child)").addClass(at)}));const R=t=>{if(t[0].classList.contains("input-set-control")){const r=[],o=e.inputSets.find((e=>P(e.name||e.label)===t[0].dataset.type));if(o&&o.showHeader){const e={type:"header",subtype:"h2",id:o.name,label:o.label};r.push(e)}r.push(...o.fields),r.forEach((e=>{W(e,!0),(b.stopIndex||0===b.stopIndex)&&b.stopIndex++}))}else W(t,!0)},I=o(d.editorWrap);o('
').appendTo(I);let M="cb-wrap",B="";if(e.stickyControls.enable){M+=" sticky-controls";const e={top:0,bottom:"auto",right:"auto",left:"auto"},t=Object.assign({},e,c.opts.stickyControls.offset);0!==t.top&&(B=`top: ${t.top}px`)}const z=g("div",d.controls,{id:`${s.formID}-cb-wrap`,className:M,style:B});e.showActionButtons&&z.appendChild(d.formActions);const U=g("div","",{id:`${s.formID}-gridModeHelp`,className:"grid-mode-help"});z.appendChild(U),I.append(d.stage,z),"textarea"!==t.type?o(t).append(I):o(t).replaceWith(I),o(d.controls).on("click","li.input-control, li.input-set-control",(t=>{let{target:r}=t;b.stageIsEmpty()&&A.find(ct).eq(0).remove();const i=o(r).closest("li");b.stopIndex=e.append?A.children().length-1:void 0,R(i),b.save.call(b)}));const W=function(t,r){void 0===r&&(r=!1);let i={};if(t instanceof jQuery)if(i.type=t[0].dataset.type,i.type){const e=y.custom.lookup(i.type);if(e)i=Object.assign({},e);else{const e=y.getClass(i.type);i.label=e.label(i.type)}}else{const e=t[0].attributes;r||(i.values=t.children().map(((e,t)=>({label:o(t).text(),value:o(t).attr("value"),selected:Boolean(o(t).attr("selected"))}))));for(let t=e.length-1;t>=0;t--)i[e[t].name]=e[t].value}else i=Object.assign({},t);i.name||(i.name=F(i)),r&&["text","number","file","date","select","textarea","autocomplete"].includes(i.type)&&(i.className=i.className||"form-control");const n=/(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(i.className);if(n&&(i.style=n[1]),r){const e=setTimeout((()=>{document.dispatchEvent(w.fieldAdded),clearTimeout(e)}),10)}e.onAddField(s.lastID,i),me(i,r),e.onAddFieldAfter(s.lastID,i),d.stage.classList.remove("empty")};i.prepFieldVars=W;const $=function(t){(t=b.getData(t))&&t.length?(t.forEach((e=>J(e))),t.forEach((e=>W(T(e)))),d.stage.classList.remove("empty")):e.defaultFields&&e.defaultFields.length?(c.opts.defaultFields.forEach((e=>J(e))),b.addDefaultFields()):e.prepend||e.append||(d.stage.classList.add("empty"),d.stage.dataset.content=h().get("getStarted")),(()=>{const t=[],r=t=>g("li",e[t],{className:`disabled-field form-${t}`});return e.prepend&&!o(".disabled-field.form-prepend",d.stage).length&&(t.push(!0),A.prepend(r("prepend"))),e.append&&!o(".disabled-field.form-append",d.stage).length&&(t.push(!0),A.append(r("append"))),b.disabledTT(d.stage),t.some((e=>!0===e))})()&&d.stage.classList.remove("empty"),b.save()};function J(e){const t=b.getRowValue(e.className);t&&!f.includes(t)&&f.push(t)}const G=t=>{const{type:r}=t,o=[],i=y.getClass(r),n=(e=>{const t=["required","label","description","placeholder","className","name","access","value"],r=!["header","paragraph","file","autocomplete"].concat(d.optionFields).includes(e),o={autocomplete:t.concat(["options","requireValidOption"]),button:["label","subtype","style","className","name","value","access"],checkbox:["required","label","description","toggle","inline","className","name","access","other","options"],text:t.concat(["subtype","maxlength"]),date:t.concat(["subtype","min","max","step"]),file:t.concat(["multiple"]),header:["label","subtype","className","access"],hidden:["name","value","access"],paragraph:["label","subtype","className","access"],number:t.concat(["subtype","min","max","step"]),select:t.concat(["multiple","options"]),textarea:t.concat(["subtype","maxlength","rows"])};e in y.registeredSubtypes&&!(e in o)&&(o[e]=t.concat(["subtype"])),o["checkbox-group"]=o.checkbox,o["radio-group"]=o.checkbox;const i=o[e];return"radio-group"===e&&Z("toggle",i),["header","paragraph","button"].includes(e)&&Z("description",i),r||Z("value",i),i||t})(r),l={required:()=>pe(t),toggle:()=>ie("toggle",t,{first:h().get("toggle")}),inline:()=>{const e={first:h().get("inline"),second:h().get("inlineDesc",r.replace("-group",""))};return ie("inline",t,e)},label:()=>ue("label",t),description:()=>ue("description",t),subtype:e=>fe("subtype",t,x[r],e),style:()=>se(t.style),placeholder:()=>ue("placeholder",t),rows:()=>de("rows",t),className:e=>ue("className",t,e),name:e=>ue("name",t,e),value:()=>ue("value",t),maxlength:()=>de("maxlength",t),access:()=>{const r=[`
`];for(a in e.roles)if(e.roles.hasOwnProperty(a)){const t=`fld-${s.lastID}-roles-${a}`,o={type:"checkbox",name:"roles[]",value:a,id:t,className:"roles-field"};f.includes(a)&&(o.checked="checked"),r.push(``)}r.push("
");const o={first:h().get("roles"),second:h().get("limitRole"),content:r.join("")};return ie("access",t,o)},other:()=>ie("other",t,{first:h().get("enableOther"),second:h().get("enableOtherMsg")}),options:()=>function(e){const{type:t,values:r}=e;let o;const i=[g("a",h().get("addOption"),{className:"add add-opt"})],n=[g("label",h().get("selectOptions"),{className:"false-label"})],l=e.multiple||"checkbox-group"===t,a=e=>{const t=h().get("optionCount",e);return{selected:!1,label:t,value:P(t)}};if(r&&r.length)o=r.map((e=>Object.assign({},{selected:!1},e)));else{let e=[1,2,3];["checkbox-group","checkbox"].includes(t)&&(e=[1]),o=e.map(a);const r=o[0];r.hasOwnProperty("selected")&&"radio-group"!==t&&(r.selected=!0)}const s=g("div",i,{className:"option-actions"}),d=g("ol",o.map((function(r,o,i,n){void 0===n&&(n=e.name);const a=c.opts.onAddOption(r,{type:t,index:o,isMultiple:l});return Te(n+"-options",a,l)})),{className:"sortable-options"}),f=g("div",[d,s],{className:"sortable-options-wrap"});return n.push(f),g("div",n,{className:"form-group field-options"}).outerHTML}(t),requireValidOption:()=>ie("requireValidOption",t,{first:" ",second:h().get("requireValidOption")}),multiple:()=>{const e={default:{first:"Multiple",second:"set multiple attribute"},file:{first:h().get("multipleFiles"),second:h().get("allowMultipleFiles")},select:{first:" ",second:h().get("selectionsMessage")}};return ie("multiple",t,e[r]||e.default)}};let a;const f=void 0!==t.role?t.role.split(","):[];["min","max","step"].forEach((e=>{l[e]="number"===r?()=>de(e,t):()=>ue(e,t)}));const u=["name","className","subtype"],p=Object.assign({},e.typeUserAttrs["*"],e.typeUserAttrs[r]);if(Object.keys(n).forEach((t=>{const a=n[t],s=[!0],d=e.disabledAttrs.includes(a);if(e.typeUserDisabledAttrs[r]){const t=e.typeUserDisabledAttrs[r];s.push(!t.includes(a))}if(i.definition.hasOwnProperty("disabledAttrs")){const e=i.definition.disabledAttrs;s.push(!e.includes(a))}if(i.definition.hasOwnProperty("defaultAttrs")){const e=Object.keys(i.definition.defaultAttrs);s.push(!e.includes(a))}if(p){const e=Object.keys(p);s.push(!e.includes(a))}d&&!u.includes(a)&&s.push(!1),s.every(Boolean)&&o.push(l[a](d))})),i.definition.hasOwnProperty("defaultAttrs")){const e=K(i.definition.defaultAttrs,t);o.push(e)}if(p){const e=K(p,t);o.push(e)}return o.join("")};function Q(e){return[["array",e=>{let{options:t}=e;return!!t}],["boolean",e=>{let{type:t}=e;return"checkbox"===t}],[typeof e.value,()=>!0]].find((t=>t[1](e)))[0]}function Y(e,t){return e.subtype&&e.subtype===t}function K(t,r){const o=[],i={array:te,string:_,number:de,boolean:(e,t)=>{let o=!1;return"checkbox"===e.type?o=Boolean(!!t.hasOwnProperty("value")&&t.value):r.hasOwnProperty(e)?o=r[e]:(t.hasOwnProperty("value")||t.hasOwnProperty("checked"))&&(o=t.value||t.checked||!1),ie(e,rt(rt({},t),{},{[e]:o}),{first:n[e]})}};for(const l in t)if(t.hasOwnProperty(l)){const a=Q(t[l]);if("undefined"!==a){const e=h().get(l),s=Object.assign({},t[l]);let d=s.value;"boolean"===a?s[l]??=s.value:"number"===a?s[l]??=ce(r[l],d):(d??="",s[l]??=r[l]||d),s.value=s[l],s.label&&(n[l]=Array.isArray(s.label)?h().get(...s.label)||s.label[0]:s.label),i[a]&&o.push(i[a](l,s)),n[l]=e}else if("undefined"===a&&Y(r,l))o.push(K(t[l],r));else{const r={};r[l]=t[l],e.notify.warning("Warning: unable to process typeUserAttr definition : "+JSON.stringify(r))}}return o.join("")}function _(e,t){const{class:r,className:o}=t,i=et(t,Qe);let l={id:e+"-"+s.lastID,title:i.description||i.label||e.toUpperCase(),name:e,type:i.type||"text",className:[`fld-${e}`,(r||o||"").trim()],value:i.hasOwnProperty(e)?i[e]:i.value||""};const a=``;return["checkbox","checkbox-group","radio-group"].includes(l.type)||l.className.push("form-control"),l=Object.assign({},i,l),`
${a}
${(()=>{if("textarea"===l.type){const e=l.value;return delete l.value,``}return``})()}
`}function te(e,t){const{multiple:r,options:o,label:i,value:l,class:a,className:d}=t,c=et(t,Ze),f=t.hasOwnProperty(e)?t[e]:l||[],u=Object.keys(o).map((e=>{const t={value:e},r=o[e],i=Array.isArray(r)?h().get(...r)||r[0]:r;return(Array.isArray(f)?f.includes(e):e===f)&&(t.selected=!0),g("option",i,t)})),p={id:`${e}-${s.lastID}`,title:c.description||i||e.toUpperCase(),name:e,className:`fld-${e} form-control ${a||d||""}`.trim()};r&&(p.multiple=!0);const m=``;return Object.keys(c).forEach((function(e){p[e]=c[e]})),`
${m}
${g("select",u,p).outerHTML}
`}const ie=function(e,t,r){void 0===r&&(r={});const o=t=>g("label",t,{for:`${e}-${s.lastID}`}).outerHTML,i={type:"checkbox",className:`fld-${e}`,name:e,id:`${e}-${s.lastID}`};t[e]&&(i.checked=!0);const n=[];let l=[g("input",null,i).outerHTML];return r.first&&n.push(o(r.first)),r.second&&l.push(" ",o(r.second)),r.content&&l.push(r.content),l=g("div",l,{className:"input-wrap"}).outerHTML,g("div",n.concat(l),{className:`form-group ${e}-wrap`}).outerHTML},se=e=>{let t="";"undefined"===e&&(e="default");const r=``;return t+=b.input({value:e||"default",type:"hidden",className:"btn-style"}).outerHTML,t+='
',ve.btn.forEach((r=>{const o=["btn-xs","btn",`btn-${r}`];e===r&&o.push("selected");const i=g("button",h().get(`styles.btn.${r}`),{value:r,type:"button",className:o.join(" ")}).outerHTML;t+=i})),t+="
",t=g("div",[r,t],{className:"form-group style-wrap"}),t.outerHTML},de=(e,t)=>{const{class:r,className:o}=t,i=et(t,Ye),n=Number.isNaN(i[e])?void 0:i[e],l=h().get(e)||e,a={type:"number",value:n,name:e,placeholder:h().get(`placeholder.${e}`),className:`fld-${e} form-control ${r||o||""}`.trim(),id:`${e}-${s.lastID}`},d=b.input(T(a)).outerHTML;return g("div",[``,`
${d}
`],{className:`form-group ${e}-wrap`}).outerHTML},fe=function(e,t,r,o){void 0===o&&(o=!1);const i=r.map(((r,o)=>{let i=Object.assign({label:`${n.option} ${o}`,value:void 0},r);return r.value===t[e]&&(i.selected=!0),i=T(i),g("option",i.label,i)})),l={id:e+"-"+s.lastID,name:e,className:`fld-${e} form-control`},a=h().get(e)||ee(e)||"",d=g("label",a,{for:l.id}),c=g("select",i,l),f=g("div",c,{className:"input-wrap"});return g("div",[d,f],{className:`form-group ${l.name}-wrap`,style:"display: "+(o?"none":"block")}).outerHTML},ue=function(t,r,o){void 0===o&&(o=!1);let i=r[t]||"",n=h().get(t)||t;"label"===t&&(["paragraph"].includes(r.type)?n=h().get("content"):i=V(i));const l=h().get(`placeholders.${t}`)||"";let a="";if(![].some((e=>!0===e))){const d={name:t,placeholder:l,className:`fld-${t} form-control`,id:`${t}-${s.lastID}`},c=g("label",n,{for:d.id}).outerHTML;"label"!==t||e.disableHTMLLabels?"textarea"===r.type&&"value"===t?a+=g("textarea",i,d).outerHTML:(d.value=i,d.type="text",a+=``):(d.contenteditable=!0,a+=g("div",i,d).outerHTML);const f=`
${a}
`;let u=o?"none":"block";"value"===t&&(u=r.subtype&&"quill"===r.subtype&&"none"),a=g("div",[c,f],{className:`form-group ${t}-wrap`,style:`display: ${u}`})}return a.outerHTML},pe=e=>{const{type:t}=e,r=[];let o="";return["header","paragraph","button"].includes(t)&&r.push(!0),r.some((e=>!0===e))||(o=ie("required",e,{first:h().get("required")})),o},me=function(t,r){void 0===r&&(r=!0);const l=Se(t);s.lastID=b.incrementId(s.lastID);const a=t.type||"text";let c=t.label||(r?n[a]||h().get("label"):"");var f;"hidden"!==a&&""!==c||(c=`${null!==(f=h().get(a))&&void 0!==f?f:a}: ${t.name}`);const u=e.disabledFieldButtons[a]||t.disabledFieldButtons;let p=[g("a",null,{type:"remove",id:"del_"+s.lastID,className:`del-button btn ${ot}cancel delete-confirm`,title:h().get("removeMessage")}),g("a",null,{type:"edit",id:s.lastID+"-edit",className:`toggle-form btn ${ot}pencil`,title:h().get("hide")}),g("a",null,{type:"copy",id:s.lastID+"-copy",className:`copy-button btn ${ot}copy`,title:h().get("copyButtonTooltip")})];D()?p.push(g("a",null,{type:"grid",id:s.lastID+"-grid",className:`grid-button btn ${ot}grid`,title:"Grid Mode"})):p.push(g("a",null,{type:"sort",id:s.lastID+"-sort-higher",className:`sort-button sort-button-higher btn ${ot}sort-higher`,title:"Move Higher"}),g("a",null,{type:"sort",id:s.lastID+"-sort-lower",className:`sort-button sort-button-lower btn ${ot}sort-lower`,title:"Move Lower"})),u&&Array.isArray(u)&&(p=p.filter((e=>!u.includes(e.type))));const m=[g("div",p,{className:"field-actions"})],w=e.disableHTMLLabels?document.createTextNode(c):V(c);m.push(g("label",w,{className:"field-label"})),m.push(g("span"," *",{className:"required-asterisk",style:t.required?"display:inline":""}));const v={className:"tooltip-element",tooltip:t.description,style:t.description?"display:inline-block":"display:none"};m.push(g("span","?",v));const y=g("div","",{className:"prev-holder",dataFieldId:s.lastID});m.push(y);const x=g("div",[G(t),g("a",h().get("close"),{className:"close-field"})],{className:"form-elements"}),C=g("div",x,{id:`${s.lastID}-holder`,className:"frm-holder",dataFieldId:s.lastID});i.currentEditPanel=C,m.push(C);const O=g("li",m,{class:`${a}-field form-field`,type:a,id:s.lastID}),j=o(O);let T;if(be(j),j.data("fieldData",{attrs:t}),void 0!==b.stopIndex?o(d.stage).children().eq(b.stopIndex).before(j):A.append(j),o(".sortable-options",j).sortable({update:()=>b.updatePreview(j)}),b.updatePreview(j),D()){const t=`div.row-${l.rowUniqueId}`;let r=!1;A.children(t).length?T=A.children(t):(T=g("div",null,{id:`${O.id}-row`,className:`row row-${l.rowUniqueId} ${it}`}),r=!0),E&&S&&(k.attr("id",T.id),k.attr("class",T.className),k.attr("style",""),k.attr("data-row-id",l.rowUniqueId),T=k);const i=g("div",null,{id:`${O.id}-cont`,className:`${l.columnSize} ${nt}`});E&&N&&("true"===k.attr("prepend")?o(i).prependTo(T):o(i).insertAfter(`#${k.attr("appendAfter")}`)),N||o(i).appendTo(T),!E&&r&&j.after(T),j.appendTo(i),r&&(Ae(T),ge(),we(T),e.enableColumnInsertMenu&&(o(T).off("mouseenter"),o(T).on("mouseenter",(function(e){ke(o(e.currentTarget))})),o(T).off("mouseleave"),o(T).on("mouseleave",(function(e){Ee(o(e.currentTarget))})))),ke(T,!0),l.addedDefaultColumnClass&&j.attr("addedDefaultColumnClass",!0),b.tmpCleanPrevHolder(o(y))}e.typeUserEvents[a]&&e.typeUserEvents[a].onadd?e.typeUserEvents[a].onadd(O):e.typeUserEvents["*"]&&e.typeUserEvents["*"].onadd&&e.typeUserEvents["*"].onadd(O),r&&(e.editOnAdd&&(b.closeAllEdit(),b.toggleEdit(s.lastID,!1)),O.scrollIntoView&&e.scrollToFieldOnAdd&&O.scrollIntoView({behavior:"smooth"})),D()&&E&&N&&Be(T,!0),E=!1,S=!1,N=!1};function be(e){D()&&e.mouseenter((function(e){Me||(Le=o(this),Re=e.pageX,Ie=e.pageY)}))}function ge(){A.find(ct+":not(:last-child)").css("height","1px").addClass(at)}function we(e){const t=o(e).clone();if(t.addClass(at).addClass(lt).html(""),t.css("height","1px"),t.attr("class",t.attr("class").replace("row-","")),t.removeAttr("id"),0===o(e).index()){const e=o(t).clone();A.prepend(e),Ae(e)}t.insertAfter(o(e)),Ae(t),A.find(st+":last-of-type").removeClass(at)}function ye(){A.children(ct).remove(),A.children(st).each(((e,t)=>{we(o(t))})),A.find(st+":last-of-type").removeClass(at)}function Ae(e){if(!D())return;o(e).sortable({connectWith:[st],cursor:"move",opacity:.9,revert:150,distance:3,tolerance:"pointer",helper:function(e,t){const r=t.clone();return r.find(".field-actions").remove(),r.css({width:"20%",height:"100px",minHeight:"60px",overflow:"hidden"}),r},over:function(e){const t=o(e.target),r=t.hasClass(lt);r||je(t),t.addClass("hoverDropStyleInverse"),r||(ge(),t.prev(ct).removeClass(at).css("height","40px"),t.next(ct).removeClass(at).css("height","40px"))},out:function(e){A.children(ct).removeClass("hoverDropStyleInverse"),o(e.target).removeClass("hoverDropStyleInverse")},placeholder:"hoverDropStyleInverse",receive:function(e,t){const r=o(t.sender).attr("id")===C.attr("id"),i=o(t.item).parent().hasClass(lt),n=!i&&o(t.item).parent().hasClass(it);if(i)if(r)S=!0,E=!0,k=o(t.item).parent();else{const e=o(t.item),r=Se({}),i=g("div",null,{id:`${e.find("li").attr("id")}-row`,className:`row row-${r.rowUniqueId} ${it}`});o(t.item).parent().replaceWith(i),be(o(t.item)),e.appendTo(i),Ae(i),Fe(e.attr("id"))}if(n&&r){k=o(t.item).prev().hasClass("btnAddControl")?o(t.item).prev():o(t.item).next().hasClass("btnAddControl")?o(t.item).next():o(t.item).attr("prepend","true");const e=b.getRowClass(o(t.item).parent().attr("class"));k.addClass(e),N=!0,E=!0,b.stopIndex=void 0}E&&(b.doCancel=!0,R(t.item),b.save.call(b)),He(),ye();const l=o(t.item).find("li");l.length&&(Ce(l),Oe(l),b.tmpCleanPrevHolder(o(t.item).find(".prev-holder")))},start:(e,t)=>{A.addClass("__preventColButtons"),je(t.item.closest(st))},stop:(e,t)=>{A.removeClass("__preventColButtons"),A.children(ct).removeClass("hoverDropStyleInverse"),Be(t.item.closest(st),!0)},update:(e,t)=>{Fe(t.item.attr("id"))}});const t=b.getRowValue(e.className);"0"!==t&&o(e).attr("data-row-id",t)}function Ce(e){const t=e.find('textarea[type="tinymce"]');t.length&&(window.lastFormBuilderCopiedTinyMCE=window.tinymce.get(t.attr("id")).save())}function Oe(e){b.updatePreview(e),b.save.call(b)}function ke(t,r){if(void 0===r&&(r=!1),!e.enableColumnInsertMenu||A.hasClass("__preventColButtons"))return;o(t).children("button.btnAddControl").remove();const i=o(t).children(dt);i.each(((e,t)=>{const n=o(t);n.addClass("colWithInsertButtons"),0===i.index(n)&&o(``).insertBefore(n),o(``).insertAfter(n)}))}function je(e){e.find("button.btnAddControl").remove(),e.find(dt).removeClass("colWithInsertButtons")}function Ee(e){e.find("button.btnAddControl").css("visibility","hidden")}function Se(t){if(!D())return{};const r=b.tryParseColumnInfo(t);if(!r.rowUniqueId){if(E&&N)r.rowUniqueId=b.getRowValue(k.attr("class"));else{let e;if(0===f.length)e=1;else{const t=f.filter((e=>!isNaN(e)&&!isNaN(parseInt(e)))).map((e=>parseInt(e)));e=Math.max(...t,0)+1}r.rowUniqueId=e.toString()}r.columnSize=e.defaultGridColumnClass,t.className||(t.className=""),t.className+=` row-${r.rowUniqueId} ${r.columnSize}`,r.addedDefaultColumnClass=!0}return f.includes(r.rowUniqueId)||f.push(r.rowUniqueId),r}const Te=function(e,t,r){const o={selected:r?"checkbox":"radio"},i={boolean:(t,r)=>{const i={value:t,type:o[r]||"checkbox"};return t&&(i.checked=!!t),i.name=e,["input",null,i]},number:e=>["input",null,{value:e,type:"number"}],string:(e,t)=>["input",null,{value:e,type:"text",placeholder:h().get(`placeholder.${t}`)||""}],array:e=>["select",e.map((e=>{let{label:t,value:r}=e;return g("option",t,{value:r})}))],object:e=>{let{tag:t,content:r}=e;return[t,r,et(e,Ke)]}};t=rt(rt({},{selected:!1,label:"",value:""}),t);const n=Object.entries(t).map((e=>{let[t,r]=e;const o=H(r),[n,l,a]=i[o](r,t),s=`option-${t} option-attr`;return a["data-attr"]=t,a.className=a.className?`${a.className} ${s}`:s,g(n,l,a)})),l={className:`remove btn ${ot}cancel`,title:h().get("removeMessage")};return n.push(g("a",null,l)),g("li",n).outerHTML},De=[".form-elements input",".form-elements select",".form-elements textarea"].join(", ");A.on("change blur keyup click",De,r()((e=>{if(e){if([e=>{let{type:t,target:r}=e;return"keyup"===t&&"className"===r.name}].some((t=>t(e))))return!1;Oe(o(e.target).closest(".form-field"))}}),333,{leading:!1})),A.on("click touchstart",".remove",(t=>{const r=o(t.target).parents(".form-field:eq(0)"),i=r[0],n=i.getAttribute("type"),l=o(t.target.parentElement);t.preventDefault(),i.querySelector(".sortable-options").childNodes.length<=2&&!n.includes("checkbox")?e.notify.error("Error: "+h().get("minOptionMessage")):l.slideUp("250",(()=>{l.remove(),Oe(r)}))})),A.on("touchstart","input",(e=>{const t=o(e.target);if(!0===e.handled)return!1;if("checkbox"===t.attr("type"))t.trigger("click");else{t.focus();const e=t.val();t.val(e)}})),A.on("click touchstart",".toggle-form, .close-field",(function(e){if(e.stopPropagation(),e.preventDefault(),!0===e.handled)return!1;{const t=o(e.target).parents(".form-field:eq(0)").attr("id");b.toggleEdit(t),e.handled=!0}})),A.on("dblclick","li.form-field",(e=>{if(!["select","input","label","textarea"].includes(e.target.tagName.toLowerCase())&&!0!==e.target.isContentEditable&&(e.stopPropagation(),e.preventDefault(),!0!==e.handled)){const t=o(e.target).closest("li.form-field").attr("id");b.toggleEdit(t),e.handled=!0}})),A.on("change",'[name="subtype"]',(e=>{const t=o(e.target).closest("li.form-field");o(".value-wrap",t).toggle("quill"!==e.target.value)})),A.on("change",'[name="name"]',(t=>{const r=t.target.value;(e=>{const t=document,r=document.createElement("form");return e in t||e in r})(r)&&e.notify.error("Potential for Dom Clobbering with field name "+r)})),A.on("change",[".prev-holder input",".prev-holder select",".prev-holder textarea"].join(", "),(e=>{let t;if(e.target.classList.contains("other-option"))return;const r=oe(e.target,".form-field");if(["select","checkbox-group","radio-group"].includes(r.type)){const o=r.getElementsByClassName("option-value");"select"===r.type?X(o,(t=>{o[t].parentElement.childNodes[0].checked=e.target.value===o[t].value})):(t=document.getElementsByName(e.target.name),X(t,(e=>{t[e].classList.contains("other-option")||(o[e].parentElement.childNodes[0].checked=t[e].checked)})))}else{const t=document.getElementById("value-"+r.id);t&&(t.value=e.target.value)}b.save.call(b)})),re(d.stage,"keyup change",(e=>{let{target:t}=e;if(!t.classList.contains("fld-label"))return;const r=t.value||t.innerHTML,o=oe(t,".form-field").querySelector(".field-label");O(o,V(r),c.opts.disableHTMLLabels)})),A.on("keyup","input.error",(e=>{let{target:t}=e;return o(t).removeClass("error")})),A.on("keyup",'input[name="description"]',(function(e){const t=o(e.target).parents(".form-field:eq(0)"),r=o(".tooltip-element",t),i=o(e.target).val();if(""!==i)if(r.length)r.attr("tooltip",i).css("display","inline-block");else{const e=`?`;o(".field-label",t).after(e)}else r.length&&r.css("display","none")})),A.on("change",".fld-multiple",(e=>{const t=e.target.checked?"checkbox":"radio",r=o(".option-selected",o(e.target).closest(".form-elements"));return r.each((e=>r[e].type=t)),t})),A.on("blur","input.fld-name",(function(e){e.target.value=ne(e.target.value),""===e.target.value?o(e.target).addClass("field-error").attr("placeholder",h().get("cannotBeEmpty")):o(e.target).removeClass("field-error")})),A.on("blur","input.fld-maxlength, input.fld-rows",(e=>{e.target.value=le(e.target.value)})),A.on("click touchstart",".btnAddControl",(function(e){const t=o(e.currentTarget);j=C.clone(),j.hover((function(){}),(function(){j.remove()})),j.on("click","li",(e=>{let{target:r}=e;N=!0,E=!0,k=t;const i=o(r).closest("li");b.stopIndex=void 0,R(i),b.save.call(b),j.remove()})),A.append(j),0==t.index()?j.css({position:"fixed",left:t.offset().left,top:t.offset().top-o(window).scrollTop()}):j.css({position:"fixed",left:t.offset().left-80,top:t.offset().top-o(window).scrollTop()});const r=j.offset().top+j.outerHeight(),i=o(window).scrollTop()+o(window).innerHeight();r>i&&j.css({top:parseInt(j.css("top"))-(r-i)})})),A.on("click",`.${ot}copy`,(function(t){t.preventDefault();const r=o(t.target).parent().parent("li"),i=function(t){s.lastID=b.incrementId(s.lastID),Ce(t);const r=t.attr("id"),i=t.attr("type"),n=i+"-"+(new Date).getTime(),l=t.clone();return o(".fld-name",l).val(n),l.find("[id]").each(((e,t)=>{t.id=t.id.replace(r,s.lastID)})),l.find("[for]").each(((e,t)=>{const o=t.getAttribute("for").replace(r,s.lastID);t.setAttribute("for",o)})),t.find("select").each((function(e){l.find("select").eq(e).val(o(this).val())})),l.attr("id",s.lastID),l.attr("name",n),l.addClass("cloned"),o(".sortable-options",l).sortable(),e.typeUserEvents[i]&&e.typeUserEvents[i].onclone?e.typeUserEvents[i].onclone(l[0]):e.typeUserEvents["*"]&&e.typeUserEvents["*"].onclone&&e.typeUserEvents["*"].onclone(l[0]),l}(r);D()?function(e,t){const r=o(`#className-${t.attr("id")}`),i=Se({}),n=g("div",null,{id:`${e.attr("id")}-row`,className:`row row-${i.rowUniqueId} ${it}`}),l=g("div",null,{id:`${e.attr("id")}-cont`,className:`${b.getBootstrapColumnClass(r.val())} ${nt}`});let a;o(l).appendTo(n),t.parent().is("div")?a=t.closest(st):t.parent().is("ul")&&(a=t),o(n).insertAfter(a),e.appendTo(l),Ae(n),ye(),Fe(e.attr("id"))}(i,r):i.insertAfter(r),Oe(i),b.tmpCleanPrevHolder(i.find(".prev-holder")),e.editOnAdd&&b.closeField(s.lastID,!1)})),D()&&A.on("stageEmptied",(()=>{f=[]})),A.on("click",".delete-confirm",(t=>{t.preventDefault();const r=t.target.getBoundingClientRect(),i=document.body.getBoundingClientRect(),n={pageX:r.left+r.width/2,pageY:r.top-i.top-12},l=o(t.target).parents(".form-field:eq(0)").attr("id"),a=o(document.getElementById(l));if(document.addEventListener("modalClosed",(function(){a.removeClass("deleting")}),!1),e.fieldRemoveWarn){const e=g("h3",h().get("warning")),t=g("p",h().get("fieldRemoveWarning"));b.confirm([e,t],(()=>b.removeField(l)),n),a.addClass("deleting")}else b.removeField(l)}));let Le,Re,Ie,Me=!1,Pe=0;function Be(e,t){void 0===t&&(t=!1);const r=e.children(`div${dt}`).length,i=Math.floor(12/r);e.children(`div${dt}`).each(((e,r)=>{const n=o(`#${r.id}`);t||"true"!=n.find("li").attr("manuallyChangedDefaultColumnClass")?b.syncBootstrapColumnWrapperAndClassProperty(r.id.replace("-cont",""),i):b.showToast(`Preserving column size of field ${e+1} because you had personally adjusted it`,4e3)}))}function Fe(e){if(e){const t=o(`#className-${e.replace("-cont","")}`);if(t.val()){const e=b.getRowClass(t.val()),r=b.getRowClass(t.closest(st).attr("class"));t.val(t.val().replace(e,r)),He()}}}function He(){A.find(dt).each(((e,t)=>{const r=o(t);r.is(":empty")&&!i.preserveTempContainers.includes(r.attr("id"))&&r.remove()})),A.children(st).not(ct).each(((e,t)=>{if(0===o(t).children(dt).length){const e=b.getRowValue(o(t).attr("class"));f=f.filter((t=>t!==e)),o(t).remove()}else ke(o(t),!0)}))}function qe(e){if(void 0===e&&(e=!0),e)Me=!0,b.showToast("Starting Grid Mode - Use the mousewheel to resize.",1500),C.css("display","none"),o(d.formActions).css("display","none"),o(U).html("\n
\n

Grid Mode

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ActionResult
MOUSEWHEELAdjust the field column size
W or ↑Move entire row up
S or ↓Move entire row down
A or ←Move field left within the row
D or →Move field right within the row
RResize all fields within the row to be maximally equal
\n\n
Current Row Fields
\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
FieldSize
\n \n
\n "),ze(),b.closeAllEdit(),b.toggleHighlight(Le),ge();else{b.showToast("Grid Mode Finished",1500);const e=Le.closest(st);let t=0;e.children(`div${dt}`).each(((e,r)=>{const i=o(`#${r.id}`).find("li").attr("id");t+=b.getBootstrapColumnValue(o(`#${i}-cont`).attr("class"))})),t>12&&Be(e,!0),Me=!1,Le=null,o(U).empty(),C.css("display","unset"),o(d.formActions).css("display","unset")}}function ze(){o(U).find(".gridHelpCurrentRow tbody").empty(),Le.closest(st).children(`div${dt}`).each(((e,t)=>{const r=o(`#${t.id}`).find("li").attr("id"),i=o(`#${r}`),n=i.attr("type");let l=o(`#label-${r}`).html();"hidden"!==n&&"paragraph"!==n||(l=o(`#name-${r}`).val()),l||(l=i.attr("id"));let a="";Le.attr("id")===r&&(a="currentGridModeFieldHighlight"),o(U).find(".gridHelpCurrentRow tbody").append(`\n \n ${l}\n \n ${b.getBootstrapColumnValue(o(`#${r}-cont`).attr("class"))}\n \n \n `)}))}if(A.on("click touchstart",".grid-button",(e=>{e.preventDefault();const t=o(e.target).parents(".form-field:eq(0)").attr("id");Le=o(document.getElementById(t)),Re=e.pageX,Ie=e.pageY,Pe=0,qe()})),A.on("wheel",(function(e){if(0!==e.originalEvent.deltaY&&Me){e.preventDefault(),Pe+=e.originalEvent.deltaY;const t=120;if(Pe>0&&Pe-t)return;const r=Le.closest("div"),i=b.getBootstrapColumnValue(r.attr("class")),n=Math.round(Pe/t);Pe%=t;const l=i+n;if(l>12)return void b.showToast('Column Size cannot exceed 12');if(l<1)return void b.showToast('Column Size cannot be less than 1');const a=Le.closest(st);let s=l;if(a.children(`div${dt}`).each(((e,t)=>{const r=o(`#${t.id}`).find("li").attr("id");r!=Le.attr("id")&&(s+=b.getBootstrapColumnValue(o(`#${r}-cont`).attr("class")))})),s>12)return void b.showToast('There is a maximum of 12 columns per row');b.syncBootstrapColumnWrapperAndClassProperty(Le.attr("id"),l),Le.attr("manuallyChangedDefaultColumnClass",!0),ze(),b.toggleHighlight(Le)}})),o(document).keydown((e=>{if(Me){e.preventDefault();const t=Le.closest(st);switch(event.code){case"KeyW":case"ArrowUp":je(t),function(e){const t=e.prevAll().not(ct).not(".form-prepend").first();t.length&&(o(Le.parent().parent()).swapWith(t),b.toggleHighlight(Le))}(t);break;case"KeyS":case"ArrowDown":je(t),function(e){const t=e.nextAll().not(ft).not(".form-append").first();t.length&&(o(Le.parent().parent()).swapWith(t),b.toggleHighlight(Le))}(t);break;case"KeyA":case"ArrowLeft":je(t),function(){const e=Le.parent().prev();e.length&&Le.parent().after(e),b.toggleHighlight(Le)}();break;case"KeyD":case"ArrowRight":je(t),function(){const e=Le.parent().next();e.length&&Le.parent().before(e),b.toggleHighlight(Le)}();break;case"KeyR":je(t),Be(t,!0),ke(t,!0)}ze(),Ee(t)}})),o(document).mousemove((e=>{Me&&b.getDistanceBetweenPoints(Re,Ie,e.pageX,e.pageY)>c.opts.cancelGridModeDistance&&qe(!1)})),o(document).on("checkRowCleanup",((e,t)=>{He();const r=o(`#${t.rowWrapperID}`);r.length&&Be(r,!0)})),o(document).on("fieldOpened",((e,t)=>{const r=o(`#${t.rowWrapperID}`);r.length&&Ee(r)})),A.on("click",".field-actions .sort-button",(function(e){e.preventDefault();const t=o(e.target).parent().parent("li");let r;o(e.target).hasClass("sort-button-higher")?(r=t.prev("li"),r.length&&!r.hasClass("form-prepend")&&t.insertBefore(r)):(r=t.next("li"),r.length&&!r.hasClass("form-append")&&t.insertAfter(r)),b.toggleHighlight(t)})),A.on("click",".style-wrap button",(e=>{const t=o(e.target),r=t.closest(".form-elements"),i=t.val(),n=o(".btn-style",r);n.val(i),t.siblings(".btn").removeClass("selected"),t.addClass("selected"),Oe(n.closest(".form-field"))})),A.on("click",".fld-required",(e=>{o(e.target).closest(".form-field").find(".required-asterisk").toggle()})),A.on("click","input.fld-access",(function(e){const t=o(e.target).closest(".form-field").find(".available-roles"),r=o(e.target);t.slideToggle(250,(function(){r.is(":checked")||o("input[type=checkbox]",t).removeAttr("checked")}))})),A.on("click",".add-opt",(function(e){e.preventDefault();const t=o(e.target).closest(".form-field").attr("type"),r=o(e.target).closest(".field-options"),i=o('[name="multiple"]',r),n=o(".option-selected:eq(0)",r),l=i.length?i.prop("checked"):"checkbox"===n.attr("type"),a=o(".sortable-options",r),s=c.opts.onAddOption({selected:!1,label:"",value:""},{type:t,index:a.children().length,isMultiple:l});a.append(Te(n.attr("name"),s,l))})),A.on("mouseover mouseout",".remove, .del-button",(e=>o(e.target).closest("li").toggleClass("delete"))),$(),!0===e.disableInjectedStyle){const e=document.getElementsByClassName("formBuilder-injected-style");X(e,(t=>a(e[t])))}else"bootstrap"===e.disableInjectedStyle&&d.editorWrap.classList.remove("formbuilder-embedded-bootstrap");return document.dispatchEvent(w.loaded),i.actions={getFieldTypes:t=>t?ae(y.getRegistered(),e.disableFields):y.getRegistered(),clearFields:()=>b.removeAllFields(d.stage),showData:b.showData.bind(b),save:e=>{const t=b.save(e),r=window.JSON.parse(t);return c.opts.onSave(r),r},addField:(e,t)=>{b.stopIndex=s.formData.length?t:void 0,W(e)},removeField:b.removeField.bind(b),getData:b.getFormData.bind(b),setData:e=>{b.stopIndex=void 0,b.removeAllFields(d.stage),$(e)},setLang:e=>h().setCurrent.call(h(),e).then((()=>{d.stage.dataset.content=h().get("getStarted"),y.init(),d.empty(d.formActions),b.formActionButtons().forEach((e=>d.formActions.appendChild(e)))})),showDialog:b.dialog.bind(b),toggleFieldEdit:e=>{(Array.isArray(e)?e:[e]).forEach((e=>{["number","string"].includes(typeof e)&&("number"==typeof e?e=d.stage.children[e].id:/^frmb-/.test(e)||(e=d.stage.querySelector(e).id),b.toggleEdit(e))}))},toggleAllFieldEdit:()=>{X(d.stage.children,(e=>{b.toggleEdit(d.stage.children[e].id)}))},closeAllFieldEdit:b.closeAllEdit.bind(b),getCurrentFieldId:()=>s.lastID},d.onRender(d.controls,(()=>{const e=setTimeout((()=>{d.stage.style.minHeight=`${d.controls.clientHeight}px`,clearTimeout(e)}),0)})),i}const mt=function(e,t){const r=this,o=jQuery.extend({},we,e,!0),{i18n:i}=o,n=et(o,_e);this.i18nOpts=jQuery.extend({},ye,i,!0);const l=()=>{console.error("formBuilder is still initialising"),console.info("See https://formbuilder.online/docs/formBuilder/actions/getData/#wont-work and https://formbuilder.online/docs/formBuilder/promise/ for more information on formBuilder asynchronous loading")};this.instance={actions:["getFieldTypes","addField","clearFields","closeAllFieldEdit","getData","removeField","save","setData","setLang","showData","showDialog","toggleAllFieldEdit","toggleFieldEdit","getCurrentFieldId"].reduce(((e,t)=>(e[t]=l,e)),{}),markup:q,get formData(){return r.instance.actions.getData!==l&&r.instance.actions.getData("json")},promise:new Promise((function(e,o){h().init(r.i18nOpts).then((()=>{const o=new pt(n,t[0],jQuery);jQuery(t[0]).data("formBuilder",o),Object.assign(r.instance,o.actions),r.instance.actions=o.actions,delete r.instance.promise,e(r.instance)})).catch((e=>{o(e),n.notify.error(e)}))}))}};jQuery.fn.formBuilder=function(e){if(void 0===e&&(e={}),"string"!=typeof e){const t=new mt(e,this);return this.data("fbInstance",t.instance),t.instance}{const i=this.data("fbInstance");if(i[e]){if("function"==typeof i[e]){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o.btn{position:relative;float:left}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn-group,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn-group{margin-left:-1px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:last-child:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.dropdown-toggle:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:focus,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:hover{z-index:2}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-image:none;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn:active{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn{display:table-cell}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group{position:relative;display:table;border-collapse:separate}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap output{font-size:14px;line-height:1.42857143;display:block}.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea.form-control{height:auto}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{height:34px;display:block;width:100%;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control:focus{outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-group{margin-left:0px;margin-bottom:15px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-right{float:right}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-left{float:left}.form-wrap.form-builder .formbuilder-required,.form-wrap.form-builder .required-asterisk{color:#c10000}.form-wrap.form-builder .formbuilder-checkbox-group input[type=checkbox],.form-wrap.form-builder .formbuilder-checkbox-group input[type=radio],.form-wrap.form-builder .formbuilder-radio-group input[type=checkbox],.form-wrap.form-builder .formbuilder-radio-group input[type=radio]{margin:0 4px 0 0}.form-wrap.form-builder .formbuilder-checkbox-inline,.form-wrap.form-builder .formbuilder-radio-inline{margin-right:8px;display:inline-block;vertical-align:middle;padding-left:0}.form-wrap.form-builder .formbuilder-checkbox-inline label input[type=text],.form-wrap.form-builder .formbuilder-radio-inline label input[type=text]{margin-top:0}.form-wrap.form-builder .formbuilder-checkbox-inline:first-child,.form-wrap.form-builder .formbuilder-radio-inline:first-child{padding-left:0}.form-wrap.form-builder .formbuilder-autocomplete-list{background-color:#fff;display:none;list-style:none;padding:0;border:1px solid #ccc;border-width:0 1px 1px;position:absolute;z-index:20;max-height:200px;overflow-y:auto}.form-wrap.form-builder .formbuilder-autocomplete-list li{display:none;cursor:default;padding:5px;margin:0;transition:background-color 200ms ease-in-out}.form-wrap.form-builder .formbuilder-autocomplete-list li:hover,.form-wrap.form-builder .formbuilder-autocomplete-list li.active-option{background-color:rgba(0,0,0,.075)}@keyframes PLACEHOLDER{0%{height:1px}100%{height:15px}}.form-wrap.form-builder .cb-wrap{width:26%;max-width:-moz-fit-content;max-width:fit-content;transition:transform 250ms}.form-wrap.form-builder .cb-wrap.sticky-controls{position:sticky;align-self:flex-start;top:0}.form-wrap.form-builder .cb-wrap h4{margin-top:0;color:#666}@media(max-width: 481px){.form-wrap.form-builder .cb-wrap{width:64px}.form-wrap.form-builder .cb-wrap h4{display:none}}.form-wrap.form-builder .cb-wrap .form-actions{float:right;margin-top:5px}.form-wrap.form-builder .cb-wrap .form-actions button{border:0 none}.form-wrap.form-builder .frmb-control{margin:0;padding:0;border-radius:5px}.form-wrap.form-builder .frmb-control li{cursor:move;list-style:none;margin:0 0 -1px 0;padding:10px;text-align:left;background:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;box-shadow:inset 0 0 0 1px #c5c5c5}.form-wrap.form-builder .frmb-control li .control-icon{width:16px;height:auto;margin-right:10px;margin-left:.2em;display:inline-block}.form-wrap.form-builder .frmb-control li .control-icon img,.form-wrap.form-builder .frmb-control li .control-icon svg{max-width:100%;height:auto}.form-wrap.form-builder .frmb-control li:first-child{border-radius:5px 5px 0 0;margin-top:0}.form-wrap.form-builder .frmb-control li:last-child{border-radius:0 0 5px 5px}.form-wrap.form-builder .frmb-control li::before{margin-right:10px;font-size:16px}.form-wrap.form-builder .frmb-control li:hover{background-color:#f2f2f2}.form-wrap.form-builder .frmb-control li.ui-sortable-helper{border-radius:5px;transition:box-shadow 250ms;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff}.form-wrap.form-builder .frmb-control li.ui-state-highlight{width:0;overflow:hidden;padding:0;margin:0;border:0 none}.form-wrap.form-builder .frmb-control li.moving{opacity:.6}.form-wrap.form-builder .frmb-control li.formbuilder-separator{background-color:rgba(0,0,0,0);box-shadow:none;padding:0;cursor:default}.form-wrap.form-builder .frmb-control li.formbuilder-separator hr{margin:10px 0}@media(max-width: 481px){.form-wrap.form-builder .frmb-control li::before{font-size:30px}.form-wrap.form-builder .frmb-control li{text-overflow:clip}.form-wrap.form-builder .frmb-control li span{visibility:hidden}.form-wrap.form-builder .frmb-control li span span{visibility:visible;font-size:30px;width:auto !important}}.form-wrap.form-builder .frmb-control.sort-enabled li.ui-state-highlight{box-shadow:none;height:0;width:100%;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;-webkit-clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin:1px 0 3px;animation:PLACEHOLDER 250ms forwards}.controls-left.form-wrap.form-builder .form-actions{float:left}.formbuilder-mobile.form-wrap.form-builder .form-actions{width:100%}.formbuilder-mobile.form-wrap.form-builder .form-actions button{width:100%;font-size:.85em !important;display:block !important;border-radius:0 !important;margin-top:-1px;margin-left:0 !important}.formbuilder-mobile.form-wrap.form-builder .form-actions button:first-child{border-radius:5px 5px 0 0 !important;margin-top:0 !important;border-bottom:0 none}.formbuilder-mobile.form-wrap.form-builder .form-actions button:last-child{border-radius:0 0 5px 5px !important}.form-wrap.form-builder .stage-wrap{flex-grow:1;display:flex;flex-direction:column;position:relative;padding:0;margin:0;width:calc(74% - 5px)}@media(max-width: 481px){.form-wrap.form-builder .stage-wrap{width:calc(100% - 64px)}}.form-wrap.form-builder .stage-wrap.empty{border:3px dashed #ccc;background-color:rgba(255,255,255,.25)}.form-wrap.form-builder .stage-wrap.empty::after{content:attr(data-content);position:absolute;text-align:center;top:50%;left:0;width:100%;margin-top:-1em}.form-wrap.form-builder .frmb{list-style-type:none;min-height:200px;transition:background-color 500ms ease-in-out}.form-wrap.form-builder .frmb .formbuilder-required{color:#c10000}.form-wrap.form-builder .frmb.removing{overflow:hidden}.form-wrap.form-builder .frmb li.form-field:hover{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder .frmb li.form-field:hover .field-actions{opacity:1}.form-wrap.form-builder .frmb li.form-field:hover li :hover{background:#fefefe}.form-wrap.form-builder .frmb li.form-field{position:relative;padding:6px;clear:both;margin-left:0;margin-bottom:3px;background-color:#fff;transition:background-color 250ms ease-in-out,margin-top 400ms}.form-wrap.form-builder .frmb li.form-field.hidden-field{background-color:rgba(255,255,255,.6)}.form-wrap.form-builder .frmb li.form-field:first-child{border-top-right-radius:5px;border-top-left-radius:5px}.form-wrap.form-builder .frmb li.form-field:first-child .field-actions .btn:last-child{border-radius:0 5px 0 0}.form-wrap.form-builder .frmb li.form-field:last-child{border-bottom-right-radius:5px;border-bottom-left-radius:5px}.form-wrap.form-builder .frmb li.form-field.no-fields label{font-weight:400}@keyframes PLACEHOLDER{0%{height:0}100%{height:15px}}.form-wrap.form-builder .frmb li.form-field.frmb-placeholder,.form-wrap.form-builder .frmb li.form-field.ui-state-highlight{height:0;padding:0;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;-webkit-clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin-bottom:3px;animation:PLACEHOLDER 250ms forwards}.form-wrap.form-builder .frmb li.form-field.moving,.form-wrap.form-builder .frmb li.form-field.ui-sortable-helper{transition:box-shadow 500ms ease-in-out;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff;border-radius:5px}.form-wrap.form-builder .frmb li.form-field.disabled-field{z-index:1;position:relative;overflow:visible}.form-wrap.form-builder .frmb li.form-field.disabled-field:hover .frmb-tt{display:inline-block}.form-wrap.form-builder .frmb li.form-field.disabled-field [type=checkbox]{float:left;margin-right:10px}.form-wrap.form-builder .frmb li.form-field.disabled-field h2{border-bottom:0 none}.form-wrap.form-builder .frmb li.form-field.disabled-field label{font-size:12px;font-weight:400;color:#666}.form-wrap.form-builder .frmb li.form-field.disabled-field .prev-holder{cursor:default;line-height:28px;padding-left:5px}.form-wrap.form-builder .frmb li.form-field .close-field{position:absolute;color:#666;left:50%;bottom:6px;background:#fff;border-top:1px solid #c5c5c5;border-left:1px solid #c5c5c5;border-right:1px solid #c5c5c5;transform:translateX(-50%);padding:0 5px;border-top-right-radius:3px;border-top-left-radius:3px;cursor:pointer;transition:background-color 250ms ease-in-out}.form-wrap.form-builder .frmb li.form-field .close-field:hover{text-decoration:none}.form-wrap.form-builder .frmb li.form-field.header-field h1,.form-wrap.form-builder .frmb li.form-field.header-field h2,.form-wrap.form-builder .frmb li.form-field.header-field h3,.form-wrap.form-builder .frmb li.form-field.header-field h4,.form-wrap.form-builder .frmb li.form-field.header-field h5,.form-wrap.form-builder .frmb li.form-field.header-field h6{word-break:break-word}.form-wrap.form-builder .frmb li.form-field.paragraph-field p{word-break:break-word}.form-wrap.form-builder .frmb li.form-field .field-label{display:block;overflow-wrap:break-word}.form-wrap.form-builder .frmb li.form-field.button-field h1,.form-wrap.form-builder .frmb li.form-field.button-field h2,.form-wrap.form-builder .frmb li.form-field.button-field h3,.form-wrap.form-builder .frmb li.form-field.button-field p,.form-wrap.form-builder .frmb li.form-field.button-field canvas,.form-wrap.form-builder .frmb li.form-field.button-field output,.form-wrap.form-builder .frmb li.form-field.button-field address,.form-wrap.form-builder .frmb li.form-field.button-field blockquote,.form-wrap.form-builder .frmb li.form-field.button-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.header-field h1,.form-wrap.form-builder .frmb li.form-field.header-field h2,.form-wrap.form-builder .frmb li.form-field.header-field h3,.form-wrap.form-builder .frmb li.form-field.header-field p,.form-wrap.form-builder .frmb li.form-field.header-field canvas,.form-wrap.form-builder .frmb li.form-field.header-field output,.form-wrap.form-builder .frmb li.form-field.header-field address,.form-wrap.form-builder .frmb li.form-field.header-field blockquote,.form-wrap.form-builder .frmb li.form-field.header-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.paragraph-field h1,.form-wrap.form-builder .frmb li.form-field.paragraph-field h2,.form-wrap.form-builder .frmb li.form-field.paragraph-field h3,.form-wrap.form-builder .frmb li.form-field.paragraph-field p,.form-wrap.form-builder .frmb li.form-field.paragraph-field canvas,.form-wrap.form-builder .frmb li.form-field.paragraph-field output,.form-wrap.form-builder .frmb li.form-field.paragraph-field address,.form-wrap.form-builder .frmb li.form-field.paragraph-field blockquote,.form-wrap.form-builder .frmb li.form-field.paragraph-field .prev-holder{margin:0}.form-wrap.form-builder .frmb li.form-field.button-field .field-label,.form-wrap.form-builder .frmb li.form-field.header-field .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field .field-label{display:none}.form-wrap.form-builder .frmb li.form-field.button-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.header-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field.editing .field-label{display:block}.form-wrap.form-builder .frmb li.form-field.paragraph-field .fld-label{min-height:150px;overflow-y:auto}.form-wrap.form-builder .frmb li.form-field.checkbox-field .field-label{display:none}.form-wrap.form-builder .frmb li.deleting,.form-wrap.form-builder .frmb li.delete:hover,.form-wrap.form-builder .frmb li:hover li.delete:hover{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting .close-field,.form-wrap.form-builder .frmb li.delete:hover .close-field,.form-wrap.form-builder .frmb li:hover li.delete:hover .close-field{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting{z-index:20;pointer-events:none}.form-wrap.form-builder .frmb.disabled-field{padding:0 5px}.form-wrap.form-builder .frmb.disabled-field :hover{border-color:rgba(0,0,0,0)}.form-wrap.form-builder .frmb.disabled-field .form-element{float:none;margin-bottom:10px;overflow:visible;padding:5px 0;position:relative}.form-wrap.form-builder .frmb .frm-holder{display:none}.form-wrap.form-builder .frmb .tooltip{left:20px}.form-wrap.form-builder .frmb .prev-holder{display:block}.form-wrap.form-builder .frmb .prev-holder .form-group{margin:0}.form-wrap.form-builder .frmb .prev-holder .ql-editor{min-height:125px}.form-wrap.form-builder .frmb .prev-holder .form-group>label:not([class=formbuilder-checkbox-label]){display:none}.form-wrap.form-builder .frmb .prev-holder select,.form-wrap.form-builder .frmb .prev-holder input[type=text],.form-wrap.form-builder .frmb .prev-holder textarea,.form-wrap.form-builder .frmb .prev-holder input[type=number]{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .prev-holder input[type=date]{width:auto}.form-wrap.form-builder .frmb .prev-holder select[multiple]{height:auto}.form-wrap.form-builder .frmb .prev-holder label{font-weight:normal}.form-wrap.form-builder .frmb .prev-holder input[type=number]{width:auto;max-width:100%}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .required-asterisk{display:none}.form-wrap.form-builder .frmb .field-label,.form-wrap.form-builder .frmb .legend{color:#666;margin-bottom:5px;line-height:27px;font-size:16px;font-weight:normal}.form-wrap.form-builder .frmb .disabled-field .field-label{display:block}.form-wrap.form-builder .frmb .other-option:checked+label input{display:inline-block}.form-wrap.form-builder .frmb .other-val{margin-left:5px;display:none}.form-wrap.form-builder .frmb .field-actions{position:absolute;top:0;right:0;opacity:0}.form-wrap.form-builder .frmb .field-actions a::before{margin:0}.form-wrap.form-builder .frmb .field-actions a:hover{text-decoration:none;color:#000}.form-wrap.form-builder .frmb .field-actions .btn{display:inline-block;width:32px;height:32px;padding:0 6px;border-radius:0;border-color:#c5c5c5;background-color:#fff;color:#c5c5c5;line-height:32px;font-size:16px;border-width:0 0 1px 1px}.form-wrap.form-builder .frmb .field-actions .btn:first-child{border-bottom-left-radius:5px}.form-wrap.form-builder .frmb .field-actions .toggle-form:hover{border-color:#ccc;background-color:#65aac6;color:#fff}.form-wrap.form-builder .frmb .field-actions .toggle-form::before{margin:0}.form-wrap.form-builder .frmb .field-actions .copy-button:hover{background-color:#6fc665;color:#fff}.form-wrap.form-builder .frmb .field-actions .del-button:hover{background-color:#c66865;color:#fff}.form-wrap.form-builder .frmb .option-actions{text-align:right;margin-top:10px;width:100%;margin-left:2%}.form-wrap.form-builder .frmb .option-actions button,.form-wrap.form-builder .frmb .option-actions a{background:#fff;padding:5px 10px;border:1px solid #c5c5c5;font-size:14px;border-radius:5px;cursor:default}.form-wrap.form-builder .frmb .sortable-options-wrap{width:81.33333333%;display:inline-block}.form-wrap.form-builder .frmb .sortable-options-wrap label{font-weight:normal}@media(max-width: 481px){.form-wrap.form-builder .frmb .sortable-options-wrap{display:block;width:100%}}.form-wrap.form-builder .frmb .radio-group-field .sortable-options li:nth-child(2) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options{display:inline-block;width:100%;margin-left:2%;background:#c5c5c5;margin-bottom:0;border-radius:2px;list-style:none;padding:0}.form-wrap.form-builder .frmb .sortable-options>li{cursor:move;margin:1px;padding:6px;background-color:#fff}.form-wrap.form-builder .frmb .sortable-options>li:nth-child(1) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options>li .remove{position:relative;opacity:1;float:right;right:14px;height:18px;width:18px;top:8px;font-size:12px;padding:0;color:#c10000}.form-wrap.form-builder .frmb .sortable-options>li .remove::before{margin:0}.form-wrap.form-builder .frmb .sortable-options>li .remove:hover{background-color:#c10000 !important;text-decoration:none;color:#fff}.form-wrap.form-builder .frmb .sortable-options .option-selected{margin:0;width:5%}.form-wrap.form-builder .frmb .sortable-options input[type=text]{width:calc(44.5% - 17px);margin:0 3px;float:none}.form-wrap.form-builder .frmb .form-field .form-group{width:100%;clear:left;float:none}.form-wrap.form-builder .frmb .col-md-6 .form-elements,.form-wrap.form-builder .frmb .col-md-8 .form-elements{width:100%}.form-wrap.form-builder .frmb .field-options .add-area .add{clear:both}.form-wrap.form-builder .frmb .style-wrap button.selected{border:1px solid #000;margin-top:0;margin-right:1px;box-shadow:0 0 0 1px #fff inset;padding:1px 5px}.form-wrap.form-builder .frmb .form-elements{padding:10px 5px;background:#f7f7f7;border-radius:3px;margin:0;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements .input-wrap{width:81.33333333%;margin-left:2%;float:left}.form-wrap.form-builder .frmb .form-elements .input-wrap>input[type=checkbox]{margin-top:8px}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.form-wrap.form-builder .frmb .form-elements .add{clear:both}.form-wrap.form-builder .frmb .form-elements [contenteditable],.form-wrap.form-builder .frmb .form-elements select[multiple]{height:auto}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control{display:inline-block}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control,.form-wrap.form-builder .frmb .form-elements input[type=text],.form-wrap.form-builder .frmb .form-elements input[type=number],.form-wrap.form-builder .frmb .form-elements input[type=date],.form-wrap.form-builder .frmb .form-elements input[type=color],.form-wrap.form-builder .frmb .form-elements textarea,.form-wrap.form-builder .frmb .form-elements select{transition:background 250ms ease-in-out;padding:6px 12px;border:1px solid #c5c5c5;background-color:#fff}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .input-wrap{width:100%;margin-left:0;float:none}}.form-wrap.form-builder .frmb .form-elements input[type=number]{width:auto}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.col-md-6 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-8 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-6 .form-wrap.form-builder .frmb .form-elements label,.col-md-8 .form-wrap.form-builder .frmb .form-elements label{display:block}.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{width:16.66666667%;padding-top:7px;margin-bottom:0;text-align:right;font-weight:700;float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{display:block;width:auto;float:none;text-align:left}.form-wrap.form-builder .frmb .form-elements .false-label:first-child.empty-label,.form-wrap.form-builder .frmb .form-elements label:first-child.empty-label{display:none}}.form-wrap.form-builder .frmb .form-elements .false-label.multiple,.form-wrap.form-builder .frmb .form-elements .false-label.required-label,.form-wrap.form-builder .frmb .form-elements .false-label.toggle-label,.form-wrap.form-builder .frmb .form-elements .false-label.roles-label,.form-wrap.form-builder .frmb .form-elements .false-label.other-label,.form-wrap.form-builder .frmb .form-elements label.multiple,.form-wrap.form-builder .frmb .form-elements label.required-label,.form-wrap.form-builder .frmb .form-elements label.toggle-label,.form-wrap.form-builder .frmb .form-elements label.roles-label,.form-wrap.form-builder .frmb .form-elements label.other-label{text-align:left;float:none;margin-bottom:-3px;font-weight:400;width:calc(81.3333% - 23px)}.form-wrap.form-builder .frmb .form-elements input.error{border:1px solid #c10000}.form-wrap.form-builder .frmb .form-elements input.fld-maxlength,.form-wrap.form-builder .frmb .form-elements input.fld-rows{width:75px}.form-wrap.form-builder .frmb .form-elements input.field-error{background:#fefefe;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements label em{display:block;font-weight:400;font-size:.75em}.form-wrap.form-builder .frmb .form-elements label.maxlength-label{line-height:1em}.form-wrap.form-builder .frmb .form-elements .available-roles{display:none;padding:10px;margin:10px 0;background:#e6e6e6;box-shadow:inset 0 0 2px 0 #b3b3b3}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .available-roles{margin-left:0}}.form-wrap.form-builder .frmb .form-elements .available-roles label{font-weight:400;width:auto;float:none;display:inline}.form-wrap.form-builder .frmb .form-elements .available-roles input{display:inline;top:auto}.form-wrap.form-builder .autocomplete-field .sortable-options .option-selected{display:none}.formbuilder-mobile.form-wrap.form-builder .field-actions{opacity:1}.form-wrap.form-builder .snackbar{visibility:hidden;min-width:250px;margin-left:-125px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:16px;position:fixed;z-index:1;left:50%;bottom:30px}.form-wrap.form-builder .snackbar.show{visibility:visible;animation:fadein .5s,fadeout .5s 2.5s}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:30px;opacity:1}}@keyframes fadeout{from{bottom:30px;opacity:1}to{bottom:0;opacity:0}}.form-wrap.form-builder .ui-state-highlight{border-radius:3px;border:1px dashed #0d99f2;background-color:#e5f5f8;width:12px}.form-wrap.form-builder .moveHighlight{border:1px dashed #0d99f2 !important;background-color:#e5f5f8 !important}.form-wrap.form-builder .currentGridModeFieldHighlight{background-color:#e5f5f8 !important}.form-wrap.form-builder .grid-mode-help{background-color:#fff;border-top-left-radius:5px;border-top-right-radius:5px}.form-wrap.form-builder .grid-mode-help-row1{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:1px}.form-wrap.form-builder .grid-mode-help-row2{white-space:nowrap}.form-wrap.form-builder .colWithInsertButtons{padding-left:0 !important;padding-right:0 !important;flex:95 1 0% !important}.form-wrap.form-builder .rowWrapper{margin-left:0 !important;margin-right:0 !important}.form-wrap.form-builder .rowWrapper:last-child{flex-grow:1}.form-wrap.form-builder .rowWrapper:not(.tempRowWrapper){padding-top:1em;padding-bottom:1em}.form-wrap.form-builder .btnAddControl{border:0;background-color:unset}.form-wrap.form-builder .hoverColumnDropStyle{border:1px dashed #0d99f2;border-radius:3px;background-color:#e5f5f8;width:20px;position:fixed;margin-left:40px}.form-wrap.form-builder .hoverDropStyleInverse{background-color:#0d99f2;border:1px dashed #e5f5f8;min-height:20px}.form-wrap.form-builder .hoverDropStyleInverse .colWrapper{max-width:calc(100% - 40px)}.form-wrap.form-builder .stage-wrap>.hoverDropStyleInverse{width:100%}.form-wrap.form-builder .rowWrapper>.hoverDropStyleInverse{min-width:40px;flex-grow:1}.form-wrap.form-builder .hoverDropStyleInverse:last-child{flex-grow:1}.form-wrap.form-builder .invisibleRowPlaceholder{width:0 !important;position:fixed !important;left:-100px !important}.form-wrap.form-builder *[tooltip]{position:relative}.form-wrap.form-builder *[tooltip]:hover::after{background:rgba(0,0,0,.9);border-radius:5px 5px 5px 0;bottom:23px;color:#fff;content:attr(tooltip);padding:10px 5px;position:absolute;z-index:98;left:2px;width:230px;text-shadow:none;font-size:12px;line-height:1.5em;cursor:default}.form-wrap.form-builder *[tooltip]:hover::before{border:solid;border-color:#222 rgba(0,0,0,0);border-width:6px 6px 0;bottom:17px;content:"";left:2px;position:absolute;z-index:99;cursor:default}.form-wrap.form-builder .tooltip-element{visibility:visible;color:#fff;background:#000;width:16px;height:16px;border-radius:8px;display:inline-block;text-align:center;line-height:16px;margin:0 5px;font-size:12px;cursor:default}.form-wrap.form-builder .kc-toggle{padding-left:0 !important}.form-wrap.form-builder .kc-toggle span{position:relative;width:48px;height:24px;background:#e6e6e6;display:inline-block;border-radius:4px;border:1px solid #ccc;padding:2px;overflow:hidden;float:left;margin-right:5px;will-change:transform}.form-wrap.form-builder .kc-toggle span::after,.form-wrap.form-builder .kc-toggle span::before{position:absolute;display:inline-block;top:0}.form-wrap.form-builder .kc-toggle span::after{position:relative;content:"";width:50%;height:100%;left:0;border-radius:3px;background:linear-gradient(to bottom, white 0%, #ccc 100%);border:1px solid #999;transition:transform 100ms;transform:translateX(0)}.form-wrap.form-builder .kc-toggle span::before{border-radius:4px;top:2px;left:2px;content:"";width:calc(100% - 4px);height:18px;box-shadow:0 0 1px 1px #b3b3b3 inset;background-color:rgba(0,0,0,0)}.form-wrap.form-builder .kc-toggle input{height:0;overflow:hidden;width:0;opacity:0;pointer-events:none;margin:0}.form-wrap.form-builder .kc-toggle input:checked+span::after{transform:translateX(100%)}.form-wrap.form-builder .kc-toggle input:checked+span::before{background-color:#6fc665}.form-wrap.form-builder.controls-left{flex-direction:row-reverse}.form-wrap.form-builder::after{content:"";display:table;clear:both}.form-wrap.form-builder .cb-wrap,.form-wrap.form-builder .stage-wrap{vertical-align:top}.form-wrap.form-builder .form-elements,.form-wrap.form-builder .form-group,.form-wrap.form-builder .multi-row span,.form-wrap.form-builder textarea{display:block}.form-wrap.form-builder .form-elements::after,.form-wrap.form-builder .form-group::after{content:".";display:block;height:0;clear:both;visibility:hidden}.form-wrap.form-builder .form-elements .field-options div:hover,.form-wrap.form-builder .frmb .legend,.form-wrap.form-builder .frmb .prev-holder{cursor:move}.form-wrap.form-builder .frmb-tt{display:none;position:absolute;top:0;left:0;border:1px solid #262626;background-color:#666;border-radius:5px;padding:5px;color:#fff;z-index:20;text-align:left;font-size:12px;pointer-events:none}.form-wrap.form-builder .frmb-tt::before{border-color:#262626 rgba(0,0,0,0);bottom:-11px}.form-wrap.form-builder .frmb-tt::before,.form-wrap.form-builder .frmb-tt::after{content:"";position:absolute;border-style:solid;border-width:10px 10px 0;border-color:#666 rgba(0,0,0,0);display:block;width:0;z-index:1;margin-left:-10px;bottom:-10px;left:20px}.form-wrap.form-builder .frmb-tt a{text-decoration:underline;color:#fff}.form-builder-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:none;z-index:10}.form-builder-overlay.visible{display:block}.form-builder-dialog{position:absolute;border-radius:5px;background:#fff;z-index:20;transform:translate(-50%, -50%);top:0;left:0;padding:10px;box-shadow:0 3px 10px #000;min-width:166px;max-height:80%;overflow-y:scroll}.form-builder-dialog h3{margin-top:0}.form-builder-dialog.data-dialog{width:65%;background-color:#23241f}.form-builder-dialog.data-dialog pre{background:none;border:0 none;box-shadow:none;margin:0;color:#f2f2f2}.form-builder-dialog.positioned{transform:translate(-50%, -100%)}.form-builder-dialog.positioned .button-wrap::before{content:"";width:0;height:0;border-left:15px solid rgba(0,0,0,0);border-right:15px solid rgba(0,0,0,0);border-top:10px solid #fff;position:absolute;left:50%;top:100%;transform:translate(-50%, 10px)}.form-builder-dialog .button-wrap{position:relative;margin-top:10px;text-align:right;clear:both}.form-builder-dialog .button-wrap .btn{margin-left:10px}',""]),t.default=u},476:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",o=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),o&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),o&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,o,i,n){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=n),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},678:function(e){e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},933:function(e){e.exports=function(e){return e[1]}},539:function(e,t,r){var o=r(400).Symbol;e.exports=o},736:function(e,t,r){var o=r(539),i=r(840),n=r(258),l=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?i(e):n(e)}},833:function(e,t,r){var o=r(127),i=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(i,""):e}},120:function(e){var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},840:function(e,t,r){var o=r(539),i=Object.prototype,n=i.hasOwnProperty,l=i.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=n.call(e,a),r=e[a];try{e[a]=void 0;var o=!0}catch(e){}var i=l.call(e);return o&&(t?e[a]=r:delete e[a]),i}},258:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},400:function(e,t,r){var o=r(120),i="object"==typeof self&&self&&self.Object===Object&&self,n=o||i||Function("return this")();e.exports=n},127:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},726:function(e,t,r){var o=r(611),i=r(846),n=r(936),l=Math.max,a=Math.min;e.exports=function(e,t,r){var s,d,c,f,u,p,m=0,b=!1,h=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var r=s,o=d;return s=d=void 0,m=t,f=e.apply(o,r)}function v(e){var r=e-p;return void 0===p||r>=t||r<0||h&&e-m>=c}function y(){var e=i();if(v(e))return x(e);u=setTimeout(y,function(e){var r=t-(e-p);return h?a(r,c-(e-m)):r}(e))}function x(e){return u=void 0,g&&s?w(e):(s=d=void 0,f)}function A(){var e=i(),r=v(e);if(s=arguments,d=this,p=e,r){if(void 0===u)return function(e){return m=e,u=setTimeout(y,t),b?w(e):f}(p);if(h)return clearTimeout(u),u=setTimeout(y,t),w(p)}return void 0===u&&(u=setTimeout(y,t)),f}return t=n(t)||0,o(r)&&(b=!!r.leading,c=(h="maxWait"in r)?l(n(r.maxWait)||0,t):c,g="trailing"in r?!!r.trailing:g),A.cancel=function(){void 0!==u&&clearTimeout(u),m=0,s=p=d=u=void 0},A.flush=function(){return void 0===u?f:x(i())},A}},611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},360:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},193:function(e,t,r){var o=r(736),i=r(360);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==o(e)}},846:function(e,t,r){var o=r(400);e.exports=function(){return o.Date.now()}},783:function(e,t,r){var o=r(726),i=r(611);e.exports=function(e,t,r){var n=!0,l=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(r)&&(n="leading"in r?!!r.leading:n,l="trailing"in r?!!r.trailing:l),o(e,t,{leading:n,maxWait:t,trailing:l})}},936:function(e,t,r){var o=r(833),i=r(611),n=r(193),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(n(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var r=a.test(e);return r||s.test(e)?d(e.slice(2),r?2:8):l.test(e)?NaN:+e}},747:function(e){e.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(o,i,function(t){return e[t]}.bind(null,i));return o},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="",r(r.s=7)}([function(e,t,r){var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(2),n=r(10),l=Object.prototype.toString;function a(e){return"[object Array]"===l.call(e)}function s(e){return null!==e&&"object"===(void 0===e?"undefined":o(e))}function d(e){return"[object Function]"===l.call(e)}function c(e,t){if(null!=e)if("object"!==(void 0===e?"undefined":o(e))&&(e=[e]),a(e))for(var r=0,i=e.length;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){a.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){a.headers[e]=o.merge(n)})),e.exports=a}).call(this,r(12))},function(e,t,r){e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),o=0;o0&&void 0!==arguments[0]?arguments[0]:l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}return e.prototype.processConfig=function(e){var t=this,r=Object.assign({},l,e),o=r.location,i=function(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}(r,["location"]),n=o.replace(/\/?$/,"/");this.config=Object.assign({},{location:n},i);var a=this.config,s=a.override,d=a.preloaded,c=void 0===d?{}:d,f=Object.entries(this.langs).concat(Object.entries(s||c));this.langs=f.reduce((function(e,r){var o=r[0],i=r[1];return e[o]=t.applyLanguage.call(t,o,i),e}),{}),this.locale=this.config.locale||this.config.langs[0]},e.prototype.init=function(e){return this.processConfig.call(this,Object.assign({},this.config,e)),this.setCurrent(this.locale)},e.prototype.addLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t="string"==typeof t?this.processFile.call(this,t):t,this.applyLanguage.call(this,e,t),this.config.langs.push("locale")},e.prototype.getValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.locale;return this.langs[t]&&this.langs[t][e]||this.getFallbackValue(e)},e.prototype.getFallbackValue=function(e){var t=Object.values(this.langs).find((function(t){return t[e]}));return t&&t[e]},e.prototype.makeSafe=function(e){var t={"{":"\\{","}":"\\}","|":"\\|"};return e=e.replace(/\{|\}|\|/g,(function(e){return t[e]})),new RegExp(e,"g")},e.prototype.put=function(e,t){return this.current[e]=t},e.prototype.get=function(e,t){var r=this.getValue(e);if(r){var i=r.match(/\{[^}]+?\}/g),n=void 0;if(t&&i)if("object"===(void 0===t?"undefined":o(t)))for(var l=0;l1&&void 0!==arguments[1])||arguments[1],r=this;return new Promise((function(o,i){if(-1!==r.loaded.indexOf(e)&&t)return r.applyLanguage.call(r,r.langs[e]),o(r.langs[e]);var l=[r.config.location,e,r.config.extension].join("");return(0,n.get)(l).then((function(t){var i=t.data,n=r.processFile(i);return r.applyLanguage.call(r,e,n),r.loaded.push(e),o(r.langs[e])})).catch((function(){var t=r.applyLanguage.call(r,e);o(t)}))}))},e.prototype.applyLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.config.override[e]||{},o=this.langs[e]||{};return this.langs[e]=Object.assign({},o,t,r),this.langs[e]},e.prototype.setCurrent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return this.loadLang(t).then((function(){return e.locale=t,e.current=e.langs[t],e.current}))},i(e,[{key:"getLangs",get:function(){return this.config.langs}}]),e}();t.default=new a},function(e,t,r){e.exports=r(9)},function(e,t,r){var o=r(0),i=r(2),n=r(11),l=r(1);function a(e){var t=new n(e),r=i(n.prototype.request,t);return o.extend(r,n.prototype,t),o.extend(r,t),r}var s=a(l);s.Axios=n,s.create=function(e){return a(o.merge(l,e))},s.Cancel=r(6),s.CancelToken=r(26),s.isCancel=r(5),s.all=function(e){return Promise.all(e)},s.spread=r(27),e.exports=s,e.exports.default=s},function(e,t,r){function o(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(o(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&o(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){var o=r(1),i=r(0),n=r(21),l=r(22);function a(e){this.defaults=e,this.interceptors={request:new n,response:new n}}a.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(o,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[l,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],(function(e){a.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}})),i.forEach(["post","put","patch"],(function(e){a.prototype[e]=function(t,r,o){return this.request(i.merge(o||{},{method:e,url:t,data:r}))}})),e.exports=a},function(e,t,r){var o,i,n=e.exports={};function l(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(o===setTimeout)return setTimeout(e,0);if((o===l||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:l}catch(e){o=l}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var d,c=[],f=!1,u=-1;function p(){f&&d&&(f=!1,d.length?c=d.concat(c):u=-1,c.length&&m())}function m(){if(!f){var e=s(p);f=!0;for(var t=c.length;t;){for(d=c,c=[];++u1)for(var r=1;r=0)return;l[t]="set-cookie"===t?(l[t]?l[t]:[]).concat([r]):l[t]?l[t]+", "+r:r}})),l):l}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var o=e;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=o.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,i=String(e),n="",l=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.charAt(0|l)||(a="=",l%1);n+=a.charAt(63&t>>8-l%1*8)){if((r=i.charCodeAt(l+=.75))>255)throw new o;t=t<<8|r}return n}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,r,i,n,l){var a=[];a.push(e+"="+encodeURIComponent(t)),o.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),o.isString(i)&&a.push("path="+i),o.isString(n)&&a.push("domain="+n),!0===l&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){var o=r(0);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){o.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,r){var o=r(0),i=r(23),n=r(5),l=r(1),a=r(24),s=r(25);function d(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return d(e),e.baseURL&&!a(e.url)&&(e.url=s(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||l.adapter)(e).then((function(t){return d(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return n(t)||(d(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){var o=r(0);e.exports=function(e,t,r){return o.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){var o=r(6);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new o(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,r){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},54:function(e){e.exports=function(e){try{var t=window[e],r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(e){return!1}}},978:function(e,t,r){var o=r(892),i=r(424);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);o(i,{attributes:{class:"formBuilder-injected-style"},insert:"head",singleton:!1}),e.exports=i.locals||{}},892:function(e,t,r){var o,i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),n=[];function l(e){for(var t=-1,r=0;r"},658:function(e){e.exports="data:image/svg+xml; utf8,"}},r={};function o(e){var i=r[e];if(void 0!==i)return i.exports;var n=r[e]={id:e,exports:{}};return t[e](n,n.exports,o),n.exports}o.m=t,o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.b=document.baseURI||self.location.href,o.nc=void 0,function(){o(978);var t=o(783),r=o.n(t);function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const n={},l={text:["text","password","email","color","tel"],header:["h1","h2","h3"],button:["button","submit","reset"],paragraph:["p","address","blockquote","canvas","output"],textarea:["textarea","quill"]},a=e=>{e.parentNode&&e.parentNode.removeChild(e)},s=e=>{for(;e.firstChild;)e.removeChild(e.firstChild);return e},d=function(e,t,r){void 0===r&&(r=!0);const o=[];let i=["none","block"];r&&(i=i.reverse());for(let r=e.length-1;r>=0;r--)-1!==e[r].textContent.toLowerCase().indexOf(t.toLowerCase())?(e[r].style.display=i[0],o.push(e[r])):e[r].style.display=i[1];return o},c=["select","checkbox-group","checkbox","radio-group","autocomplete"],f=new RegExp(`(${c.join("|")})`);class u{constructor(e){return i(this,"stage",void 0),i(this,"controls",void 0),i(this,"formActions",void 0),i(this,"editorWrap",void 0),this.optionFields=c,this.optionFieldsRegEx=f,this.subtypes=l,this.empty=s,this.filter=d,n[e]=this,n[e]}onRender(e,t){e.parentElement?t(e):window.requestAnimationFrame((()=>this.onRender(e,t)))}}const p={};class m{constructor(e){this.formData={},this.formID=e,p[e]=this}}var b=o(747),h=o.n(b);function g(e){let t;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}var w={loaded:g("loaded"),viewData:g("viewData"),userDeclined:g("userDeclined"),modalClosed:g("modalClosed"),modalOpened:g("modalOpened"),formSaved:g("formSaved"),fieldAdded:g("fieldAdded"),fieldRemoved:g("fieldRemoved"),fieldRendered:g("fieldRendered"),fieldEditOpened:g("fieldEditOpened"),fieldEditClosed:g("fieldEditClosed"),stageEmptied:g("stageEmptied")};const v={clobberingProtection:{document:!0,form:!0,namespaceAttributes:!1},backendOrder:["dompurify","sanitizer","fallback"],backends:{sanitizer:"function"==typeof window.Sanitizer&&new window.Sanitizer,dompurify:!!window.DOMPurify&&(y=window.DOMPurify,y.setConfig({SANITIZE_DOM:!1,ADD_ATTR:["contenteditable"]}),y),fallback:e=>e}};var y;const x=(e,t)=>{if(0===v.backendOrder.length)return!1;const r=e.toLowerCase();return t=t?t+"":"",r.startsWith("on")||["form","formaction"].includes(r)||t.trim().toLowerCase().startsWith("javascript:")};v.backends.fallback=function(t){const r=document.implementation.createHTMLDocument(""),o=r.createElement("base");o.href=document.location.href,r.head.appendChild(o);const i=["applet","comment","embed","iframe","link","listing","meta","noscript","object","plaintext","script","style","xmp"],n=e.parseHTML(t,r,!1);e(n).find("*").addBack().each(((t,r)=>{"#text"!==r.nodeName&&(r.tagName&&i.includes(r.tagName.toLowerCase())?r.parentElement?r.parentElement.removeChild(r):n.includes(r)&&n.splice(n.indexOf(r),1):r.attributes&&Array.from(r.attributes).forEach((t=>{x(t.name,t.value)&&e(r).removeAttr(t.name)})))}));const l=r.createElement("div");return e(l).html(n),l.innerHTML};const A=e=>{const t=!!v.clobberingProtection.document&&document,r=!!v.clobberingProtection.form&&document.createElement("form");return t&&e in t||r&&e in r?v.clobberingProtection.namespaceAttributes?"user-content-"+e:void 0:e},C={fallback:(e,t)=>{const r=v.backends.fallback,o="function"==typeof r;return o&&(t=r(t)),e.innerHTML=t,o},dompurify:(e,t)=>{const r=v.backends.dompurify;return!(!1===r||!r.isSupported||(e.innerHTML=r.sanitize(t),0))},sanitizer:(e,t)=>{const r=v.backends.sanitizer;return!!r&&(e.setHTML(t,{sanitizer:r}),!0)}},O=function(t,r,o){if(void 0===o&&(o=!1),!o){const o=document.createElement(t.tagName);return void 0!==v.backendOrder.find((e=>C[e](o,r)))?((t=>{e(t).find("*").each(((e,t)=>{["embed","form","iframe","image","img","object"].includes(t.tagName.toLowerCase())&&t.removeAttribute("name"),["id","name"].forEach((e=>{if(t.hasAttribute(e)){const r=A(t.getAttribute(e));void 0===r?t.removeAttribute(e):t.setAttribute(e,r)}}))}))})(o),t.innerHTML=o.innerHTML,t):(t.innerHTML=r,t)}t.textContent=r},k=["events"],j=["tag","content"];function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function S(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};const T=function(e,t){if(void 0===t&&(t=!1),null==e||"object"!=typeof e)return e;const r="function"==typeof window.structuredClone?window.structuredClone(e):Object.assign({},e),o=[null,void 0,""];t&&o.push(!1);for(const e in r)o.includes(r[e])?delete r[e]:Array.isArray(r[e])&&(r[e].length||delete r[e]);return r},D=function(e){return!["values","enableOther","other","label","subtype"].includes(e)},L=e=>Object.entries(e).map((e=>{let[t,r]=e;return D(t)&&Object.values(R(t,r)).join("")})).filter(Boolean).join(" "),R=(e,t)=>{let r;return e=M(e),t&&(Array.isArray(t)?r=G(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),r=G(t.trim()))),{name:e,value:t=t?`="${r}"`:""}},I=e=>e.reduce(((e,t)=>e.concat(Array.isArray(t)?I(t):t)),[]),M=e=>({className:"class"}[e]||P(e)),P=e=>(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))).replace(/\s/g,"-").replace(/^-+/g,""),B=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),F=function(){let e,t=0;return function(r){const o=Date.now();return o===e?++t:(t=0,e=o),(r.type||P(r.label))+"-"+o+"-"+t}}(),H=e=>void 0===e?e:[["array",e=>Array.isArray(e)],["node",e=>e instanceof window.Node||e instanceof window.HTMLElement],["component",()=>e&&e.dom],[typeof e,()=>!0]].find((t=>t[1](e)))[0],q=function(e,t,r){void 0===t&&(t=""),void 0===r&&(r={});let o=H(t);const{events:i}=r,n=N(r,k),l=document.createElement(e),a={string:e=>{O(l,l.innerHTML+e)},object:e=>{const{tag:t,content:r}=e,o=N(e,j);return l.appendChild(q(t,r,o))},node:e=>l.appendChild(e),array:e=>{for(let t=0;t{e=e(),o=H(e),a[o](e)},undefined:()=>{}};for(const e in n)if(n.hasOwnProperty(e)){const t=M(e);let r=Array.isArray(n[e])?Q(n[e].join(" ").split(" ")).join(" "):n[e];if(x(t,r))continue;if("boolean"==typeof r){if(!0===r){const e="contenteditable"===t||t;l.setAttribute(t,e)}}else"id"!==t&&"name"!==t||(r=A(r)),void 0!==r&&l.setAttribute(t,r)}return t&&a[o](t),((e,t)=>{if(t)for(const r in t)t.hasOwnProperty(r)&&e.addEventListener(r,(e=>t[r](e)))})(l,i),l},z=e=>{const t=e.attributes,r={};return X(t,(e=>{let o=t[e].value||"";o.match(/false|true/g)?o="true"===o:o.match(/undefined/g)&&(o=void 0),o&&(r[B(t[e].name)]=o)})),r},U=e=>{const t=[];for(let r=0;r{const t=[];if(e.length){const r=e[0].getElementsByTagName("value");for(let e=0;e{const t=(new window.DOMParser).parseFromString(e,"text/xml"),r=[];if(t){const e=t.getElementsByTagName("field");for(let t=0;t{const t=document.createElement("textarea");return t.innerHTML=e,t.textContent},J=e=>{const t=document.createElement("textarea");return t.textContent=e,t.innerHTML},G=e=>{const t={'"':""","&":"&","<":"<",">":">"};return"string"==typeof e?e.replace(/["&<>]/g,(e=>t[e]||e)):e},X=function(e,t,r){for(let o=0;oe.filter(((e,t,r)=>r.indexOf(e)===t)),Z=(e,t)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Y=function(e,t){void 0===t&&(t="");const r=jQuery;let o=[];return Array.isArray(e)||(e=[e]),K(e)||(o=jQuery.map(e,(e=>{const r={dataType:"script",cache:!0,url:(t||"")+e};return jQuery.ajax(r).done((()=>window.fbLoaded.js.push(e)))}))),o.push(jQuery.Deferred((e=>r(e.resolve)))),jQuery.when(...o)},K=function(e,t){void 0===t&&(t="js");const r=window.fbLoaded[t];return Array.isArray(e)?e.every((e=>r.includes(e))):r.includes(e)},_=function(t,r){void 0===r&&(r=""),Array.isArray(t)||(t=[t]),t.forEach((t=>{let o="href",i=t,n="";if("object"==typeof t&&(o=t.type||(t.style?"inline":"href"),n=t.id,i=n||t.href||t.style,t="inline"===o?t.style:t.href),!K(i,"css")){if("href"===o){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=(r||"")+t,document.head.appendChild(e)}else e(``).attr("id",n).appendTo(e(document.head));window.fbLoaded.css.push(i)}}))},ee=e=>e.replace(/\b\w/g,(function(e){return e.toUpperCase()})),te=(e,t)=>{const r=Object.assign({},e,t);for(const o in t)r.hasOwnProperty(o)&&(Array.isArray(t[o])?r[o]=Array.isArray(e[o])?Q(e[o].concat(t[o])):t[o]:"object"==typeof t[o]?r[o]=te(e[o],t[o]):r[o]=t[o]);return r},re=(e,t,r)=>t.split(" ").forEach((t=>e.addEventListener(t,r,!1))),oe=(e,t)=>{const r=t.replace(".","");for(;(e=e.parentElement)&&!e.classList.contains(r););return e},ie=()=>{let e="";var t;return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e="formbuilder-mobile"),e},ne=e=>e.replace(/\s/g,"-").replace(/[^a-zA-Z0-9[\]_-]/g,""),le=e=>e.replace(/[^0-9]/g,""),ae=(e,t)=>t.filter((function(e){return!~this.indexOf(e)}),e),se=/^col-(xs|sm|md|lg)-([^\s]+)/,de=e=>"string"==typeof e?e.split(" ").filter((e=>se.test(e)||e.startsWith("row-"))):[];function ce(){for(var e=arguments.length,t=new Array(e),r=0;r"number"==typeof e))}const fe={addEventListeners:re,attrString:L,camelCase:B,capitalize:ee,closest:oe,getContentType:H,escapeAttr:G,escapeAttrs:e=>{for(const t in e)e.hasOwnProperty(t)&&(e[t]=G(e[t]));return e},escapeHtml:J,forceNumber:le,forEach:X,getScripts:Y,getStyles:_,hyphenCase:P,isCached:K,markup:q,merge:te,mobileClass:ie,nameAttr:F,parsedHtml:V,parseXML:$,removeFromArray:Z,safeAttr:R,safeAttrName:M,safename:ne,subtract:ae,trimObj:T,unique:Q,validAttr:D,titleCase:function(e){const t=["a","an","and","as","at","but","by","for","for","from","in","into","near","nor","of","on","onto","or","the","to","with"].map((e=>`\\s${e}\\s`)),r=new RegExp(`(?!${t.join("|")})\\w\\S*`,"g");return`${e}`.replace(r,(e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/[A-Z]/g,(e=>` ${e}`))))},firstNumberOrUndefined:ce,splitObject:(e,t)=>{const r=e=>(t,r)=>(t[r]=e[r],t);return[Object.keys(e).filter((e=>t.includes(e))).reduce(r(e),{}),Object.keys(e).filter((e=>!t.includes(e))).reduce(r(e),{})]}};e.fn.swapWith=function(t){const r=this,o=e(t),i=e("
");return r.before(i),o.before(r),i.before(o).remove(),r};var ue=fe;const pe=["label","type"];class me{constructor(e,t){this.rawConfig=jQuery.extend({},e),e=jQuery.extend({},e),this.preview=t,delete e.isPreview,this.preview&&delete e.required;const r=["label","description","subtype","required","disabled"];for(const t of r)this[t]=e[t],delete e[t];e.id||(e.name?e.id=e.name:e.id="control-"+Math.floor(1e7*Math.random()+1)),this.id=e.id,this.type=e.type,this.description&&(e.title=this.description),me.controlConfig||(me.controlConfig={});const o=this.subtype?this.type+"."+this.subtype:this.type;this.classConfig=jQuery.extend({},me.controlConfig[this.type]||{},me.controlConfig[o]||{}),this.subtype&&(e.type=this.subtype),this.required&&(e.required="required",e["aria-required"]="true"),this.disabled&&(e.disabled="disabled"),this.config=e,this.configure()}static get definition(){return{}}static register(e,t,r){const o=r?r+".":"";me.classRegister||(me.classRegister={}),Array.isArray(e)||(e=[e]);for(const r of e)-1===r.indexOf(".")?me.classRegister[o+r]=t:me.error(`Ignoring type ${r}. Cannot use the character '.' in a type name.`)}static getRegistered(e){void 0===e&&(e=!1);const t=Object.keys(me.classRegister);return t.length?t.filter((t=>e?t.indexOf(e+".")>-1:-1===t.indexOf("."))):t}static getRegisteredSubtypes(){const e={};for(const t in me.classRegister)if(me.classRegister.hasOwnProperty(t)){const[r,o]=t.split(".");if(!o)continue;e[r]||(e[r]=[]),e[r].push(o)}return e}static getClass(e,t){const r=t?e+"."+t:e;return me.classRegister[r]||me.classRegister[e]||me.error("Invalid control type. (Type: "+e+", Subtype: "+t+"). Please ensure you have registered it, and imported it correctly.")}static loadCustom(e){let t=[];if(e&&(t=t.concat(e)),window.fbControls&&(t=t.concat(window.fbControls)),!this.fbControlsLoaded){for(const e of t)e(me,me.classRegister);this.fbControlsLoaded=!0}}static mi18n(e,t){const r=this.definition;let o=r.i18n||{};o=o[h().locale]||o.default||o;const i=this.camelCase(e),n="object"==typeof o?o[i]||o[e]:o;if(n)return n;let l=r.mi18n;return"object"==typeof l&&(l=l[i]||l[e]),l||(l=i),h().get(l,t)}static active(e){return!Array.isArray(this.definition.inactive)||-1===this.definition.inactive.indexOf(e)}static label(e){return this.mi18n(e)}static icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}configure(){}build(){const e=this.config,{label:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,pe);return this.markup(r,V(t),o)}on(e){const t={prerender:e=>e,render:e=>{const t=()=>{this.onRender&&this.onRender(e)};this.css&&_(this.css),this.js&&!K(this.js)?Y(this.js).done(t):t()}};return e?t[e]:t}static error(e){throw new Error(e)}markup(e,t,r){return void 0===t&&(t=""),void 0===r&&(r={}),this.element=q(e,t,r),this.element}parsedHtml(e){return V(e)}static camelCase(e){return B(e)}}const be=(e,t)=>{let r=e.id?`formbuilder-${e.type} form-group field-${e.id}`:"";if(e.className){const o=de(e.className);o&&o.length>0&&(r+=` ${o.join(" ")}`,Array.isArray(t)||(t=[t]),t.forEach((e=>{e.classList&&e.classList.remove(...o),e.querySelectorAll("[class*=row-],[class*=col-]").forEach((e=>{e.classList&&e.classList.remove(...o)}))})))}return r};class he{constructor(e,t,r,o){var i,n,l;void 0===t&&(t=!1),void 0===r&&(r=!1),void 0===o&&(o={}),this.preview=null!==(i=t)&&void 0!==i&&i,this.disableHTMLLabels=null!==(n=r)&&void 0!==n&&n,this.controlConfig=null!==(l=o)&&void 0!==l?l:{},this.templates={label:null,help:null,default:(e,t,r,o)=>(r&&t.appendChild(r),this.markup("div",[t,e],{className:be(o,e)})),noLabel:(e,t,r,o)=>this.markup("div",e,{className:be(o,e)}),hidden:e=>e},e&&(this.templates=jQuery.extend(this.templates,e)),this.configure()}configure(){}build(e,t,r){this.preview&&(t.name?t.name=t.name+"-preview":t.name=ue.nameAttr(t)+"-preview"),t.id=t.name,this.data=jQuery.extend({},t),me.controlConfig=this.controlConfig;const o=new e(t,this.preview);let i=o.build();if("object"==typeof i&&i.field||(i={field:i}),"string"==typeof i.field){const e=this.markup("div",i.field,{});1===e.childElementCount?i.field=e.children.item(0):i.field=Array.from(e.children)}const n=this.label(),l=this.help();let a;a=r&&this.isTemplate(r)?r:this.isTemplate(i.layout)?i.layout:"default";const s=this.processTemplate(a,i.field,n,l);return o.on("prerender")(s),s.addEventListener("fieldRendered",o.on("render")),s}label(){const e=this.data.label||"",t=[this.disableHTMLLabels?document.createTextNode(e):ue.parsedHtml(e)];return this.data.required&&t.push(this.markup("span","*",{className:"formbuilder-required"})),this.isTemplate("label")?this.processTemplate("label",t):this.markup("label",t,{for:this.data.id,className:`formbuilder-${this.data.type}-label`})}help(){return this.data.description?this.isTemplate("help")?this.processTemplate("help",this.data.description):this.markup("span","?",{className:"tooltip-element",tooltip:this.data.description}):null}isTemplate(e){return"function"==typeof this.templates[e]}processTemplate(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;onull;h().addLanguage("en-US",{NATIVE_NAME:"English (US)",ENGLISH_NAME:"English",addOption:"Add Option +",allFieldsRemoved:"All fields were removed.",allowMultipleFiles:"Allow users to upload multiple files",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",checkboxGroup:"Checkbox Group",checkbox:"Checkbox",checkboxes:"Checkboxes",className:"Class",clearAllMessage:"Are you sure you want to clear all fields?",clear:"Clear",close:"Close",content:"Content",copy:"Copy To Clipboard",copyButton:"+",copyButtonTooltip:"Copy",dateField:"Date Field",description:"Help Text",descriptionField:"Description",devMode:"Developer Mode",editNames:"Edit Names",editorTitle:"Form Elements",editXML:"Edit XML",enableOther:"Enable "Other"",enableOtherMsg:"Let users enter an unlisted option",fieldDeleteWarning:"false",fieldVars:"Field Variables",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to this area",header:"Header",hide:"Edit",hidden:"Hidden Input",inline:"Inline",inlineDesc:"Display {type} inline",label:"Label",labelEmpty:"Field Label cannot be empty",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length",minOptionMessage:"This field requires a minimum of 2 options",minSelectionRequired:"Minimum {min} selections required",multipleFiles:"Multiple Files",name:"Name",no:"No",noFieldsToClear:"There are no fields to clear",number:"Number",off:"Off",on:"On",option:"Option",optionCount:"Option {count}",options:"Options",optional:"optional",optionLabelPlaceholder:"Label",optionValuePlaceholder:"Value",optionEmpty:"Option value required",other:"Other",paragraph:"Paragraph",placeholder:"Placeholder","placeholders.value":"Value","placeholders.label":"Label","placeholders.email":"Enter your email","placeholders.className":"space separated classes","placeholders.password":"Enter your password",preview:"Preview",radioGroup:"Radio Group",radio:"Radio",removeMessage:"Remove Element",removeOption:"Remove Option",remove:"×",required:"Required",requireValidOption:"Only accept a pre-defined Option",richText:"Rich Text Editor",roles:"Access",rows:"Rows",save:"Save",selectOptions:"Options",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",size:"Size","size.xs":"Extra Small","size.sm":"Small","size.m":"Default","size.lg":"Large",style:"Style","styles.btn.default":"Default","styles.btn.danger":"Danger","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",text:"Text Field",textArea:"Text Area",toggle:"Toggle",warning:"Warning!",value:"Value",viewJSON:"[{…}]",viewXML:"</>",yes:"Yes"});const we={actionButtons:[],allowStageSort:!0,append:!1,controlOrder:["autocomplete","button","checkbox-group","checkbox","date","file","header","hidden","number","paragraph","radio-group","select","text","textarea"],controlPosition:"right",dataType:"json",defaultFields:[],disabledActionButtons:[],disabledAttrs:[],disabledFieldButtons:{},disabledSubtypes:{},disableFields:[],disableHTMLLabels:!1,disableInjectedStyle:!1,editOnAdd:!1,fields:[],fieldRemoveWarn:!1,fieldEditContainer:null,inputSets:[],notify:{error:e=>{console.log(e)},success:e=>{console.log(e)},warning:e=>{console.warn(e)}},onAddField:(e,t)=>t,onAddFieldAfter:(e,t)=>t,onAddOption:e=>e,onClearAll:ge,onCloseFieldEdit:ge,onOpenFieldEdit:ge,onSave:ge,persistDefaultFields:!1,prepend:!1,replaceFields:[],roles:{1:"Administrator"},sanitizerOptions:{clobberingProtection:{document:!1,form:!1},backendOrder:[]},scrollToFieldOnAdd:!0,showActionButtons:!0,sortableControls:!1,stickyControls:{enable:!0,offset:{top:5,bottom:"auto",right:"auto"}},subtypes:{},templates:{},typeUserAttrs:{},typeUserDisabledAttrs:{},typeUserEvents:{},defaultGridColumnClass:"col-md-12",cancelGridModeDistance:100,enableColumnInsertMenu:!1,enableEnhancedBootstrapGrid:!1},ve={btn:["default","danger","info","primary","success","warning"]},ye={location:"assets/lang/"},xe={},Ae={rowWrapperClass:"rowWrapper",colWrapperClass:"colWrapper",tmpRowPlaceholderClass:"tempRowWrapper",invisibleRowPlaceholderClass:"invisibleRowPlaceholder"};var Ce=o(54),Oe=o.n(Ce);const ke=["values"],je=["label","events"],Ee=["actionButtons","replaceFields"];function Se(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}class Ne{constructor(e,t,r){this.data=p[e],this.d=n[e],this.config=xe[e],this.doCancel=!1,this.layout=t,this.handleKeyDown=this.handleKeyDown.bind(this),this.formBuilder=r,this.toastTimer=null}startMoving(e,t){t.item.show().addClass("moving"),this.doCancel=!0,this.from=t.item.parent()}stopMoving(t,r){const o=this;r.item.removeClass("moving"),o.doCancel&&(r.sender&&e(r.sender).sortable("cancel"),this.from.closest(".frmb-control").sortable("cancel")),o.save(),o.doCancel=!1}beforeStop(e,t){const r=this,o=this.config.opts,i=r.d.stage.childNodes.length-1,n=[];r.stopIndex=t.placeholder.closest("ul.stage-wrap > *").index()-1,!o.sortableControls&&t.item.parent().hasClass("frmb-control")&&n.push(!0),n.push(t.item.is(":not(li.input-control,li.input-set-control)")&&!t.item.parent().hasClass("frmb-control")),o.prepend&&n.push(0===r.stopIndex),o.append&&n.push(r.stopIndex+1===i),r.doCancel=n.some((e=>!0===e))}getTypes(t){const r={type:t.attr("type")},o=e(".fld-subtype",t).val();return o!==r.type&&(r.subtype=o),r}fieldOptionData(t){const r=[],o=e(".sortable-options li",t);return o.each((e=>{const t=o[e],i=t.querySelectorAll("input[type=text], input[type=number], select"),n=t.querySelectorAll("input[type=checkbox], input[type=radio]"),l={};X(i,(e=>{const t=i[e],r=t.dataset.attr;l[r]=t.value})),X(n,(e=>{const t=n[e],r=t.getAttribute("data-attr");l[r]=t.checked})),r.push(l)})),r}xmlSave(e){const t=this.prepData(e),r=new XMLSerializer,o=[""];t.forEach((e=>{const{values:t}=e;let r=[`{let[t,r]=e;return`${P(t)}="${r}"`})).join(" ")}>`];var i;if(c.includes(e.type)){const e=t.map((e=>q("option",e.label,e).outerHTML));r=r.concat(e)}r.push(""),o.push(r)})),o.push("");const i=q("form-template",I(o).join(""));return r.serializeToString(i)}prepData(t){const r=[],o=this.d,i=this,n=this.config;if(0!==t.childNodes.length){const l=[];X(t.childNodes,(function(t,r){e(r).find("li.form-field").each((function(e,t){l.push(t)}))})),X(t.childNodes,(function(t,r){const o=e(r);o.is("li")&&o.hasClass("form-field")&&l.push(r)})),l.length&&l.forEach((t=>{const l=e(t);if(!l.hasClass("disabled-field")){let a=i.getTypes(l);const s=e(".roles-field:checked",t),d=s.map((e=>s[e].value)).get();if(a=Object.assign({},a,i.getAttrVals(t)),a.subtype)if("quill"===a.subtype){const e=`${a.name}-preview`;if(window.fbEditors.quill[e]){const t=window.fbEditors.quill[e].instance.getContents();a.value=window.JSON.stringify(t.ops)}}else if("tinymce"===a.subtype&&window.tinymce){const e=`${a.name}-preview`,t=window.tinymce.get(e);t&&(a.value=t.getContent())}if(d.length&&(a.role=d.join(",")),a.className=a.className||a.class,a.className&&"true"==l.attr("addeddefaultcolumnclass")&&1==l.closest(this.formBuilder.rowWrapperClassSelector).children().length&&a.className.includes(n.opts.defaultGridColumnClass)){const e=de(a.className);e&&e.length>0&&e.forEach((e=>{a.className=a.className.replace(e,"").trim()}))}if(a.className){const e=new RegExp("(?:^|\\s)btn-("+ve.btn.join("|")+")(?:\\s|$)","g").exec(a.className);e&&(a.style=e[1])}a=T(a),a.type&&a.type.match(o.optionFieldsRegEx)&&(a.values=i.fieldOptionData(l)),r.push(a)}}))}return r}getData(e){const t=this.data;if(e||(e=this.config.opts.formData),!e)return!1;const r={xml:e=>Array.isArray(e)?e:$(e),json:e=>"string"==typeof e?window.JSON.parse(e):e};return t.formData=r[this.config.opts.dataType](e)||[],t.formData}save(e){void 0===e&&(e=!1);const t=this,r=this.data,o=this.d.stage,i={xml:()=>t.xmlSave(o),json:e=>window.JSON.stringify(t.prepData(o),null,e&&" ")};return r.formData=i[this.config.opts.dataType](e),document.dispatchEvent(w.formSaved),r.formData}incrementId(e){const t=e.lastIndexOf("-"),r=parseInt(e.substring(t+1))+1;return`${e.substring(0,t)}-${r}`}getAttrVals(t){const r=this.config,o=Object.create(null),i=t.querySelectorAll('[class*="fld-"]');return X(i,(t=>{const n=i[t],l=B(n.getAttribute("name"));o[l]=[[n.attributes.contenteditable,()=>"xml"===r.opts.dataType?J(n.innerHTML):n.innerHTML],["checkbox"===n.type,()=>n.checked],["number"===n.type&&""!==n.value,()=>Number(n.value)],[n.attributes.multiple,()=>e(n).val()],[!0,()=>n.value]].find((e=>{let[t]=e;return!!t}))[1]()})),o}updatePreview(t){const r=this,o=this.d,i=t.attr("class"),n=t[0];if(i.includes("input-control"))return;const l=t.attr("type"),a=e(".prev-holder",n);let d=Object.assign({},r.getAttrVals(n),{type:l});l.match(o.optionFieldsRegEx)&&(d.values=[],d.multiple=e('[name="multiple"]',n).is(":checked"),e(".sortable-options li",n).each((function(t,r){const o={selected:e(".option-selected",r).is(":checked"),value:e(".option-value",r).val(),label:e(".option-label",r).val()};d.values.push(o)}))),d=T(d,!0),d.className=r.classNames(n,d),t.data("fieldData",d);const c=r.formBuilder.controls.custom.lookup(d.type),f=r.formBuilder.controls.custom.getClass(d.type),u=c?c.class:f||me.getClass(d.type,d.subtype),p=this.layout.build(u,d);s(a[0]),a[0].appendChild(p),p.dispatchEvent(w.fieldRendered)}disabledTT(e){const t=e.querySelectorAll(".disabled-field");X(t,(e=>{const r=t[e],o=h().get("fieldNonEditable");if(o){const e=q("p",o,{className:"frmb-tt"});r.appendChild(e),r.addEventListener("mousemove",(t=>((e,t)=>{const r=t.field.getBoundingClientRect(),o=e.clientX-r.left-21,i=e.clientY-r.top-t.tt.offsetHeight-12;t.tt.style.transform=`translate(${o}px, ${i}px)`})(t,{tt:e,field:r})))}}))}classNames(t,r){const o=t.querySelector(".fld-className"),i=t.querySelector(".btn-style"),n=i&&i.value;if(!o)return;const{type:l}=r,a=o.multiple?e(o).val():o.value.trim().split(" "),s={button:"btn",submit:"btn"}[l];if(s&&n){for(let e=0;e{let{target:t}=e;return this.closeConfirm(t)}),!1),document.addEventListener("keydown",this.handleKeyDown,!1),e}confirm(e,t,r,o){void 0===r&&(r=!1),void 0===o&&(o="");const i=this,n=h().current,l=i.showOverlay(),a=q("button",n.yes,{className:"yes btn btn-success btn-sm"}),s=q("button",n.no,{className:"no btn btn-danger btn-sm"});s.onclick=function(){i.closeConfirm(l)},a.onclick=function(){t(),i.closeConfirm(l)};const d=q("div",[s,a],{className:"button-wrap"}),c=q("div",[e,d],{className:o="form-builder-dialog "+o});if(r)c.classList.add("positioned");else{const e=document.documentElement;r={pageX:Math.max(e.clientWidth,window.innerWidth||0)/2,pageY:Math.max(e.clientHeight,window.innerHeight||0)/2},c.style.position="fixed"}return c.style.left=r.pageX+"px",c.style.top=r.pageY+"px",document.body.appendChild(c),a.focus(),c}dialog(e,t,r){void 0===t&&(t=!1),void 0===r&&(r="");const o=document.documentElement.clientWidth,i=document.documentElement.clientHeight;this.showOverlay();const n=q("div",e,{className:r="form-builder-dialog "+r});return t?n.classList.add("positioned"):(t={pageX:Math.max(o,window.innerWidth||0)/2,pageY:Math.max(i,window.innerHeight||0)/2},n.style.position="fixed"),n.style.left=t.pageX+"px",n.style.top=t.pageY+"px",document.body.appendChild(n),document.dispatchEvent(w.modalOpened),-1!==r.indexOf("data-dialog")&&document.dispatchEvent(w.viewData),n}confirmRemoveAll(t){const r=this,o=this.config,i=t.target.id.match(/frmb-\d{13}/)[0],n=document.getElementById(i),l=h().current,a=e("li.form-field",n),s=t.target.getBoundingClientRect(),d=document.body.getBoundingClientRect(),c={pageX:s.left+s.width/2,pageY:s.top-d.top-12};a.length?r.confirm(l.clearAllMessage,(()=>{r.removeAllFields.call(r,n),o.opts.persistDefaultFields&&o.opts.defaultFields?this.addDefaultFields():o.opts.notify.success(l.allFieldsRemoved),o.opts.onClearAll()}),c):r.dialog(l.noFieldsToClear,c)}addDefaultFields(){this.config.opts.defaultFields.forEach((e=>this.formBuilder.prepFieldVars(e))),this.d.stage.classList.remove("empty")}removeAllFields(e){const t=h().current,r=this.config.opts,o=[];e.querySelectorAll(this.formBuilder.fieldSelector).length&&(r.prepend&&o.push(!0),r.append&&o.push(!0),o.some(Boolean)||(e.classList.add("empty"),e.dataset.content=t.getStarted),this.emptyStage(e))}emptyStage(e){s(e).classList.remove("removing"),e.dispatchEvent(w.stageEmptied),this.save()}stageIsEmpty(){return 0===e(this.d.stage).find("li").length}setFieldOrder(t){if(!this.config.opts.sortableControls)return!1;const r=window.JSON,o=[];return t.children().each(((t,r)=>{const i=e(r).data("type");i&&o.push(i)})),Oe()("sessionStorage")&&window.sessionStorage.setItem("fieldOrder",r.stringify(o)),o}closeAllEdit(){e(this.d.stage).find("li.form-field").each(((e,t)=>{this.closeField(t.id,!1)}))}toggleEdit(t,r){void 0===r&&(r=!0);const o=document.getElementById(t);if(o)return e(o).hasClass("editing")?this.closeField(t,r):this.openField(t,r)}closeField(t,r){void 0===r&&(r=!0);const o=this,i=document.getElementById(t);if(!i)return i;const n=e(".frm-holder",i),l=e(".prev-holder",i);let a=!1;if(e(i).hasClass("editing")&&(a=!0),!a)return i;i.classList.toggle("editing"),e(".toggle-form",i).toggleClass("open"),r?(l.slideToggle(250),n.slideToggle(250)):(l.toggle(),n.toggle()),this.updatePreview(e(i));const s=e(`#${t}`),d=e(`#${t}-cont`);d.append(s),this.removeContainerProtection(d.attr("id")),this.config.opts.onCloseFieldEdit(n[0]),document.dispatchEvent(w.fieldEditClosed);const c=s.find(".prev-holder"),f=setTimeout((()=>{clearTimeout(f),o.tmpCleanPrevHolder(c).forEach((e=>{if(e.columnInfo.columnSize){const t=o.getBootstrapColumnClass(d.attr("class"));t!==e.columnInfo.columnSize&&(d.removeClass(t).addClass(e.columnInfo.columnSize),o.tmpCleanPrevHolder(c))}}))}),300);return i}openField(t,r){void 0===r&&(r=!0);const o=document.getElementById(t);if(!o)return o;const i=e(".frm-holder",o),n=e(".prev-holder",o);let l=!1;if(e(o).hasClass("editing")&&(l=!0),l)return o;o.classList.toggle("editing"),e(".toggle-form",o).toggleClass("open"),r?(n.slideToggle(250),i.slideToggle(250)):(n.toggle(),i.toggle()),this.updatePreview(e(o));const a=e(`#${t}`),s=e(`#${t}-cont`),d=s.closest(this.formBuilder.rowWrapperClassSelector);return this.formBuilder.preserveTempContainers.push(s.attr("id")),a.insertAfter(d),this.formBuilder.currentEditPanel=i[0],this.config.opts.onOpenFieldEdit(i[0]),document.dispatchEvent(w.fieldEditOpened),e(document).trigger("fieldOpened",[{rowWrapperID:d.attr("id")}]),o}getStyle(e,t){let r;return void 0===t&&(t=!1),window.getComputedStyle?r=window.getComputedStyle(e,null):e.currentStyle&&(r=e.currentStyle),t?r[t]:r}showData(){const e=J(this.getFormData(this.config.opts.dataType,!0)),t=q("code",e,{className:`formData-${this.config.opts.dataType}`});this.dialog(q("pre",t),!1,"data-dialog")}removeField(t,r){void 0===r&&(r=250);let o=!1;const i=this,n=this.d.stage,l=n.getElementsByClassName("form-field");if(!l.length)return this.config.opts.notify.warning("No fields to remove"),!1;if(!t){const e=[].slice.call(l).map((e=>e.id));this.config.opts.notify.warning("fieldID required to remove specific fields."),this.config.opts.notify.warning("Removing last field since no ID was supplied."),this.config.opts.notify.warning("Available IDs: "+e.join(", ")),t=e[e.length-1]}const a=document.getElementById(t);if(!a)return this.config.opts.notify.warning("Field not found"),!1;const s=e(a),d=s.closest(this.formBuilder.rowWrapperClassSelector);s.slideUp(r,(function(){s.removeClass("deleting"),s.remove(),o=!0,i.save(),n.childNodes.length||(n.classList.add("empty"),n.dataset.content=h().current.getStarted)}));const c=Object.assign({},this.config.opts.typeUserEvents["*"],this.config.opts.typeUserEvents[a.type]);if(c&&c.onremove&&c.onremove(a),document.dispatchEvent(w.fieldRemoved),d.length){this.removeContainerProtection(`${t}-cont`);const r=setTimeout((()=>{clearTimeout(r),e(document).trigger("checkRowCleanup",[{rowWrapperID:d.attr("id")}])}),333)}return o}processActionButtons(e){const{label:t,events:r}=e,o=Se(e,je);let i=t;const n=this.data;i=i?h().current[i]||i:o.id?h().current[o.id]||ee(o.id):"",o.id?o.id=`${n.formID}-${o.id}-action`:o.id=`${n.formID}-action-${Math.round(1e3*Math.random())}`;const l=q("button",i,o);if(r)for(const e in r)r.hasOwnProperty(e)&&l.addEventListener(e,(t=>r[e](t)));return l}processSubtypes(e){const t=this.config.opts.disabledSubtypes;for(const t in e)e.hasOwnProperty(t)&&me.register(e[t],me.getClass(t),t);const r=me.getRegisteredSubtypes(),o=Object.entries(r).reduce(((e,r)=>{let[o,i]=r;return e[o]=t[o]&&ae(t[o],i)||i,e}),{}),i={};for(const e in o)if(o.hasOwnProperty(e)){const t=[];for(const r of o[e]){const o=me.getClass(e,r),i=o.mi18n(`subtype.${r}`)||o.mi18n(r)||r;t.push({label:i,value:r})}i[e]=t}return i}editorUI(e,t){const r=this.d,o=this.data,i=e||o.formID,n="left"===(t||"")?"controls-left":"controls-right";r.editorWrap=q("div",null,{id:`${o.formID}-form-wrap`,className:`form-wrap form-builder formbuilder-embedded-bootstrap ${ie()} ${n}`}),r.stage=q("ul",null,{id:i,className:"frmb stage-wrap"}),r.controls=q("ul",null,{id:`${i}-control-box`,className:"frmb-control"});const l=this.formActionButtons();r.formActions=q("div",l,{className:"form-actions btn-group"})}formActionButtons(){const e=this.config.opts;return e.actionButtons.map((t=>{if(t.id&&-1===e.disabledActionButtons.indexOf(t.id))return this.processActionButtons(t)})).filter(Boolean)}processOptions(e){const t=this,{actionButtons:r,replaceFields:o}=e,i=Se(e,Ee);let n=i.fieldEditContainer;"string"==typeof i.fieldEditContainer&&(n=document.querySelector(i.fieldEditContainer));const l=[{type:"button",id:"clear",className:"clear-all btn btn-danger",events:{click:t.confirmRemoveAll.bind(t)}},{type:"button",label:"viewJSON",id:"data",className:"btn btn-default get-data",events:{click:t.showData.bind(t)}},{type:"button",id:"save",className:"btn btn-primary save-template",events:{click:e=>{t.save(),t.config.opts.onSave(e,t.data.formData)}}}].concat(r);return i.fields=i.fields.concat(o),i.disableFields=i.disableFields.concat(o.map((e=>{let{type:t}=e;return t&&t}))),"xml"===i.dataType&&(i.disableHTMLLabels=!0),t.config.opts=Object.assign({},{actionButtons:l},{fieldEditContainer:n},i),t.config.opts}input(e){return void 0===e&&(e={}),q("input",null,e)}getFormData(e,t){void 0===e&&(e="js"),void 0===t&&(t=!1);const r=this,o={js:()=>r.prepData(r.d.stage),xml:()=>r.xmlSave(r.d.stage),json:e=>window.JSON.stringify(r.prepData(r.d.stage),null,e&&" ")};return o[e](t)}tmpCleanPrevHolder(t){const r=this,o=[],i=t.find(".form-group");function n(e){const t=e.attr("class");if(void 0!==t&&!1!==t){const t=r.tryParseColumnInfo(e[0]);e.attr("class",e.attr("class").replace("__fb-tmp-col-","col-")),e.attr("class",e.attr("class").replace("__fb-tmp-row-","row-")),e.attr("class",e.attr("class").replace("col-","__fb-tmp-col-")),e.attr("class",e.attr("class").replace("row-","__fb-tmp-row-"));const i={};i.field=e,i.columnInfo=t,o.push(i)}}return n(i),i.find("*").each((function(t,r){n(e(r))})),o}tryParseColumnInfo(e){const t={};if(e.className){const r=de(e.className);r&&r.length>0&&r.forEach((e=>{e.startsWith("row-")?t.rowUniqueId=e.replace("row-","").trim():t.columnSize=e}))}return t}removeContainerProtection(e){const t=this.formBuilder.preserveTempContainers.indexOf(e);-1!==t&&this.formBuilder.preserveTempContainers.splice(t,1)}toggleHighlight(e,t){void 0===t&&(t=600),e.addClass("moveHighlight"),setTimeout((function(){e.removeClass("moveHighlight")}),t)}showToast(t,r){void 0===r&&(r=3e3),null!=this.toastTimer&&(window.clearTimeout(this.toastTimer),this.toastTimer=null),this.toastTimer=setTimeout((function(){e(".snackbar").removeClass("show")}),r),e(".snackbar").addClass("show").html(t)}getDistanceBetweenPoints(e,t,r,o){const i=r-e,n=o-t;return Math.floor(Math.sqrt(n*n+i*i))}getRowClass(e){if(e){const t=e.split(" ").filter((e=>e.startsWith("row-")));if(t&&t.length>0)return t[0]}return""}getRowValue(e){if(e){const t=this.getRowClass(e);if(t)return t.split("-")[1]}return"0"}changeRowClass(e,t){const r=this.getRowClass(e);return e.replace(r,`row-${t}`)}getBootstrapColumnValue(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return parseInt(t.split("-")[2])}return 0}getBootstrapColumnPrefix(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return`${t.split("-")[0]}-${t.split("-")[1]}`}return""}getBootstrapColumnClass(e){if(e){const t=e.split(" ").filter((e=>se.test(e)));if(t&&t.length>0)return t[0]}return""}changeBootstrapClass(e,t){const r=this.getBootstrapColumnClass(e);return e.replace(r,`${this.getBootstrapColumnPrefix(e)}-${t}`)}syncBootstrapColumnWrapperAndClassProperty(t,r){const o=e(`#${t}-cont`);o.attr("class",this.changeBootstrapClass(o.attr("class"),r));const i=e(`#className-${t}`);i.val()&&i.val(this.changeBootstrapClass(i.val(),r))}}const Te=["values","type"];me.register("autocomplete",class extends me{static get definition(){return{mi18n:{requireValidOption:"requireValidOption"}}}build(){const e=this.config,{values:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Te),i=e=>{const t=e.target.nextSibling.nextSibling,r=e.target.nextSibling,o=this.getActiveOption(t);let i=new Map([[38,()=>{const e=this.getPreviousOption(o);e&&this.selectOption(t,e)}],[40,()=>{const e=this.getNextOption(o);e&&this.selectOption(t,e)}],[13,()=>{o?(e.target.value=o.innerHTML,r.value=o.getAttribute("value"),"none"===t.style.display?this.showList(t,o):this.hideList(t)):this.config.requireValidOption&&(this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")),e.preventDefault()}],[27,()=>{this.hideList(t)}]]).get(e.keyCode);return i||(i=()=>!1),i()},n={focus:e=>{const t=e.target.nextSibling.nextSibling,r=d(t.querySelectorAll("li"),e.target.value);if(e.target.addEventListener("keydown",i),e.target.value.length>0){const e=r.length>0?r[r.length-1]:null;this.showList(t,e)}},blur:e=>{e.target.removeEventListener("keydown",i);const t=setTimeout((()=>{e.target.nextSibling.nextSibling.style.display="none",clearTimeout(t)}),200);if(this.config.requireValidOption){const t=e.target.nextSibling.nextSibling;this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")}},input:e=>{const t=e.target.nextSibling.nextSibling;e.target.nextSibling.value=e.target.value;const r=d(t.querySelectorAll("li"),e.target.value);if(0==r.length)this.hideList(t);else{let e=this.getActiveOption(t);e||(e=r[r.length-1]),this.showList(t,e)}}},l=Object.assign({},o,{id:`${o.id}-input`,autocomplete:"off",events:n}),a=Object.assign({},o,{type:"hidden"});delete l.name;const s=[this.markup("input",null,l),this.markup("input",null,a)],c=t.map((e=>{const t=e.label,r={events:{click:t=>{const r=t.target.parentElement,o=r.previousSibling.previousSibling;o.value=e.label,o.nextSibling.value=e.value,this.hideList(r)}},value:e.value};return this.markup("li",t,r)}));return s.push(this.markup("ul",c,{id:`${o.id}-list`,className:`formbuilder-${r}-list`})),s}hideList(e){this.selectOption(e,null),e.style.display="none"}showList(e,t){this.selectOption(e,t),e.style.display="block",e.style.width=e.parentElement.offsetWidth+"px"}getActiveOption(e){const t=e.getElementsByClassName("active-option")[0];return t&&"none"!==t.style.display?t:null}getPreviousOption(e){let t=e;do{t=t?t.previousSibling:null}while(null!=t&&"none"===t.style.display);return t}getNextOption(e){let t=e;do{t=t?t.nextSibling:null}while(null!=t&&"none"===t.style.display);return t}selectOption(e,t){const r=e.querySelectorAll("li");for(let e=0;e=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Re);let o=t;const i={paragraph:"p",header:this.subtype};return i[t]&&(o=i[t]),{field:this.markup(o,ue.parsedHtml(this.label),r),layout:"noLabel"}}}me.register(["paragraph","header"],Ie),me.register(["p","address","blockquote","canvas","output"],Ie,"paragraph"),me.register(["h1","h2","h3","h4","h5","h6"],Ie,"header");const Me=["values","value","placeholder","type","inline","other","toggle"],Pe=["label"];function Be(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}me.register(["select","checkbox-group","radio-group","checkbox"],class extends me{static get definition(){return{inactive:["checkbox"],mi18n:{minSelectionRequired:"minSelectionRequired"}}}build(){const e=[],t=this.config,{values:r,value:o,placeholder:i,type:n,inline:l,other:a,toggle:s}=t,d=Be(t,Me),c=n.replace("-group",""),f="select"===n;if((d.multiple||"checkbox-group"===n)&&(d.name=d.name+"[]"),"checkbox-group"===n&&d.required){const e=this,t=this.onRender.bind(this);this.onRender=function(){t(),e.groupRequired()}}if(delete d.title,r){i&&f&&e.push(this.markup("option",i,{disabled:!0,selected:!0,value:""}));for(let t=0;t{const t=e.target;t.parentElement.previousElementSibling.value=t.value}},id:`${t.id}-value`,className:"other-val"},n=this.markup("input",null,o),a=[document.createTextNode(me.mi18n("other")),this.markup("input",null,i)],s=this.markup("label",a,{for:o.id}),f=this.markup("div",[n,s],{className:r});e.push(f)}}return this.dom="select"==n?this.markup(c,e,T(d,!0)):this.markup("div",e,{className:n}),this.dom}groupRequired(){const e=this.element.getElementsByTagName("input"),t=()=>{const t=[].some.call(e,(e=>e.checked));((e,t)=>{[].forEach.call(e,(e=>{t?e.removeAttribute("required"):e.setAttribute("required","required"),((e,t)=>{const r=me.mi18n("minSelectionRequired",1);t?e.setCustomValidity(""):e.setCustomValidity(r)})(e,t)}))})(e,t)};for(let r=e.length-1;r>=0;r--)e[r].addEventListener("change",t);t()}onRender(){if(this.config.userData){const t=this.config.userData.slice();"select"===this.config.type?e(this.dom).val(t).prop("selected",!0):this.config.type.endsWith("-group")&&("checkbox-group"===this.config.type&&this.dom.querySelectorAll("input[type=checkbox]").forEach((e=>{e.removeAttribute("checked")})),this.dom.querySelectorAll("input").forEach((e=>{if(!e.classList.contains("other-val")){for(let r=0;r0){const r=this.dom.querySelector(`#${e.id}-value`);e.setAttribute("checked","checked"),r.value=e.value=t[0],r.style.display="inline-block"}}})))}}});class Fe extends me{static get definition(){return{mi18n:{date:"dateField",file:"fileUpload"}}}build(){let{name:e}=this.config;e=this.config.multiple?`${e}[]`:e;const t=Object.assign({},this.config,{name:e});return this.dom=this.markup("input",null,t),this.dom}onRender(){this.config.userData&&e(this.dom).val(this.config.userData[0])}}me.register(["text","file","date","number"],Fe),me.register(["text","password","email","color","tel"],Fe,"text"),me.register(["date","time","datetime-local"],Fe,"date"),me.register(["number","range"],Fe,"number");const He=["value"];class qe extends me{static get definition(){return{mi18n:{textarea:"textArea"}}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,He);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),this.field}onRender(){this.config.userData&&e(this.field).val(this.config.userData[0])}on(t){return"prerender"==t&&this.preview?t=>{this.field&&(t=this.field),e(t).on("mousedown",(e=>{e.stopPropagation()}))}:super.on(t)}}me.register("textarea",qe),me.register("textarea",qe,"textarea");const ze=["value"];qe.register("tinymce",class extends qe{configure(){if(this.js=[],window.tinymce||this.js.push("https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js"),this.classConfig.js){let e=this.classConfig.js;Array.isArray(e)||(e=new Array(e)),this.js=this.js.concat(e),delete this.classConfig.js}this.classConfig.css&&(this.css=this.classConfig.css),this.editorOptions={height:250,paste_data_images:!0,plugins:["advlist","autolink","lists","link","image","charmap","print","preview","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","contextmenu","paste","code"],toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | table"}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ze);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),r.disabled&&(this.editorOptions.readonly=!0),this.field}onRender(){const e=window.tinymce.get(this.id);e&&window.tinymce.remove(e);const t=jQuery.extend(this.editorOptions,this.classConfig);t.target=this.field;const r=[];Number(window.tinymce.majorVersion)>=5&&r.push("contextmenu"),Number(window.tinymce.majorVersion)>=6&&r.push("paste","print"),t.plugins=t.plugins.filter((e=>-1===r.indexOf(e)));const o=this.config.userData?this.parsedHtml(this.config.userData[0]):void 0,i=window.lastFormBuilderCopiedTinyMCE?this.parsedHtml(window.lastFormBuilderCopiedTinyMCE):void 0;window.lastFormBuilderCopiedTinyMCE=null;const n=function(e){i?e[0].setContent(i):o&&e[0].setContent(o)};setTimeout((()=>{window.tinymce.init(t).then(n)}),0)}},"textarea");const Ue=["value"];function We(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function $e(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Ue);return delete r.type,this.field=this.markup("div",null,r),this.field.classList.contains("form-control")&&this.field.classList.remove("form-control"),this.field}onRender(e){const t=this.config.value||"",r=window.Quill.import("delta");window.fbEditors.quill[this.id]={};const o=window.fbEditors.quill[this.id];return o.instance=new window.Quill(this.field,this.editorConfig),o.data=new r,t&&o.instance.setContents(window.JSON.parse(this.parsedHtml(t))),o.instance.on("text-change",(function(e){o.data=o.data.compose(e)})),e}},"textarea");class Ve{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),this.customRegister={},this.templateControlRegister={},this.def={icon:{},i18n:{}},this.register(e,t)}register(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);const r=h().locale;this.def.i18n[r]||(this.def.i18n[r]={});const o=this;Object.keys(e).forEach((t=>{const r=function(r,o){this.customControl=new Le(r,o,e[t]),this.build=function(){return this.customControl.build()},this.on=function(e){return this.customControl.on(e)}};r.definition={},r.label=e=>o.label(e),r.icon=e=>o.icon(e),this.templateControlRegister[t]=r}));for(const o of t){let t=o.type;if(o.attrs=o.attrs||{},!t){if(!o.attrs.type){me.error("Ignoring invalid custom field definition. Please specify a type property.");continue}t=o.attrs.type}let i=o.subtype||t;if(e[t]){const e=this.templateControlRegister[t];e.definition=o,this.customRegister[i]=jQuery.extend(o,{type:t,class:e})}else try{const e=me.getClass(t,o.subtype);i=o.datatype?o.datatype:`${t}-${Math.floor(9e3*Math.random()+1e3)}`,this.customRegister[i]=jQuery.extend(o,{type:t,class:e})}catch(e){me.error("Error while registering custom field: "+t+(o.subtype?":"+o.subtype:"")+". Unable to find any existing defined control or template for rendering.")}this.def.i18n[r][i]=Array.isArray(o.label)?h().get(...o.label)||o.label[0]:o.label,this.def.icon[i]=o.icon}}label(e){const t=this.def;let r=t.i18n||{};r=r[h().locale]||r.default||r;const o=me.camelCase(e),i="object"==typeof r?r[o]||r[e]:r;if(i)return i;{let r=t.mi18n;return"object"==typeof r&&(r=r[o]||r[e]),r||(r=o),h().get(r)}}get definition(){return{}}icon(e){const t=this.def;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}getRegistered(e){var t;return void 0===e&&(e=!1),e?null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0:Object.keys(this.customRegister)}getClass(e){var t;return null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0}lookup(e){return this.customRegister[e]}}var Je=JSON.parse('{"Rp":"formbuilder-icon-"}');const Ge=Je.Rp;class Xe{constructor(e,t){this.opts=e,this.dom=t.controls,this.getRegistered=me.getRegistered,this.init()}init(){this.setupControls(),this.appendControls()}setupControls(){const e=this.opts;me.loadCustom(e.controls),this.custom=new Ve(e.templates,e.fields);const t=me.getRegistered(),r=this.custom.getRegistered();r&&jQuery.merge(t,r),this.registeredSubtypes=me.getRegisteredSubtypes(),e.sortableControls&&this.dom.classList.add("sort-enabled"),this.controlList=[],this.allControls={};for(let e=0;e${l}${i}`);const s=q("li",q("span",i),{className:`${a} input-control input-control-${e}`});s.dataset.type=r,this.controlList.push(r),this.allControls[r]=s}e.inputSets.length&&e.inputSets.forEach(((e,t)=>{let{name:r,label:o}=e;r=r||P(o),e.icon&&(o=`${e.icon}${o}`);const i=q("li",q("span",o),{className:`input-set-control input-set-${t}`});i.dataset.type=r,this.controlList.push(r),this.allControls[r]=i}))}orderFields(e){const t=this.opts,r=t.controlOrder.concat(e);let o;return Oe()("sessionStorage")&&(t.sortableControls?o=window.sessionStorage.getItem("fieldOrder"):window.sessionStorage.removeItem("fieldOrder")),o?(o=window.JSON.parse(o),o=Q(o.concat(e)),o=Object.keys(o).map((e=>o[e]))):o=Q(r),o.forEach((e=>{const t=new RegExp("-[\\d]{4}$");if(e.match(t)){const r=o.indexOf(e.replace(t,""));-1!==r&&(o.splice(o.indexOf(e),1),o.splice(r+1,o.indexOf(e),e))}})),t.disableFields.length&&(o=o.filter((e=>!t.disableFields.includes(e)))),o.filter(Boolean)}appendControls(){const e=document.createDocumentFragment();s(this.dom),this.orderFields(this.controlList).forEach((t=>{const r=this.allControls[t];r&&e.appendChild(r)})),this.dom.appendChild(e)}getClass(e,t){return this.custom.getClass(e)||me.getClass(e,t)}}const Qe=["class","className"],Ze=["multiple","options","label","value","class","className"],Ye=["class","className"],Ke=["tag","content"],_e=["i18n"];function et(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r,o,i={},n=Object.keys(e);for(o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function rt(e){for(var t=1;t{let[r,o]=t;return S(S({},e),{},{[`${r}Selector`]:`.${o}`})}),{}));var ut;function pt(e,t,o){const i=this,n=h().current,l=`frmb-${Date.now()}`,s=new m(l),d=new u(l),c=xe[l]={};let f=[];i.preserveTempContainers=[],i.rowWrapperClassSelector=st,i.colWrapperClassSelector=dt,i.colWrapperClass=nt,i.fieldSelector=e.enableEnhancedBootstrapGrid?st:"li.form-field",(e=>{if("object"!=typeof e)throw"Invalid value given to setSanitizerConfig, expected config object";if(e.hasOwnProperty("clobberingProtection")&&["document","form","namespaceAttributes"].forEach((t=>{e.clobberingProtection.hasOwnProperty(t)&&"boolean"==typeof e.clobberingProtection[t]&&(v.clobberingProtection[t]=e.clobberingProtection[t])})),e.hasOwnProperty("backends")){if("object"!=typeof e.backends)throw"backends config expected to be an Object";Object.keys(e.backends).forEach((t=>v.backends[t]=e.backends[t]))}if(e.hasOwnProperty("backendOrder")){if(v.backendOrder=[],!Array.isArray(e.backendOrder))throw"backendOrder config expected to be an Array of backend keys as strings";e.backendOrder.forEach((e=>{if(!v.backends.hasOwnProperty(e))throw"unknown sanitizer backend "+e;v.backendOrder.push(e)}))}})(e.sanitizerOptions),o(t).closest("form").length&&e.notify.warning("WARNING: FormBuilder does not support being contained with a Element"),e.layout||(e.layout=he);const p=new e.layout(e.layoutTemplates,!0,e.disableHTMLLabels,e.controlConfig),b=new Ne(l,p,i),g=q;e=b.processOptions(e),b.editorUI(l,e.controlPosition),s.formID=l,s.lastID=`${s.formID}-fld-0`;const y=new Xe(e,d);i.controls=y;const x=c.subtypes=b.processSubtypes(e.subtypes),A=o(d.stage),C=o(d.controls);let k,j,E=!1,S=!1,N=!1;function D(){return!!e.enableEnhancedBootstrapGrid}A.sortable({cursor:"move",opacity:.9,revert:150,beforeStop:(e,t)=>b.beforeStop.call(b,e,t),start:(e,t)=>b.startMoving.call(b,e,t),stop:(e,t)=>b.stopMoving.call(b,e,t),change:function(t,r){e.prepend&&r.placeholder.index()<1?o("li.form-prepend").after(r.placeholder):e.append&&r.placeholder.index()>=A.children("li").length-1&&o("li.form-append").before(r.placeholder)},cancel:["input","select","textarea",".disabled-field",".form-elements",".btn","button",".is-locked"].join(", "),placeholder:"frmb-placeholder hoverDropStyleInverse"}),e.allowStageSort||A.sortable("disable"),C.sortable({helper:"clone",opacity:.9,connectWith:`#${l}, ${st}`,cancel:".formbuilder-separator",cursor:"move",scroll:!1,placeholder:"hoverDropStyleInverse ui-state-highlight",tolerance:"pointer",start:(e,t)=>b.startMoving.call(b,e,t),stop:(e,t)=>{b.stopMoving.call(b,e,t)},revert:150,beforeStop:(e,t)=>b.beforeStop.call(b,e,t),distance:3,change:function(t,r){e.prepend&&r.placeholder.index()<1?o("li.form-prepend").after(r.placeholder):e.append&&r.placeholder.index()>=A.children("li").length-1&&o("li.form-append").before(r.placeholder)},update:function(t,r){if(b.doCancel)return!1;o(r.item).closest(".stage-wrap").length&&0===o(r.item).closest(st).length?(b.doCancel=!0,R(r.item)):(D()&&ge(),b.setFieldOrder(C),b.doCancel=!e.sortableControls)}}),C.on("mouseenter",(function(){b.stageIsEmpty()||A.children(ct+":not(:last-child)").addClass(at)}));const R=t=>{if(t[0].classList.contains("input-set-control")){const r=[],o=e.inputSets.find((e=>P(e.name||e.label)===t[0].dataset.type));if(o&&o.showHeader){const e={type:"header",subtype:"h2",id:o.name,label:o.label};r.push(e)}r.push(...o.fields),r.forEach((e=>{W(e,!0),(b.stopIndex||0===b.stopIndex)&&b.stopIndex++}))}else W(t,!0)},I=o(d.editorWrap);o('
').appendTo(I);let M="cb-wrap",B="";if(e.stickyControls.enable){M+=" sticky-controls";const e={top:0,bottom:"auto",right:"auto",left:"auto"},t=Object.assign({},e,c.opts.stickyControls.offset);0!==t.top&&(B=`top: ${t.top}px`)}const z=g("div",d.controls,{id:`${s.formID}-cb-wrap`,className:M,style:B});e.showActionButtons&&z.appendChild(d.formActions);const U=g("div","",{id:`${s.formID}-gridModeHelp`,className:"grid-mode-help"});z.appendChild(U),I.append(d.stage,z),"textarea"!==t.type?o(t).append(I):o(t).replaceWith(I),o(d.controls).on("click","li.input-control, li.input-set-control",(t=>{let{target:r}=t;b.stageIsEmpty()&&A.find(ct).eq(0).remove();const i=o(r).closest("li");b.stopIndex=e.append?A.children().length-1:void 0,R(i),b.save.call(b)}));const W=function(t,r){void 0===r&&(r=!1);let i={};if(t instanceof jQuery)if(i.type=t[0].dataset.type,i.type){const e=y.custom.lookup(i.type);if(e){const t=i.type;i=Object.assign({},e),i.label=y.custom.label(t)}else{const e=y.getClass(i.type);i.label=e.label(i.type)}}else{const e=t[0].attributes;r||(i.values=t.children().map(((e,t)=>({label:o(t).text(),value:o(t).attr("value"),selected:Boolean(o(t).attr("selected"))}))));for(let t=e.length-1;t>=0;t--)i[e[t].name]=e[t].value}else i=Object.assign({},t);i.name||(i.name=F(i)),r&&["text","number","file","date","select","textarea","autocomplete"].includes(i.type)&&(i.className=i.className||"form-control");const n=/(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(i.className);if(n&&(i.style=n[1]),r){const e=setTimeout((()=>{document.dispatchEvent(w.fieldAdded),clearTimeout(e)}),10)}e.onAddField(s.lastID,i),me(i,r),e.onAddFieldAfter(s.lastID,i),d.stage.classList.remove("empty")};i.prepFieldVars=W;const $=function(t){(t=b.getData(t))&&t.length?(t.forEach((e=>J(e))),t.forEach((e=>W(T(e)))),d.stage.classList.remove("empty")):e.defaultFields&&e.defaultFields.length?(c.opts.defaultFields.forEach((e=>J(e))),b.addDefaultFields()):e.prepend||e.append||(d.stage.classList.add("empty"),d.stage.dataset.content=h().get("getStarted")),(()=>{const t=[],r=t=>g("li",e[t],{className:`disabled-field form-${t}`});return e.prepend&&!o(".disabled-field.form-prepend",d.stage).length&&(t.push(!0),A.prepend(r("prepend"))),e.append&&!o(".disabled-field.form-append",d.stage).length&&(t.push(!0),A.append(r("append"))),b.disabledTT(d.stage),t.some((e=>!0===e))})()&&d.stage.classList.remove("empty"),b.save()};function J(e){const t=b.getRowValue(e.className);t&&!f.includes(t)&&f.push(t)}const G=t=>{const{type:r}=t,o=[],i=y.getClass(r),n=(e=>{const t=["required","label","description","placeholder","className","name","access","value"],r=!["header","paragraph","file","autocomplete"].concat(d.optionFields).includes(e),o={autocomplete:t.concat(["options","requireValidOption"]),button:["label","subtype","style","className","name","value","access"],checkbox:["required","label","description","toggle","inline","className","name","access","other","options"],text:t.concat(["subtype","maxlength"]),date:t.concat(["subtype","min","max","step"]),file:t.concat(["multiple"]),header:["label","subtype","className","access"],hidden:["name","value","access"],paragraph:["label","subtype","className","access"],number:t.concat(["subtype","min","max","step"]),select:t.concat(["multiple","options"]),textarea:t.concat(["subtype","maxlength","rows"])};e in y.registeredSubtypes&&!(e in o)&&(o[e]=t.concat(["subtype"])),o["checkbox-group"]=o.checkbox,o["radio-group"]=o.checkbox;const i=o[e];return"radio-group"===e&&Z("toggle",i),["header","paragraph","button"].includes(e)&&Z("description",i),r||Z("value",i),i||t})(r),l={required:()=>pe(t),toggle:()=>ie("toggle",t,{first:h().get("toggle")}),inline:()=>{const e={first:h().get("inline"),second:h().get("inlineDesc",r.replace("-group",""))};return ie("inline",t,e)},label:()=>ue("label",t),description:()=>ue("description",t),subtype:e=>fe("subtype",t,x[r],e),style:()=>se(t.style),placeholder:()=>ue("placeholder",t),rows:()=>de("rows",t),className:e=>ue("className",t,e),name:e=>ue("name",t,e),value:()=>ue("value",t),maxlength:()=>de("maxlength",t),access:()=>{const r=[`
`];for(a in e.roles)if(e.roles.hasOwnProperty(a)){const t=`fld-${s.lastID}-roles-${a}`,o={type:"checkbox",name:"roles[]",value:a,id:t,className:"roles-field"};f.includes(a)&&(o.checked="checked"),r.push(``)}r.push("
");const o={first:h().get("roles"),second:h().get("limitRole"),content:r.join("")};return ie("access",t,o)},other:()=>ie("other",t,{first:h().get("enableOther"),second:h().get("enableOtherMsg")}),options:()=>function(e){const{type:t,values:r}=e;let o;const i=[g("a",h().get("addOption"),{className:"add add-opt"})],n=[g("label",h().get("selectOptions"),{className:"false-label"})],l=e.multiple||"checkbox-group"===t,a=e=>{const t=h().get("optionCount",e);return{selected:!1,label:t,value:P(t)}};if(r&&r.length)o=r.map((e=>Object.assign({},{selected:!1},e)));else{let e=[1,2,3];["checkbox-group","checkbox"].includes(t)&&(e=[1]),o=e.map(a);const r=o[0];r.hasOwnProperty("selected")&&"radio-group"!==t&&(r.selected=!0)}const s=g("div",i,{className:"option-actions"}),d=g("ol",o.map((function(r,o,i,n){void 0===n&&(n=e.name);const a=c.opts.onAddOption(r,{type:t,index:o,isMultiple:l});return Te(n+"-options",a,l)})),{className:"sortable-options"}),f=g("div",[d,s],{className:"sortable-options-wrap"});return n.push(f),g("div",n,{className:"form-group field-options"}).outerHTML}(t),requireValidOption:()=>ie("requireValidOption",t,{first:" ",second:h().get("requireValidOption")}),multiple:()=>{const e={default:{first:"Multiple",second:"set multiple attribute"},file:{first:h().get("multipleFiles"),second:h().get("allowMultipleFiles")},select:{first:" ",second:h().get("selectionsMessage")}};return ie("multiple",t,e[r]||e.default)}};let a;const f=void 0!==t.role?t.role.split(","):[];["min","max","step"].forEach((e=>{l[e]="number"===r?()=>de(e,t):()=>ue(e,t)}));const u=["name","className","subtype"],p=Object.assign({},e.typeUserAttrs["*"],e.typeUserAttrs[r]);if(Object.keys(n).forEach((t=>{const a=n[t],s=[!0],d=e.disabledAttrs.includes(a);if(e.typeUserDisabledAttrs[r]){const t=e.typeUserDisabledAttrs[r];s.push(!t.includes(a))}if(i.definition.hasOwnProperty("disabledAttrs")){const e=i.definition.disabledAttrs;s.push(!e.includes(a))}if(i.definition.hasOwnProperty("defaultAttrs")){const e=Object.keys(i.definition.defaultAttrs);s.push(!e.includes(a))}if(p){const e=Object.keys(p);s.push(!e.includes(a))}d&&!u.includes(a)&&s.push(!1),s.every(Boolean)&&o.push(l[a](d))})),i.definition.hasOwnProperty("defaultAttrs")){const e=K(i.definition.defaultAttrs,t);o.push(e)}if(p){const e=K(p,t);o.push(e)}return o.join("")};function Q(e){return[["array",e=>{let{options:t}=e;return!!t}],["boolean",e=>{let{type:t}=e;return"checkbox"===t}],[typeof e.value,()=>!0]].find((t=>t[1](e)))[0]}function Y(e,t){return e.subtype&&e.subtype===t}function K(t,r){const o=[],i={array:te,string:_,number:de,boolean:(e,t)=>{let o=!1;return"checkbox"===e.type?o=Boolean(!!t.hasOwnProperty("value")&&t.value):r.hasOwnProperty(e)?o=r[e]:(t.hasOwnProperty("value")||t.hasOwnProperty("checked"))&&(o=t.value||t.checked||!1),ie(e,rt(rt({},t),{},{[e]:o}),{first:n[e]})}};for(const l in t)if(t.hasOwnProperty(l)){const a=Q(t[l]);if("undefined"!==a){const e=h().get(l),s=Object.assign({},t[l]);let d=s.value;"boolean"===a?s[l]??=s.value:"number"===a?s[l]??=ce(r[l],d):(d??="",s[l]??=r[l]||d),s.value=s[l],s.label&&(n[l]=Array.isArray(s.label)?h().get(...s.label)||s.label[0]:s.label),i[a]&&o.push(i[a](l,s)),n[l]=e}else if("undefined"===a&&Y(r,l))o.push(K(t[l],r));else{const r={};r[l]=t[l],e.notify.warning("Warning: unable to process typeUserAttr definition : "+JSON.stringify(r))}}return o.join("")}function _(e,t){const{class:r,className:o}=t,i=et(t,Qe);let l={id:e+"-"+s.lastID,title:i.description||i.label||e.toUpperCase(),name:e,type:i.type||"text",className:[`fld-${e}`,(r||o||"").trim()],value:i.hasOwnProperty(e)?i[e]:i.value||""};const a=``;return["checkbox","checkbox-group","radio-group"].includes(l.type)||l.className.push("form-control"),l=Object.assign({},i,l),`
${a}
${(()=>{if("textarea"===l.type){const e=l.value;return delete l.value,``}return``})()}
`}function te(e,t){const{multiple:r,options:o,label:i,value:l,class:a,className:d}=t,c=et(t,Ze),f=t.hasOwnProperty(e)?t[e]:l||[],u=Object.keys(o).map((e=>{const t={value:e},r=o[e],i=Array.isArray(r)?h().get(...r)||r[0]:r;return(Array.isArray(f)?f.includes(e):e===f)&&(t.selected=!0),g("option",i,t)})),p={id:`${e}-${s.lastID}`,title:c.description||i||e.toUpperCase(),name:e,className:`fld-${e} form-control ${a||d||""}`.trim()};r&&(p.multiple=!0);const m=``;return Object.keys(c).forEach((function(e){p[e]=c[e]})),`
${m}
${g("select",u,p).outerHTML}
`}const ie=function(e,t,r){void 0===r&&(r={});const o=t=>g("label",t,{for:`${e}-${s.lastID}`}).outerHTML,i={type:"checkbox",className:`fld-${e}`,name:e,id:`${e}-${s.lastID}`};t[e]&&(i.checked=!0);const n=[];let l=[g("input",null,i).outerHTML];return r.first&&n.push(o(r.first)),r.second&&l.push(" ",o(r.second)),r.content&&l.push(r.content),l=g("div",l,{className:"input-wrap"}).outerHTML,g("div",n.concat(l),{className:`form-group ${e}-wrap`}).outerHTML},se=e=>{let t="";"undefined"===e&&(e="default");const r=``;return t+=b.input({value:e||"default",type:"hidden",className:"btn-style"}).outerHTML,t+='
',ve.btn.forEach((r=>{const o=["btn-xs","btn",`btn-${r}`];e===r&&o.push("selected");const i=g("button",h().get(`styles.btn.${r}`),{value:r,type:"button",className:o.join(" ")}).outerHTML;t+=i})),t+="
",t=g("div",[r,t],{className:"form-group style-wrap"}),t.outerHTML},de=(e,t)=>{const{class:r,className:o}=t,i=et(t,Ye),n=Number.isNaN(i[e])?void 0:i[e],l=h().get(e)||e,a={type:"number",value:n,name:e,placeholder:h().get(`placeholder.${e}`),className:`fld-${e} form-control ${r||o||""}`.trim(),id:`${e}-${s.lastID}`},d=b.input(T(a)).outerHTML;return g("div",[``,`
${d}
`],{className:`form-group ${e}-wrap`}).outerHTML},fe=function(e,t,r,o){void 0===o&&(o=!1);const i=r.map(((r,o)=>{let i=Object.assign({label:`${n.option} ${o}`,value:void 0},r);return r.value===t[e]&&(i.selected=!0),i=T(i),g("option",i.label,i)})),l={id:e+"-"+s.lastID,name:e,className:`fld-${e} form-control`},a=h().get(e)||ee(e)||"",d=g("label",a,{for:l.id}),c=g("select",i,l),f=g("div",c,{className:"input-wrap"});return g("div",[d,f],{className:`form-group ${l.name}-wrap`,style:"display: "+(o?"none":"block")}).outerHTML},ue=function(t,r,o){void 0===o&&(o=!1);let i=r[t]||"",n=h().get(t)||t;"label"===t&&(["paragraph"].includes(r.type)?n=h().get("content"):i=V(i));const l=h().get(`placeholders.${t}`)||"";let a="";if(![].some((e=>!0===e))){const d={name:t,placeholder:l,className:`fld-${t} form-control`,id:`${t}-${s.lastID}`},c=g("label",n,{for:d.id}).outerHTML;"label"!==t||e.disableHTMLLabels?"textarea"===r.type&&"value"===t?a+=g("textarea",i,d).outerHTML:(d.value=i,d.type="text",a+=``):(d.contenteditable=!0,a+=g("div",i,d).outerHTML);const f=`
${a}
`;let u=o?"none":"block";"value"===t&&(u=r.subtype&&"quill"===r.subtype&&"none"),a=g("div",[c,f],{className:`form-group ${t}-wrap`,style:`display: ${u}`})}return a.outerHTML},pe=e=>{const{type:t}=e,r=[];let o="";return["header","paragraph","button"].includes(t)&&r.push(!0),r.some((e=>!0===e))||(o=ie("required",e,{first:h().get("required")})),o},me=function(t,r){void 0===r&&(r=!0);const l=Se(t);s.lastID=b.incrementId(s.lastID);const a=t.type||"text";let c=t.label||(r?n[a]||h().get("label"):"");var f;"hidden"!==a&&""!==c||(c=`${null!==(f=h().get(a))&&void 0!==f?f:a}: ${t.name}`);const u=e.disabledFieldButtons[a]||t.disabledFieldButtons;let p=[g("a",null,{type:"remove",id:"del_"+s.lastID,className:`del-button btn ${ot}cancel delete-confirm`,title:h().get("removeMessage")}),g("a",null,{type:"edit",id:s.lastID+"-edit",className:`toggle-form btn ${ot}pencil`,title:h().get("hide")}),g("a",null,{type:"copy",id:s.lastID+"-copy",className:`copy-button btn ${ot}copy`,title:h().get("copyButtonTooltip")})];D()?p.push(g("a",null,{type:"grid",id:s.lastID+"-grid",className:`grid-button btn ${ot}grid`,title:"Grid Mode"})):p.push(g("a",null,{type:"sort",id:s.lastID+"-sort-higher",className:`sort-button sort-button-higher btn ${ot}sort-higher`,title:"Move Higher"}),g("a",null,{type:"sort",id:s.lastID+"-sort-lower",className:`sort-button sort-button-lower btn ${ot}sort-lower`,title:"Move Lower"})),u&&Array.isArray(u)&&(p=p.filter((e=>!u.includes(e.type))));const m=[g("div",p,{className:"field-actions"})],w=e.disableHTMLLabels?document.createTextNode(c):V(c);m.push(g("label",w,{className:"field-label"})),m.push(g("span"," *",{className:"required-asterisk",style:t.required?"display:inline":""}));const v={className:"tooltip-element",tooltip:t.description,style:t.description?"display:inline-block":"display:none"};m.push(g("span","?",v));const y=g("div","",{className:"prev-holder",dataFieldId:s.lastID});m.push(y);const x=g("div",[G(t),g("a",h().get("close"),{className:"close-field"})],{className:"form-elements"}),C=g("div",x,{id:`${s.lastID}-holder`,className:"frm-holder",dataFieldId:s.lastID});i.currentEditPanel=C,m.push(C);const O=g("li",m,{class:`${a}-field form-field`,type:a,id:s.lastID}),j=o(O);let T;if(be(j),j.data("fieldData",{attrs:t}),void 0!==b.stopIndex?o(d.stage).children().eq(b.stopIndex).before(j):A.append(j),o(".sortable-options",j).sortable({update:()=>b.updatePreview(j)}),b.updatePreview(j),D()){const t=`div.row-${l.rowUniqueId}`;let r=!1;A.children(t).length?T=A.children(t):(T=g("div",null,{id:`${O.id}-row`,className:`row row-${l.rowUniqueId} ${it}`}),r=!0),E&&S&&(k.attr("id",T.id),k.attr("class",T.className),k.attr("style",""),k.attr("data-row-id",l.rowUniqueId),T=k);const i=g("div",null,{id:`${O.id}-cont`,className:`${l.columnSize} ${nt}`});E&&N&&("true"===k.attr("prepend")?o(i).prependTo(T):o(i).insertAfter(`#${k.attr("appendAfter")}`)),N||o(i).appendTo(T),!E&&r&&j.after(T),j.appendTo(i),r&&(Ae(T),ge(),we(T),e.enableColumnInsertMenu&&(o(T).off("mouseenter"),o(T).on("mouseenter",(function(e){ke(o(e.currentTarget))})),o(T).off("mouseleave"),o(T).on("mouseleave",(function(e){Ee(o(e.currentTarget))})))),ke(T,!0),l.addedDefaultColumnClass&&j.attr("addedDefaultColumnClass",!0),b.tmpCleanPrevHolder(o(y))}e.typeUserEvents[a]&&e.typeUserEvents[a].onadd?e.typeUserEvents[a].onadd(O):e.typeUserEvents["*"]&&e.typeUserEvents["*"].onadd&&e.typeUserEvents["*"].onadd(O),r&&(e.editOnAdd&&(b.closeAllEdit(),b.toggleEdit(s.lastID,!1)),O.scrollIntoView&&e.scrollToFieldOnAdd&&O.scrollIntoView({behavior:"smooth"})),D()&&E&&N&&Be(T,!0),E=!1,S=!1,N=!1};function be(e){D()&&e.mouseenter((function(e){Me||(Le=o(this),Re=e.pageX,Ie=e.pageY)}))}function ge(){A.find(ct+":not(:last-child)").css("height","1px").addClass(at)}function we(e){const t=o(e).clone();if(t.addClass(at).addClass(lt).html(""),t.css("height","1px"),t.attr("class",t.attr("class").replace("row-","")),t.removeAttr("id"),0===o(e).index()){const e=o(t).clone();A.prepend(e),Ae(e)}t.insertAfter(o(e)),Ae(t),A.find(st+":last-of-type").removeClass(at)}function ye(){A.children(ct).remove(),A.children(st).each(((e,t)=>{we(o(t))})),A.find(st+":last-of-type").removeClass(at)}function Ae(e){if(!D())return;o(e).sortable({connectWith:[st],cursor:"move",opacity:.9,revert:150,distance:3,tolerance:"pointer",helper:function(e,t){const r=t.clone();return r.find(".field-actions").remove(),r.css({width:"20%",height:"100px",minHeight:"60px",overflow:"hidden"}),r},over:function(e){const t=o(e.target),r=t.hasClass(lt);r||je(t),t.addClass("hoverDropStyleInverse"),r||(ge(),t.prev(ct).removeClass(at).css("height","40px"),t.next(ct).removeClass(at).css("height","40px"))},out:function(e){A.children(ct).removeClass("hoverDropStyleInverse"),o(e.target).removeClass("hoverDropStyleInverse")},placeholder:"hoverDropStyleInverse",receive:function(e,t){const r=o(t.sender).attr("id")===C.attr("id"),i=o(t.item).parent().hasClass(lt),n=!i&&o(t.item).parent().hasClass(it);if(i)if(r)S=!0,E=!0,k=o(t.item).parent();else{const e=o(t.item),r=Se({}),i=g("div",null,{id:`${e.find("li").attr("id")}-row`,className:`row row-${r.rowUniqueId} ${it}`});o(t.item).parent().replaceWith(i),be(o(t.item)),e.appendTo(i),Ae(i),Fe(e.attr("id"))}if(n&&r){k=o(t.item).prev().hasClass("btnAddControl")?o(t.item).prev():o(t.item).next().hasClass("btnAddControl")?o(t.item).next():o(t.item).attr("prepend","true");const e=b.getRowClass(o(t.item).parent().attr("class"));k.addClass(e),N=!0,E=!0,b.stopIndex=void 0}E&&(b.doCancel=!0,R(t.item),b.save.call(b)),He(),ye();const l=o(t.item).find("li");l.length&&(Ce(l),Oe(l),b.tmpCleanPrevHolder(o(t.item).find(".prev-holder")))},start:(e,t)=>{A.addClass("__preventColButtons"),je(t.item.closest(st))},stop:(e,t)=>{A.removeClass("__preventColButtons"),A.children(ct).removeClass("hoverDropStyleInverse"),Be(t.item.closest(st),!0)},update:(e,t)=>{Fe(t.item.attr("id"))}});const t=b.getRowValue(e.className);"0"!==t&&o(e).attr("data-row-id",t)}function Ce(e){const t=e.find('textarea[type="tinymce"]');t.length&&(window.lastFormBuilderCopiedTinyMCE=window.tinymce.get(t.attr("id")).save())}function Oe(e){b.updatePreview(e),b.save.call(b)}function ke(t,r){if(void 0===r&&(r=!1),!e.enableColumnInsertMenu||A.hasClass("__preventColButtons"))return;o(t).children("button.btnAddControl").remove();const i=o(t).children(dt);i.each(((e,t)=>{const n=o(t);n.addClass("colWithInsertButtons"),0===i.index(n)&&o(``).insertBefore(n),o(``).insertAfter(n)}))}function je(e){e.find("button.btnAddControl").remove(),e.find(dt).removeClass("colWithInsertButtons")}function Ee(e){e.find("button.btnAddControl").css("visibility","hidden")}function Se(t){if(!D())return{};const r=b.tryParseColumnInfo(t);if(!r.rowUniqueId){if(E&&N)r.rowUniqueId=b.getRowValue(k.attr("class"));else{let e;if(0===f.length)e=1;else{const t=f.filter((e=>!isNaN(e)&&!isNaN(parseInt(e)))).map((e=>parseInt(e)));e=Math.max(...t,0)+1}r.rowUniqueId=e.toString()}r.columnSize=e.defaultGridColumnClass,t.className||(t.className=""),t.className+=` row-${r.rowUniqueId} ${r.columnSize}`,r.addedDefaultColumnClass=!0}return f.includes(r.rowUniqueId)||f.push(r.rowUniqueId),r}const Te=function(e,t,r){const o={selected:r?"checkbox":"radio"},i={boolean:(t,r)=>{const i={value:t,type:o[r]||"checkbox"};return t&&(i.checked=!!t),i.name=e,["input",null,i]},number:e=>["input",null,{value:e,type:"number"}],string:(e,t)=>["input",null,{value:e,type:"text",placeholder:h().get(`placeholder.${t}`)||""}],array:e=>["select",e.map((e=>{let{label:t,value:r}=e;return g("option",t,{value:r})}))],object:e=>{let{tag:t,content:r}=e;return[t,r,et(e,Ke)]}};t=rt(rt({},{selected:!1,label:"",value:""}),t);const n=Object.entries(t).map((e=>{let[t,r]=e;const o=H(r),[n,l,a]=i[o](r,t),s=`option-${t} option-attr`;return a["data-attr"]=t,a.className=a.className?`${a.className} ${s}`:s,g(n,l,a)})),l={className:`remove btn ${ot}cancel`,title:h().get("removeMessage")};return n.push(g("a",null,l)),g("li",n).outerHTML},De=[".form-elements input",".form-elements select",".form-elements textarea"].join(", ");A.on("change blur keyup click",De,r()((e=>{if(e){if([e=>{let{type:t,target:r}=e;return"keyup"===t&&"className"===r.name}].some((t=>t(e))))return!1;Oe(o(e.target).closest(".form-field"))}}),333,{leading:!1})),A.on("click touchstart",".remove",(t=>{const r=o(t.target).parents(".form-field:eq(0)"),i=r[0],n=i.getAttribute("type"),l=o(t.target.parentElement);t.preventDefault(),i.querySelector(".sortable-options").childNodes.length<=2&&!n.includes("checkbox")?e.notify.error("Error: "+h().get("minOptionMessage")):l.slideUp("250",(()=>{l.remove(),Oe(r)}))})),A.on("touchstart","input",(e=>{const t=o(e.target);if(!0===e.handled)return!1;if("checkbox"===t.attr("type"))t.trigger("click");else{t.focus();const e=t.val();t.val(e)}})),A.on("click touchstart",".toggle-form, .close-field",(function(e){if(e.stopPropagation(),e.preventDefault(),!0===e.handled)return!1;{const t=o(e.target).parents(".form-field:eq(0)").attr("id");b.toggleEdit(t),e.handled=!0}})),A.on("dblclick","li.form-field",(e=>{if(!["select","input","label","textarea"].includes(e.target.tagName.toLowerCase())&&!0!==e.target.isContentEditable&&(e.stopPropagation(),e.preventDefault(),!0!==e.handled)){const t=o(e.target).closest("li.form-field").attr("id");b.toggleEdit(t),e.handled=!0}})),A.on("change",'[name="subtype"]',(e=>{const t=o(e.target).closest("li.form-field");o(".value-wrap",t).toggle("quill"!==e.target.value)})),A.on("change",'[name="name"]',(t=>{const r=t.target.value;(e=>{const t=document,r=document.createElement("form");return e in t||e in r})(r)&&e.notify.error("Potential for Dom Clobbering with field name "+r)})),A.on("change",[".prev-holder input",".prev-holder select",".prev-holder textarea"].join(", "),(e=>{let t;if(e.target.classList.contains("other-option"))return;const r=oe(e.target,".form-field");if(["select","checkbox-group","radio-group"].includes(r.type)){const o=r.getElementsByClassName("option-value");"select"===r.type?X(o,(t=>{o[t].parentElement.childNodes[0].checked=e.target.value===o[t].value})):(t=document.getElementsByName(e.target.name),X(t,(e=>{t[e].classList.contains("other-option")||(o[e].parentElement.childNodes[0].checked=t[e].checked)})))}else{const t=document.getElementById("value-"+r.id);t&&(t.value=e.target.value)}b.save.call(b)})),re(d.stage,"keyup change",(e=>{let{target:t}=e;if(!t.classList.contains("fld-label"))return;const r=t.value||t.innerHTML,o=oe(t,".form-field").querySelector(".field-label");O(o,V(r),c.opts.disableHTMLLabels)})),A.on("keyup","input.error",(e=>{let{target:t}=e;return o(t).removeClass("error")})),A.on("keyup",'input[name="description"]',(function(e){const t=o(e.target).parents(".form-field:eq(0)"),r=o(".tooltip-element",t),i=o(e.target).val();if(""!==i)if(r.length)r.attr("tooltip",i).css("display","inline-block");else{const e=`?`;o(".field-label",t).after(e)}else r.length&&r.css("display","none")})),A.on("change",".fld-multiple",(e=>{const t=e.target.checked?"checkbox":"radio",r=o(".option-selected",o(e.target).closest(".form-elements"));return r.each((e=>r[e].type=t)),t})),A.on("blur","input.fld-name",(function(e){e.target.value=ne(e.target.value),""===e.target.value?o(e.target).addClass("field-error").attr("placeholder",h().get("cannotBeEmpty")):o(e.target).removeClass("field-error")})),A.on("blur","input.fld-maxlength, input.fld-rows",(e=>{e.target.value=le(e.target.value)})),A.on("click touchstart",".btnAddControl",(function(e){const t=o(e.currentTarget);j=C.clone(),j.hover((function(){}),(function(){j.remove()})),j.on("click","li",(e=>{let{target:r}=e;N=!0,E=!0,k=t;const i=o(r).closest("li");b.stopIndex=void 0,R(i),b.save.call(b),j.remove()})),A.append(j),0==t.index()?j.css({position:"fixed",left:t.offset().left,top:t.offset().top-o(window).scrollTop()}):j.css({position:"fixed",left:t.offset().left-80,top:t.offset().top-o(window).scrollTop()});const r=j.offset().top+j.outerHeight(),i=o(window).scrollTop()+o(window).innerHeight();r>i&&j.css({top:parseInt(j.css("top"))-(r-i)})})),A.on("click",`.${ot}copy`,(function(t){t.preventDefault();const r=o(t.target).parent().parent("li"),i=function(t){s.lastID=b.incrementId(s.lastID),Ce(t);const r=t.attr("id"),i=t.attr("type"),n=i+"-"+(new Date).getTime(),l=t.clone();return o(".fld-name",l).val(n),l.find("[id]").each(((e,t)=>{t.id=t.id.replace(r,s.lastID)})),l.find("[for]").each(((e,t)=>{const o=t.getAttribute("for").replace(r,s.lastID);t.setAttribute("for",o)})),t.find("select").each((function(e){l.find("select").eq(e).val(o(this).val())})),l.attr("id",s.lastID),l.attr("name",n),l.addClass("cloned"),o(".sortable-options",l).sortable(),e.typeUserEvents[i]&&e.typeUserEvents[i].onclone?e.typeUserEvents[i].onclone(l[0]):e.typeUserEvents["*"]&&e.typeUserEvents["*"].onclone&&e.typeUserEvents["*"].onclone(l[0]),l}(r);D()?function(e,t){const r=o(`#className-${t.attr("id")}`),i=Se({}),n=g("div",null,{id:`${e.attr("id")}-row`,className:`row row-${i.rowUniqueId} ${it}`}),l=g("div",null,{id:`${e.attr("id")}-cont`,className:`${b.getBootstrapColumnClass(r.val())} ${nt}`});let a;o(l).appendTo(n),t.parent().is("div")?a=t.closest(st):t.parent().is("ul")&&(a=t),o(n).insertAfter(a),e.appendTo(l),Ae(n),ye(),Fe(e.attr("id"))}(i,r):i.insertAfter(r),Oe(i),b.tmpCleanPrevHolder(i.find(".prev-holder")),e.editOnAdd&&b.closeField(s.lastID,!1)})),D()&&A.on("stageEmptied",(()=>{f=[]})),A.on("click",".delete-confirm",(t=>{t.preventDefault();const r=t.target.getBoundingClientRect(),i=document.body.getBoundingClientRect(),n={pageX:r.left+r.width/2,pageY:r.top-i.top-12},l=o(t.target).parents(".form-field:eq(0)").attr("id"),a=o(document.getElementById(l));if(document.addEventListener("modalClosed",(function(){a.removeClass("deleting")}),!1),e.fieldRemoveWarn){const e=g("h3",h().get("warning")),t=g("p",h().get("fieldRemoveWarning"));b.confirm([e,t],(()=>b.removeField(l)),n),a.addClass("deleting")}else b.removeField(l)}));let Le,Re,Ie,Me=!1,Pe=0;function Be(e,t){void 0===t&&(t=!1);const r=e.children(`div${dt}`).length,i=Math.floor(12/r);e.children(`div${dt}`).each(((e,r)=>{const n=o(`#${r.id}`);t||"true"!=n.find("li").attr("manuallyChangedDefaultColumnClass")?b.syncBootstrapColumnWrapperAndClassProperty(r.id.replace("-cont",""),i):b.showToast(`Preserving column size of field ${e+1} because you had personally adjusted it`,4e3)}))}function Fe(e){if(e){const t=o(`#className-${e.replace("-cont","")}`);if(t.val()){const e=b.getRowClass(t.val()),r=b.getRowClass(t.closest(st).attr("class"));t.val(t.val().replace(e,r)),He()}}}function He(){A.find(dt).each(((e,t)=>{const r=o(t);r.is(":empty")&&!i.preserveTempContainers.includes(r.attr("id"))&&r.remove()})),A.children(st).not(ct).each(((e,t)=>{if(0===o(t).children(dt).length){const e=b.getRowValue(o(t).attr("class"));f=f.filter((t=>t!==e)),o(t).remove()}else ke(o(t),!0)}))}function qe(e){if(void 0===e&&(e=!0),e)Me=!0,b.showToast("Starting Grid Mode - Use the mousewheel to resize.",1500),C.css("display","none"),o(d.formActions).css("display","none"),o(U).html("\n
\n

Grid Mode

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ActionResult
MOUSEWHEELAdjust the field column size
W or ↑Move entire row up
S or ↓Move entire row down
A or ←Move field left within the row
D or →Move field right within the row
RResize all fields within the row to be maximally equal
\n\n
Current Row Fields
\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
FieldSize
\n \n
\n "),ze(),b.closeAllEdit(),b.toggleHighlight(Le),ge();else{b.showToast("Grid Mode Finished",1500);const e=Le.closest(st);let t=0;e.children(`div${dt}`).each(((e,r)=>{const i=o(`#${r.id}`).find("li").attr("id");t+=b.getBootstrapColumnValue(o(`#${i}-cont`).attr("class"))})),t>12&&Be(e,!0),Me=!1,Le=null,o(U).empty(),C.css("display","unset"),o(d.formActions).css("display","unset")}}function ze(){o(U).find(".gridHelpCurrentRow tbody").empty(),Le.closest(st).children(`div${dt}`).each(((e,t)=>{const r=o(`#${t.id}`).find("li").attr("id"),i=o(`#${r}`),n=i.attr("type");let l=o(`#label-${r}`).html();"hidden"!==n&&"paragraph"!==n||(l=o(`#name-${r}`).val()),l||(l=i.attr("id"));let a="";Le.attr("id")===r&&(a="currentGridModeFieldHighlight"),o(U).find(".gridHelpCurrentRow tbody").append(`\n \n ${l}\n \n ${b.getBootstrapColumnValue(o(`#${r}-cont`).attr("class"))}\n \n \n `)}))}if(A.on("click touchstart",".grid-button",(e=>{e.preventDefault();const t=o(e.target).parents(".form-field:eq(0)").attr("id");Le=o(document.getElementById(t)),Re=e.pageX,Ie=e.pageY,Pe=0,qe()})),A.on("wheel",(function(e){if(0!==e.originalEvent.deltaY&&Me){e.preventDefault(),Pe+=e.originalEvent.deltaY;const t=120;if(Pe>0&&Pe-t)return;const r=Le.closest("div"),i=b.getBootstrapColumnValue(r.attr("class")),n=Math.round(Pe/t);Pe%=t;const l=i+n;if(l>12)return void b.showToast('Column Size cannot exceed 12');if(l<1)return void b.showToast('Column Size cannot be less than 1');const a=Le.closest(st);let s=l;if(a.children(`div${dt}`).each(((e,t)=>{const r=o(`#${t.id}`).find("li").attr("id");r!=Le.attr("id")&&(s+=b.getBootstrapColumnValue(o(`#${r}-cont`).attr("class")))})),s>12)return void b.showToast('There is a maximum of 12 columns per row');b.syncBootstrapColumnWrapperAndClassProperty(Le.attr("id"),l),Le.attr("manuallyChangedDefaultColumnClass",!0),ze(),b.toggleHighlight(Le)}})),o(document).keydown((e=>{if(Me){e.preventDefault();const t=Le.closest(st);switch(event.code){case"KeyW":case"ArrowUp":je(t),function(e){const t=e.prevAll().not(ct).not(".form-prepend").first();t.length&&(o(Le.parent().parent()).swapWith(t),b.toggleHighlight(Le))}(t);break;case"KeyS":case"ArrowDown":je(t),function(e){const t=e.nextAll().not(ft).not(".form-append").first();t.length&&(o(Le.parent().parent()).swapWith(t),b.toggleHighlight(Le))}(t);break;case"KeyA":case"ArrowLeft":je(t),function(){const e=Le.parent().prev();e.length&&Le.parent().after(e),b.toggleHighlight(Le)}();break;case"KeyD":case"ArrowRight":je(t),function(){const e=Le.parent().next();e.length&&Le.parent().before(e),b.toggleHighlight(Le)}();break;case"KeyR":je(t),Be(t,!0),ke(t,!0)}ze(),Ee(t)}})),o(document).mousemove((e=>{Me&&b.getDistanceBetweenPoints(Re,Ie,e.pageX,e.pageY)>c.opts.cancelGridModeDistance&&qe(!1)})),o(document).on("checkRowCleanup",((e,t)=>{He();const r=o(`#${t.rowWrapperID}`);r.length&&Be(r,!0)})),o(document).on("fieldOpened",((e,t)=>{const r=o(`#${t.rowWrapperID}`);r.length&&Ee(r)})),A.on("click",".field-actions .sort-button",(function(e){e.preventDefault();const t=o(e.target).parent().parent("li");let r;o(e.target).hasClass("sort-button-higher")?(r=t.prev("li"),r.length&&!r.hasClass("form-prepend")&&t.insertBefore(r)):(r=t.next("li"),r.length&&!r.hasClass("form-append")&&t.insertAfter(r)),b.toggleHighlight(t)})),A.on("click",".style-wrap button",(e=>{const t=o(e.target),r=t.closest(".form-elements"),i=t.val(),n=o(".btn-style",r);n.val(i),t.siblings(".btn").removeClass("selected"),t.addClass("selected"),Oe(n.closest(".form-field"))})),A.on("click",".fld-required",(e=>{o(e.target).closest(".form-field").find(".required-asterisk").toggle()})),A.on("click","input.fld-access",(function(e){const t=o(e.target).closest(".form-field").find(".available-roles"),r=o(e.target);t.slideToggle(250,(function(){r.is(":checked")||o("input[type=checkbox]",t).removeAttr("checked")}))})),A.on("click",".add-opt",(function(e){e.preventDefault();const t=o(e.target).closest(".form-field").attr("type"),r=o(e.target).closest(".field-options"),i=o('[name="multiple"]',r),n=o(".option-selected:eq(0)",r),l=i.length?i.prop("checked"):"checkbox"===n.attr("type"),a=o(".sortable-options",r),s=c.opts.onAddOption({selected:!1,label:"",value:""},{type:t,index:a.children().length,isMultiple:l});a.append(Te(n.attr("name"),s,l))})),A.on("mouseover mouseout",".remove, .del-button",(e=>o(e.target).closest("li").toggleClass("delete"))),$(),!0===e.disableInjectedStyle){const e=document.getElementsByClassName("formBuilder-injected-style");X(e,(t=>a(e[t])))}else"bootstrap"===e.disableInjectedStyle&&d.editorWrap.classList.remove("formbuilder-embedded-bootstrap");return document.dispatchEvent(w.loaded),i.actions={getFieldTypes:t=>t?ae(y.getRegistered(),e.disableFields):y.getRegistered(),clearFields:()=>b.removeAllFields(d.stage),showData:b.showData.bind(b),save:e=>{const t=b.save(e),r=window.JSON.parse(t);return c.opts.onSave(r),r},addField:(e,t)=>{b.stopIndex=s.formData.length?t:void 0,W(e)},removeField:b.removeField.bind(b),getData:b.getFormData.bind(b),setData:e=>{b.stopIndex=void 0,b.removeAllFields(d.stage),$(e)},setLang:e=>h().setCurrent.call(h(),e).then((()=>{d.stage.dataset.content=h().get("getStarted"),y.init(),d.empty(d.formActions),b.formActionButtons().forEach((e=>d.formActions.appendChild(e)))})),showDialog:b.dialog.bind(b),toggleFieldEdit:e=>{(Array.isArray(e)?e:[e]).forEach((e=>{["number","string"].includes(typeof e)&&("number"==typeof e?e=d.stage.children[e].id:/^frmb-/.test(e)||(e=d.stage.querySelector(e).id),b.toggleEdit(e))}))},toggleAllFieldEdit:()=>{X(d.stage.children,(e=>{b.toggleEdit(d.stage.children[e].id)}))},closeAllFieldEdit:b.closeAllEdit.bind(b),getCurrentFieldId:()=>s.lastID},d.onRender(d.controls,(()=>{const e=setTimeout((()=>{d.stage.style.minHeight=`${d.controls.clientHeight}px`,clearTimeout(e)}),0)})),i}const mt=function(e,t){const r=this,o=jQuery.extend({},we,e,!0),{i18n:i}=o,n=et(o,_e);this.i18nOpts=jQuery.extend({},ye,i,!0);const l=()=>{console.error("formBuilder is still initialising"),console.info("See https://formbuilder.online/docs/formBuilder/actions/getData/#wont-work and https://formbuilder.online/docs/formBuilder/promise/ for more information on formBuilder asynchronous loading")};this.instance={actions:["getFieldTypes","addField","clearFields","closeAllFieldEdit","getData","removeField","save","setData","setLang","showData","showDialog","toggleAllFieldEdit","toggleFieldEdit","getCurrentFieldId"].reduce(((e,t)=>(e[t]=l,e)),{}),markup:q,get formData(){return r.instance.actions.getData!==l&&r.instance.actions.getData("json")},promise:new Promise((function(e,o){h().init(r.i18nOpts).then((()=>{const o=new pt(n,t[0],jQuery);jQuery(t[0]).data("formBuilder",o),Object.assign(r.instance,o.actions),r.instance.actions=o.actions,delete r.instance.promise,e(r.instance)})).catch((e=>{o(e),n.notify.error(e)}))}))}};jQuery.fn.formBuilder=function(e){if(void 0===e&&(e={}),"string"!=typeof e){const t=new mt(e,this);return this.data("fbInstance",t.instance),t.instance}{const i=this.data("fbInstance");if(i[e]){if("function"==typeof i[e]){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o */ diff --git a/assets/js/form-builder.min.js.gz b/assets/js/form-builder.min.js.gz index 75ff93cf4..a55e54764 100644 Binary files a/assets/js/form-builder.min.js.gz and b/assets/js/form-builder.min.js.gz differ diff --git a/assets/js/form-render.min.js b/assets/js/form-render.min.js index 1371a8993..f3c640134 100644 --- a/assets/js/form-render.min.js +++ b/assets/js/form-render.min.js @@ -1,2 +1,2 @@ /*! For license information please see form-render.min.js.LICENSE.txt */ -!function(e){"use strict";!function(){var t={946:function(e,t,r){r.r(t);var n=r(933),o=r.n(n),i=r(476),s=r.n(i)()(o());s.push([e.id,'.rendered-form *{box-sizing:border-box}.rendered-form.formbuilder-embedded-bootstrap button,.rendered-form.formbuilder-embedded-bootstrap input,.rendered-form.formbuilder-embedded-bootstrap select,.rendered-form.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.rendered-form.formbuilder-embedded-bootstrap input{line-height:normal}.rendered-form.formbuilder-embedded-bootstrap textarea{overflow:auto}.rendered-form.formbuilder-embedded-bootstrap button,.rendered-form.formbuilder-embedded-bootstrap input,.rendered-form.formbuilder-embedded-bootstrap select,.rendered-form.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.rendered-form.formbuilder-embedded-bootstrap .btn-group{position:relative;display:inline-block;vertical-align:middle}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn{position:relative;float:left}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn+.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn+.btn-group,.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn-group{margin-left:-1px}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:last-child:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .btn-group>.dropdown-toggle:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group .form-control:last-child,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-addon:last-child,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn-group>.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn.active,.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:active,.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:focus,.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:hover{z-index:2}.rendered-form.formbuilder-embedded-bootstrap .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-image:none;border-radius:4px}.rendered-form.formbuilder-embedded-bootstrap .btn.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.rendered-form.formbuilder-embedded-bootstrap .btn.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.rendered-form.formbuilder-embedded-bootstrap .btn.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.rendered-form.formbuilder-embedded-bootstrap .btn.active,.rendered-form.formbuilder-embedded-bootstrap .btn.btn-active,.rendered-form.formbuilder-embedded-bootstrap .btn:active{background-image:none}.rendered-form.formbuilder-embedded-bootstrap .input-group .form-control:last-child,.rendered-form.formbuilder-embedded-bootstrap .input-group-addon:last-child,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn-group>.btn,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.rendered-form.formbuilder-embedded-bootstrap .input-group .form-control,.rendered-form.formbuilder-embedded-bootstrap .input-group-addon,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn{display:table-cell}.rendered-form.formbuilder-embedded-bootstrap .input-group-lg>.form-control,.rendered-form.formbuilder-embedded-bootstrap .input-group-lg>.input-group-addon,.rendered-form.formbuilder-embedded-bootstrap .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333}.rendered-form.formbuilder-embedded-bootstrap .input-group{position:relative;display:table;border-collapse:separate}.rendered-form.formbuilder-embedded-bootstrap .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.rendered-form.formbuilder-embedded-bootstrap .form-control,.rendered-form.formbuilder-embedded-bootstrap output{font-size:14px;line-height:1.42857143;display:block}.rendered-form.formbuilder-embedded-bootstrap textarea.form-control{height:auto}.rendered-form.formbuilder-embedded-bootstrap .form-control{height:34px;display:block;width:100%;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px}.rendered-form.formbuilder-embedded-bootstrap .form-control:focus{outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.rendered-form.formbuilder-embedded-bootstrap .form-group{margin-left:0px;margin-bottom:15px}.rendered-form.formbuilder-embedded-bootstrap .btn,.rendered-form.formbuilder-embedded-bootstrap .form-control{background-image:none}.rendered-form.formbuilder-embedded-bootstrap .pull-right{float:right}.rendered-form.formbuilder-embedded-bootstrap .pull-left{float:left}.rendered-form .formbuilder-required,.rendered-form .required-asterisk{color:#c10000}.rendered-form .formbuilder-checkbox-group input[type=checkbox],.rendered-form .formbuilder-checkbox-group input[type=radio],.rendered-form .formbuilder-radio-group input[type=checkbox],.rendered-form .formbuilder-radio-group input[type=radio]{margin:0 4px 0 0}.rendered-form .formbuilder-checkbox-inline,.rendered-form .formbuilder-radio-inline{margin-right:8px;display:inline-block;vertical-align:middle;padding-left:0}.rendered-form .formbuilder-checkbox-inline label input[type=text],.rendered-form .formbuilder-radio-inline label input[type=text]{margin-top:0}.rendered-form .formbuilder-checkbox-inline:first-child,.rendered-form .formbuilder-radio-inline:first-child{padding-left:0}.rendered-form .formbuilder-autocomplete-list{background-color:#fff;display:none;list-style:none;padding:0;border:1px solid #ccc;border-width:0 1px 1px;position:absolute;z-index:20;max-height:200px;overflow-y:auto}.rendered-form .formbuilder-autocomplete-list li{display:none;cursor:default;padding:5px;margin:0;transition:background-color 200ms ease-in-out}.rendered-form .formbuilder-autocomplete-list li:hover,.rendered-form .formbuilder-autocomplete-list li.active-option{background-color:rgba(0,0,0,.075)}.rendered-form *[tooltip]{position:relative}.rendered-form *[tooltip]:hover::after{background:rgba(0,0,0,.9);border-radius:5px 5px 5px 0;bottom:23px;color:#fff;content:attr(tooltip);padding:10px 5px;position:absolute;z-index:98;left:2px;width:230px;text-shadow:none;font-size:12px;line-height:1.5em;cursor:default}.rendered-form *[tooltip]:hover::before{border:solid;border-color:#222 rgba(0,0,0,0);border-width:6px 6px 0;bottom:17px;content:"";left:2px;position:absolute;z-index:99;cursor:default}.rendered-form .tooltip-element{visibility:visible;color:#fff;background:#000;width:16px;height:16px;border-radius:8px;display:inline-block;text-align:center;line-height:16px;margin:0 5px;font-size:12px;cursor:default}.rendered-form .kc-toggle{padding-left:0 !important}.rendered-form .kc-toggle span{position:relative;width:48px;height:24px;background:#e6e6e6;display:inline-block;border-radius:4px;border:1px solid #ccc;padding:2px;overflow:hidden;float:left;margin-right:5px;will-change:transform}.rendered-form .kc-toggle span::after,.rendered-form .kc-toggle span::before{position:absolute;display:inline-block;top:0}.rendered-form .kc-toggle span::after{position:relative;content:"";width:50%;height:100%;left:0;border-radius:3px;background:linear-gradient(to bottom, white 0%, #ccc 100%);border:1px solid #999;transition:transform 100ms;transform:translateX(0)}.rendered-form .kc-toggle span::before{border-radius:4px;top:2px;left:2px;content:"";width:calc(100% - 4px);height:18px;box-shadow:0 0 1px 1px #b3b3b3 inset;background-color:rgba(0,0,0,0)}.rendered-form .kc-toggle input{height:0;overflow:hidden;width:0;opacity:0;pointer-events:none;margin:0}.rendered-form .kc-toggle input:checked+span::after{transform:translateX(100%)}.rendered-form .kc-toggle input:checked+span::before{background-color:#6fc665}.rendered-form label{font-weight:normal}.rendered-form .form-group .formbuilder-required{color:#c10000}.rendered-form .other-option:checked+label input{display:inline-block}.rendered-form .other-val{margin-left:5px;display:none}.rendered-form .form-control.number{width:auto}.rendered-form .form-control[type=color]{width:60px;padding:2px;display:inline-block}.rendered-form .form-control[multiple]{height:auto}',""]),t.default=s},476:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},933:function(e){e.exports=function(e){return e[1]}},747:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,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 o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));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="",r(r.s=7)}([function(e,t,r){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=r(2),i=r(10),s=Object.prototype.toString;function a(e){return"[object Array]"===s.call(e)}function l(e){return null!==e&&"object"===(void 0===e?"undefined":n(e))}function d(e){return"[object Function]"===s.call(e)}function c(e,t){if(null!=e)if("object"!==(void 0===e?"undefined":n(e))&&(e=[e]),a(e))for(var r=0,o=e.length;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){a.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){a.headers[e]=n.merge(i)})),e.exports=a}).call(this,r(12))},function(e,t,r){e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n0&&void 0!==arguments[0]?arguments[0]:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}return e.prototype.processConfig=function(e){var t=this,r=Object.assign({},s,e),n=r.location,o=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(r,["location"]),i=n.replace(/\/?$/,"/");this.config=Object.assign({},{location:i},o);var a=this.config,l=a.override,d=a.preloaded,c=void 0===d?{}:d,u=Object.entries(this.langs).concat(Object.entries(l||c));this.langs=u.reduce((function(e,r){var n=r[0],o=r[1];return e[n]=t.applyLanguage.call(t,n,o),e}),{}),this.locale=this.config.locale||this.config.langs[0]},e.prototype.init=function(e){return this.processConfig.call(this,Object.assign({},this.config,e)),this.setCurrent(this.locale)},e.prototype.addLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t="string"==typeof t?this.processFile.call(this,t):t,this.applyLanguage.call(this,e,t),this.config.langs.push("locale")},e.prototype.getValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.locale;return this.langs[t]&&this.langs[t][e]||this.getFallbackValue(e)},e.prototype.getFallbackValue=function(e){var t=Object.values(this.langs).find((function(t){return t[e]}));return t&&t[e]},e.prototype.makeSafe=function(e){var t={"{":"\\{","}":"\\}","|":"\\|"};return e=e.replace(/\{|\}|\|/g,(function(e){return t[e]})),new RegExp(e,"g")},e.prototype.put=function(e,t){return this.current[e]=t},e.prototype.get=function(e,t){var r=this.getValue(e);if(r){var o=r.match(/\{[^}]+?\}/g),i=void 0;if(t&&o)if("object"===(void 0===t?"undefined":n(t)))for(var s=0;s1&&void 0!==arguments[1])||arguments[1],r=this;return new Promise((function(n,o){if(-1!==r.loaded.indexOf(e)&&t)return r.applyLanguage.call(r,r.langs[e]),n(r.langs[e]);var s=[r.config.location,e,r.config.extension].join("");return(0,i.get)(s).then((function(t){var o=t.data,i=r.processFile(o);return r.applyLanguage.call(r,e,i),r.loaded.push(e),n(r.langs[e])})).catch((function(){var t=r.applyLanguage.call(r,e);n(t)}))}))},e.prototype.applyLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.config.override[e]||{},n=this.langs[e]||{};return this.langs[e]=Object.assign({},n,t,r),this.langs[e]},e.prototype.setCurrent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return this.loadLang(t).then((function(){return e.locale=t,e.current=e.langs[t],e.current}))},o(e,[{key:"getLangs",get:function(){return this.config.langs}}]),e}();t.default=new a},function(e,t,r){e.exports=r(9)},function(e,t,r){var n=r(0),o=r(2),i=r(11),s=r(1);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var l=a(s);l.Axios=i,l.create=function(e){return a(n.merge(s,e))},l.Cancel=r(6),l.CancelToken=r(26),l.isCancel=r(5),l.all=function(e){return Promise.all(e)},l.spread=r(27),e.exports=l,e.exports.default=l},function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){var n=r(1),o=r(0),i=r(21),s=r(22);function a(e){this.defaults=e,this.interceptors={request:new i,response:new i}}a.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},o.forEach(["delete","get","head","options"],(function(e){a.prototype[e]=function(t,r){return this.request(o.merge(r||{},{method:e,url:t}))}})),o.forEach(["post","put","patch"],(function(e){a.prototype[e]=function(t,r,n){return this.request(o.merge(n||{},{method:e,url:t,data:r}))}})),e.exports=a},function(e,t,r){var n,o,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var d,c=[],u=!1,f=-1;function p(){u&&d&&(u=!1,d.length?c=d.concat(c):f=-1,c.length&&m())}function m(){if(!u){var e=l(p);u=!0;for(var t=c.length;t;){for(d=c,c=[];++f1)for(var r=1;r=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},function(e,t,r){var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){function n(){this.message="String contains an invalid character"}n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,o=String(e),i="",s=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.charAt(0|s)||(a="=",s%1);i+=a.charAt(63&t>>8-s%1*8)){if((r=o.charCodeAt(s+=.75))>255)throw new n;t=t<<8|r}return i}},function(e,t,r){var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,r){var n=r(0),o=r(23),i=r(5),s=r(1),a=r(24),l=r(25);function d(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return d(e),e.baseURL&&!a(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return d(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(d(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){var n=r(0);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){var n=r(6);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,r){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},299:function(e,t,r){var n=r(892),o=r(946);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{attributes:{class:"formBuilder-injected-style"},insert:"head",singleton:!1}),e.exports=o.locals||{}},892:function(e,t,r){var n,o=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function s(e){for(var t=-1,r=0;re}};var i;const s=(e,t)=>{if(0===o.backendOrder.length)return!1;const r=e.toLowerCase();return t=t?t+"":"",r.startsWith("on")||["form","formaction"].includes(r)||t.trim().toLowerCase().startsWith("javascript:")};o.backends.fallback=function(t){const r=document.implementation.createHTMLDocument(""),n=r.createElement("base");n.href=document.location.href,r.head.appendChild(n);const o=["applet","comment","embed","iframe","link","listing","meta","noscript","object","plaintext","script","style","xmp"],i=e.parseHTML(t,r,!1);e(i).find("*").addBack().each(((t,r)=>{"#text"!==r.nodeName&&(r.tagName&&o.includes(r.tagName.toLowerCase())?r.parentElement?r.parentElement.removeChild(r):i.includes(r)&&i.splice(i.indexOf(r),1):r.attributes&&Array.from(r.attributes).forEach((t=>{s(t.name,t.value)&&e(r).removeAttr(t.name)})))}));const a=r.createElement("div");return e(a).html(i),a.innerHTML};const a=e=>{const t=!!o.clobberingProtection.document&&document,r=!!o.clobberingProtection.form&&document.createElement("form");return t&&e in t||r&&e in r?o.clobberingProtection.namespaceAttributes?"user-content-"+e:void 0:e},l={fallback:(e,t)=>{const r=o.backends.fallback,n="function"==typeof r;return n&&(t=r(t)),e.innerHTML=t,n},dompurify:(e,t)=>{const r=o.backends.dompurify;return!(!1===r||!r.isSupported||(e.innerHTML=r.sanitize(t),0))},sanitizer:(e,t)=>{const r=o.backends.sanitizer;return!!r&&(e.setHTML(t,{sanitizer:r}),!0)}},d=["events"],c=["tag","content"];function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};const m=function(e,t){if(void 0===t&&(t=!1),null==e||"object"!=typeof e)return e;const r="function"==typeof window.structuredClone?window.structuredClone(e):Object.assign({},e),n=[null,void 0,""];t&&n.push(!1);for(const e in r)n.includes(r[e])?delete r[e]:Array.isArray(r[e])&&(r[e].length||delete r[e]);return r},h=function(e){return!["values","enableOther","other","label","subtype"].includes(e)},b=(e,t)=>{let r;return e=g(e),t&&(Array.isArray(t)?r=A(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),r=A(t.trim()))),{name:e,value:t=t?`="${r}"`:""}},g=e=>({className:"class"}[e]||y(e)),y=e=>(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))).replace(/\s/g,"-").replace(/^-+/g,""),v=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),w=function(){let e,t=0;return function(r){const n=Date.now();return n===e?++t:(t=0,e=n),(r.type||y(r.label))+"-"+n+"-"+t}}(),x=e=>void 0===e?e:[["array",e=>Array.isArray(e)],["node",e=>e instanceof window.Node||e instanceof window.HTMLElement],["component",()=>e&&e.dom],[typeof e,()=>!0]].find((t=>t[1](e)))[0],O=function(t,r,n){void 0===r&&(r=""),void 0===n&&(n={});let i=x(r);const{events:u}=n,f=p(n,d),m=document.createElement(t),h={string:t=>{!function(t,r,n){if(void 0===n&&(n=!1),!n){const n=document.createElement(t.tagName);return void 0!==o.backendOrder.find((e=>l[e](n,r)))?((t=>{e(t).find("*").each(((e,t)=>{["embed","form","iframe","image","img","object"].includes(t.tagName.toLowerCase())&&t.removeAttribute("name"),["id","name"].forEach((e=>{if(t.hasAttribute(e)){const r=a(t.getAttribute(e));void 0===r?t.removeAttribute(e):t.setAttribute(e,r)}}))}))})(n),t.innerHTML=n.innerHTML,t):(t.innerHTML=r,t)}t.textContent=r}(m,m.innerHTML+t)},object:e=>{const{tag:t,content:r}=e,n=p(e,c);return m.appendChild(O(t,r,n))},node:e=>m.appendChild(e),array:e=>{for(let t=0;t{e=e(),i=x(e),h[i](e)},undefined:()=>{}};for(const e in f)if(f.hasOwnProperty(e)){const t=g(e);let r=Array.isArray(f[e])?L(f[e].join(" ").split(" ")).join(" "):f[e];if(s(t,r))continue;if("boolean"==typeof r){if(!0===r){const e="contenteditable"===t||t;m.setAttribute(t,e)}}else"id"!==t&&"name"!==t||(r=a(r)),void 0!==r&&m.setAttribute(t,r)}return r&&h[i](r),((e,t)=>{if(t)for(const r in t)t.hasOwnProperty(r)&&e.addEventListener(r,(e=>t[r](e)))})(m,u),m},j=e=>{const t=e.attributes,r={};return T(t,(e=>{let n=t[e].value||"";n.match(/false|true/g)?n="true"===n:n.match(/undefined/g)&&(n=void 0),n&&(r[v(t[e].name)]=n)})),r},k=e=>{const t=[];for(let r=0;r{const t=[];if(e.length){const r=e[0].getElementsByTagName("value");for(let e=0;e{const t=(new window.DOMParser).parseFromString(e,"text/xml"),r=[];if(t){const e=t.getElementsByTagName("field");for(let t=0;t{const t=document.createElement("textarea");return t.innerHTML=e,t.textContent},A=e=>{const t={'"':""","&":"&","<":"<",">":">"};return"string"==typeof e?e.replace(/["&<>]/g,(e=>t[e]||e)):e},T=function(e,t,r){for(let n=0;ne.filter(((e,t,r)=>r.indexOf(e)===t)),R=function(e,t){void 0===t&&(t="");const r=jQuery;let n=[];return Array.isArray(e)||(e=[e]),P(e)||(n=jQuery.map(e,(e=>{const r={dataType:"script",cache:!0,url:(t||"")+e};return jQuery.ajax(r).done((()=>window.fbLoaded.js.push(e)))}))),n.push(jQuery.Deferred((e=>r(e.resolve)))),jQuery.when(...n)},P=function(e,t){void 0===t&&(t="js");const r=window.fbLoaded[t];return Array.isArray(e)?e.every((e=>r.includes(e))):r.includes(e)},D=function(t,r){void 0===r&&(r=""),Array.isArray(t)||(t=[t]),t.forEach((t=>{let n="href",o=t,i="";if("object"==typeof t&&(n=t.type||(t.style?"inline":"href"),i=t.id,o=i||t.href||t.style,t="inline"===n?t.style:t.href),!P(o,"css")){if("href"===n){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=(r||"")+t,document.head.appendChild(e)}else e(``).attr("id",i).appendTo(e(document.head));window.fbLoaded.css.push(o)}}))},N=(e,t)=>{const r=Object.assign({},e,t);for(const n in t)r.hasOwnProperty(n)&&(Array.isArray(t[n])?r[n]=Array.isArray(e[n])?L(e[n].concat(t[n])):t[n]:"object"==typeof t[n]?r[n]=N(e[n],t[n]):r[n]=t[n]);return r},q=/^col-(xs|sm|md|lg)-([^\s]+)/,M={addEventListeners:(e,t,r)=>t.split(" ").forEach((t=>e.addEventListener(t,r,!1))),attrString:e=>Object.entries(e).map((e=>{let[t,r]=e;return h(t)&&Object.values(b(t,r)).join("")})).filter(Boolean).join(" "),camelCase:v,capitalize:e=>e.replace(/\b\w/g,(function(e){return e.toUpperCase()})),closest:(e,t)=>{const r=t.replace(".","");for(;(e=e.parentElement)&&!e.classList.contains(r););return e},getContentType:x,escapeAttr:A,escapeAttrs:e=>{for(const t in e)e.hasOwnProperty(t)&&(e[t]=A(e[t]));return e},escapeHtml:e=>{const t=document.createElement("textarea");return t.textContent=e,t.innerHTML},forceNumber:e=>e.replace(/[^0-9]/g,""),forEach:T,getScripts:R,getStyles:D,hyphenCase:y,isCached:P,markup:O,merge:N,mobileClass:()=>{let e="";var t;return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e="formbuilder-mobile"),e},nameAttr:w,parsedHtml:S,parseXML:E,removeFromArray:(e,t)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},safeAttr:b,safeAttrName:g,safename:e=>e.replace(/\s/g,"-").replace(/[^a-zA-Z0-9[\]_-]/g,""),subtract:(e,t)=>t.filter((function(e){return!~this.indexOf(e)}),e),trimObj:m,unique:L,validAttr:h,titleCase:function(e){const t=["a","an","and","as","at","but","by","for","for","from","in","into","near","nor","of","on","onto","or","the","to","with"].map((e=>`\\s${e}\\s`)),r=new RegExp(`(?!${t.join("|")})\\w\\S*`,"g");return`${e}`.replace(r,(e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/[A-Z]/g,(e=>` ${e}`))))},firstNumberOrUndefined:function(){for(var e=arguments.length,t=new Array(e),r=0;r"number"==typeof e))},splitObject:(e,t)=>{const r=e=>(t,r)=>(t[r]=e[r],t);return[Object.keys(e).filter((e=>t.includes(e))).reduce(r(e),{}),Object.keys(e).filter((e=>!t.includes(e))).reduce(r(e),{})]}};e.fn.swapWith=function(t){const r=this,n=e(t),o=e("
");return r.before(o),n.before(r),o.before(n).remove(),r};var F=M;const z=function(e,t,r){void 0===r&&(r=!0);const n=[];let o=["none","block"];r&&(o=o.reverse());for(let r=e.length-1;r>=0;r--)-1!==e[r].textContent.toLowerCase().indexOf(t.toLowerCase())?(e[r].style.display=o[0],n.push(e[r])):e[r].style.display=o[1];return n};function B(e){let t;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}new RegExp(`(${["select","checkbox-group","checkbox","radio-group","autocomplete"].join("|")})`);var H={loaded:B("loaded"),viewData:B("viewData"),userDeclined:B("userDeclined"),modalClosed:B("modalClosed"),modalOpened:B("modalOpened"),formSaved:B("formSaved"),fieldAdded:B("fieldAdded"),fieldRemoved:B("fieldRemoved"),fieldRendered:B("fieldRendered"),fieldEditOpened:B("fieldEditOpened"),fieldEditClosed:B("fieldEditClosed"),stageEmptied:B("stageEmptied")};const $=["label","type"];class U{constructor(e,t){this.rawConfig=jQuery.extend({},e),e=jQuery.extend({},e),this.preview=t,delete e.isPreview,this.preview&&delete e.required;const r=["label","description","subtype","required","disabled"];for(const t of r)this[t]=e[t],delete e[t];e.id||(e.name?e.id=e.name:e.id="control-"+Math.floor(1e7*Math.random()+1)),this.id=e.id,this.type=e.type,this.description&&(e.title=this.description),U.controlConfig||(U.controlConfig={});const n=this.subtype?this.type+"."+this.subtype:this.type;this.classConfig=jQuery.extend({},U.controlConfig[this.type]||{},U.controlConfig[n]||{}),this.subtype&&(e.type=this.subtype),this.required&&(e.required="required",e["aria-required"]="true"),this.disabled&&(e.disabled="disabled"),this.config=e,this.configure()}static get definition(){return{}}static register(e,t,r){const n=r?r+".":"";U.classRegister||(U.classRegister={}),Array.isArray(e)||(e=[e]);for(const r of e)-1===r.indexOf(".")?U.classRegister[n+r]=t:U.error(`Ignoring type ${r}. Cannot use the character '.' in a type name.`)}static getRegistered(e){void 0===e&&(e=!1);const t=Object.keys(U.classRegister);return t.length?t.filter((t=>e?t.indexOf(e+".")>-1:-1===t.indexOf("."))):t}static getRegisteredSubtypes(){const e={};for(const t in U.classRegister)if(U.classRegister.hasOwnProperty(t)){const[r,n]=t.split(".");if(!n)continue;e[r]||(e[r]=[]),e[r].push(n)}return e}static getClass(e,t){const r=t?e+"."+t:e;return U.classRegister[r]||U.classRegister[e]||U.error("Invalid control type. (Type: "+e+", Subtype: "+t+"). Please ensure you have registered it, and imported it correctly.")}static loadCustom(e){let t=[];if(e&&(t=t.concat(e)),window.fbControls&&(t=t.concat(window.fbControls)),!this.fbControlsLoaded){for(const e of t)e(U,U.classRegister);this.fbControlsLoaded=!0}}static mi18n(e,t){const n=this.definition;let o=n.i18n||{};o=o[r().locale]||o.default||o;const i=this.camelCase(e),s="object"==typeof o?o[i]||o[e]:o;if(s)return s;let a=n.mi18n;return"object"==typeof a&&(a=a[i]||a[e]),a||(a=i),r().get(a,t)}static active(e){return!Array.isArray(this.definition.inactive)||-1===this.definition.inactive.indexOf(e)}static label(e){return this.mi18n(e)}static icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}configure(){}build(){const e=this.config,{label:t,type:r}=e,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,$);return this.markup(r,S(t),n)}on(e){const t={prerender:e=>e,render:e=>{const t=()=>{this.onRender&&this.onRender(e)};this.css&&D(this.css),this.js&&!P(this.js)?R(this.js).done(t):t()}};return e?t[e]:t}static error(e){throw new Error(e)}markup(e,t,r){return void 0===t&&(t=""),void 0===r&&(r={}),this.element=O(e,t,r),this.element}parsedHtml(e){return S(e)}static camelCase(e){return v(e)}}const I=(e,t)=>{let r=e.id?`formbuilder-${e.type} form-group field-${e.id}`:"";if(e.className){const n=(e=>"string"==typeof e?e.split(" ").filter((e=>q.test(e)||e.startsWith("row-"))):[])(e.className);n&&n.length>0&&(r+=` ${n.join(" ")}`,Array.isArray(t)||(t=[t]),t.forEach((e=>{e.classList&&e.classList.remove(...n),e.querySelectorAll("[class*=row-],[class*=col-]").forEach((e=>{e.classList&&e.classList.remove(...n)}))})))}return r};class _{constructor(e,t,r,n){var o,i,s;void 0===t&&(t=!1),void 0===r&&(r=!1),void 0===n&&(n={}),this.preview=null!==(o=t)&&void 0!==o&&o,this.disableHTMLLabels=null!==(i=r)&&void 0!==i&&i,this.controlConfig=null!==(s=n)&&void 0!==s?s:{},this.templates={label:null,help:null,default:(e,t,r,n)=>(r&&t.appendChild(r),this.markup("div",[t,e],{className:I(n,e)})),noLabel:(e,t,r,n)=>this.markup("div",e,{className:I(n,e)}),hidden:e=>e},e&&(this.templates=jQuery.extend(this.templates,e)),this.configure()}configure(){}build(e,t,r){this.preview&&(t.name?t.name=t.name+"-preview":t.name=F.nameAttr(t)+"-preview"),t.id=t.name,this.data=jQuery.extend({},t),U.controlConfig=this.controlConfig;const n=new e(t,this.preview);let o=n.build();if("object"==typeof o&&o.field||(o={field:o}),"string"==typeof o.field){const e=this.markup("div",o.field,{});1===e.childElementCount?o.field=e.children.item(0):o.field=Array.from(e.children)}const i=this.label(),s=this.help();let a;a=r&&this.isTemplate(r)?r:this.isTemplate(o.layout)?o.layout:"default";const l=this.processTemplate(a,o.field,i,s);return n.on("prerender")(l),l.addEventListener("fieldRendered",n.on("render")),l}label(){const e=this.data.label||"",t=[this.disableHTMLLabels?document.createTextNode(e):F.parsedHtml(e)];return this.data.required&&t.push(this.markup("span","*",{className:"formbuilder-required"})),this.isTemplate("label")?this.processTemplate("label",t):this.markup("label",t,{for:this.data.id,className:`formbuilder-${this.data.type}-label`})}help(){return this.data.description?this.isTemplate("help")?this.processTemplate("help",this.data.description):this.markup("span","?",{className:"tooltip-element",tooltip:this.data.description}):null}isTemplate(e){return"function"==typeof this.templates[e]}processTemplate(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,V),o=e=>{const t=e.target.nextSibling.nextSibling,r=e.target.nextSibling,n=this.getActiveOption(t);let o=new Map([[38,()=>{const e=this.getPreviousOption(n);e&&this.selectOption(t,e)}],[40,()=>{const e=this.getNextOption(n);e&&this.selectOption(t,e)}],[13,()=>{n?(e.target.value=n.innerHTML,r.value=n.getAttribute("value"),"none"===t.style.display?this.showList(t,n):this.hideList(t)):this.config.requireValidOption&&(this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")),e.preventDefault()}],[27,()=>{this.hideList(t)}]]).get(e.keyCode);return o||(o=()=>!1),o()},i={focus:e=>{const t=e.target.nextSibling.nextSibling,r=z(t.querySelectorAll("li"),e.target.value);if(e.target.addEventListener("keydown",o),e.target.value.length>0){const e=r.length>0?r[r.length-1]:null;this.showList(t,e)}},blur:e=>{e.target.removeEventListener("keydown",o);const t=setTimeout((()=>{e.target.nextSibling.nextSibling.style.display="none",clearTimeout(t)}),200);if(this.config.requireValidOption){const t=e.target.nextSibling.nextSibling;this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")}},input:e=>{const t=e.target.nextSibling.nextSibling;e.target.nextSibling.value=e.target.value;const r=z(t.querySelectorAll("li"),e.target.value);if(0==r.length)this.hideList(t);else{let e=this.getActiveOption(t);e||(e=r[r.length-1]),this.showList(t,e)}}},s=Object.assign({},n,{id:`${n.id}-input`,autocomplete:"off",events:i}),a=Object.assign({},n,{type:"hidden"});delete s.name;const l=[this.markup("input",null,s),this.markup("input",null,a)],d=t.map((e=>{const t=e.label,r={events:{click:t=>{const r=t.target.parentElement,n=r.previousSibling.previousSibling;n.value=e.label,n.nextSibling.value=e.value,this.hideList(r)}},value:e.value};return this.markup("li",t,r)}));return l.push(this.markup("ul",d,{id:`${n.id}-list`,className:`formbuilder-${r}-list`})),l}hideList(e){this.selectOption(e,null),e.style.display="none"}showList(e,t){this.selectOption(e,t),e.style.display="block",e.style.width=e.parentElement.offsetWidth+"px"}getActiveOption(e){const t=e.getElementsByClassName("active-option")[0];return t&&"none"!==t.style.display?t:null}getPreviousOption(e){let t=e;do{t=t?t.previousSibling:null}while(null!=t&&"none"===t.style.display);return t}getNextOption(e){let t=e;do{t=t?t.nextSibling:null}while(null!=t&&"none"===t.style.display);return t}selectOption(e,t){const r=e.querySelectorAll("li");for(let e=0;e=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,W);let n=t;const o={paragraph:"p",header:this.subtype};return o[t]&&(n=o[t]),{field:this.markup(n,F.parsedHtml(this.label),r),layout:"noLabel"}}}U.register(["paragraph","header"],J),U.register(["p","address","blockquote","canvas","output"],J,"paragraph"),U.register(["h1","h2","h3","h4","h5","h6"],J,"header");const G=["values","value","placeholder","type","inline","other","toggle"],Z=["label"];function K(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}U.register(["select","checkbox-group","radio-group","checkbox"],class extends U{static get definition(){return{inactive:["checkbox"],mi18n:{minSelectionRequired:"minSelectionRequired"}}}build(){const e=[],t=this.config,{values:r,value:n,placeholder:o,type:i,inline:s,other:a,toggle:l}=t,d=K(t,G),c=i.replace("-group",""),u="select"===i;if((d.multiple||"checkbox-group"===i)&&(d.name=d.name+"[]"),"checkbox-group"===i&&d.required){const e=this,t=this.onRender.bind(this);this.onRender=function(){t(),e.groupRequired()}}if(delete d.title,r){o&&u&&e.push(this.markup("option",o,{disabled:!0,selected:!0,value:""}));for(let t=0;t{const t=e.target;t.parentElement.previousElementSibling.value=t.value}},id:`${t.id}-value`,className:"other-val"},i=this.markup("input",null,n),a=[document.createTextNode(U.mi18n("other")),this.markup("input",null,o)],l=this.markup("label",a,{for:n.id}),u=this.markup("div",[i,l],{className:r});e.push(u)}}return this.dom="select"==i?this.markup(c,e,m(d,!0)):this.markup("div",e,{className:i}),this.dom}groupRequired(){const e=this.element.getElementsByTagName("input"),t=()=>{const t=[].some.call(e,(e=>e.checked));((e,t)=>{[].forEach.call(e,(e=>{t?e.removeAttribute("required"):e.setAttribute("required","required"),((e,t)=>{const r=U.mi18n("minSelectionRequired",1);t?e.setCustomValidity(""):e.setCustomValidity(r)})(e,t)}))})(e,t)};for(let r=e.length-1;r>=0;r--)e[r].addEventListener("change",t);t()}onRender(){if(this.config.userData){const t=this.config.userData.slice();"select"===this.config.type?e(this.dom).val(t).prop("selected",!0):this.config.type.endsWith("-group")&&("checkbox-group"===this.config.type&&this.dom.querySelectorAll("input[type=checkbox]").forEach((e=>{e.removeAttribute("checked")})),this.dom.querySelectorAll("input").forEach((e=>{if(!e.classList.contains("other-val")){for(let r=0;r0){const r=this.dom.querySelector(`#${e.id}-value`);e.setAttribute("checked","checked"),r.value=e.value=t[0],r.style.display="inline-block"}}})))}}});class Y extends U{static get definition(){return{mi18n:{date:"dateField",file:"fileUpload"}}}build(){let{name:e}=this.config;e=this.config.multiple?`${e}[]`:e;const t=Object.assign({},this.config,{name:e});return this.dom=this.markup("input",null,t),this.dom}onRender(){this.config.userData&&e(this.dom).val(this.config.userData[0])}}U.register(["text","file","date","number"],Y),U.register(["text","password","email","color","tel"],Y,"text"),U.register(["date","time","datetime-local"],Y,"date"),U.register(["number","range"],Y,"number");const ee=["value"];class te extends U{static get definition(){return{mi18n:{textarea:"textArea"}}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ee);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),this.field}onRender(){this.config.userData&&e(this.field).val(this.config.userData[0])}on(t){return"prerender"==t&&this.preview?t=>{this.field&&(t=this.field),e(t).on("mousedown",(e=>{e.stopPropagation()}))}:super.on(t)}}U.register("textarea",te),U.register("textarea",te,"textarea");const re=["value"];te.register("tinymce",class extends te{configure(){if(this.js=[],window.tinymce||this.js.push("https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js"),this.classConfig.js){let e=this.classConfig.js;Array.isArray(e)||(e=new Array(e)),this.js=this.js.concat(e),delete this.classConfig.js}this.classConfig.css&&(this.css=this.classConfig.css),this.editorOptions={height:250,paste_data_images:!0,plugins:["advlist","autolink","lists","link","image","charmap","print","preview","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","contextmenu","paste","code"],toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | table"}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,re);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),r.disabled&&(this.editorOptions.readonly=!0),this.field}onRender(){const e=window.tinymce.get(this.id);e&&window.tinymce.remove(e);const t=jQuery.extend(this.editorOptions,this.classConfig);t.target=this.field;const r=[];Number(window.tinymce.majorVersion)>=5&&r.push("contextmenu"),Number(window.tinymce.majorVersion)>=6&&r.push("paste","print"),t.plugins=t.plugins.filter((e=>-1===r.indexOf(e)));const n=this.config.userData?this.parsedHtml(this.config.userData[0]):void 0,o=window.lastFormBuilderCopiedTinyMCE?this.parsedHtml(window.lastFormBuilderCopiedTinyMCE):void 0;window.lastFormBuilderCopiedTinyMCE=null;const i=function(e){o?e[0].setContent(o):n&&e[0].setContent(n)};setTimeout((()=>{window.tinymce.init(t).then(i)}),0)}},"textarea");const ne=["value"];function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ne);return delete r.type,this.field=this.markup("div",null,r),this.field.classList.contains("form-control")&&this.field.classList.remove("form-control"),this.field}onRender(e){const t=this.config.value||"",r=window.Quill.import("delta");window.fbEditors.quill[this.id]={};const n=window.fbEditors.quill[this.id];return n.instance=new window.Quill(this.field,this.editorConfig),n.data=new r,t&&n.instance.setContents(window.JSON.parse(this.parsedHtml(t))),n.instance.on("text-change",(function(e){n.data=n.data.compose(e)})),e}},"textarea"),r().addLanguage("en-US",{NATIVE_NAME:"English (US)",ENGLISH_NAME:"English",addOption:"Add Option +",allFieldsRemoved:"All fields were removed.",allowMultipleFiles:"Allow users to upload multiple files",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",checkboxGroup:"Checkbox Group",checkbox:"Checkbox",checkboxes:"Checkboxes",className:"Class",clearAllMessage:"Are you sure you want to clear all fields?",clear:"Clear",close:"Close",content:"Content",copy:"Copy To Clipboard",copyButton:"+",copyButtonTooltip:"Copy",dateField:"Date Field",description:"Help Text",descriptionField:"Description",devMode:"Developer Mode",editNames:"Edit Names",editorTitle:"Form Elements",editXML:"Edit XML",enableOther:"Enable "Other"",enableOtherMsg:"Let users enter an unlisted option",fieldDeleteWarning:"false",fieldVars:"Field Variables",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to this area",header:"Header",hide:"Edit",hidden:"Hidden Input",inline:"Inline",inlineDesc:"Display {type} inline",label:"Label",labelEmpty:"Field Label cannot be empty",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length",minOptionMessage:"This field requires a minimum of 2 options",minSelectionRequired:"Minimum {min} selections required",multipleFiles:"Multiple Files",name:"Name",no:"No",noFieldsToClear:"There are no fields to clear",number:"Number",off:"Off",on:"On",option:"Option",optionCount:"Option {count}",options:"Options",optional:"optional",optionLabelPlaceholder:"Label",optionValuePlaceholder:"Value",optionEmpty:"Option value required",other:"Other",paragraph:"Paragraph",placeholder:"Placeholder","placeholders.value":"Value","placeholders.label":"Label","placeholders.email":"Enter your email","placeholders.className":"space separated classes","placeholders.password":"Enter your password",preview:"Preview",radioGroup:"Radio Group",radio:"Radio",removeMessage:"Remove Element",removeOption:"Remove Option",remove:"×",required:"Required",requireValidOption:"Only accept a pre-defined Option",richText:"Rich Text Editor",roles:"Access",rows:"Rows",save:"Save",selectOptions:"Options",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",size:"Size","size.xs":"Extra Small","size.sm":"Small","size.m":"Default","size.lg":"Large",style:"Style","styles.btn.default":"Default","styles.btn.danger":"Danger","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",text:"Text Field",textArea:"Text Area",toggle:"Toggle",warning:"Warning!",value:"Value",viewJSON:"[{…}]",viewXML:"</>",yes:"Yes"});const se={location:"assets/lang/"};n(299);class ae{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),this.customRegister={},this.templateControlRegister={},this.def={icon:{},i18n:{}},this.register(e,t)}register(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);const n=r().locale;this.def.i18n[n]||(this.def.i18n[n]={});const o=this;Object.keys(e).forEach((t=>{const r=function(r,n){this.customControl=new X(r,n,e[t]),this.build=function(){return this.customControl.build()},this.on=function(e){return this.customControl.on(e)}};r.definition={},r.label=e=>o.label(e),r.icon=e=>o.icon(e),this.templateControlRegister[t]=r}));for(const r of t){let t=r.type;if(r.attrs=r.attrs||{},!t){if(!r.attrs.type){U.error("Ignoring invalid custom field definition. Please specify a type property.");continue}t=r.attrs.type}let o=r.subtype||t;if(e[t]){const e=this.templateControlRegister[t];e.definition=r,this.customRegister[o]=jQuery.extend(r,{type:t,class:e})}else{const e=U.getClass(t,r.subtype);if(!e){super.error("Error while registering custom field: "+t+(r.subtype?":"+r.subtype:"")+". Unable to find any existing defined control or template for rendering.");continue}o=r.datatype?r.datatype:`${t}-${Math.floor(9e3*Math.random()+1e3)}`,this.customRegister[o]=jQuery.extend(r,{type:t,class:e})}this.def.i18n[n][o]=r.label,this.def.icon[o]=r.icon}}label(e){const t=this.definition;let n=t.i18n||{};n=n[r().locale]||n.default||n;const o=U.camelCase(e),i="object"==typeof n?n[o]||n[e]:n;if(i)return i;{let n=t.mi18n;return"object"==typeof n&&(n=n[o]||n[e]),n||(n=o),r().get(n)}}get definition(){return{}}icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}getRegistered(e){var t;return void 0===e&&(e=!1),e?null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0:Object.keys(this.customRegister)}getClass(e){var t;return null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0}lookup(e){return this.customRegister[e]}}class le{constructor(e){void 0===e&&(e={});const t={layout:_,layoutTemplates:{},controls:{},controlConfig:{},container:!1,dataType:"json",disableHTMLLabels:!1,formData:[],i18n:Object.assign({},se),messages:{formRendered:"Form Rendered",noFormData:"No form data.",other:"Other",selectColor:"Select Color",invalidControl:"Invalid control"},onRender:()=>{},render:!0,sanitizerOptions:{clobberingProtection:{document:!0,form:!1,namespaceAttributes:!0},backendOrder:["dompurify","sanitizer","fallback"]},templates:{},notify:{error:e=>{console.log(e)},success:e=>{console.log(e)},warning:e=>{console.warn(e)}}};this.options=jQuery.extend(!0,t,e),this.instanceContainers=[],(e=>{if("object"!=typeof e)throw"Invalid value given to setSanitizerConfig, expected config object";if(e.hasOwnProperty("clobberingProtection")&&["document","form","namespaceAttributes"].forEach((t=>{e.clobberingProtection.hasOwnProperty(t)&&"boolean"==typeof e.clobberingProtection[t]&&(o.clobberingProtection[t]=e.clobberingProtection[t])})),e.hasOwnProperty("backends")){if("object"!=typeof e.backends)throw"backends config expected to be an Object";Object.keys(e.backends).forEach((t=>o.backends[t]=e.backends[t]))}if(e.hasOwnProperty("backendOrder")){if(o.backendOrder=[],!Array.isArray(e.backendOrder))throw"backendOrder config expected to be an Array of backend keys as strings";e.backendOrder.forEach((e=>{if(!o.backends.hasOwnProperty(e))throw"unknown sanitizer backend "+e;o.backendOrder.push(e)}))}})(this.options.sanitizerOptions),r().current||r().init(this.options.i18n),this.options.formData?this.options.formData=this.parseFormData(this.options.formData):this.options.formData=[],U.controlConfig=e.controlConfig||{},U.loadCustom(e.controls),this.templatedControls=new ae(this.options.templates),"function"!=typeof Element.prototype.appendFormFields&&(Element.prototype.appendFormFields=function(e){Array.isArray(e)||(e=[e]);const t=F.markup("div",e,{className:"rendered-form formbuilder-embedded-bootstrap"});this.appendChild(t),e.forEach((e=>{const[r]=e.className.match(/row-([^\s]+)/)||[];if(r){const n=this.id?`${this.id}-row-${r}`:`row-${r}`;let o=document.getElementById(n);o||(o=F.markup("div",null,{id:n,className:"row"}),t.appendChild(o)),o.appendChild(e)}else t.appendChild(e);e.dispatchEvent(H.fieldRendered)}))}),"function"!=typeof Element.prototype.emptyContainer&&(Element.prototype.emptyContainer=function(){const e=this;for(;e.lastChild;)e.removeChild(e.lastChild)})}sanitizeField(e,t){let r=Object.assign({},e);return t&&(r.id=e.id&&`${e.id}-${t}`,r.name=e.name&&`${e.name}-${t}`),r.className=Array.isArray(e.className)?F.unique(e.className.join(" ").split(" ")).join(" "):e.className||e.class||null,delete r.class,e.values&&(r.values=e.values.map((e=>F.trimObj(e)))),r=F.trimObj(r),Array.isArray(e.userData)&&0===e.userData.length&&(r.userData=[]),r}getElement(e){return(e=this.options.container||e)instanceof jQuery?e=e[0]:"string"==typeof e&&(e=document.querySelector(e)),e}render(e,t){void 0===e&&(e=null),void 0===t&&(t=0);const r=this,n=this.options;e=this.getElement(e);const o=[],i=new n.layout(n.layoutTemplates,!1,n.disableHTMLLabels,n.controlConfig);if(n.formData.length)for(let e=0;ee.map((e=>e.innerHTML)).join("");r.markup=e(o)}if(!0===n.disableInjectedStyle){const e=document.getElementsByClassName("formBuilder-injected-style");T(e,(t=>(e=>{e.parentNode&&e.parentNode.removeChild(e)})(e[t])))}else"bootstrap"===n.disableInjectedStyle&&n.render&&e&&e.getElementsByClassName("formbuilder-embedded-bootstrap").item(0)?.classList.remove("formbuilder-embedded-bootstrap");return r}renderControl(e){void 0===e&&(e=null);const t=this.options,r=t.formData;if(!r||Array.isArray(r))throw new Error("To render a single element, please specify a single object of formData for the field in question");const n=this.sanitizeField(r),o=new t.layout,i=this.templatedControls.getClass(r.type)||U.getClass(r.type,r.subtype),s=t.forceTemplate||"hidden",a=o.build(i,n,s);return e.appendFormFields(a),t.notify.success(t.messages.formRendered),this}get userData(){const t=this.options.formData.slice();return t.filter((e=>"tinymce"===e.subtype)).forEach((e=>window.tinymce.get(e.name).save())),this.instanceContainers.forEach((r=>{const n=e("select, input, textarea",r).serializeArray().reduce(((e,t)=>{let{name:r,value:n}=t;return r=r.replace("[]",""),e[r]?e[r].push(n):e[r]=[n],e}),{}),o=t.length;for(let e=0;e{this.options.formData.slice().filter((e=>"tinymce"===e.subtype)).forEach((e=>window.tinymce.get(e.name).setContent(""))),e.querySelectorAll("input, select, textarea").forEach((e=>{["checkbox","radio"].includes(e.type)?e.checked=!1:e.value=""}))}))}parseFormData(e){const t={xml:e=>E(e),json:e=>window.JSON.parse(e)};return"object"!=typeof e&&(e=t[this.options.dataType](e)||!1),e}}!function(e){let t;const r={init:function(e,n){return void 0===n&&(n={}),t=e,r.instance=new le(n),e.each((t=>r.instance.render(e[t],t))),r.instance},userData:()=>r.instance&&r.instance.userData,clear:()=>r.instance&&r.instance.clear(),setData:e=>{if(r.instance){const t=r.instance;t.options.formData=t.parseFormData(e)}},render:function(e,n){if(void 0===n&&(n={}),r.instance){const o=r.instance;e||(e=o.options.formData),o.options=Object.assign({},o.options,n,{formData:o.parseFormData(e)}),t.each((e=>r.instance.render(t[e],e)))}},html:()=>t.map((e=>t[e])).html()};e.fn.formRender=function(e){if(void 0===e&&(e={}),r[e]){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;or.renderControl(n[e]))),n}}(jQuery)}()}()}(jQuery); \ No newline at end of file +!function(e){"use strict";!function(){var t={946:function(e,t,r){r.r(t);var n=r(933),o=r.n(n),i=r(476),s=r.n(i)()(o());s.push([e.id,'.rendered-form *{box-sizing:border-box}.rendered-form.formbuilder-embedded-bootstrap button,.rendered-form.formbuilder-embedded-bootstrap input,.rendered-form.formbuilder-embedded-bootstrap select,.rendered-form.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.rendered-form.formbuilder-embedded-bootstrap input{line-height:normal}.rendered-form.formbuilder-embedded-bootstrap textarea{overflow:auto}.rendered-form.formbuilder-embedded-bootstrap button,.rendered-form.formbuilder-embedded-bootstrap input,.rendered-form.formbuilder-embedded-bootstrap select,.rendered-form.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.rendered-form.formbuilder-embedded-bootstrap .btn-group{position:relative;display:inline-block;vertical-align:middle}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn{position:relative;float:left}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn+.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn+.btn-group,.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn-group{margin-left:-1px}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:last-child:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .btn-group>.dropdown-toggle:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group .form-control:last-child,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-addon:last-child,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn-group>.btn,.rendered-form.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn.active,.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:active,.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:focus,.rendered-form.formbuilder-embedded-bootstrap .btn-group>.btn:hover{z-index:2}.rendered-form.formbuilder-embedded-bootstrap .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-image:none;border-radius:4px}.rendered-form.formbuilder-embedded-bootstrap .btn.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.rendered-form.formbuilder-embedded-bootstrap .btn.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.rendered-form.formbuilder-embedded-bootstrap .btn.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.rendered-form.formbuilder-embedded-bootstrap .btn.active,.rendered-form.formbuilder-embedded-bootstrap .btn.btn-active,.rendered-form.formbuilder-embedded-bootstrap .btn:active{background-image:none}.rendered-form.formbuilder-embedded-bootstrap .input-group .form-control:last-child,.rendered-form.formbuilder-embedded-bootstrap .input-group-addon:last-child,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn:not(:first-child),.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn-group>.btn,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.rendered-form.formbuilder-embedded-bootstrap .input-group .form-control,.rendered-form.formbuilder-embedded-bootstrap .input-group-addon,.rendered-form.formbuilder-embedded-bootstrap .input-group-btn{display:table-cell}.rendered-form.formbuilder-embedded-bootstrap .input-group-lg>.form-control,.rendered-form.formbuilder-embedded-bootstrap .input-group-lg>.input-group-addon,.rendered-form.formbuilder-embedded-bootstrap .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333}.rendered-form.formbuilder-embedded-bootstrap .input-group{position:relative;display:table;border-collapse:separate}.rendered-form.formbuilder-embedded-bootstrap .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.rendered-form.formbuilder-embedded-bootstrap .form-control,.rendered-form.formbuilder-embedded-bootstrap output{font-size:14px;line-height:1.42857143;display:block}.rendered-form.formbuilder-embedded-bootstrap textarea.form-control{height:auto}.rendered-form.formbuilder-embedded-bootstrap .form-control{height:34px;display:block;width:100%;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px}.rendered-form.formbuilder-embedded-bootstrap .form-control:focus{outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.rendered-form.formbuilder-embedded-bootstrap .form-group{margin-left:0px;margin-bottom:15px}.rendered-form.formbuilder-embedded-bootstrap .btn,.rendered-form.formbuilder-embedded-bootstrap .form-control{background-image:none}.rendered-form.formbuilder-embedded-bootstrap .pull-right{float:right}.rendered-form.formbuilder-embedded-bootstrap .pull-left{float:left}.rendered-form .formbuilder-required,.rendered-form .required-asterisk{color:#c10000}.rendered-form .formbuilder-checkbox-group input[type=checkbox],.rendered-form .formbuilder-checkbox-group input[type=radio],.rendered-form .formbuilder-radio-group input[type=checkbox],.rendered-form .formbuilder-radio-group input[type=radio]{margin:0 4px 0 0}.rendered-form .formbuilder-checkbox-inline,.rendered-form .formbuilder-radio-inline{margin-right:8px;display:inline-block;vertical-align:middle;padding-left:0}.rendered-form .formbuilder-checkbox-inline label input[type=text],.rendered-form .formbuilder-radio-inline label input[type=text]{margin-top:0}.rendered-form .formbuilder-checkbox-inline:first-child,.rendered-form .formbuilder-radio-inline:first-child{padding-left:0}.rendered-form .formbuilder-autocomplete-list{background-color:#fff;display:none;list-style:none;padding:0;border:1px solid #ccc;border-width:0 1px 1px;position:absolute;z-index:20;max-height:200px;overflow-y:auto}.rendered-form .formbuilder-autocomplete-list li{display:none;cursor:default;padding:5px;margin:0;transition:background-color 200ms ease-in-out}.rendered-form .formbuilder-autocomplete-list li:hover,.rendered-form .formbuilder-autocomplete-list li.active-option{background-color:rgba(0,0,0,.075)}.rendered-form *[tooltip]{position:relative}.rendered-form *[tooltip]:hover::after{background:rgba(0,0,0,.9);border-radius:5px 5px 5px 0;bottom:23px;color:#fff;content:attr(tooltip);padding:10px 5px;position:absolute;z-index:98;left:2px;width:230px;text-shadow:none;font-size:12px;line-height:1.5em;cursor:default}.rendered-form *[tooltip]:hover::before{border:solid;border-color:#222 rgba(0,0,0,0);border-width:6px 6px 0;bottom:17px;content:"";left:2px;position:absolute;z-index:99;cursor:default}.rendered-form .tooltip-element{visibility:visible;color:#fff;background:#000;width:16px;height:16px;border-radius:8px;display:inline-block;text-align:center;line-height:16px;margin:0 5px;font-size:12px;cursor:default}.rendered-form .kc-toggle{padding-left:0 !important}.rendered-form .kc-toggle span{position:relative;width:48px;height:24px;background:#e6e6e6;display:inline-block;border-radius:4px;border:1px solid #ccc;padding:2px;overflow:hidden;float:left;margin-right:5px;will-change:transform}.rendered-form .kc-toggle span::after,.rendered-form .kc-toggle span::before{position:absolute;display:inline-block;top:0}.rendered-form .kc-toggle span::after{position:relative;content:"";width:50%;height:100%;left:0;border-radius:3px;background:linear-gradient(to bottom, white 0%, #ccc 100%);border:1px solid #999;transition:transform 100ms;transform:translateX(0)}.rendered-form .kc-toggle span::before{border-radius:4px;top:2px;left:2px;content:"";width:calc(100% - 4px);height:18px;box-shadow:0 0 1px 1px #b3b3b3 inset;background-color:rgba(0,0,0,0)}.rendered-form .kc-toggle input{height:0;overflow:hidden;width:0;opacity:0;pointer-events:none;margin:0}.rendered-form .kc-toggle input:checked+span::after{transform:translateX(100%)}.rendered-form .kc-toggle input:checked+span::before{background-color:#6fc665}.rendered-form label{font-weight:normal}.rendered-form .form-group .formbuilder-required{color:#c10000}.rendered-form .other-option:checked+label input{display:inline-block}.rendered-form .other-val{margin-left:5px;display:none}.rendered-form .form-control.number{width:auto}.rendered-form .form-control[type=color]{width:60px;padding:2px;display:inline-block}.rendered-form .form-control[multiple]{height:auto}',""]),t.default=s},476:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},933:function(e){e.exports=function(e){return e[1]}},747:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,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 o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));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="",r(r.s=7)}([function(e,t,r){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=r(2),i=r(10),s=Object.prototype.toString;function a(e){return"[object Array]"===s.call(e)}function l(e){return null!==e&&"object"===(void 0===e?"undefined":n(e))}function d(e){return"[object Function]"===s.call(e)}function c(e,t){if(null!=e)if("object"!==(void 0===e?"undefined":n(e))&&(e=[e]),a(e))for(var r=0,o=e.length;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){a.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){a.headers[e]=n.merge(i)})),e.exports=a}).call(this,r(12))},function(e,t,r){e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n0&&void 0!==arguments[0]?arguments[0]:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}return e.prototype.processConfig=function(e){var t=this,r=Object.assign({},s,e),n=r.location,o=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(r,["location"]),i=n.replace(/\/?$/,"/");this.config=Object.assign({},{location:i},o);var a=this.config,l=a.override,d=a.preloaded,c=void 0===d?{}:d,u=Object.entries(this.langs).concat(Object.entries(l||c));this.langs=u.reduce((function(e,r){var n=r[0],o=r[1];return e[n]=t.applyLanguage.call(t,n,o),e}),{}),this.locale=this.config.locale||this.config.langs[0]},e.prototype.init=function(e){return this.processConfig.call(this,Object.assign({},this.config,e)),this.setCurrent(this.locale)},e.prototype.addLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t="string"==typeof t?this.processFile.call(this,t):t,this.applyLanguage.call(this,e,t),this.config.langs.push("locale")},e.prototype.getValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.locale;return this.langs[t]&&this.langs[t][e]||this.getFallbackValue(e)},e.prototype.getFallbackValue=function(e){var t=Object.values(this.langs).find((function(t){return t[e]}));return t&&t[e]},e.prototype.makeSafe=function(e){var t={"{":"\\{","}":"\\}","|":"\\|"};return e=e.replace(/\{|\}|\|/g,(function(e){return t[e]})),new RegExp(e,"g")},e.prototype.put=function(e,t){return this.current[e]=t},e.prototype.get=function(e,t){var r=this.getValue(e);if(r){var o=r.match(/\{[^}]+?\}/g),i=void 0;if(t&&o)if("object"===(void 0===t?"undefined":n(t)))for(var s=0;s1&&void 0!==arguments[1])||arguments[1],r=this;return new Promise((function(n,o){if(-1!==r.loaded.indexOf(e)&&t)return r.applyLanguage.call(r,r.langs[e]),n(r.langs[e]);var s=[r.config.location,e,r.config.extension].join("");return(0,i.get)(s).then((function(t){var o=t.data,i=r.processFile(o);return r.applyLanguage.call(r,e,i),r.loaded.push(e),n(r.langs[e])})).catch((function(){var t=r.applyLanguage.call(r,e);n(t)}))}))},e.prototype.applyLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.config.override[e]||{},n=this.langs[e]||{};return this.langs[e]=Object.assign({},n,t,r),this.langs[e]},e.prototype.setCurrent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return this.loadLang(t).then((function(){return e.locale=t,e.current=e.langs[t],e.current}))},o(e,[{key:"getLangs",get:function(){return this.config.langs}}]),e}();t.default=new a},function(e,t,r){e.exports=r(9)},function(e,t,r){var n=r(0),o=r(2),i=r(11),s=r(1);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var l=a(s);l.Axios=i,l.create=function(e){return a(n.merge(s,e))},l.Cancel=r(6),l.CancelToken=r(26),l.isCancel=r(5),l.all=function(e){return Promise.all(e)},l.spread=r(27),e.exports=l,e.exports.default=l},function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){var n=r(1),o=r(0),i=r(21),s=r(22);function a(e){this.defaults=e,this.interceptors={request:new i,response:new i}}a.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},o.forEach(["delete","get","head","options"],(function(e){a.prototype[e]=function(t,r){return this.request(o.merge(r||{},{method:e,url:t}))}})),o.forEach(["post","put","patch"],(function(e){a.prototype[e]=function(t,r,n){return this.request(o.merge(n||{},{method:e,url:t,data:r}))}})),e.exports=a},function(e,t,r){var n,o,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var d,c=[],u=!1,f=-1;function p(){u&&d&&(u=!1,d.length?c=d.concat(c):f=-1,c.length&&m())}function m(){if(!u){var e=l(p);u=!0;for(var t=c.length;t;){for(d=c,c=[];++f1)for(var r=1;r=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},function(e,t,r){var n=r(0);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){function n(){this.message="String contains an invalid character"}n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,o=String(e),i="",s=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.charAt(0|s)||(a="=",s%1);i+=a.charAt(63&t>>8-s%1*8)){if((r=o.charCodeAt(s+=.75))>255)throw new n;t=t<<8|r}return i}},function(e,t,r){var n=r(0);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,r){var n=r(0),o=r(23),i=r(5),s=r(1),a=r(24),l=r(25);function d(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return d(e),e.baseURL&&!a(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return d(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(d(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){var n=r(0);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){var n=r(6);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,r){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},299:function(e,t,r){var n=r(892),o=r(946);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{attributes:{class:"formBuilder-injected-style"},insert:"head",singleton:!1}),e.exports=o.locals||{}},892:function(e,t,r){var n,o=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function s(e){for(var t=-1,r=0;re}};var i;const s=(e,t)=>{if(0===o.backendOrder.length)return!1;const r=e.toLowerCase();return t=t?t+"":"",r.startsWith("on")||["form","formaction"].includes(r)||t.trim().toLowerCase().startsWith("javascript:")};o.backends.fallback=function(t){const r=document.implementation.createHTMLDocument(""),n=r.createElement("base");n.href=document.location.href,r.head.appendChild(n);const o=["applet","comment","embed","iframe","link","listing","meta","noscript","object","plaintext","script","style","xmp"],i=e.parseHTML(t,r,!1);e(i).find("*").addBack().each(((t,r)=>{"#text"!==r.nodeName&&(r.tagName&&o.includes(r.tagName.toLowerCase())?r.parentElement?r.parentElement.removeChild(r):i.includes(r)&&i.splice(i.indexOf(r),1):r.attributes&&Array.from(r.attributes).forEach((t=>{s(t.name,t.value)&&e(r).removeAttr(t.name)})))}));const a=r.createElement("div");return e(a).html(i),a.innerHTML};const a=e=>{const t=!!o.clobberingProtection.document&&document,r=!!o.clobberingProtection.form&&document.createElement("form");return t&&e in t||r&&e in r?o.clobberingProtection.namespaceAttributes?"user-content-"+e:void 0:e},l={fallback:(e,t)=>{const r=o.backends.fallback,n="function"==typeof r;return n&&(t=r(t)),e.innerHTML=t,n},dompurify:(e,t)=>{const r=o.backends.dompurify;return!(!1===r||!r.isSupported||(e.innerHTML=r.sanitize(t),0))},sanitizer:(e,t)=>{const r=o.backends.sanitizer;return!!r&&(e.setHTML(t,{sanitizer:r}),!0)}},d=["events"],c=["tag","content"];function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};const m=function(e,t){if(void 0===t&&(t=!1),null==e||"object"!=typeof e)return e;const r="function"==typeof window.structuredClone?window.structuredClone(e):Object.assign({},e),n=[null,void 0,""];t&&n.push(!1);for(const e in r)n.includes(r[e])?delete r[e]:Array.isArray(r[e])&&(r[e].length||delete r[e]);return r},h=function(e){return!["values","enableOther","other","label","subtype"].includes(e)},b=(e,t)=>{let r;return e=g(e),t&&(Array.isArray(t)?r=A(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),r=A(t.trim()))),{name:e,value:t=t?`="${r}"`:""}},g=e=>({className:"class"}[e]||y(e)),y=e=>(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))).replace(/\s/g,"-").replace(/^-+/g,""),v=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),w=function(){let e,t=0;return function(r){const n=Date.now();return n===e?++t:(t=0,e=n),(r.type||y(r.label))+"-"+n+"-"+t}}(),x=e=>void 0===e?e:[["array",e=>Array.isArray(e)],["node",e=>e instanceof window.Node||e instanceof window.HTMLElement],["component",()=>e&&e.dom],[typeof e,()=>!0]].find((t=>t[1](e)))[0],O=function(t,r,n){void 0===r&&(r=""),void 0===n&&(n={});let i=x(r);const{events:u}=n,f=p(n,d),m=document.createElement(t),h={string:t=>{!function(t,r,n){if(void 0===n&&(n=!1),!n){const n=document.createElement(t.tagName);return void 0!==o.backendOrder.find((e=>l[e](n,r)))?((t=>{e(t).find("*").each(((e,t)=>{["embed","form","iframe","image","img","object"].includes(t.tagName.toLowerCase())&&t.removeAttribute("name"),["id","name"].forEach((e=>{if(t.hasAttribute(e)){const r=a(t.getAttribute(e));void 0===r?t.removeAttribute(e):t.setAttribute(e,r)}}))}))})(n),t.innerHTML=n.innerHTML,t):(t.innerHTML=r,t)}t.textContent=r}(m,m.innerHTML+t)},object:e=>{const{tag:t,content:r}=e,n=p(e,c);return m.appendChild(O(t,r,n))},node:e=>m.appendChild(e),array:e=>{for(let t=0;t{e=e(),i=x(e),h[i](e)},undefined:()=>{}};for(const e in f)if(f.hasOwnProperty(e)){const t=g(e);let r=Array.isArray(f[e])?L(f[e].join(" ").split(" ")).join(" "):f[e];if(s(t,r))continue;if("boolean"==typeof r){if(!0===r){const e="contenteditable"===t||t;m.setAttribute(t,e)}}else"id"!==t&&"name"!==t||(r=a(r)),void 0!==r&&m.setAttribute(t,r)}return r&&h[i](r),((e,t)=>{if(t)for(const r in t)t.hasOwnProperty(r)&&e.addEventListener(r,(e=>t[r](e)))})(m,u),m},j=e=>{const t=e.attributes,r={};return T(t,(e=>{let n=t[e].value||"";n.match(/false|true/g)?n="true"===n:n.match(/undefined/g)&&(n=void 0),n&&(r[v(t[e].name)]=n)})),r},k=e=>{const t=[];for(let r=0;r{const t=[];if(e.length){const r=e[0].getElementsByTagName("value");for(let e=0;e{const t=(new window.DOMParser).parseFromString(e,"text/xml"),r=[];if(t){const e=t.getElementsByTagName("field");for(let t=0;t{const t=document.createElement("textarea");return t.innerHTML=e,t.textContent},A=e=>{const t={'"':""","&":"&","<":"<",">":">"};return"string"==typeof e?e.replace(/["&<>]/g,(e=>t[e]||e)):e},T=function(e,t,r){for(let n=0;ne.filter(((e,t,r)=>r.indexOf(e)===t)),R=function(e,t){void 0===t&&(t="");const r=jQuery;let n=[];return Array.isArray(e)||(e=[e]),P(e)||(n=jQuery.map(e,(e=>{const r={dataType:"script",cache:!0,url:(t||"")+e};return jQuery.ajax(r).done((()=>window.fbLoaded.js.push(e)))}))),n.push(jQuery.Deferred((e=>r(e.resolve)))),jQuery.when(...n)},P=function(e,t){void 0===t&&(t="js");const r=window.fbLoaded[t];return Array.isArray(e)?e.every((e=>r.includes(e))):r.includes(e)},D=function(t,r){void 0===r&&(r=""),Array.isArray(t)||(t=[t]),t.forEach((t=>{let n="href",o=t,i="";if("object"==typeof t&&(n=t.type||(t.style?"inline":"href"),i=t.id,o=i||t.href||t.style,t="inline"===n?t.style:t.href),!P(o,"css")){if("href"===n){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=(r||"")+t,document.head.appendChild(e)}else e(``).attr("id",i).appendTo(e(document.head));window.fbLoaded.css.push(o)}}))},N=(e,t)=>{const r=Object.assign({},e,t);for(const n in t)r.hasOwnProperty(n)&&(Array.isArray(t[n])?r[n]=Array.isArray(e[n])?L(e[n].concat(t[n])):t[n]:"object"==typeof t[n]?r[n]=N(e[n],t[n]):r[n]=t[n]);return r},q=/^col-(xs|sm|md|lg)-([^\s]+)/,M={addEventListeners:(e,t,r)=>t.split(" ").forEach((t=>e.addEventListener(t,r,!1))),attrString:e=>Object.entries(e).map((e=>{let[t,r]=e;return h(t)&&Object.values(b(t,r)).join("")})).filter(Boolean).join(" "),camelCase:v,capitalize:e=>e.replace(/\b\w/g,(function(e){return e.toUpperCase()})),closest:(e,t)=>{const r=t.replace(".","");for(;(e=e.parentElement)&&!e.classList.contains(r););return e},getContentType:x,escapeAttr:A,escapeAttrs:e=>{for(const t in e)e.hasOwnProperty(t)&&(e[t]=A(e[t]));return e},escapeHtml:e=>{const t=document.createElement("textarea");return t.textContent=e,t.innerHTML},forceNumber:e=>e.replace(/[^0-9]/g,""),forEach:T,getScripts:R,getStyles:D,hyphenCase:y,isCached:P,markup:O,merge:N,mobileClass:()=>{let e="";var t;return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e="formbuilder-mobile"),e},nameAttr:w,parsedHtml:S,parseXML:E,removeFromArray:(e,t)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},safeAttr:b,safeAttrName:g,safename:e=>e.replace(/\s/g,"-").replace(/[^a-zA-Z0-9[\]_-]/g,""),subtract:(e,t)=>t.filter((function(e){return!~this.indexOf(e)}),e),trimObj:m,unique:L,validAttr:h,titleCase:function(e){const t=["a","an","and","as","at","but","by","for","for","from","in","into","near","nor","of","on","onto","or","the","to","with"].map((e=>`\\s${e}\\s`)),r=new RegExp(`(?!${t.join("|")})\\w\\S*`,"g");return`${e}`.replace(r,(e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/[A-Z]/g,(e=>` ${e}`))))},firstNumberOrUndefined:function(){for(var e=arguments.length,t=new Array(e),r=0;r"number"==typeof e))},splitObject:(e,t)=>{const r=e=>(t,r)=>(t[r]=e[r],t);return[Object.keys(e).filter((e=>t.includes(e))).reduce(r(e),{}),Object.keys(e).filter((e=>!t.includes(e))).reduce(r(e),{})]}};e.fn.swapWith=function(t){const r=this,n=e(t),o=e("
");return r.before(o),n.before(r),o.before(n).remove(),r};var F=M;const z=function(e,t,r){void 0===r&&(r=!0);const n=[];let o=["none","block"];r&&(o=o.reverse());for(let r=e.length-1;r>=0;r--)-1!==e[r].textContent.toLowerCase().indexOf(t.toLowerCase())?(e[r].style.display=o[0],n.push(e[r])):e[r].style.display=o[1];return n};function B(e){let t;return"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}new RegExp(`(${["select","checkbox-group","checkbox","radio-group","autocomplete"].join("|")})`);var H={loaded:B("loaded"),viewData:B("viewData"),userDeclined:B("userDeclined"),modalClosed:B("modalClosed"),modalOpened:B("modalOpened"),formSaved:B("formSaved"),fieldAdded:B("fieldAdded"),fieldRemoved:B("fieldRemoved"),fieldRendered:B("fieldRendered"),fieldEditOpened:B("fieldEditOpened"),fieldEditClosed:B("fieldEditClosed"),stageEmptied:B("stageEmptied")};const $=["label","type"];class U{constructor(e,t){this.rawConfig=jQuery.extend({},e),e=jQuery.extend({},e),this.preview=t,delete e.isPreview,this.preview&&delete e.required;const r=["label","description","subtype","required","disabled"];for(const t of r)this[t]=e[t],delete e[t];e.id||(e.name?e.id=e.name:e.id="control-"+Math.floor(1e7*Math.random()+1)),this.id=e.id,this.type=e.type,this.description&&(e.title=this.description),U.controlConfig||(U.controlConfig={});const n=this.subtype?this.type+"."+this.subtype:this.type;this.classConfig=jQuery.extend({},U.controlConfig[this.type]||{},U.controlConfig[n]||{}),this.subtype&&(e.type=this.subtype),this.required&&(e.required="required",e["aria-required"]="true"),this.disabled&&(e.disabled="disabled"),this.config=e,this.configure()}static get definition(){return{}}static register(e,t,r){const n=r?r+".":"";U.classRegister||(U.classRegister={}),Array.isArray(e)||(e=[e]);for(const r of e)-1===r.indexOf(".")?U.classRegister[n+r]=t:U.error(`Ignoring type ${r}. Cannot use the character '.' in a type name.`)}static getRegistered(e){void 0===e&&(e=!1);const t=Object.keys(U.classRegister);return t.length?t.filter((t=>e?t.indexOf(e+".")>-1:-1===t.indexOf("."))):t}static getRegisteredSubtypes(){const e={};for(const t in U.classRegister)if(U.classRegister.hasOwnProperty(t)){const[r,n]=t.split(".");if(!n)continue;e[r]||(e[r]=[]),e[r].push(n)}return e}static getClass(e,t){const r=t?e+"."+t:e;return U.classRegister[r]||U.classRegister[e]||U.error("Invalid control type. (Type: "+e+", Subtype: "+t+"). Please ensure you have registered it, and imported it correctly.")}static loadCustom(e){let t=[];if(e&&(t=t.concat(e)),window.fbControls&&(t=t.concat(window.fbControls)),!this.fbControlsLoaded){for(const e of t)e(U,U.classRegister);this.fbControlsLoaded=!0}}static mi18n(e,t){const n=this.definition;let o=n.i18n||{};o=o[r().locale]||o.default||o;const i=this.camelCase(e),s="object"==typeof o?o[i]||o[e]:o;if(s)return s;let a=n.mi18n;return"object"==typeof a&&(a=a[i]||a[e]),a||(a=i),r().get(a,t)}static active(e){return!Array.isArray(this.definition.inactive)||-1===this.definition.inactive.indexOf(e)}static label(e){return this.mi18n(e)}static icon(e){const t=this.definition;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}configure(){}build(){const e=this.config,{label:t,type:r}=e,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,$);return this.markup(r,S(t),n)}on(e){const t={prerender:e=>e,render:e=>{const t=()=>{this.onRender&&this.onRender(e)};this.css&&D(this.css),this.js&&!P(this.js)?R(this.js).done(t):t()}};return e?t[e]:t}static error(e){throw new Error(e)}markup(e,t,r){return void 0===t&&(t=""),void 0===r&&(r={}),this.element=O(e,t,r),this.element}parsedHtml(e){return S(e)}static camelCase(e){return v(e)}}const I=(e,t)=>{let r=e.id?`formbuilder-${e.type} form-group field-${e.id}`:"";if(e.className){const n=(e=>"string"==typeof e?e.split(" ").filter((e=>q.test(e)||e.startsWith("row-"))):[])(e.className);n&&n.length>0&&(r+=` ${n.join(" ")}`,Array.isArray(t)||(t=[t]),t.forEach((e=>{e.classList&&e.classList.remove(...n),e.querySelectorAll("[class*=row-],[class*=col-]").forEach((e=>{e.classList&&e.classList.remove(...n)}))})))}return r};class _{constructor(e,t,r,n){var o,i,s;void 0===t&&(t=!1),void 0===r&&(r=!1),void 0===n&&(n={}),this.preview=null!==(o=t)&&void 0!==o&&o,this.disableHTMLLabels=null!==(i=r)&&void 0!==i&&i,this.controlConfig=null!==(s=n)&&void 0!==s?s:{},this.templates={label:null,help:null,default:(e,t,r,n)=>(r&&t.appendChild(r),this.markup("div",[t,e],{className:I(n,e)})),noLabel:(e,t,r,n)=>this.markup("div",e,{className:I(n,e)}),hidden:e=>e},e&&(this.templates=jQuery.extend(this.templates,e)),this.configure()}configure(){}build(e,t,r){this.preview&&(t.name?t.name=t.name+"-preview":t.name=F.nameAttr(t)+"-preview"),t.id=t.name,this.data=jQuery.extend({},t),U.controlConfig=this.controlConfig;const n=new e(t,this.preview);let o=n.build();if("object"==typeof o&&o.field||(o={field:o}),"string"==typeof o.field){const e=this.markup("div",o.field,{});1===e.childElementCount?o.field=e.children.item(0):o.field=Array.from(e.children)}const i=this.label(),s=this.help();let a;a=r&&this.isTemplate(r)?r:this.isTemplate(o.layout)?o.layout:"default";const l=this.processTemplate(a,o.field,i,s);return n.on("prerender")(l),l.addEventListener("fieldRendered",n.on("render")),l}label(){const e=this.data.label||"",t=[this.disableHTMLLabels?document.createTextNode(e):F.parsedHtml(e)];return this.data.required&&t.push(this.markup("span","*",{className:"formbuilder-required"})),this.isTemplate("label")?this.processTemplate("label",t):this.markup("label",t,{for:this.data.id,className:`formbuilder-${this.data.type}-label`})}help(){return this.data.description?this.isTemplate("help")?this.processTemplate("help",this.data.description):this.markup("span","?",{className:"tooltip-element",tooltip:this.data.description}):null}isTemplate(e){return"function"==typeof this.templates[e]}processTemplate(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,V),o=e=>{const t=e.target.nextSibling.nextSibling,r=e.target.nextSibling,n=this.getActiveOption(t);let o=new Map([[38,()=>{const e=this.getPreviousOption(n);e&&this.selectOption(t,e)}],[40,()=>{const e=this.getNextOption(n);e&&this.selectOption(t,e)}],[13,()=>{n?(e.target.value=n.innerHTML,r.value=n.getAttribute("value"),"none"===t.style.display?this.showList(t,n):this.hideList(t)):this.config.requireValidOption&&(this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")),e.preventDefault()}],[27,()=>{this.hideList(t)}]]).get(e.keyCode);return o||(o=()=>!1),o()},i={focus:e=>{const t=e.target.nextSibling.nextSibling,r=z(t.querySelectorAll("li"),e.target.value);if(e.target.addEventListener("keydown",o),e.target.value.length>0){const e=r.length>0?r[r.length-1]:null;this.showList(t,e)}},blur:e=>{e.target.removeEventListener("keydown",o);const t=setTimeout((()=>{e.target.nextSibling.nextSibling.style.display="none",clearTimeout(t)}),200);if(this.config.requireValidOption){const t=e.target.nextSibling.nextSibling;this.isOptionValid(t,e.target.value)||(e.target.value="",e.target.nextSibling.value="")}},input:e=>{const t=e.target.nextSibling.nextSibling;e.target.nextSibling.value=e.target.value;const r=z(t.querySelectorAll("li"),e.target.value);if(0==r.length)this.hideList(t);else{let e=this.getActiveOption(t);e||(e=r[r.length-1]),this.showList(t,e)}}},s=Object.assign({},n,{id:`${n.id}-input`,autocomplete:"off",events:i}),a=Object.assign({},n,{type:"hidden"});delete s.name;const l=[this.markup("input",null,s),this.markup("input",null,a)],d=t.map((e=>{const t=e.label,r={events:{click:t=>{const r=t.target.parentElement,n=r.previousSibling.previousSibling;n.value=e.label,n.nextSibling.value=e.value,this.hideList(r)}},value:e.value};return this.markup("li",t,r)}));return l.push(this.markup("ul",d,{id:`${n.id}-list`,className:`formbuilder-${r}-list`})),l}hideList(e){this.selectOption(e,null),e.style.display="none"}showList(e,t){this.selectOption(e,t),e.style.display="block",e.style.width=e.parentElement.offsetWidth+"px"}getActiveOption(e){const t=e.getElementsByClassName("active-option")[0];return t&&"none"!==t.style.display?t:null}getPreviousOption(e){let t=e;do{t=t?t.previousSibling:null}while(null!=t&&"none"===t.style.display);return t}getNextOption(e){let t=e;do{t=t?t.nextSibling:null}while(null!=t&&"none"===t.style.display);return t}selectOption(e,t){const r=e.querySelectorAll("li");for(let e=0;e=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,W);let n=t;const o={paragraph:"p",header:this.subtype};return o[t]&&(n=o[t]),{field:this.markup(n,F.parsedHtml(this.label),r),layout:"noLabel"}}}U.register(["paragraph","header"],J),U.register(["p","address","blockquote","canvas","output"],J,"paragraph"),U.register(["h1","h2","h3","h4","h5","h6"],J,"header");const G=["values","value","placeholder","type","inline","other","toggle"],Z=["label"];function K(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}U.register(["select","checkbox-group","radio-group","checkbox"],class extends U{static get definition(){return{inactive:["checkbox"],mi18n:{minSelectionRequired:"minSelectionRequired"}}}build(){const e=[],t=this.config,{values:r,value:n,placeholder:o,type:i,inline:s,other:a,toggle:l}=t,d=K(t,G),c=i.replace("-group",""),u="select"===i;if((d.multiple||"checkbox-group"===i)&&(d.name=d.name+"[]"),"checkbox-group"===i&&d.required){const e=this,t=this.onRender.bind(this);this.onRender=function(){t(),e.groupRequired()}}if(delete d.title,r){o&&u&&e.push(this.markup("option",o,{disabled:!0,selected:!0,value:""}));for(let t=0;t{const t=e.target;t.parentElement.previousElementSibling.value=t.value}},id:`${t.id}-value`,className:"other-val"},i=this.markup("input",null,n),a=[document.createTextNode(U.mi18n("other")),this.markup("input",null,o)],l=this.markup("label",a,{for:n.id}),u=this.markup("div",[i,l],{className:r});e.push(u)}}return this.dom="select"==i?this.markup(c,e,m(d,!0)):this.markup("div",e,{className:i}),this.dom}groupRequired(){const e=this.element.getElementsByTagName("input"),t=()=>{const t=[].some.call(e,(e=>e.checked));((e,t)=>{[].forEach.call(e,(e=>{t?e.removeAttribute("required"):e.setAttribute("required","required"),((e,t)=>{const r=U.mi18n("minSelectionRequired",1);t?e.setCustomValidity(""):e.setCustomValidity(r)})(e,t)}))})(e,t)};for(let r=e.length-1;r>=0;r--)e[r].addEventListener("change",t);t()}onRender(){if(this.config.userData){const t=this.config.userData.slice();"select"===this.config.type?e(this.dom).val(t).prop("selected",!0):this.config.type.endsWith("-group")&&("checkbox-group"===this.config.type&&this.dom.querySelectorAll("input[type=checkbox]").forEach((e=>{e.removeAttribute("checked")})),this.dom.querySelectorAll("input").forEach((e=>{if(!e.classList.contains("other-val")){for(let r=0;r0){const r=this.dom.querySelector(`#${e.id}-value`);e.setAttribute("checked","checked"),r.value=e.value=t[0],r.style.display="inline-block"}}})))}}});class Y extends U{static get definition(){return{mi18n:{date:"dateField",file:"fileUpload"}}}build(){let{name:e}=this.config;e=this.config.multiple?`${e}[]`:e;const t=Object.assign({},this.config,{name:e});return this.dom=this.markup("input",null,t),this.dom}onRender(){this.config.userData&&e(this.dom).val(this.config.userData[0])}}U.register(["text","file","date","number"],Y),U.register(["text","password","email","color","tel"],Y,"text"),U.register(["date","time","datetime-local"],Y,"date"),U.register(["number","range"],Y,"number");const ee=["value"];class te extends U{static get definition(){return{mi18n:{textarea:"textArea"}}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ee);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),this.field}onRender(){this.config.userData&&e(this.field).val(this.config.userData[0])}on(t){return"prerender"==t&&this.preview?t=>{this.field&&(t=this.field),e(t).on("mousedown",(e=>{e.stopPropagation()}))}:super.on(t)}}U.register("textarea",te),U.register("textarea",te,"textarea");const re=["value"];te.register("tinymce",class extends te{configure(){if(this.js=[],window.tinymce||this.js.push("https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js"),this.classConfig.js){let e=this.classConfig.js;Array.isArray(e)||(e=new Array(e)),this.js=this.js.concat(e),delete this.classConfig.js}this.classConfig.css&&(this.css=this.classConfig.css),this.editorOptions={height:250,paste_data_images:!0,plugins:["advlist","autolink","lists","link","image","charmap","print","preview","anchor","searchreplace","visualblocks","code","fullscreen","insertdatetime","media","table","contextmenu","paste","code"],toolbar:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | table"}}build(){const e=this.config,{value:t=""}=e,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,re);return delete r.type,this.field=this.markup("textarea",this.parsedHtml(t),r),r.disabled&&(this.editorOptions.readonly=!0),this.field}onRender(){const e=window.tinymce.get(this.id);e&&window.tinymce.remove(e);const t=jQuery.extend(this.editorOptions,this.classConfig);t.target=this.field;const r=[];Number(window.tinymce.majorVersion)>=5&&r.push("contextmenu"),Number(window.tinymce.majorVersion)>=6&&r.push("paste","print"),t.plugins=t.plugins.filter((e=>-1===r.indexOf(e)));const n=this.config.userData?this.parsedHtml(this.config.userData[0]):void 0,o=window.lastFormBuilderCopiedTinyMCE?this.parsedHtml(window.lastFormBuilderCopiedTinyMCE):void 0;window.lastFormBuilderCopiedTinyMCE=null;const i=function(e){o?e[0].setContent(o):n&&e[0].setContent(n)};setTimeout((()=>{window.tinymce.init(t).then(i)}),0)}},"textarea");const ne=["value"];function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ne);return delete r.type,this.field=this.markup("div",null,r),this.field.classList.contains("form-control")&&this.field.classList.remove("form-control"),this.field}onRender(e){const t=this.config.value||"",r=window.Quill.import("delta");window.fbEditors.quill[this.id]={};const n=window.fbEditors.quill[this.id];return n.instance=new window.Quill(this.field,this.editorConfig),n.data=new r,t&&n.instance.setContents(window.JSON.parse(this.parsedHtml(t))),n.instance.on("text-change",(function(e){n.data=n.data.compose(e)})),e}},"textarea"),r().addLanguage("en-US",{NATIVE_NAME:"English (US)",ENGLISH_NAME:"English",addOption:"Add Option +",allFieldsRemoved:"All fields were removed.",allowMultipleFiles:"Allow users to upload multiple files",autocomplete:"Autocomplete",button:"Button",cannotBeEmpty:"This field cannot be empty",checkboxGroup:"Checkbox Group",checkbox:"Checkbox",checkboxes:"Checkboxes",className:"Class",clearAllMessage:"Are you sure you want to clear all fields?",clear:"Clear",close:"Close",content:"Content",copy:"Copy To Clipboard",copyButton:"+",copyButtonTooltip:"Copy",dateField:"Date Field",description:"Help Text",descriptionField:"Description",devMode:"Developer Mode",editNames:"Edit Names",editorTitle:"Form Elements",editXML:"Edit XML",enableOther:"Enable "Other"",enableOtherMsg:"Let users enter an unlisted option",fieldDeleteWarning:"false",fieldVars:"Field Variables",fieldNonEditable:"This field cannot be edited.",fieldRemoveWarning:"Are you sure you want to remove this field?",fileUpload:"File Upload",formUpdated:"Form Updated",getStarted:"Drag a field from the right to this area",header:"Header",hide:"Edit",hidden:"Hidden Input",inline:"Inline",inlineDesc:"Display {type} inline",label:"Label",labelEmpty:"Field Label cannot be empty",limitRole:"Limit access to one or more of the following roles:",mandatory:"Mandatory",maxlength:"Max Length",minOptionMessage:"This field requires a minimum of 2 options",minSelectionRequired:"Minimum {min} selections required",multipleFiles:"Multiple Files",name:"Name",no:"No",noFieldsToClear:"There are no fields to clear",number:"Number",off:"Off",on:"On",option:"Option",optionCount:"Option {count}",options:"Options",optional:"optional",optionLabelPlaceholder:"Label",optionValuePlaceholder:"Value",optionEmpty:"Option value required",other:"Other",paragraph:"Paragraph",placeholder:"Placeholder","placeholders.value":"Value","placeholders.label":"Label","placeholders.email":"Enter your email","placeholders.className":"space separated classes","placeholders.password":"Enter your password",preview:"Preview",radioGroup:"Radio Group",radio:"Radio",removeMessage:"Remove Element",removeOption:"Remove Option",remove:"×",required:"Required",requireValidOption:"Only accept a pre-defined Option",richText:"Rich Text Editor",roles:"Access",rows:"Rows",save:"Save",selectOptions:"Options",select:"Select",selectColor:"Select Color",selectionsMessage:"Allow Multiple Selections",size:"Size","size.xs":"Extra Small","size.sm":"Small","size.m":"Default","size.lg":"Large",style:"Style","styles.btn.default":"Default","styles.btn.danger":"Danger","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning",subtype:"Type",text:"Text Field",textArea:"Text Area",toggle:"Toggle",warning:"Warning!",value:"Value",viewJSON:"[{…}]",viewXML:"</>",yes:"Yes"});const se={location:"assets/lang/"};n(299);class ae{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),this.customRegister={},this.templateControlRegister={},this.def={icon:{},i18n:{}},this.register(e,t)}register(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);const n=r().locale;this.def.i18n[n]||(this.def.i18n[n]={});const o=this;Object.keys(e).forEach((t=>{const r=function(r,n){this.customControl=new X(r,n,e[t]),this.build=function(){return this.customControl.build()},this.on=function(e){return this.customControl.on(e)}};r.definition={},r.label=e=>o.label(e),r.icon=e=>o.icon(e),this.templateControlRegister[t]=r}));for(const o of t){let t=o.type;if(o.attrs=o.attrs||{},!t){if(!o.attrs.type){U.error("Ignoring invalid custom field definition. Please specify a type property.");continue}t=o.attrs.type}let i=o.subtype||t;if(e[t]){const e=this.templateControlRegister[t];e.definition=o,this.customRegister[i]=jQuery.extend(o,{type:t,class:e})}else try{const e=U.getClass(t,o.subtype);i=o.datatype?o.datatype:`${t}-${Math.floor(9e3*Math.random()+1e3)}`,this.customRegister[i]=jQuery.extend(o,{type:t,class:e})}catch(e){U.error("Error while registering custom field: "+t+(o.subtype?":"+o.subtype:"")+". Unable to find any existing defined control or template for rendering.")}this.def.i18n[n][i]=Array.isArray(o.label)?r().get(...o.label)||o.label[0]:o.label,this.def.icon[i]=o.icon}}label(e){const t=this.def;let n=t.i18n||{};n=n[r().locale]||n.default||n;const o=U.camelCase(e),i="object"==typeof n?n[o]||n[e]:n;if(i)return i;{let n=t.mi18n;return"object"==typeof n&&(n=n[o]||n[e]),n||(n=o),r().get(n)}}get definition(){return{}}icon(e){const t=this.def;return t&&"object"==typeof t.icon?t.icon[e]:t.icon}getRegistered(e){var t;return void 0===e&&(e=!1),e?null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0:Object.keys(this.customRegister)}getClass(e){var t;return null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0}lookup(e){return this.customRegister[e]}}class le{constructor(e){void 0===e&&(e={});const t={layout:_,layoutTemplates:{},controls:{},controlConfig:{},container:!1,dataType:"json",disableHTMLLabels:!1,formData:[],i18n:Object.assign({},se),messages:{formRendered:"Form Rendered",noFormData:"No form data.",other:"Other",selectColor:"Select Color",invalidControl:"Invalid control"},onRender:()=>{},render:!0,sanitizerOptions:{clobberingProtection:{document:!0,form:!1,namespaceAttributes:!0},backendOrder:["dompurify","sanitizer","fallback"]},templates:{},notify:{error:e=>{console.log(e)},success:e=>{console.log(e)},warning:e=>{console.warn(e)}}};this.options=jQuery.extend(!0,t,e),this.instanceContainers=[],(e=>{if("object"!=typeof e)throw"Invalid value given to setSanitizerConfig, expected config object";if(e.hasOwnProperty("clobberingProtection")&&["document","form","namespaceAttributes"].forEach((t=>{e.clobberingProtection.hasOwnProperty(t)&&"boolean"==typeof e.clobberingProtection[t]&&(o.clobberingProtection[t]=e.clobberingProtection[t])})),e.hasOwnProperty("backends")){if("object"!=typeof e.backends)throw"backends config expected to be an Object";Object.keys(e.backends).forEach((t=>o.backends[t]=e.backends[t]))}if(e.hasOwnProperty("backendOrder")){if(o.backendOrder=[],!Array.isArray(e.backendOrder))throw"backendOrder config expected to be an Array of backend keys as strings";e.backendOrder.forEach((e=>{if(!o.backends.hasOwnProperty(e))throw"unknown sanitizer backend "+e;o.backendOrder.push(e)}))}})(this.options.sanitizerOptions),r().current||r().init(this.options.i18n),this.options.formData?this.options.formData=this.parseFormData(this.options.formData):this.options.formData=[],U.controlConfig=e.controlConfig||{},U.loadCustom(e.controls),this.templatedControls=new ae(this.options.templates),"function"!=typeof Element.prototype.appendFormFields&&(Element.prototype.appendFormFields=function(e){Array.isArray(e)||(e=[e]);const t=F.markup("div",e,{className:"rendered-form formbuilder-embedded-bootstrap"});this.appendChild(t),e.forEach((e=>{const[r]=e.className.match(/row-([^\s]+)/)||[];if(r){const n=this.id?`${this.id}-row-${r}`:`row-${r}`;let o=document.getElementById(n);o||(o=F.markup("div",null,{id:n,className:"row"}),t.appendChild(o)),o.appendChild(e)}else t.appendChild(e);e.dispatchEvent(H.fieldRendered)}))}),"function"!=typeof Element.prototype.emptyContainer&&(Element.prototype.emptyContainer=function(){const e=this;for(;e.lastChild;)e.removeChild(e.lastChild)})}sanitizeField(e,t){let r=Object.assign({},e);return t&&(r.id=e.id&&`${e.id}-${t}`,r.name=e.name&&`${e.name}-${t}`),r.className=Array.isArray(e.className)?F.unique(e.className.join(" ").split(" ")).join(" "):e.className||e.class||null,delete r.class,e.values&&(r.values=e.values.map((e=>F.trimObj(e)))),r=F.trimObj(r),Array.isArray(e.userData)&&0===e.userData.length&&(r.userData=[]),r}getElement(e){return(e=this.options.container||e)instanceof jQuery?e=e[0]:"string"==typeof e&&(e=document.querySelector(e)),e}render(e,t){void 0===e&&(e=null),void 0===t&&(t=0);const r=this,n=this.options;e=this.getElement(e);const o=[],i=new n.layout(n.layoutTemplates,!1,n.disableHTMLLabels,n.controlConfig);if(n.formData.length)for(let e=0;ee.map((e=>e.innerHTML)).join("");r.markup=e(o)}if(!0===n.disableInjectedStyle){const e=document.getElementsByClassName("formBuilder-injected-style");T(e,(t=>(e=>{e.parentNode&&e.parentNode.removeChild(e)})(e[t])))}else"bootstrap"===n.disableInjectedStyle&&n.render&&e&&e.getElementsByClassName("formbuilder-embedded-bootstrap").item(0)?.classList.remove("formbuilder-embedded-bootstrap");return r}renderControl(e){void 0===e&&(e=null);const t=this.options,r=t.formData;if(!r||Array.isArray(r))throw new Error("To render a single element, please specify a single object of formData for the field in question");const n=this.sanitizeField(r),o=new t.layout,i=this.templatedControls.getClass(r.type)||U.getClass(r.type,r.subtype),s=t.forceTemplate||"hidden",a=o.build(i,n,s);return e.appendFormFields(a),t.notify.success(t.messages.formRendered),this}get userData(){const t=this.options.formData.slice();return t.filter((e=>"tinymce"===e.subtype)).forEach((e=>window.tinymce.get(e.name).save())),this.instanceContainers.forEach((r=>{const n=e("select, input, textarea",r).serializeArray().reduce(((e,t)=>{let{name:r,value:n}=t;return r=r.replace("[]",""),e[r]?e[r].push(n):e[r]=[n],e}),{}),o=t.length;for(let e=0;e{this.options.formData.slice().filter((e=>"tinymce"===e.subtype)).forEach((e=>window.tinymce.get(e.name).setContent(""))),e.querySelectorAll("input, select, textarea").forEach((e=>{["checkbox","radio"].includes(e.type)?e.checked=!1:e.value=""}))}))}parseFormData(e){const t={xml:e=>E(e),json:e=>window.JSON.parse(e)};return"object"!=typeof e&&(e=t[this.options.dataType](e)||!1),e}}!function(e){let t;const r={init:function(e,n){return void 0===n&&(n={}),t=e,r.instance=new le(n),e.each((t=>r.instance.render(e[t],t))),r.instance},userData:()=>r.instance&&r.instance.userData,clear:()=>r.instance&&r.instance.clear(),setData:e=>{if(r.instance){const t=r.instance;t.options.formData=t.parseFormData(e)}},render:function(e,n){if(void 0===n&&(n={}),r.instance){const o=r.instance;e||(e=o.options.formData),o.options=Object.assign({},o.options,n,{formData:o.parseFormData(e)}),t.each((e=>r.instance.render(t[e],e)))}},html:()=>t.map((e=>t[e])).html()};e.fn.formRender=function(e){if(void 0===e&&(e={}),r[e]){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;or.renderControl(n[e]))),n}}(jQuery)}()}()}(jQuery); \ No newline at end of file diff --git a/assets/js/form-render.min.js.LICENSE.txt b/assets/js/form-render.min.js.LICENSE.txt index bd7481a20..856f41d09 100644 --- a/assets/js/form-render.min.js.LICENSE.txt +++ b/assets/js/form-render.min.js.LICENSE.txt @@ -7,7 +7,7 @@ /*! * jQuery formRender: https://formbuilder.online/ - * Version: 3.19.9 + * Version: 3.19.10 * Author: Kevin Chappell */ diff --git a/assets/js/form-render.min.js.gz b/assets/js/form-render.min.js.gz index 426614334..2ece75361 100644 Binary files a/assets/js/form-render.min.js.gz and b/assets/js/form-render.min.js.gz differ