From f07f3d643abec1b571b380478c2ec3e27a547fd3 Mon Sep 17 00:00:00 2001
From: barbara-prusiewicz
Date: Wed, 3 Jul 2024 13:40:06 -1000
Subject: [PATCH] Package and Tool version changes to resolve bootstrap script
grunt step failures
---
.tool-versions | 2 +-
dist/formrenderer.js | 2 +-
dist/formrenderer.standalone.js | 2 +-
dist/formrenderer.standalone.uncompressed.js | 5526 +++++++++--------
dist/formrenderer.uncompressed.js | 5524 +++++++++--------
dist/plugins/i18n.js | 28 +-
package-lock.json | 5762 +++++++++---------
package.json | 53 +-
test/karma.conf.coffee | 8 +-
9 files changed, 8441 insertions(+), 8466 deletions(-)
diff --git a/.tool-versions b/.tool-versions
index 3311a0e2..4862458d 100644
--- a/.tool-versions
+++ b/.tool-versions
@@ -1,2 +1,2 @@
nodejs 10.22.1
-ruby 2.7.7
+ruby 2.6.10
diff --git a/dist/formrenderer.js b/dist/formrenderer.js
index 42f01d3c..c618740e 100644
--- a/dist/formrenderer.js
+++ b/dist/formrenderer.js
@@ -1 +1 @@
-!function(a){!function(b){"function"==typeof define&&define.amd?define(["jquery"],b):b("undefined"!=typeof jQuery?jQuery:a.Zepto)}(function(b){"use strict";function c(a){var c=a.data;a.isDefaultPrevented()||(a.preventDefault(),b(a.target).ajaxSubmit(c))}function d(a){var c=a.target,d=b(c);if(!d.is("[type=submit],[type=image]")){var e=d.closest("[type=submit]");if(0===e.length)return;c=e[0]}var f=this;if(f.clk=c,"image"==c.type)if(void 0!==a.offsetX)f.clk_x=a.offsetX,f.clk_y=a.offsetY;else if("function"==typeof b.fn.offset){var g=d.offset();f.clk_x=a.pageX-g.left,f.clk_y=a.pageY-g.top}else f.clk_x=a.pageX-c.offsetLeft,f.clk_y=a.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)}function e(){if(b.fn.ajaxSubmit.debug){var c="[jquery.form] "+Array.prototype.join.call(arguments,"");a.console&&a.console.log?a.console.log(c):a.opera&&a.opera.postError&&a.opera.postError(c)}}var f={};f.fileapi=void 0!==b("").get(0).files,f.formdata=void 0!==a.FormData;var g=!!b.fn.prop;b.fn.attr2=function(){if(!g)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"==typeof a?a:this.attr.apply(this,arguments)},b.fn.ajaxSubmit=function(c){function d(a){var d,e,f=b.param(a,c.traditional).split("&"),g=f.length,h=[];for(d=0;d').val(n.extraData[h].value).appendTo(y)[0]):g.push(b('').val(n.extraData[h]).appendTo(y)[0]));n.iframeTarget||r.appendTo("body"),s.attachEvent?s.attachEvent("onload",i):s.addEventListener("load",i,!1),setTimeout(a,15);try{y.submit()}catch(a){var k=document.createElement("form").submit;k.apply(y)}}finally{y.setAttribute("action",d),c?y.setAttribute("target",c):m.removeAttr("target"),b(g).remove()}}function i(c){if(!t.aborted&&!G){if(F=f(s),F||(e("cannot access response document"),c=B),c===A&&t)return t.abort("timeout"),void z.reject(t,"timeout");if(c==B&&t)return t.abort("server abort"),void z.reject(t,"error","server abort");if(F&&F.location.href!=n.iframeSrc||w){s.detachEvent?s.detachEvent("onload",i):s.removeEventListener("load",i,!1);var d,g="success";try{if(w)throw"timeout";var h="xml"==n.dataType||F.XMLDocument||b.isXMLDoc(F);if(e("isXml="+h),!h&&a.opera&&(null===F.body||!F.body.innerHTML)&&--H)return e("requeing onLoad callback, DOM not available"),void setTimeout(i,250);var j=F.body?F.body:F.documentElement;t.responseText=j?j.innerHTML:null,t.responseXML=F.XMLDocument?F.XMLDocument:F,h&&(n.dataType="xml"),t.getResponseHeader=function(a){return{"content-type":n.dataType}[a.toLowerCase()]},j&&(t.status=Number(j.getAttribute("status"))||t.status,t.statusText=j.getAttribute("statusText")||t.statusText);var k=(n.dataType||"").toLowerCase(),l=/(json|script|text)/.test(k);if(l||n.textarea){var m=F.getElementsByTagName("textarea")[0];if(m)t.responseText=m.value,t.status=Number(m.getAttribute("status"))||t.status,t.statusText=m.getAttribute("statusText")||t.statusText;else if(l){var p=F.getElementsByTagName("pre")[0],q=F.getElementsByTagName("body")[0];p?t.responseText=p.textContent?p.textContent:p.innerText:q&&(t.responseText=q.textContent?q.textContent:q.innerText)}}else"xml"==k&&!t.responseXML&&t.responseText&&(t.responseXML=I(t.responseText));try{E=K(t,k,n)}catch(a){g="parsererror",t.error=d=a||g}}catch(a){e("error caught: ",a),g="error",t.error=d=a||g}t.aborted&&(e("upload aborted"),g=null),t.status&&(g=t.status>=200&&t.status<300||304===t.status?"success":"error"),"success"===g?(n.success&&n.success.call(n.context,E,"success",t),z.resolve(t.responseText,"success",t),o&&b.event.trigger("ajaxSuccess",[t,n])):g&&(void 0===d&&(d=t.statusText),n.error&&n.error.call(n.context,t,g,d),z.reject(t,"error",d),o&&b.event.trigger("ajaxError",[t,n,d])),o&&b.event.trigger("ajaxComplete",[t,n]),o&&!--b.active&&b.event.trigger("ajaxStop"),n.complete&&n.complete.call(n.context,t,g),G=!0,n.timeout&&clearTimeout(x),setTimeout(function(){n.iframeTarget?r.attr("src",n.iframeSrc):r.remove(),t.responseXML=null},100)}}}var k,l,n,o,p,r,s,t,u,v,w,x,y=m[0],z=b.Deferred();if(z.abort=function(a){t.abort(a)},d)for(l=0;l'),r.css({position:"absolute",top:"-1000px",left:"-1000px"})),s=r[0],t={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(a){var c="timeout"===a?"timeout":"aborted";e("aborting upload... "+c),this.aborted=1;try{s.contentWindow.document.execCommand&&s.contentWindow.document.execCommand("Stop")}catch(a){}r.attr("src",n.iframeSrc),t.error=c,n.error&&n.error.call(n.context,t,c,a),o&&b.event.trigger("ajaxError",[t,n,c]),n.complete&&n.complete.call(n.context,t,c)}},o=n.global,o&&0==b.active++&&b.event.trigger("ajaxStart"),o&&b.event.trigger("ajaxSend",[t,n]),n.beforeSend&&!1===n.beforeSend.call(n.context,t,n))return n.global&&b.active--,z.reject(),z;if(t.aborted)return z.reject(),z;(u=y.clk)&&(v=u.name)&&!u.disabled&&(n.extraData=n.extraData||{},n.extraData[v]=u.value,"image"==u.type&&(n.extraData[v+".x"]=y.clk_x,n.extraData[v+".y"]=y.clk_y));var A=1,B=2,C=b("meta[name=csrf-token]").attr("content"),D=b("meta[name=csrf-param]").attr("content");D&&C&&(n.extraData=n.extraData||{},n.extraData[D]=C),n.forceSync?h():setTimeout(h,10);var E,F,G,H=50,I=b.parseXML||function(b,c){return a.ActiveXObject?(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)):c=(new DOMParser).parseFromString(b,"text/xml"),c&&c.documentElement&&"parsererror"!=c.documentElement.nodeName?c:null},J=b.parseJSON||function(b){return a.eval("("+b+")")},K=function(a,c,d){var e=a.getResponseHeader("content-type")||"",f="xml"===c||!c&&e.indexOf("xml")>=0,g=f?a.responseXML:a.responseText;return f&&"parsererror"===g.documentElement.nodeName&&b.error&&b.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),"string"==typeof g&&("json"===c||!c&&e.indexOf("json")>=0?g=J(g):("script"===c||!c&&e.indexOf("javascript")>=0)&&b.globalEval(g)),g};return z}if(!this.length)return e("ajaxSubmit: skipping submit process - no element selected"),this;var j,k,l,m=this;"function"==typeof c?c={success:c}:void 0===c&&(c={}),j=c.type||this.attr2("method"),k=c.url||this.attr2("action"),l="string"==typeof k?b.trim(k):"",l=l||a.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),c=b.extend(!0,{url:l,success:b.ajaxSettings.success,type:j||b.ajaxSettings.type,iframeSrc:/^https/i.test(a.location.href||"")?"javascript:false":"about:blank"},c);var n={};if(this.trigger("form-pre-serialize",[this,c,n]),n.veto)return e("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(c.beforeSerialize&&!1===c.beforeSerialize(this,c))return e("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var o=c.traditional;void 0===o&&(o=b.ajaxSettings.traditional);var p,q=[],r=this.formToArray(c.semantic,q);if(c.data&&(c.extraData=c.data,p=b.param(c.data,o)),c.beforeSubmit&&!1===c.beforeSubmit(r,this,c))return e("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[r,this,c,n]),n.veto)return e("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var s=b.param(r,o);p&&(s=s?s+"&"+p:p),"GET"==c.type.toUpperCase()?(c.url+=(c.url.indexOf("?")>=0?"&":"?")+s,c.data=null):c.data=s;var t=[];if(c.resetForm&&t.push(function(){m.resetForm()}),c.clearForm&&t.push(function(){m.clearForm(c.includeHidden)}),!c.dataType&&c.target){var u=c.success||function(){};t.push(function(a){var d=c.replaceTarget?"replaceWith":"html";b(c.target)[d](a).each(u,arguments)})}else c.success&&t.push(c.success);if(c.success=function(a,b,d){for(var e=c.context||this,f=0,g=t.length;f0,z="multipart/form-data",A=m.attr("enctype")==z||m.attr("encoding")==z,B=f.fileapi&&f.formdata;e("fileAPI :"+B);var C,D=(y||A)&&!B;!1!==c.iframe&&(c.iframe||D)?c.closeKeepAlive?b.get(c.closeKeepAlive,function(){C=i(r)}):C=i(r):C=(y||A)&&B?h(r):b.ajax(c),m.removeData("jqxhr").data("jqxhr",C);for(var E=0;E\n \n"),b=this.$input,this.$input=b.clone().val("").insertBefore(b),this._bindInputChange(),b.appendTo(c),b.attr("name",this.options.name),c.insertBefore(this.$input),c},b.prototype._eventToFilename=function(a){return null!=a.target.files?a.target.files[0].name:a.target.value?a.target.value.replace(/^.+\\/,""):void 0},b.prototype._onChange=function(a){var b,c;if(this.$input.val())return c={filename:this._eventToFilename(a)},"function"==typeof(b=this.options).start&&b.start(c),this.$input.trigger("inline_file_upload:start",c),this._ajaxUpload()},b.prototype._bindInputChange=function(){return this.$input.on("change",a.proxy(this._onChange,this))},b}(),a.fn.extend({inlineFileUpload:function(){var c,e;return e=arguments[0],c=2<=arguments.length?b.call(arguments,1):[],this.each(function(){var b;if(b=a(this).data("inline-file-upload"),b||a(this).data("inline-file-upload",b=new d(a(this),e)),"string"==typeof e)return b[e].apply(b,c)})}})}(a.jQuery),function(b){var c=!1;if("function"==typeof define&&define.amd&&(define(b),c=!0),"object"==typeof exports&&(module.exports=b(),c=!0),!c){var d=a.Cookies,e=a.Cookies=b();e.noConflict=function(){return a.Cookies=d,e}}}(function(){function a(){for(var a=0,b={};a1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(a){}return e=c.write?c.write(e,b):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape),document.cookie=[b,"=",e,f.expires?"; expires="+f.expires.toUTCString():"",f.path?"; path="+f.path:"",f.domain?"; domain="+f.domain:"",f.secure?"; secure":""].join("")}b||(g={});for(var i=document.cookie?document.cookie.split("; "):[],j=/(%[0-9A-Z]{2})+/g,k=0;k2;if(null==a&&(a=[]),n&&a.reduce===n)return d&&(b=x.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(y(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError(z);return c},x.reduceRight=x.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),o&&a.reduceRight===o)return d&&(b=x.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=a.length;if(f!==+f){var g=x.keys(a);f=g.length}if(y(a,function(h,i,j){i=g?g[--f]:--f,e?c=b.call(d,c,a[i],i,j):(c=a[i],e=!0)}),!e)throw new TypeError(z);return c},x.find=x.detect=function(a,b,c){var d;return A(a,function(a,e,f){if(b.call(c,a,e,f))return d=a,!0}),d},x.filter=x.select=function(a,b,c){var d=[];return null==a?d:p&&a.filter===p?a.filter(b,c):(y(a,function(a,e,f){b.call(c,a,e,f)&&d.push(a)}),d)},x.reject=function(a,b,c){return x.filter(a,function(a,d,e){return!b.call(c,a,d,e)},c)},x.every=x.all=function(a,b,d){b||(b=x.identity);var e=!0;return null==a?e:q&&a.every===q?a.every(b,d):(y(a,function(a,f,g){if(!(e=e&&b.call(d,a,f,g)))return c}),!!e)};var A=x.some=x.any=function(a,b,d){b||(b=x.identity);var e=!1;return null==a?e:r&&a.some===r?a.some(b,d):(y(a,function(a,f,g){if(e||(e=b.call(d,a,f,g)))return c}),!!e)};x.contains=x.include=function(a,b){return null!=a&&(s&&a.indexOf===s?-1!=a.indexOf(b):A(a,function(a){return a===b}))},x.invoke=function(a,b){var c=h.call(arguments,2),d=x.isFunction(b);return x.map(a,function(a){return(d?b:a[b]).apply(a,c)})},x.pluck=function(a,b){return x.map(a,x.property(b))},x.where=function(a,b){return x.filter(a,x.matches(b))},x.findWhere=function(a,b){return x.find(a,x.matches(b))},x.max=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.max.apply(Math,a);var d=-1/0,e=-1/0;return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;h>e&&(d=a,e=h)}),d},x.min=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.min.apply(Math,a);var d=1/0,e=1/0;return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;hd||void 0===c)return 1;if(c>>1;c.call(d,a[h])=0;c--)b=[a[c].apply(this,b)];return b[0]}},x.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},x.keys=function(a){if(!x.isObject(a))return[];if(v)return v(a);var b=[];for(var c in a)x.has(a,c)&&b.push(c);return b},x.values=function(a){for(var b=x.keys(a),c=b.length,d=new Array(c),e=0;e":">",'"':""","'":"'"}};G.unescape=x.invert(G.escape);var H={escape:new RegExp("["+x.keys(G.escape).join("")+"]","g"),unescape:new RegExp("("+x.keys(G.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(a){x[a]=function(b){return null==b?"":(""+b).replace(H[a],function(b){return G[a][b]})}}),x.result=function(a,b){if(null!=a){var c=a[b];return x.isFunction(c)?c.call(a):c}},x.mixin=function(a){y(x.functions(a),function(b){var c=x[b]=a[b];x.prototype[b]=function(){var a=[this._wrapped];return g.apply(a,arguments),M.call(this,c.apply(x,a))}})};var I=0;x.uniqueId=function(a){var b=++I+"";return a?a+b:b},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},L=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(a,b,c){var d;c=x.defaults({},c,x.templateSettings);var e=new RegExp([(c.escape||J).source,(c.interpolate||J).source,(c.evaluate||J).source].join("|")+"|$","g"),f=0,g="__p+='";a.replace(e,function(b,c,d,e,h){return g+=a.slice(f,h).replace(L,function(a){return"\\"+K[a]}),c&&(g+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'"),d&&(g+="'+\n((__t=("+d+"))==null?'':__t)+\n'"),e&&(g+="';\n"+e+"\n__p+='"),f=h+b.length,b}),g+="';\n",c.variable||(g="with(obj||{}){\n"+g+"}\n"),g="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+g+"return __p;\n";try{d=new Function(c.variable||"obj","_",g)}catch(a){throw a.source=g,a}if(b)return d(b,x);var h=function(a){return d.call(this,a,x)};return h.source="function("+(c.variable||"obj")+"){\n"+g+"}",h},x.chain=function(a){return x(a).chain()};var M=function(a){return this._chain?x(a).chain():a};x.mixin(x),y(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=d[a];x.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!=a&&"splice"!=a||0!==c.length||delete c[0],M.call(this,c)}}),y(["concat","join","slice"],function(a){var b=d[a];x.prototype[a]=function(){return M.call(this,b.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return x})}.call(this),function(a,b){if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(c,d,e){a.Backbone=b(a,e,c,d)});else if("undefined"!=typeof exports){var c=require("underscore");b(a,exports,c)}else a.Backbone=b(a,{},a._,a.jQuery||a.Zepto||a.ender||a.$)}(this,function(b,c,d,e){var f=b.Backbone,g=[],h=(g.push,g.slice);g.splice;c.VERSION="1.1.2",c.$=e,c.noConflict=function(){return b.Backbone=f,this},c.emulateHTTP=!1,c.emulateJSON=!1;var i=c.Events={on:function(a,b,c){return k(this,"on",a,[b,c])&&b?(this._events||(this._events={}),(this._events[a]||(this._events[a]=[])).push({callback:b,context:c,ctx:c||this}),this):this},once:function(a,b,c){if(!k(this,"once",a,[b,c])||!b)return this;var e=this,f=d.once(function(){e.off(a,f),b.apply(this,arguments)});return f._callback=b,this.on(a,f,c)},off:function(a,b,c){var e,f,g,h,i,j,l,m;if(!this._events||!k(this,"off",a,[b,c]))return this;if(!a&&!b&&!c)return this._events=void 0,this;for(h=a?[a]:d.keys(this._events),i=0,j=h.length;i").attr(a);this.setElement(b,!1)}}}),c.sync=function(a,b,e){var f=y[a];d.defaults(e||(e={}),{emulateHTTP:c.emulateHTTP,emulateJSON:c.emulateJSON});var g={type:f,dataType:"json"};if(e.url||(g.url=d.result(b,"url")||L()),null!=e.data||!b||"create"!==a&&"update"!==a&&"patch"!==a||(g.contentType="application/json",g.data=JSON.stringify(e.attrs||b.toJSON(e))),e.emulateJSON&&(g.contentType="application/x-www-form-urlencoded",g.data=g.data?{model:g.data}:{}),e.emulateHTTP&&("PUT"===f||"DELETE"===f||"PATCH"===f)){g.type="POST",e.emulateJSON&&(g.data._method=f);var h=e.beforeSend;e.beforeSend=function(a){if(a.setRequestHeader("X-HTTP-Method-Override",f),h)return h.apply(this,arguments)}}"GET"===g.type||e.emulateJSON||(g.processData=!1),"PATCH"===g.type&&x&&(g.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var i=e.xhr=c.ajax(d.extend(g,e));return b.trigger("request",b,i,e),i};var x=!(void 0===a||!a.ActiveXObject||a.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),y={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};c.ajax=function(){return c.$.ajax.apply(c.$,arguments)};var z=c.Router=function(a){a||(a={}),a.routes&&(this.routes=a.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},A=/\((.*?)\)/g,B=/(\(\?)?:\w+/g,C=/\*\w+/g,D=/[\-{}\[\]+?.,\\\^$|#\s]/g;d.extend(z.prototype,i,{initialize:function(){},route:function(a,b,e){d.isRegExp(a)||(a=this._routeToRegExp(a)),d.isFunction(b)&&(e=b,b=""),e||(e=this[b]);var f=this;return c.history.route(a,function(d){var g=f._extractParameters(a,d);f.execute(e,g),f.trigger.apply(f,["route:"+b].concat(g)),f.trigger("route",b,g),c.history.trigger("route",f,b,g)}),this},execute:function(a,b){a&&a.apply(this,b)},navigate:function(a,b){return c.history.navigate(a,b),this},_bindRoutes:function(){if(this.routes){this.routes=d.result(this,"routes");for(var a,b=d.keys(this.routes);null!=(a=b.pop());)this.route(a,this.routes[a])}},_routeToRegExp:function(a){return a=a.replace(D,"\\$&").replace(A,"(?:$1)?").replace(B,function(a,b){return b?a:"([^/?]+)"}).replace(C,"([^?]*?)"),new RegExp("^"+a+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(a,b){var c=a.exec(b).slice(1);return d.map(c,function(a,b){return b===c.length-1?a||null:a?decodeURIComponent(a):null})}});var E=c.History=function(){this.handlers=[],d.bindAll(this,"checkUrl"),void 0!==a&&(this.location=a.location,this.history=a.history)},F=/^[#\/]|\s+$/g,G=/^\/+|\/+$/g,H=/msie [\w.]+/,I=/\/$/,J=/#.*$/;E.started=!1,d.extend(E.prototype,i,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(a){var b=(a||this).location.href.match(/#(.*)$/);return b?b[1]:""},getFragment:function(a,b){if(null==a)if(this._hasPushState||!this._wantsHashChange||b){a=decodeURI(this.location.pathname+this.location.search);var c=this.root.replace(I,"");a.indexOf(c)||(a=a.slice(c.length))}else a=this.getHash();return a.replace(F,"")},start:function(b){if(E.started)throw new Error("Backbone.history has already been started");E.started=!0,this.options=d.extend({root:"/"},this.options,b),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var e=this.getFragment(),f=document.documentMode,g=H.exec(navigator.userAgent.toLowerCase())&&(!f||f<=7);if(this.root=("/"+this.root+"/").replace(G,"/"),g&&this._wantsHashChange){var h=c.$('
"}),c(),document.location.search.match(/respondent_auth_token/))return document.location.search=d.tokenlessQueryParams(document.location.search)}}(this),error:function(a){return function(c){var d,e,f,g,h;return a.corsSupported()?"Token expired. Verify identity."===(null!=(d=c.responseJSON)?d.error:void 0)?(a.$el.html(JST["partials/verify"]({template:null!=(e=c.responseJSON)?e.template:void 0,href:null!=(f=c.responseJSON)?f.verify_api_endpoint:void 0,button:null!=(g=c.responseJSON)?g.verify_email_button:void 0})),a.maybe_delete_jwt_token(c)):(a.$el.find(".fr_loading").text(b.t.error_loading+': "'+((null!=(h=c.responseJSON)?h.error:void 0)||"Unknown")+'"'),a.trigger("errorSaving",c)):a.$el.find(".fr_loading").html(b.t.not_supported.replace(/\:url/g,a.projectUrl()))}}(this)})},initPages:function(){var a,c,d,e,f,g;a=function(a){return function(){return a.subviews.pages[c]=new b.Views.Page({form_renderer:a})}}(this),this.numPages=this.formComponents.where({field_type:"page_break"}).length+1,this.state.set("activePage",1),c=1,a(),this.formComponents.each(function(b){return function(d){return"page_break"===d.get("field_type")?(c++,a()):b.subviews.pages[c].models.push(d)}}(this)),f=this.subviews.pages,g=[];for(e in f)d=f[e],g.push(this.$el.append(d.render().el));return g},initPagination:function(){return this.subviews.pagination=new b.Views.Pagination({form_renderer:this}),this.$el.prepend(this.subviews.pagination.render().el),this.subviews.pages[this.state.get("activePage")].show()},initNoPagination:function(){var a,b,c,d;c=this.subviews.pages,d=[];for(b in c)a=c[b],d.push(a.show());return d},activatePage:function(b){return this.subviews.pages[this.state.get("activePage")].hide(),this.subviews.pages[b].show(),a.scrollTo(0,this.options.scrollToPadding),this.state.set("activePage",b)},validate:function(){var a,b,c;c=this.subviews.pages;for(b in c)a=c[b],a.validate();return this.trigger("afterValidate afterValidate:all"),this.areAllPagesValid()},isPageVisible:function(a){var b;return null!=(b=this.subviews.pages[a])?b.isVisible():void 0},isPageValid:function(a){var b;return null!=(b=this.subviews.pages[a])?b.isValid():void 0},focusFirstError:function(){var b,c;return b=this.invalidPages()[0],this.activatePage(b),c=this.subviews.pages[b].firstViewWithError(),a.scrollTo(0,c.$el.offset().top-this.options.scrollToPadding),c.focus()},invalidPages:function(){var a;return _.filter(function(){a=[];for(var b=1,c=this.numPages;1<=c?b<=c:b>=c;1<=c?b++:b--)a.push(b);return a}.apply(this),function(a){return function(b){return!1===a.isPageValid(b)}}(this))},areAllPagesValid:function(){return 0===this.invalidPages().length},visiblePages:function(){return _.tap([],function(a){return function(b){var c,d,e;d=a.subviews.pages,e=[];for(c in d)d[c],a.isPageVisible(c)?e.push(b.push(parseInt(c,10))):e.push(void 0);return e}}(this))},isFirstPage:function(){var a;return!(a=this.visiblePages()[0])||this.state.get("activePage")===a},isLastPage:function(){var a;return!(a=_.last(this.visiblePages()))||this.state.get("activePage")===a},previousPage:function(){return this.visiblePages()[_.indexOf(this.visiblePages(),this.state.get("activePage"))-1]},nextPage:function(){return this.visiblePages()[_.indexOf(this.visiblePages(),this.state.get("activePage"))+1]},handlePreviousPage:function(){return this.activatePage(this.previousPage())},handleNextPage:function(){return this.isLastPage()||!this.options.enablePages?this.submit():this.activatePage(this.nextPage())},queryParams:function(){return b.queryParams(document.location.search)},loadParams:function(){return _.extend({v:0,response_id:this.options.response.id,project_id:this.options.project_id,responder_language:this.options.responderLanguage,query_params:this.queryParams()},this.followUpFormParams())},saveParams:function(){return _.extend(this.loadParams(),{skip_validation:this.options.skipValidation},this.options.saveParams)},followUpFormParams:function(){return this.isRenderingFollowUpForm()?{follow_up_form_id:this.options.follow_up_form_id,initial_response_id:this.options.initial_response_id}:{}},isRenderingFollowUpForm:function(){return!!this.options.follow_up_form_id},responsesChanged:function(){if(this.state.set("hasChanges",!0),this.isSaving)return this.changedWhileSaving=!0},save:function(b){if(null==b&&(b={}),!this.isSaving)return this.requests+=1,this.isSaving=!0,this.changedWhileSaving=!1,d.ajax({url:this.options.screendoorBase+"/api/form_renderer/save",type:"post",contentType:"application/json",dataType:"json",data:JSON.stringify(_.extend(this.saveParams(),{raw_responses:this.getValue(),submit:!!b.submit||void 0})),headers:_.extend(this.serverHeaders,this.authorizationHeader()),complete:function(a){return function(){return a.requests-=1,a.isSaving=!1,a.trigger("afterSave")}}(this),success:function(c){return function(d,e,f){var g;return null!=f.getResponseHeader("jwt_token")&&(a.sessionStorage.jwtToken=f.getResponseHeader("jwt_token")),c.state.set({hasChanges:c.changedWhileSaving,hasServerErrors:!1}),c.options.response.id=d.response_id,null!=(g=b.cb)?g.apply(c,arguments):void 0}}(this),error:function(a){return function(b){var c,d,e,f,g,h;if(a.state.set({hasServerErrors:!0,serverErrorText:null!=(c=b.responseJSON)?c.error:void 0,serverErrorKey:null!=(d=b.responseJSON)?d.error_key:void 0,submitting:!1}),"Token expired. Verify identity."===(null!=(e=b.responseJSON)?e.error:void 0))return a.$el.html(JST["partials/verify"]({template:null!=(f=b.responseJSON)?f.template:void 0,href:null!=(g=b.responseJSON)?g.verify_api_endpoint:void 0,button:null!=(h=b.responseJSON)?h.verify_email_button:void 0})),a.maybe_delete_jwt_token(b)}}(this)})},waitForRequests:function(a){return this.requests>0?setTimeout(function(b){return function(){return b.waitForRequests(a)}}(this),100):a()},submit:function(a){if(null==a&&(a={}),a.skipValidation||this.options.skipValidation||this.validate())return this.state.set("submitting",!0),this.waitForRequests(function(a){return function(){return a.options.preview?a._preview():a.save({submit:!0,cb:function(){return a.trigger("afterSubmit"),a._afterSubmit()}})}}(this))},_afterSubmit:function(){var b,c;return c=this.options.afterSubmit,"function"==typeof c?c.call(this):"string"==typeof c?a.location=c.replace(":id",this.options.response.id.split(",")[0]):"object"==typeof c&&"page"===c.method?(b=d(""+c.html+"
"),this.$el.replaceWith(b)):console.log("[FormRenderer] Not sure what to do...")},_preview:function(){var b;return b=function(b){return function(){return a.location=b.options.preview.replace(":id",b.options.response.id.split(",")[0])}}(this),!this.state.get("hasChanges")&&this.options.response.id?b():this.save({cb:b})},reflectConditions:function(){var a,b,c,d;c=this.subviews.pages;for(b in c)a=c[b],a.reflectConditions();return null!=(d=this.subviews.pagination)?d.render():void 0}}),b.BUTTON_CLASS="fr_button",b.DEFAULT_LAT_LNG=[40.7700118,-73.9800453],b.MAPBOX_URL="https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js",b.EMAIL_REGEX=/^\s*([^@\s]{1,64})@((?:[-a-z0-9]+\.)+[a-z]{2,})\s*$/i,b.ADD_ROW_ICON="+",b.REMOVE_ROW_ICON="-",b.REMOVE_ENTRY_LINK_CLASS="fr_group_entry_remove",b.REMOVE_ENTRY_LINK_HTML="Remove",b.Views={},b.Models={},b.Plugins={},b.Validators={EmailValidator:{VALID_REGEX:b.EMAIL_REGEX}},b.addPlugin=function(a){return this.prototype.defaults.plugins.push(a)},b.removePlugin=function(a){return this.prototype.defaults.plugins=_.without(this.prototype.defaults.plugins,a)}}.call(this),function(){FormRenderer.formComponentViewClass=function(a){var b;return a.group?FormRenderer.Views.ResponseFieldRepeatingGroup:(b=FormRenderer.Views["ResponseField"+e.classify(a.field_type)])?b:FormRenderer.Views.ResponseField},FormRenderer.buildFormComponentView=function(a,b){return new(FormRenderer.formComponentViewClass(a))({model:a,form_renderer:b})},FormRenderer.formComponentModelClass=function(a){return FormRenderer.Models["ResponseField"+e.classify(a.field_type)]},FormRenderer.buildFormComponentModel=function(a,b,c){return new(FormRenderer.formComponentModelClass(a))(a,b,c)}}.call(this),function(){var a,b,c,d,e;b=["a","p","br","b","strong","em","i"],a=["href","target"],c=function(a){var b;return b=/(^|[\s\n]|
)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,a.replace(b,"$1$2")},e=function(a){return null==a&&(a=""),(""+a).replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1
$2")},d=function(c){return DOMPurify.sanitize(c,{ALLOWED_TAGS:b,ALLOWED_ATTR:a})},FormRenderer.formatAndSanitizeHTML=function(a){return d(c(e(a)))}}.call(this),function(){FormRenderer.getLength=function(a,b){var c;return c=e.trim(b),"words"===a?(c.replace(/['";:,.?¿\-!¡]+/g,"").match(/\S+/g)||"").length:c.length}}.call(this),function(){FormRenderer.normalizeNumber=function(a,b){var c;return c=a.replace(/,/g,"").replace(/-/g,"").replace(/^\+/,"").trim(),b&&(c=c.replace(new RegExp(b+"$","i"),"").trim()),c}}.call(this),function(){FormRenderer.queryParams=function(a){return a.substring(1).split("&").filter(function(a){return""!==a}).reduce(function(a,b){return b=b.split("="),2===b.length&&(a[b[0]]=b[1]),a},{})}}.call(this),function(){FormRenderer.toBoolean=function(a){return _.contains(["True","Yes","true","1",1,"yes",!0],a)}}.call(this),function(){FormRenderer.VERSION="1.4.1"}.call(this),function(){var a;a=["US","GB","CA"],FormRenderer.ORDERED_COUNTRIES=_.uniq(_.union(a,[void 0],_.keys(c))),FormRenderer.PROVINCES_CA=["Alberta","British Columbia","Labrador","Manitoba","New Brunswick","Newfoundland","Nova Scotia","Nunavut","Northwest Territories","Ontario","Prince Edward Island","Quebec","Saskatchewen","Yukon"],FormRenderer.PROVINCES_US=["Alabama","Alaska","American Samoa","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District Of Columbia","Federated States Of Micronesia","Florida","Georgia","Guam","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Marshall Islands","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Northern Mariana Islands","Ohio","Oklahoma","Oregon","Palau","Pennsylvania","Puerto Rico","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virgin Islands","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]}.call(this),function(){var a,b=[].indexOf||function(a){for(var b=0,c=this.length;b-1},c.prototype.method_not=function(){return!this.method_eq()},c.prototype.method_does_not_contain=function(){return!this.method_contains()},c.prototype.method_gt=function(){return parseFloat(this.value)>parseFloat(this.condition.value)},c.prototype.method_lt=function(){return parseFloat(this.value)parseInt(this.condition.value,10)},c.prototype.method_present=function(){return!!this.value.match(/\S/)},c.prototype.method_blank=function(){return!this.method_present()},c.prototype.length=function(){return FormRenderer.getLength(this.responseField.getLengthValidationUnits(),this.value)},c.prototype.isValid=function(){var c;return this.responseField&&_.all(["response_field_id","method"],function(a){return function(b){return a.condition[b]}}(this))&&(c=this.condition.method,b.call(a,c)>=0||this.condition.value)},c.prototype.isVisible=function(){var c,d,e,f;return!(null==(c=this.responseField)||null==(d=c.fr)||null==(e=d.options)||!e.skipConditions)||(!this.isValid()||(f=this.condition.method,b.call(a,f)>=0?this["method_"+this.condition.method]():this.method_present()&&this["method_"+this.condition.method]()))},c}()}.call(this),function(){FormRenderer.Models.BaseFormComponent=Backbone.DeepModel.extend({initialize:function(a,b,c){return this.fr=b,this.parent=c,this.calculateVisibility()},sync:function(){},validateComponent:function(){},setExistingValue:function(){},shouldPersistValue:function(){return this.isVisible&&(this.group||this.input_field)},getConditions:function(){return this.get("conditions")||[]},isRequired:function(){return this.get("required")},isConditional:function(){return this.getConditions().length>0},parentGroupIsHidden:function(){return null!=this.parent.repeatingGroup&&!this.parent.repeatingGroup.isVisible},calculateVisibilityIsChanged:function(){var a;return a=!!this.isVisible,this.calculateVisibility(),a!==this.isVisible},calculateVisibility:function(){return this.isVisible=this._calculateIsVisible()},_calculateIsVisible:function(){return!this.renderingRespondentForm()||this.satisfiesConditions(this.parent.formComponents)},satisfiesConditions:function(a){return!this.isConditional()||_[this.conditionMethod()](this.getConditions(),function(b){return function(b){var c;return c=new FormRenderer.ConditionChecker(a.get(b.response_field_id),b),c.isVisible()}}())},conditionMethod:function(){return"any"===this.get("condition_method")?"any":"all"},renderingRespondentForm:function(){return!!this.fr}})}.call(this),function(){var a,b=[].indexOf||function(a){for(var b=0,c=this.length;b0)return this.errors.join(" ")},calculateLength:function(){return this.set("currentLength",FormRenderer.getLength(this.getLengthValidationUnits(),this.get("value")))},getLengthValidationUnits:function(){return this.get("min_max_length_units")||"characters"},setExistingValue:function(a){if(null!=a&&this.set("value",a),this.hasLengthValidation())return this.calculateLength()},getValue:function(){return this.get("value")||this.defaultValue()},defaultValue:function(){return"hash"===this.valueType?{}:"string"===this.valueType?"":void 0},toText:function(){return this.getValue()},hasValue:function(){return"hash"===this.valueType?_.some(this.get("value")||{},function(a){return function(c,d){return!(b.call(a.ignoreKeysWhenCheckingPresence(),d)>=0||!c)}}(this)):!!this.get("value")},getOptions:function(){return this.get("options")||[]},getColumns:function(){return this.get("columns")||[]},getSize:function(){return this.get("size")||"small"},sizeToHeaderTag:function(){return{large:"h2",medium:"h3",small:"h4"}[this.getSize()]}}),FormRenderer.Views.ResponseField=Backbone.View.extend({className:"fr_response_field",events:{"blur input, textarea, select":"_onBlur"},initialize:function(a){return this._sharedInitialize(a),this.listenTo(this.model,"afterValidate",this.render),this.listenTo(this.model,"change",this._onInput),this.listenTo(this.model,"change:currentLength",this.auditLength),this.listenTo(this.model,"change:error",this.toggleErrorModifier),this.$el.addClass("fr_response_field_"+this.model.field_type)},_onBlur:function(b){if(this.model.hasValue())return setTimeout(function(b){return function(){var c;if(c=document.activeElement,!d.contains(b.el,c))return a(c)?d(document).one("mouseup",function(){return b.model.validateComponent()}):b.model.validateComponent()}}(this),1)},_onInput:function(){if(this.model.errors.length>0)return this.model.validateComponent({clearOnly:!0})},focus:function(){return this.$el.find(":input:eq(0)").focus()},auditLength:function(){var a,b;if(this.model.hasLengthValidation()&&(a=this.$el.find(".fr_length_counter"))[0])return b=this.model.validateLength(),"short"===b?a.addClass("is_short").removeClass("is_long"):"long"===b?a.addClass("is_long").removeClass("is_short"):a.removeClass("is_short is_long")},toggleErrorModifier:function(){return this.$el[this.model.getError()?"addClass":"removeClass"]("error")},partialName:function(){return this.model.input_field?"response_field":"non_input_response_field"},render:function(){var a;return this.$el.html(JST["partials/"+this.partialName()](this)),rivets.bind(this.$el,{model:this.model}),this.auditLength(),null!=(a=this.form_renderer)&&a.trigger("viewRendered",this),this}})}.call(this),function(){FormRenderer.Models.NonInputResponseField=FormRenderer.Models.ResponseField.extend({input_field:!1,validateComponent:function(){}})}.call(this),function(){FormRenderer.Models.ResponseFieldRepeatingGroup=FormRenderer.Models.BaseFormComponent.extend({group:!0,field_type:"repeating_group",initialize:function(){return FormRenderer.Models.BaseFormComponent.prototype.initialize.apply(this,arguments),this.entries=[]},validateComponent:function(){var a,b,c,d,e;for(d=this.entries,e=[],b=0,c=d.length;bb&&(a=a.substr(0,b).trim()+"…"),a},maxEntries:function(){return this.get("maxentries")?parseInt(this.get("maxentries"),10)||1/0:1/0},canAdd:function(){return this.entries.length1}}),FormRenderer.Views.ResponseFieldRepeatingGroup=Backbone.View.extend({className:"fr_response_field fr_response_field_group",events:{"click .js-remove-entry":"removeEntry","click .js-add-entry":"addEntry","click .js-skip":"toggleSkip"},initialize:function(a){return this._sharedInitialize(a),this.on("shown",function(a){return function(){var b,c,d,e,f;for(e=a.views,f=[],c=0,d=e.length;c0&&this.$el.addClass("is_truncated"),rivets.bind(this.$el,{model:this.model}),this.$el.find(".fr_group_entries").append(a),null!=(i=this.form_renderer)&&i.trigger("viewRendered",this),this}}),FormRenderer.Views.ResponseFieldRepeatingGroupEntry=Backbone.View.extend({className:"fr_group_entry",initialize:function(a){return this.entry=a.entry,this.form_renderer=a.form_renderer,this.idx=a.idx,this.views=[],this.on("shown",function(a){return function(){var b,c,d,e,f;for(e=a.views,f=[],c=0,d=e.length;c0||this.get("value.other_checked")}}),FormRenderer.Views.ResponseFieldCheckboxes=FormRenderer.Views.ResponseField.extend({wrapper:"fieldset",field_type:"checkboxes"})}.call(this),function(){FormRenderer.Models.ResponseFieldConfirm=FormRenderer.Models.ResponseField.extend({field_type:"confirm",wrapper:"none",getValue:function(){return this.get("value")||!1},setExistingValue:function(a){if(null!=a)return this.set("value",a)},toText:function(){return this.get("value")?"Yes":"No"}}),FormRenderer.Views.ResponseFieldConfirm=FormRenderer.Views.ResponseField.extend({wrapper:"none",field_type:"confirm"})}.call(this),function(){FormRenderer.Models.ResponseFieldDate=FormRenderer.Models.ResponseField.extend({wrapper:"fieldset",field_type:"date",valueType:"hash",toText:function(){return _.values(_.pick(this.getValue(),"month","day","year")).join("/")},validateType:function(){var a,b,c,d,e,f;if(f=this.get("disable_year")?2e3:parseInt(this.get("value.year"),10)||0,a=parseInt(this.get("value.day"),10)||0,e=parseInt(this.get("value.month"),10)||0,c=1===new Date(f,1,29).getMonth()?29:28,b=[31,c,31,30,31,30,31,31,30,31,30,31],d=b[e-1],!(f>0&&06?"seven_plus":a>3?"four_six":"one_three"}})}.call(this),function(){FormRenderer.Models.ResponseFieldPageBreak=FormRenderer.Models.NonInputResponseField.extend({field_type:"page_break"}),FormRenderer.Views.ResponseFieldPageBreak=FormRenderer.Views.ResponseField.extend({field_type:"page_break"})}.call(this),function(){FormRenderer.Models.ResponseFieldParagraph=FormRenderer.Models.ResponseField.extend({field_type:"paragraph"}),FormRenderer.Views.ResponseFieldParagraph=FormRenderer.Views.ResponseField.extend({field_type:"paragraph"})}.call(this),function(){FormRenderer.Models.ResponseFieldPhone=FormRenderer.Models.ResponseField.extend({field_type:"phone",valueType:"string",validateType:function(){var a,b,c,d;if(b="us"===this.get("phone_format"),c=b?10:7,a=(null!=(d=this.get("value").match(/\d/g))?d.join(""):void 0)||"",!(a.length>=c))return b?"us_phone":"phone"}}),FormRenderer.Views.ResponseFieldPhone=FormRenderer.Views.ResponseField.extend({phonePlaceholder:function(){if("us"===this.model.get("phone_format"))return"(xxx) xxx-xxxx"}})}.call(this),function(){FormRenderer.Models.ResponseFieldPrice=FormRenderer.Models.ResponseField.extend({wrapper:"fieldset",field_type:"price",valueType:"hash",toText:function(){return(this.getValue().dollars||"0")+"."+(this.getValue().cents||"00")},validateType:function(){var a;if(a=[],this.get("value.dollars")&&a.push((""+this.get("value.dollars")).replace(/,/g,"").replace(/^\$/,"")),this.get("value.cents")&&a.push(""+this.get("value.cents")),!_.every(a,function(a){return a.match(/^-?\d+$/)}))return"price"}}),FormRenderer.Views.ResponseFieldPrice=FormRenderer.Views.ResponseField.extend({events:_.extend({},FormRenderer.Views.ResponseField.prototype.events,{'blur [data-rv-input="model.value.cents"]':"formatCents"}),formatCents:function(a){var b;if((b=d(a.target).val())&&b.match(/^\d$/))return this.model.set("value.cents","0"+b)}})}.call(this),function(){FormRenderer.Models.ResponseFieldRadio=FormRenderer.Models.ResponseFieldCheckboxes.extend({field_type:"radio",wrapper:"fieldset"}),FormRenderer.Views.ResponseFieldRadio=FormRenderer.Views.ResponseField.extend({wrapper:"fieldset",field_type:"radio"})}.call(this),function(){FormRenderer.Models.ResponseFieldSectionBreak=FormRenderer.Models.NonInputResponseField.extend({field_type:"section_break"}),FormRenderer.Views.ResponseFieldSectionBreak=FormRenderer.Views.ResponseField.extend({field_type:"section_break"})}.call(this),function(){FormRenderer.Models.ResponseFieldTable=FormRenderer.Models.ResponseField.extend({field_type:"table",initialize:function(){if(FormRenderer.Models.ResponseField.prototype.initialize.apply(this,arguments),this.get("column_totals"))return this.listenTo(this,"change:value.*",this.calculateColumnTotals)},canAddRows:function(){return this.numRows()=c;0<=c?a++:a--)k.push(a);return k}.apply(this),function(b){var d;return c.getPresetValue(f.label,b)||(null!=a&&null!=(d=a[f.label])?d[b]:void 0)}),j.push(d.push(e));return j}}(this)))},numRows:function(){var a;return a=this.get("value"),null!=a&&a.length?Math.max(this.minRows(),a[0].length||0,1):0},hasValue:function(){return _.some(this.getValue(),function(a){return function(b,c){return _.some(b,function(b,d){return!a.getPresetValue(c,d)&&!!b})}}(this))},getPresetValue:function(a,b){var c,d;return null!=(c=this.get("preset_values"))&&null!=(d=c[a])?d[b]:void 0},getValue:function(){return _.tap({},function(a){return function(b){var c,d,e,f,g,h,i;for(h=a.getColumns(),i=[],e=f=0,g=h.length;f=f;d=0<=f?++a:--a)g.push(b[c.label].push(this.get("value."+e+"."+d)||""));return g}.call(a));return i}}(this))},toText:function(){return _.flatten(_.values(this.getValue())).join(" ")},calculateColumnTotals:function(){var a,b,c,d,e,f,g,h,i,j;for(h=this.getColumns(),j=[],d=e=0,g=h.length;e=i;c=0<=i?++f:--f)b.push(parseFloat((this.get("value."+d+"."+c)||"").replace(/\$?,?/g,"")));a=_.reduce(b,function(a,b){return _.isNaN(b)?a:a+b},0),j.push(this.set("columnTotals."+d,this.formatColumnSum(a)))}return j},formatColumnSum:function(a){var b,c,d;return a>0?(b=parseFloat(a.toFixed(10)),c=(null!=(d=(""+b).split(".")[1])?d.length:void 0)||0,e.numberFormat(b,c,".",",")):""}}),FormRenderer.Views.ResponseFieldTable=FormRenderer.Views.ResponseField.extend({events:_.extend({},FormRenderer.Views.ResponseField.prototype.events,{"click .js-add-row":"addRow","click .js-remove-row":"removeRow"}),canRemoveRow:function(a){var b;return b=Math.max(1,this.model.minRows()),a>b-1},addRow:function(a){var b,c,d,e;a.preventDefault(),c={},e=this.model.get("value");for(b in e)d=e[b],c[b]=d.concat("");return this.model.set("value",c),this.render()},removeRow:function(a){var b,c,e,f,g;a.preventDefault(),c=d(a.currentTarget).closest("[data-row-index]").data("row-index"),e={},g=this.model.get("value");for(b in g)f=g[b],e[b]=_.tap([],function(a){var b,d,e;e=[];for(b in f)d=f[b],parseInt(b,10)!==c?e.push(a.push(d)):e.push(void 0);return e});return this.model.set("value",e),this.render()}})}.call(this),function(){FormRenderer.Models.ResponseFieldText=FormRenderer.Models.ResponseField.extend({field_type:"text",valueType:"string"}),FormRenderer.Views.ResponseFieldText=FormRenderer.Views.ResponseField.extend({field_type:"text"})}.call(this),function(){FormRenderer.Models.ResponseFieldTime=FormRenderer.Models.ResponseField.extend({field_type:"time",wrapper:"fieldset",valueType:"hash",ignoreKeysWhenCheckingPresence:function(){return["am_pm"]},setExistingValue:function(a){if(FormRenderer.Models.ResponseField.prototype.setExistingValue.apply(this,arguments),!(null!=a?a.am_pm:void 0))return this.set("value.am_pm","AM")},toText:function(){return(this.getValue().hours||"00")+":"+(this.getValue().minutes||"00")+":"+(this.getValue().seconds||"00")+" "+this.getValue().am_pm},validateType:function(){var a,b,c;if(a=parseInt(this.get("value.hours"),10),b=parseInt(this.get("value.minutes"),10),c=parseInt(this.get("value.seconds"),10)||0,!(1<=a&&a<=12&&0<=b&&b<=59&&0<=c&&c<=59))return"time"}}),FormRenderer.Views.ResponseFieldTime=FormRenderer.Views.ResponseField.extend({wrapper:"fieldset",field_type:"time"})}.call(this),function(){FormRenderer.Models.ResponseFieldWebsite=FormRenderer.Models.ResponseField.extend({field_type:"website",valueType:"string"}),FormRenderer.Views.ResponseFieldWebsite=FormRenderer.Views.ResponseField.extend({field_type:"website"})}.call(this),function(){var a;a={validateType:function(){},validationFns:["validateType","validateInteger","validateLength","validateMinMax"],validateComponent:function(a){var b,c,d,e,f,g,h;if(null==a&&(a={}),d=this.get("error"),this.errors=[],this.isVisible&&!this.parentGroupIsHidden()){if(this.hasValue())for(h=this.validationFns,f=0,g=h.length;fb?"long":void 0},hasMinMaxValidation:function(){var a;return("number"===(a=this.field_type)||"price"===a)&&(this.get("min")||this.get("max"))},validateMinMax:function(){var a,b,c;if(this.hasMinMaxValidation())return b=this.get("min")&&parseFloat(this.get("min")),a=this.get("max")&&parseFloat(this.get("max")),c="price"===this.field_type?parseFloat((this.get("value.dollars")||0)+"."+(this.get("value.cents")||0)):parseFloat(this.get("value").replace(/,/g,"")),b&&ca?"large":void 0}},_.extend(FormRenderer.Models.ResponseField.prototype,a)}.call(this),function(){var a;a={_sharedInitialize:function(a){return this.form_renderer=a.form_renderer,this.model=a.model,this.model.id&&this.$el.addClass("fr_response_field_"+this.model.id),this.showLabels=this.form_renderer?this.form_renderer.options.showLabels:this.showLabels=a.showLabels},reflectConditions:function(){return this.model.isVisible?this.$el.show():this.$el.hide()},domId:function(){return this.model.cid},getDomId:function(){return domId}},_.extend(FormRenderer.Views.ResponseFieldRepeatingGroup.prototype,a),_.extend(FormRenderer.Views.ResponseField.prototype,a)}.call(this),function(){var a;a={getValue:function(){return _.tap({},function(a){return function(b){return a.formComponents.each(function(a){if(a.shouldPersistValue())return b[a.get("id")]=a.getValue()})}}(this))},initFormComponents:function(a,b){var c,d,e,f;for(this.formComponents=new Backbone.Collection,this.response_fields=this.formComponents,e=0,f=a.length;e0})},isVisible:function(){return _.any(this.models,function(a){return a.isVisible})},isValid:function(){return!this.firstViewWithError()}})}.call(this),function(){FormRenderer.Views.Pagination=Backbone.View.extend({events:{"click [data-activate-page]":function(a){return a.preventDefault(),this.form_renderer.activatePage(d(a.currentTarget).data("activate-page"))}},initialize:function(a){return this.form_renderer=a.form_renderer,this.listenTo(this.form_renderer.state,"change:activePage",this.render),this.listenTo(this.form_renderer,"afterValidate",this.render)},render:function(){return this.$el.html(JST["partials/pagination"](this)),this.form_renderer.trigger("viewRendered",this),this}})}.call(this),FormRenderer.FILE_TYPES={images:["bmp","gif","jpg","jpeg","png","psd","tif","tiff"],videos:["m4v","mp4","mov","mpg"],audio:["m4a","mp3","wav"],docs:["doc","docx","pdf","rtf","txt"],spreadsheets:["csv","xls","xlsx"],presentations:["ppt","pptx"],pdfs:["pdf"]};var f={address:"Address",add_another:"Add another",answer:"Answer this question",back_to_page:"Back to page :num",blind:"Blind",bookmark_hint:"To finish your response later, copy the link below.",cents:"Cents",characters:"characters",choose_an_option:"Choose an option",city:"City",clear:"Clear",click_to_set:"Click to set location",coordinates:"Coordinates",country:"Country",dollars:"Dollars",email:"Email",enter_at_least:"Enter at least :min",enter_between:"Enter between :min and :max",enter_exactly:"Enter :num",enter_up_to:"Enter up to :max",error:"Error",errors:{blank:"This field can't be blank.",date:"Please enter a valid date.",email:"Please enter a valid email address.",identification:"Please enter your name and email address.",integer:"Please enter a whole number.",large:"Your answer is too large.",long:"Your answer is too long.",number:"Please enter a valid number.",phone:"Please enter a valid phone number.",price:"Please enter a valid price.",short:"Your answer is too short.",small:"Your answer is too small.",time:"Please enter a valid time.",us_phone:"Please enter a valid 10-digit phone number."},error_bar:{errors:"Your response has validation errors."},error_filename:"Error reading filename",error_loading:"Error loading form",error_saving:"Error saving",finishing_up:"Finishing up...",finish_later:"Finish this later",has_conditions:"Has conditions",hidden:"Hidden",loading_form:"Loading form...",na:"N/A",name:"Name",next_page:"Next page",not_supported:"Sorry, your browser does not support this embedded form. Please visit :url to fill out this form.",other:"Other",postal_code:"Postal Code",province:"Province",remove:"Remove",saved:"Saved",saving:"Saving...",skip:"Skip this question",skipped:"This question is skipped.",state:"State",state_province_region:"State / Province / Region",submit:"Submit",submitting:"Submitting",thanks:"Thanks for submitting our form!",upload:"Upload a file",uploading:"Uploading...",upload_another:"Upload another file",we_accept:"We'll accept",words:"words",write_here:"Write your answer here",zip_code:"ZIP Code"};"undefined"!=typeof FormRenderer&&(FormRenderer.t=f),a.JST||(a.JST={}),a.JST["fields/address"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],d=this,e=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:d.escape(b))};return function(){var a,d,f,g,h,i,j,k,l;if(a=this.model.get("address_format"),e(b("\n\n")),"city_state"!==a&&"city_state_zip"!==a&&"country"!==a&&(e(b("\n \n
\n \n \n
\n
\n"))),e(b("\n\n")),"country"!==a){if(e(b("\n \n
\n \n \n
\n\n
\n \n\n ")),"US"===(i=this.model.get("value.country"))||"CA"===i){for(e(b("\n \n "))}else e(b("\n \n "));e(b("\n
\n
\n"))}if(e(b("\n\n\n ")),"city_state"!==a&&"country"!==a&&(e(b("\n
\n \n \n
\n "))),e(b("\n\n ")),"city_state"!==a&&"city_state_zip"!==a){for(e(b("\n
\n \n \n
\n "))}e(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/block_of_text"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b(JST["partials/labels"](this))),d(b("\n\n\n ")),d(this.safe(FormRenderer.formatAndSanitizeHTML(this.model.get("description")))),d(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/checkboxes"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;for(f=this.model.getOptions(),a=0,c=f.length;a\n \n ')),d(e.translated_label||e.label),d(b("\n \n"));d(b("\n\n")),this.model.get("include_other_option")&&(d(b("\n \n \n\n \n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/confirm"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/date"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
\n \n \n
\n\n
/
\n\n
\n \n \n
\n\n ')),this.model.get("disable_year")||(d(b("\n
/
\n\n
\n \n \n
\n '))),d(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/dropdown"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;for(d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/email"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/file"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,f,g,h;for(d(b("\n ")),h=this.model.getFiles(),f=0,g=h.length;f\n ")),d(a.filename),d(b("\n \n
\n "));d(b("\n\n\n")),this.model.canAddFile()&&(d(b("\n \n
\n\n
\n\n
\n\n ")),(c=this.model.getAcceptedExtensions())&&(d(b("\n
\n ")),d(FormRenderer.t.we_accept),d(b(" ")),d(e.toSentence(c)),d(b("\n
\n "))),d(b("\n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/identification"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
\n
\n\n ")),this.dontRenderInputs()?(d(b("\n
")),d(this.model.get("value.name")),d(b("\n "))):(d(b("\n
\n "))),d(b("\n
\n\n
\n
\n\n ")),this.dontRenderInputs()?(d(b("\n
")),d(this.model.get("value.email")),d(b("\n "))):(d(b('\n
\n "))),d(b("\n
\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/map_marker"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
\n \n
\n\n
\n ")),d(FormRenderer.t.click_to_set),d(b("\n
\n\n
\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/number"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n\n')),this.model.get("units")&&(d(b("\n \n ")),d(this.model.get("units")),d(b("\n \n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/page_break"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n Page break\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/paragraph"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/phone"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/price"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
$
\n\n
\n \n \n
\n\n ")),this.model.get("disable_cents")||(d(b("\n
.
\n
\n \n \n
\n '))),d(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/radio"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;for(f=this.model.getOptions(),a=0,c=f.length;a\n \n ')),d(e.translated_label||e.label),d(b("\n \n"));d(b("\n\n")),this.model.get("include_other_option")&&(d(b("\n \n \n\n \n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/section_break"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a;d(b(JST["partials/labels"](this))),d(b("\n\n")),a=FormRenderer.formatAndSanitizeHTML(this.model.get("description")),d(b("\n<")),d(this.model.sizeToHeaderTag()),d(b(">")),d(this.model.get("label")),d(b("")),d(this.model.sizeToHeaderTag()),d(b(">\n")),a&&(d(b("\n \n ")),d(this.safe(a)),d(b("\n
\n"))),d(b("\n\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/table"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f,g,h,i,j,k,l,m,n,o,p;for(d(b("\n \n \n ")),m=this.model.getColumns(),f=0,h=m.length;f")),d(a.translated_label||a.label),d(b("\n "));for(d(b("\n\n | \n
\n \n\n \n ")),c=g=0,n=this.model.numRows()-1;0<=n?g<=n:g>=n;c=0<=n?++g:--g){for(d(b('\n \n ')),o=this.model.getColumns(),e=k=0,i=o.length;k\n \n "))):(d(b("\n \n \n "))),d(b("\n | \n "));d(b("\n\n \n ")),this.canRemoveRow(c)&&(d(b("\n \n ")),d(b(FormRenderer.REMOVE_ROW_ICON)),d(b("\n \n "))),d(b("\n | \n
\n "))}if(d(b("\n \n\n ")),this.model.get("column_totals")){for(d(b("\n \n \n ")),p=this.model.getColumns(),e=l=0,j=p.length;l\n "));d(b('\n | \n
\n \n '))}d(b("\n
\n\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/text"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/time"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
\n \n \n
\n\n
:
\n\n
\n \n \n
\n\n ')),this.model.get("disable_seconds")||(d(b("\n
:
\n\n
\n \n \n
\n '))),d(b("\n\n
\n \n
\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/website"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST.main=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n ")),d(FormRenderer.t.loading_form),d(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/description"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.model.get("description")&&(d(b("\n \n ")),d(this.safe(FormRenderer.formatAndSanitizeHTML(this.model.get("description")))),d(b("\n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/email_sent"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("")),d(this.message),d(b("
\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/error"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/label"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/labels"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.showLabels&&(d(b("\n ")),this.model.get("admin_only")&&(d(b("\n ")),d(FormRenderer.t.hidden),d(b("\n "))),d(b("\n ")),this.model.get("blind")&&(d(b("\n ")),d(FormRenderer.t.blind),d(b("\n "))),d(b("\n ")),this.model.isConditional()&&(d(b("\n ")),d(FormRenderer.t.has_conditions),d(b("\n "))),d(b("\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/length_counter"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/length_validations"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e;c=this.model.get("minlength"),d(b("\n")),a=this.model.get("maxlength"),d(b("\n")),e=this.model.getLengthValidationUnits(),d(b("\n\n")),this.model.hasLengthValidation()&&(d(b("\n \n \n ")),c&&a?(d(b("\n ")),c===a?(d(b("\n ")),d(FormRenderer.t.enter_exactly.replace(":num",c)),d(b(" ")),d(FormRenderer.t[e]),d(b(".\n "))):(d(b("\n ")),d(FormRenderer.t.enter_between.replace(":min",c).replace(":max",a)),d(b(" ")),d(FormRenderer.t[e]),d(b(".\n "))),d(b("\n "))):c?(d(b("\n ")),d(FormRenderer.t.enter_at_least.replace(":min",c)),d(b(" ")),d(FormRenderer.t[e]),d(b(".\n "))):a&&(d(b("\n ")),d(FormRenderer.t.enter_up_to.replace(":max",a)),d(b(" ")),d(FormRenderer.t[e]),d(b(".\n "))),d(b("\n \n\n ")),d(b(JST["partials/length_counter"](this))),d(b("\n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/min_max_validations"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c;this.model.hasMinMaxValidation()&&(d(b("\n ")),c=this.model.get("min"),d(b("\n ")),a=this.model.get("max"),d(b("\n\n \n ")),c&&a?(d(b("\n ")),d(FormRenderer.t.enter_between.replace(":min",c).replace(":max",a)),d(b(".\n "))):c?(d(b("\n ")),d(FormRenderer.t.enter_at_least.replace(":min",c)),d(b(".\n "))):a&&(d(b("\n ")),d(FormRenderer.t.enter_up_to.replace(":max",a)),d(b(".\n "))),d(b("\n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/non_input_response_field"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b(JST["fields/"+this.model.field_type](this))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/pagination"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f,g;if(this.form_renderer.visiblePages().length>1){for(d(b("\n \n"))}d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/repeating_group"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/repeating_group_entry"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("")),d(this.idx+1),d(b("
\n\n\n
\n\n")),this.entry.canRemove()&&(d(b("\n ")),d(b(FormRenderer.REMOVE_ENTRY_LINK_HTML)),d(b("\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/required"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.model.get("required")&&d(b(" *")),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/response_field"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){"fieldset"===this.model.wrapper?(d(b("\n \n"))):"label"===this.model.wrapper?(d(b("\n ")),d(b(JST["partials/label"](this))),d(b("\n \n ")),d(b(JST["fields/"+this.model.field_type](this))),d(b("\n
\n"))):(d(b("\n \n ")),d(b(JST["fields/"+this.model.field_type](this))),d(b("\n
\n"))),d(b("\n\n")),d(b(JST["partials/length_validations"](this))),d(b("\n")),d(b(JST["partials/min_max_validations"](this))),d(b("\n")),d(b(JST["partials/error"](this))),d(b("\n")),d(b(JST["partials/description"](this))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/verify"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
")),d(this.safe(this.template)),d(b("
\n ")),null!=this.href&&(d(b("\n
\n \n
\n "))),d(b("\n
\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["plugins/bookmark_draft"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["plugins/bottom_bar"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;b\n ")),a.call(this.form_renderer.options.plugins,"Autosave")>=0&&(d(b("\n \n ")),this.form_renderer.state.get("hasServerErrors")?(d(b("\n ")),d(this.form_renderer.state.get("serverErrorText")||FormRenderer.t.error_saving),d(b("\n "))):this.form_renderer.state.get("hasChanges")?(d(b("\n ")),d(FormRenderer.t.saving),d(b("\n "))):(d(b("\n ")),d(FormRenderer.t.saved),d(b("\n "))),d(b("\n
\n "))),d(b("\n\n \n ")),this.form_renderer.isFirstPage()||(d(b("\n \n "))),d(b("\n\n ")),this.form_renderer.state.get("submitting")?(d(b("\n \n "))):(d(b("\n \n "))),d(b("\n
\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["plugins/error_bar"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.form_renderer.areAllPagesValid()||(d(b("\n \n ")),d(b(FormRenderer.t.error_bar.errors)),d(b("\n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())}}(window);
\ No newline at end of file
+!function(Oe){o=function(M){var m={},A=(m.fileapi=void 0!==M("").get(0).files,m.formdata=void 0!==Oe.FormData,!!M.fn.prop);function n(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),M(e.target).ajaxSubmit(t))}function r(e){var t=e.target,n=M(t);if(!n.is("[type=submit],[type=image]")){var r=n.closest("[type=submit]");if(0===r.length)return;t=r[0]}var i=this;"image"==(i.clk=t).type&&(void 0!==e.offsetX?(i.clk_x=e.offsetX,i.clk_y=e.offsetY):"function"==typeof M.fn.offset?(r=n.offset(),i.clk_x=e.pageX-r.left,i.clk_y=e.pageY-r.top):(i.clk_x=e.pageX-t.offsetLeft,i.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function L(){var e;M.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),Oe.console&&Oe.console.log?Oe.console.log(e):Oe.opera&&Oe.opera.postError&&Oe.opera.postError(e))}M.fn.attr2=function(){var e;return A&&((e=this.prop.apply(this,arguments))&&e.jquery||"string"==typeof e)?e:this.attr.apply(this,arguments)},M.fn.ajaxSubmit=function(l){if(this.length){var k,C=this,e=("function"==typeof l?l={success:l}:void 0===l&&(l={}),k=l.type||this.attr2("method"),e=(e=(e="string"==typeof(e=l.url||this.attr2("action"))?M.trim(e):"")||Oe.location.href||"")&&(e.match(/^([^#]+)/)||[])[1],l=M.extend(!0,{url:e,success:M.ajaxSettings.success,type:k||M.ajaxSettings.type,iframeSrc:/^https/i.test(Oe.location.href||"")?"javascript:false":"about:blank"},l),{});if(this.trigger("form-pre-serialize",[this,l,e]),e.veto)L("ajaxSubmit: submit vetoed via form-pre-serialize trigger");else if(l.beforeSerialize&&!1===l.beforeSerialize(this,l))L("ajaxSubmit: submit aborted via beforeSerialize callback");else{var t=l.traditional,E=(void 0===t&&(t=M.ajaxSettings.traditional),[]),n=this.formToArray(l.semantic,E);if(l.data&&(l.extraData=l.data,u=M.param(l.data,t)),l.beforeSubmit&&!1===l.beforeSubmit(n,this,l))L("ajaxSubmit: submit aborted via beforeSubmit callback");else if(this.trigger("form-submit-validate",[n,this,l,e]),e.veto)L("ajaxSubmit: submit vetoed via form-submit-validate trigger");else{var r,i,s,e=M.param(n,t),o=(u&&(e=e?e+"&"+u:u),"GET"==l.type.toUpperCase()?(l.url+=(0<=l.url.indexOf("?")?"&":"?")+e,l.data=null):l.data=e,[]);l.resetForm&&o.push(function(){C.resetForm()}),l.clearForm&&o.push(function(){C.clearForm(l.includeHidden)}),!l.dataType&&l.target?(r=l.success||function(){},o.push(function(e){var t=l.replaceTarget?"replaceWith":"html";M(l.target)[t](e).each(r,arguments)})):l.success&&o.push(l.success),l.success=function(e,t,n){for(var r=l.context||this,i=0,s=o.length;i')).css({position:"absolute",top:"-1000px",left:"-1000px"}),d=h[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";L("aborting upload... "+t),this.aborted=1;try{d.contentWindow.document.execCommand&&d.contentWindow.document.execCommand("Stop")}catch(e){}h.attr("src",u.iframeSrc),p.error=t,u.error&&u.error.call(u.context,p,t,e),c&&M.event.trigger("ajaxError",[p,u,t]),u.complete&&u.complete.call(u.context,p,t)}},(c=u.global)&&0==M.active++&&M.event.trigger("ajaxStart"),c&&M.event.trigger("ajaxSend",[p,u]),u.beforeSend&&!1===u.beforeSend.call(u.context,p,u)?(u.global&&M.active--,w.reject()):p.aborted?w.reject():((e=o.clk)&&(r=e.name)&&!e.disabled&&(u.extraData=u.extraData||{},u.extraData[r]=e.value,"image"==e.type)&&(u.extraData[r+".x"]=o.clk_x,u.extraData[r+".y"]=o.clk_y),g=1,v=2,e=M("meta[name=csrf-token]").attr("content"),(r=M("meta[name=csrf-param]").attr("content"))&&e&&(u.extraData=u.extraData||{},u.extraData[r]=e),u.forceSync?a():setTimeout(a,10),y=50,x=M.parseXML||function(e,t){return Oe.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},s=M.parseJSON||function(e){return Oe.eval("("+e+")")},R=function(e,t,n){var r=e.getResponseHeader("content-type")||"",i="xml"===t||!t&&0<=r.indexOf("xml"),e=i?e.responseXML:e.responseText;return i&&"parsererror"===e.documentElement.nodeName&&M.error&&M.error("parsererror"),"string"==typeof(e=n&&n.dataFilter?n.dataFilter(e,t):e)&&("json"===t||!t&&0<=r.indexOf("json")?e=s(e):("script"===t||!t&&0<=r.indexOf("javascript"))&&M.globalEval(e)),e}),w;function F(t){var n=null;try{t.contentWindow&&(n=t.contentWindow.document)}catch(e){L("cannot get iframe.contentWindow document: "+e)}if(!n)try{n=t.contentDocument||t.document}catch(e){L("cannot get iframe.contentDocument: "+e),n=t.document}return n}function a(){var e=C.attr2("target"),t=C.attr2("action");o.setAttribute("target",i),k&&!/post/i.test(k)||o.setAttribute("method","POST"),t!=u.url&&o.setAttribute("action",u.url),u.skipEncodingOverride||k&&!/post/i.test(k)||C.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),u.timeout&&(m=setTimeout(function(){f=!0,T(g)},u.timeout));var n=[];try{if(u.extraData)for(var r in u.extraData)u.extraData.hasOwnProperty(r)&&(M.isPlainObject(u.extraData[r])&&u.extraData[r].hasOwnProperty("name")&&u.extraData[r].hasOwnProperty("value")?n.push(M('').val(u.extraData[r].value).appendTo(o)[0]):n.push(M('').val(u.extraData[r]).appendTo(o)[0]));u.iframeTarget||h.appendTo("body"),d.attachEvent?d.attachEvent("onload",T):d.addEventListener("load",T,!1),setTimeout(function e(){try{var t=F(d).readyState;L("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(e){L("Server abort: ",e," (",e.name,")"),T(v),m&&clearTimeout(m),m=void 0}},15);try{o.submit()}catch(e){document.createElement("form").submit.apply(o)}}finally{o.setAttribute("action",t),e?o.setAttribute("target",e):C.removeAttr("target"),M(n).remove()}}function T(t){if(!p.aborted&&!S)if((b=F(d))||(L("cannot access response document"),t=v),t===g&&p)p.abort("timeout"),w.reject(p,"timeout");else if(t==v&&p)p.abort("server abort"),w.reject(p,"error","server abort");else if(b&&b.location.href!=u.iframeSrc||f){d.detachEvent?d.detachEvent("onload",T):d.removeEventListener("load",T,!1);var n,t="success";try{if(f)throw"timeout";var e="xml"==u.dataType||b.XMLDocument||M.isXMLDoc(b);if(L("isXml="+e),!e&&Oe.opera&&(null===b.body||!b.body.innerHTML)&&--y)return L("requeing onLoad callback, DOM not available"),void setTimeout(T,250);var r,i,s,o=b.body||b.documentElement,a=(p.responseText=o?o.innerHTML:null,p.responseXML=b.XMLDocument||b,e&&(u.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":u.dataType}[e.toLowerCase()]},o&&(p.status=Number(o.getAttribute("status"))||p.status,p.statusText=o.getAttribute("statusText")||p.statusText),(u.dataType||"").toLowerCase()),l=/(json|script|text)/.test(a);l||u.textarea?(r=b.getElementsByTagName("textarea")[0])?(p.responseText=r.value,p.status=Number(r.getAttribute("status"))||p.status,p.statusText=r.getAttribute("statusText")||p.statusText):l&&(i=b.getElementsByTagName("pre")[0],s=b.getElementsByTagName("body")[0],i?p.responseText=i.textContent||i.innerText:s&&(p.responseText=s.textContent||s.innerText)):"xml"==a&&!p.responseXML&&p.responseText&&(p.responseXML=x(p.responseText));try{_=R(p,a,u)}catch(e){t="parsererror",p.error=n=e||t}}catch(e){L("error caught: ",e),t="error",p.error=n=e||t}p.aborted&&(L("upload aborted"),t=null),"success"===(t=p.status?200<=p.status&&p.status<300||304===p.status?"success":"error":t)?(u.success&&u.success.call(u.context,_,"success",p),w.resolve(p.responseText,"success",p),c&&M.event.trigger("ajaxSuccess",[p,u])):t&&(void 0===n&&(n=p.statusText),u.error&&u.error.call(u.context,p,t,n),w.reject(p,"error",n),c)&&M.event.trigger("ajaxError",[p,u,n]),c&&M.event.trigger("ajaxComplete",[p,u]),c&&!--M.active&&M.event.trigger("ajaxStop"),u.complete&&u.complete.call(u.context,p,t),S=!0,u.timeout&&clearTimeout(m),setTimeout(function(){u.iframeTarget?h.attr("src",u.iframeSrc):h.remove(),p.responseXML=null},100)}}}},M.fn.ajaxForm=function(e){var t;return(e=e||{}).delegation=e.delegation&&M.isFunction(M.fn.on),e.delegation||0!==this.length?e.delegation?(M(document).off("submit.form-plugin",this.selector,n).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,e,n).on("click.form-plugin",this.selector,e,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",e,n).bind("click.form-plugin",e,r):(t={s:this.selector,c:this.context},!M.isReady&&t.s?(L("DOM not ready, queuing ajaxForm"),M(function(){M(t.s,t.c).ajaxForm(e)})):L("terminating; zero elements found by selector"+(M.isReady?"":" (DOM not ready)")),this)},M.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},M.fn.formToArray=function(e,t){var n=[];if(0!==this.length){var r=this[0],i=e?r.getElementsByTagName("*"):r.elements;if(i){for(var s,o,a,l,u,c,h,d=0,p=i.length;d\n \n"),t=this.$input;return this.$input=t.clone().val("").insertBefore(t),this._bindInputChange(),t.appendTo(e),t.attr("name",this.options.name),e.insertBefore(this.$input),e},n.prototype._eventToFilename=function(e){return null!=e.target.files?e.target.files[0].name:e.target.value?e.target.value.replace(/^.+\\/,""):void 0},n.prototype._onChange=function(e){var t;if(this.$input.val())return e={filename:this._eventToFilename(e)},"function"==typeof(t=this.options).start&&t.start(e),this.$input.trigger("inline_file_upload:start",e),this._ajaxUpload()},n.prototype._bindInputChange=function(){return this.$input.on("change",a.proxy(this._onChange,this))},r=n,a.fn.extend({inlineFileUpload:function(){var t=arguments[0],n=2<=arguments.length?N.call(arguments,1):[];return this.each(function(){var e=a(this).data("inline-file-upload");if(e||a(this).data("inline-file-upload",e=new r(a(this),t)),"string"==typeof t)return e[t].apply(e,n)})}}),E=!(o=function(){function p(){for(var e=0,t={};e>>1;n.call(r,e[a])":">",'"':""","'":"'"}}),L=(A.unescape=k.invert(A.escape),{escape:new RegExp("["+k.keys(A.escape).join("")+"]","g"),unescape:new RegExp("("+k.keys(A.unescape).join("|")+")","g")}),P=(k.each(["escape","unescape"],function(t){k[t]=function(e){return null==e?"":(""+e).replace(L[t],function(e){return A[t][e]})}}),k.result=function(e,t){if(null!=e)return t=e[t],k.isFunction(t)?t.call(e):t},k.mixin=function(n){C(k.functions(n),function(e){var t=k[e]=n[e];k.prototype[e]=function(){var e=[this._wrapped];return c.apply(e,arguments),I.call(this,t.apply(k,e))}})},0),j=(k.uniqueId=function(e){var t=++P+"";return e?e+t:t},k.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},/(.)^/),V={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},N=/\\|'|\r|\n|\t|\u2028|\u2029/g,I=(k.template=function(s,e,t){t=k.defaults({},t,k.templateSettings);var n,r=new RegExp([(t.escape||j).source,(t.interpolate||j).source,(t.evaluate||j).source].join("|")+"|$","g"),o=0,a="__p+='";s.replace(r,function(e,t,n,r,i){return a+=s.slice(o,i).replace(N,function(e){return"\\"+V[e]}),t&&(a+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'"),n&&(a+="'+\n((__t=("+n+"))==null?'':__t)+\n'"),r&&(a+="';\n"+r+"\n__p+='"),o=i+e.length,e}),a+="';\n",a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+(a=t.variable?a:"with(obj||{}){\n"+a+"}\n")+"return __p;\n";try{n=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}return e?n(e,k):((r=function(e){return n.call(this,e,k)}).source="function("+(t.variable||"obj")+"){\n"+a+"}",r)},k.chain=function(e){return k(e).chain()},function(e){return this._chain?k(e).chain():e});k.mixin(k),C(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var n=i[t];k.prototype[t]=function(){var e=this._wrapped;return n.apply(e,arguments),"shift"!=t&&"splice"!=t||0!==e.length||delete e[0],I.call(this,e)}}),C(["concat","join","slice"],function(e){var t=i[e];k.prototype[e]=function(){return I.call(this,t.apply(this._wrapped,arguments))}}),k.extend(k.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return k})}.call(this),i=this,s=function(e,o,S,t){var n=e.Backbone,r=[],i=r.slice,s=(o.VERSION="1.1.2",o.$=t,o.noConflict=function(){return e.Backbone=n,this},o.emulateHTTP=!1,o.emulateJSON=!1,o.Events={on:function(e,t,n){return h(this,"on",e,[t,n])&&t&&(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:n,ctx:n||this})),this},once:function(e,t,n){var r,i;return h(this,"once",e,[t,n])&&t?(r=this,(i=S.once(function(){r.off(e,i),t.apply(this,arguments)}))._callback=t,this.on(e,i,n)):this},off:function(e,t,n){var r,i,s,o,a,l,u,c;if(this._events&&h(this,"off",e,[t,n]))if(e||t||n){for(a=0,l=(o=e?[e]:S.keys(this._events)).length;a").attr(e),this.setElement(e,!1))}}),o.sync=function(e,t,n){var r,i=m[e],s=(S.defaults(n=n||{},{emulateHTTP:o.emulateHTTP,emulateJSON:o.emulateJSON}),{type:i,dataType:"json"}),e=(n.url||(s.url=S.result(t,"url")||E()),null!=n.data||!t||"create"!==e&&"update"!==e&&"patch"!==e||(s.contentType="application/json",s.data=JSON.stringify(n.attrs||t.toJSON(n))),n.emulateJSON&&(s.contentType="application/x-www-form-urlencoded",s.data=s.data?{model:s.data}:{}),!n.emulateHTTP||"PUT"!==i&&"DELETE"!==i&&"PATCH"!==i||(s.type="POST",n.emulateJSON&&(s.data._method=i),r=n.beforeSend,n.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",i),r)return r.apply(this,arguments)}),"GET"===s.type||n.emulateJSON||(s.processData=!1),"PATCH"===s.type&&f&&(s.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}),n.xhr=o.ajax(S.extend(s,n)));return t.trigger("request",t,e,n),e},!(void 0===Oe||!Oe.ActiveXObject||Oe.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent)),m={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"},t=(o.ajax=function(){return o.$.ajax.apply(o.$,arguments)},o.Router=function(e){(e=e||{}).routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)}),g=/\((.*?)\)/g,v=/(\(\?)?:\w+/g,_=/\*\w+/g,b=/[\-{}\[\]+?.,\\\^$|#\s]/g,y=(S.extend(t.prototype,s,{initialize:function(){},route:function(t,n,r){S.isRegExp(t)||(t=this._routeToRegExp(t)),S.isFunction(n)&&(r=n,n=""),r=r||this[n];var i=this;return o.history.route(t,function(e){e=i._extractParameters(t,e);i.execute(r,e),i.trigger.apply(i,["route:"+n].concat(e)),i.trigger("route",n,e),o.history.trigger("route",i,n,e)}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,t){return o.history.navigate(e,t),this},_bindRoutes:function(){if(this.routes){this.routes=S.result(this,"routes");for(var e,t=S.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(b,"\\$&").replace(g,"(?:$1)?").replace(v,function(e,t){return t?e:"([^/?]+)"}).replace(_,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var n=e.exec(t).slice(1);return S.map(n,function(e,t){return t===n.length-1?e||null:e?decodeURIComponent(e):null})}}),o.History=function(){this.handlers=[],S.bindAll(this,"checkUrl"),void 0!==Oe&&(this.location=Oe.location,this.history=Oe.history)}),w=/^[#\/]|\s+$/g,F=/^\/+|\/+$/g,T=/msie [\w.]+/,k=/\/$/,C=/#.*$/,E=(y.started=!1,S.extend(y.prototype,s,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){e=(e||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(e,t){return null==e&&(this._hasPushState||!this._wantsHashChange||t?(e=decodeURI(this.location.pathname+this.location.search),t=this.root.replace(k,""),e.indexOf(t)||(e=e.slice(t.length))):e=this.getHash()),e.replace(w,"")},start:function(e){if(y.started)throw new Error("Backbone.history has already been started");y.started=!0,this.options=S.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var e=this.getFragment(),t=document.documentMode,t=T.exec(navigator.userAgent.toLowerCase())&&(!t||t<=7),n=(this.root=("/"+this.root+"/").replace(F,"/"),t&&this._wantsHashChange&&(n=o.$('
"}),d(),document.location.search.match(/respondent_auth_token/))return document.location.search=b.tokenlessQueryParams(document.location.search)}}(this),error:function(a){return function(b){var d,e,f,g,h;return a.corsSupported()?"Token expired. Verify identity."===(null!=(d=b.responseJSON)?d.error:void 0)?(a.$el.html(JST["partials/verify"]({template:null!=(e=b.responseJSON)?e.template:void 0,href:null!=(f=b.responseJSON)?f.verify_api_endpoint:void 0,button:null!=(g=b.responseJSON)?g.verify_email_button:void 0})),a.maybe_delete_jwt_token(b)):(a.$el.find(".fr_loading").text(c.t.error_loading+': "'+((null!=(h=b.responseJSON)?h.error:void 0)||"Unknown")+'"'),a.trigger("errorSaving",b)):a.$el.find(".fr_loading").html(c.t.not_supported.replace(/\:url/g,a.projectUrl()))}}(this)})},initPages:function(){var a,b,d,e,f,g;a=function(a){return function(){return a.subviews.pages[b]=new c.Views.Page({form_renderer:a})}}(this),this.numPages=this.formComponents.where({field_type:"page_break"}).length+1,this.state.set("activePage",1),b=1,a(),this.formComponents.each(function(c){return function(d){return"page_break"===d.get("field_type")?(b++,a()):c.subviews.pages[b].models.push(d)}}(this)),f=this.subviews.pages,g=[];for(e in f)d=f[e],g.push(this.$el.append(d.render().el));return g},initPagination:function(){return this.subviews.pagination=new c.Views.Pagination({form_renderer:this}),this.$el.prepend(this.subviews.pagination.render().el),this.subviews.pages[this.state.get("activePage")].show()},initNoPagination:function(){var a,b,c,d;c=this.subviews.pages,d=[];for(b in c)a=c[b],d.push(a.show());return d},activatePage:function(b){return this.subviews.pages[this.state.get("activePage")].hide(),this.subviews.pages[b].show(),a.scrollTo(0,this.options.scrollToPadding),this.state.set("activePage",b)},validate:function(){var a,b,c;c=this.subviews.pages;for(b in c)a=c[b],a.validate();return this.trigger("afterValidate afterValidate:all"),this.areAllPagesValid()},isPageVisible:function(a){var b;return null!=(b=this.subviews.pages[a])?b.isVisible():void 0},isPageValid:function(a){var b;return null!=(b=this.subviews.pages[a])?b.isValid():void 0},focusFirstError:function(){var b,c;return b=this.invalidPages()[0],this.activatePage(b),c=this.subviews.pages[b].firstViewWithError(),a.scrollTo(0,c.$el.offset().top-this.options.scrollToPadding),c.focus()},invalidPages:function(){var a;return _.filter(function(){a=[];for(var b=1,c=this.numPages;1<=c?b<=c:b>=c;1<=c?b++:b--)a.push(b);return a}.apply(this),function(a){return function(b){return!1===a.isPageValid(b)}}(this))},areAllPagesValid:function(){return 0===this.invalidPages().length},visiblePages:function(){return _.tap([],function(a){return function(b){var c,d,e;d=a.subviews.pages,e=[];for(c in d)d[c],a.isPageVisible(c)?e.push(b.push(parseInt(c,10))):e.push(void 0);return e}}(this))},isFirstPage:function(){var a;return!(a=this.visiblePages()[0])||this.state.get("activePage")===a},isLastPage:function(){var a;return!(a=_.last(this.visiblePages()))||this.state.get("activePage")===a},previousPage:function(){return this.visiblePages()[_.indexOf(this.visiblePages(),this.state.get("activePage"))-1]},nextPage:function(){return this.visiblePages()[_.indexOf(this.visiblePages(),this.state.get("activePage"))+1]},handlePreviousPage:function(){return this.activatePage(this.previousPage())},handleNextPage:function(){return this.isLastPage()||!this.options.enablePages?this.submit():this.activatePage(this.nextPage())},queryParams:function(){return c.queryParams(document.location.search)},loadParams:function(){return _.extend({v:0,response_id:this.options.response.id,project_id:this.options.project_id,responder_language:this.options.responderLanguage,query_params:this.queryParams()},this.followUpFormParams())},saveParams:function(){return _.extend(this.loadParams(),{skip_validation:this.options.skipValidation},this.options.saveParams)},followUpFormParams:function(){return this.isRenderingFollowUpForm()?{follow_up_form_id:this.options.follow_up_form_id,initial_response_id:this.options.initial_response_id}:{}},isRenderingFollowUpForm:function(){return!!this.options.follow_up_form_id},responsesChanged:function(){if(this.state.set("hasChanges",!0),this.isSaving)return this.changedWhileSaving=!0},save:function(c){if(null==c&&(c={}),!this.isSaving)return this.requests+=1,this.isSaving=!0,this.changedWhileSaving=!1,b.ajax({url:this.options.screendoorBase+"/api/form_renderer/save",type:"post",contentType:"application/json",dataType:"json",data:JSON.stringify(_.extend(this.saveParams(),{raw_responses:this.getValue(),submit:!!c.submit||void 0})),headers:_.extend(this.serverHeaders,this.authorizationHeader()),complete:function(a){return function(){return a.requests-=1,a.isSaving=!1,a.trigger("afterSave")}}(this),success:function(b){return function(d,e,f){var g;return null!=f.getResponseHeader("jwt_token")&&(a.sessionStorage.jwtToken=f.getResponseHeader("jwt_token")),b.state.set({hasChanges:b.changedWhileSaving,hasServerErrors:!1}),b.options.response.id=d.response_id,null!=(g=c.cb)?g.apply(b,arguments):void 0}}(this),error:function(a){return function(b){var c,d,e,f,g,h;if(a.state.set({hasServerErrors:!0,serverErrorText:null!=(c=b.responseJSON)?c.error:void 0,serverErrorKey:null!=(d=b.responseJSON)?d.error_key:void 0,submitting:!1}),"Token expired. Verify identity."===(null!=(e=b.responseJSON)?e.error:void 0))return a.$el.html(JST["partials/verify"]({template:null!=(f=b.responseJSON)?f.template:void 0,href:null!=(g=b.responseJSON)?g.verify_api_endpoint:void 0,button:null!=(h=b.responseJSON)?h.verify_email_button:void 0})),a.maybe_delete_jwt_token(b)}}(this)})},waitForRequests:function(a){return this.requests>0?setTimeout(function(b){return function(){return b.waitForRequests(a)}}(this),100):a()},submit:function(a){if(null==a&&(a={}),a.skipValidation||this.options.skipValidation||this.validate())return this.state.set("submitting",!0),this.waitForRequests(function(a){return function(){return a.options.preview?a._preview():a.save({submit:!0,cb:function(){return a.trigger("afterSubmit"),a._afterSubmit()}})}}(this))},_afterSubmit:function(){var c,d;return d=this.options.afterSubmit,"function"==typeof d?d.call(this):"string"==typeof d?a.location=d.replace(":id",this.options.response.id.split(",")[0]):"object"==typeof d&&"page"===d.method?(c=b(""+d.html+"
"),this.$el.replaceWith(c)):console.log("[FormRenderer] Not sure what to do...")},_preview:function(){var b;return b=function(b){return function(){return a.location=b.options.preview.replace(":id",b.options.response.id.split(",")[0])}}(this),!this.state.get("hasChanges")&&this.options.response.id?b():this.save({cb:b})},reflectConditions:function(){var a,b,c,d;c=this.subviews.pages;for(b in c)a=c[b],a.reflectConditions();return null!=(d=this.subviews.pagination)?d.render():void 0}}),c.BUTTON_CLASS="fr_button",c.DEFAULT_LAT_LNG=[40.7700118,-73.9800453],c.MAPBOX_URL="https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js",c.EMAIL_REGEX=/^\s*([^@\s]{1,64})@((?:[-a-z0-9]+\.)+[a-z]{2,})\s*$/i,c.ADD_ROW_ICON="+",c.REMOVE_ROW_ICON="-",c.REMOVE_ENTRY_LINK_CLASS="fr_group_entry_remove",c.REMOVE_ENTRY_LINK_HTML="Remove",c.Views={},c.Models={},c.Plugins={},c.Validators={EmailValidator:{VALID_REGEX:c.EMAIL_REGEX}},c.addPlugin=function(a){return this.prototype.defaults.plugins.push(a)},c.removePlugin=function(a){return this.prototype.defaults.plugins=_.without(this.prototype.defaults.plugins,a)}}.call(this),function(){FormRenderer.formComponentViewClass=function(a){var b;return a.group?FormRenderer.Views.ResponseFieldRepeatingGroup:(b=FormRenderer.Views["ResponseField"+c.classify(a.field_type)])?b:FormRenderer.Views.ResponseField},FormRenderer.buildFormComponentView=function(a,b){return new(FormRenderer.formComponentViewClass(a))({model:a,form_renderer:b})},FormRenderer.formComponentModelClass=function(a){return FormRenderer.Models["ResponseField"+c.classify(a.field_type)]},FormRenderer.buildFormComponentModel=function(a,b,c){return new(FormRenderer.formComponentModelClass(a))(a,b,c)}}.call(this),function(){var a,b,c,d,e;b=["a","p","br","b","strong","em","i"],a=["href","target"],c=function(a){var b;return b=/(^|[\s\n]|
)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,a.replace(b,"$1$2")},e=function(a){return null==a&&(a=""),(""+a).replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1
$2")},d=function(c){return DOMPurify.sanitize(c,{ALLOWED_TAGS:b,ALLOWED_ATTR:a})},FormRenderer.formatAndSanitizeHTML=function(a){return d(c(e(a)))}}.call(this),function(){FormRenderer.getLength=function(a,b){var d;return d=c.trim(b),"words"===a?(d.replace(/['";:,.?¿\-!¡]+/g,"").match(/\S+/g)||"").length:d.length}}.call(this),function(){FormRenderer.normalizeNumber=function(a,b){var c;return c=a.replace(/,/g,"").replace(/-/g,"").replace(/^\+/,"").trim(),b&&(c=c.replace(new RegExp(b+"$","i"),"").trim()),c}}.call(this),function(){FormRenderer.queryParams=function(a){return a.substring(1).split("&").filter(function(a){return""!==a}).reduce(function(a,b){return b=b.split("="),2===b.length&&(a[b[0]]=b[1]),a},{})}}.call(this),function(){FormRenderer.toBoolean=function(a){return _.contains(["True","Yes","true","1",1,"yes",!0],a)}}.call(this),function(){FormRenderer.VERSION="1.4.1"}.call(this),function(){var a;a=["US","GB","CA"],FormRenderer.ORDERED_COUNTRIES=_.uniq(_.union(a,[void 0],_.keys(ISOCountryNames))),FormRenderer.PROVINCES_CA=["Alberta","British Columbia","Labrador","Manitoba","New Brunswick","Newfoundland","Nova Scotia","Nunavut","Northwest Territories","Ontario","Prince Edward Island","Quebec","Saskatchewen","Yukon"],FormRenderer.PROVINCES_US=["Alabama","Alaska","American Samoa","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District Of Columbia","Federated States Of Micronesia","Florida","Georgia","Guam","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Marshall Islands","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Northern Mariana Islands","Ohio","Oklahoma","Oregon","Palau","Pennsylvania","Puerto Rico","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virgin Islands","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]}.call(this),function(){var a,b=[].indexOf||function(a){for(var b=0,c=this.length;b-1},c.prototype.method_not=function(){return!this.method_eq()},c.prototype.method_does_not_contain=function(){return!this.method_contains()},c.prototype.method_gt=function(){return parseFloat(this.value)>parseFloat(this.condition.value)},c.prototype.method_lt=function(){return parseFloat(this.value)parseInt(this.condition.value,10)},c.prototype.method_present=function(){return!!this.value.match(/\S/)},c.prototype.method_blank=function(){return!this.method_present()},c.prototype.length=function(){return FormRenderer.getLength(this.responseField.getLengthValidationUnits(),this.value)},c.prototype.isValid=function(){var c;return this.responseField&&_.all(["response_field_id","method"],function(a){return function(b){return a.condition[b]}}(this))&&(c=this.condition.method,b.call(a,c)>=0||this.condition.value)},c.prototype.isVisible=function(){var c,d,e,f;return!(null==(c=this.responseField)||null==(d=c.fr)||null==(e=d.options)||!e.skipConditions)||(!this.isValid()||(f=this.condition.method,b.call(a,f)>=0?this["method_"+this.condition.method]():this.method_present()&&this["method_"+this.condition.method]()))},c}()}.call(this),function(){FormRenderer.Models.BaseFormComponent=Backbone.DeepModel.extend({initialize:function(a,b,c){return this.fr=b,this.parent=c,this.calculateVisibility()},sync:function(){},validateComponent:function(){},setExistingValue:function(){},shouldPersistValue:function(){return this.isVisible&&(this.group||this.input_field)},getConditions:function(){return this.get("conditions")||[]},isRequired:function(){return this.get("required")},isConditional:function(){return this.getConditions().length>0},parentGroupIsHidden:function(){return null!=this.parent.repeatingGroup&&!this.parent.repeatingGroup.isVisible},calculateVisibilityIsChanged:function(){var a;return a=!!this.isVisible,this.calculateVisibility(),a!==this.isVisible},calculateVisibility:function(){return this.isVisible=this._calculateIsVisible()},_calculateIsVisible:function(){return!this.renderingRespondentForm()||this.satisfiesConditions(this.parent.formComponents)},satisfiesConditions:function(a){return!this.isConditional()||_[this.conditionMethod()](this.getConditions(),function(b){return function(b){var c;return c=new FormRenderer.ConditionChecker(a.get(b.response_field_id),b),c.isVisible()}}())},conditionMethod:function(){return"any"===this.get("condition_method")?"any":"all"},renderingRespondentForm:function(){return!!this.fr}})}.call(this),function(){var a,c=[].indexOf||function(a){for(var b=0,c=this.length;b0)return this.errors.join(" ")},calculateLength:function(){return this.set("currentLength",FormRenderer.getLength(this.getLengthValidationUnits(),this.get("value")))},getLengthValidationUnits:function(){return this.get("min_max_length_units")||"characters"},setExistingValue:function(a){if(null!=a&&this.set("value",a),this.hasLengthValidation())return this.calculateLength()},getValue:function(){return this.get("value")||this.defaultValue()},defaultValue:function(){return"hash"===this.valueType?{}:"string"===this.valueType?"":void 0},toText:function(){return this.getValue()},hasValue:function(){return"hash"===this.valueType?_.some(this.get("value")||{},function(a){return function(b,d){return!(c.call(a.ignoreKeysWhenCheckingPresence(),d)>=0||!b)}}(this)):!!this.get("value")},getOptions:function(){return this.get("options")||[]},getColumns:function(){return this.get("columns")||[]},getSize:function(){return this.get("size")||"small"},sizeToHeaderTag:function(){return{large:"h2",medium:"h3",small:"h4"}[this.getSize()]}}),FormRenderer.Views.ResponseField=Backbone.View.extend({className:"fr_response_field",events:{"blur input, textarea, select":"_onBlur"},initialize:function(a){return this._sharedInitialize(a),this.listenTo(this.model,"afterValidate",this.render),this.listenTo(this.model,"change",this._onInput),this.listenTo(this.model,"change:currentLength",this.auditLength),this.listenTo(this.model,"change:error",this.toggleErrorModifier),this.$el.addClass("fr_response_field_"+this.model.field_type)},_onBlur:function(c){if(this.model.hasValue())return setTimeout(function(c){return function(){var d;if(d=document.activeElement,!b.contains(c.el,d))return a(d)?b(document).one("mouseup",function(){return c.model.validateComponent()}):c.model.validateComponent()}}(this),1)},_onInput:function(){if(this.model.errors.length>0)return this.model.validateComponent({clearOnly:!0})},focus:function(){return this.$el.find(":input:eq(0)").focus()},auditLength:function(){var a,b;if(this.model.hasLengthValidation()&&(a=this.$el.find(".fr_length_counter"))[0])return b=this.model.validateLength(),"short"===b?a.addClass("is_short").removeClass("is_long"):"long"===b?a.addClass("is_long").removeClass("is_short"):a.removeClass("is_short is_long")},toggleErrorModifier:function(){return this.$el[this.model.getError()?"addClass":"removeClass"]("error")},partialName:function(){return this.model.input_field?"response_field":"non_input_response_field"},render:function(){var a;return this.$el.html(JST["partials/"+this.partialName()](this)),rivets.bind(this.$el,{model:this.model}),this.auditLength(),null!=(a=this.form_renderer)&&a.trigger("viewRendered",this),this}})}.call(this),function(){FormRenderer.Models.NonInputResponseField=FormRenderer.Models.ResponseField.extend({input_field:!1,validateComponent:function(){}})}.call(this),function(){FormRenderer.Models.ResponseFieldRepeatingGroup=FormRenderer.Models.BaseFormComponent.extend({group:!0,field_type:"repeating_group",initialize:function(){return FormRenderer.Models.BaseFormComponent.prototype.initialize.apply(this,arguments),this.entries=[]},validateComponent:function(){var a,b,c,d,e;for(d=this.entries,e=[],b=0,c=d.length;bb&&(a=a.substr(0,b).trim()+"…"),a},maxEntries:function(){return this.get("maxentries")?parseInt(this.get("maxentries"),10)||1/0:1/0},canAdd:function(){return this.entries.length1}}),FormRenderer.Views.ResponseFieldRepeatingGroup=Backbone.View.extend({className:"fr_response_field fr_response_field_group",events:{"click .js-remove-entry":"removeEntry","click .js-add-entry":"addEntry","click .js-skip":"toggleSkip"},initialize:function(a){return this._sharedInitialize(a),this.on("shown",function(a){return function(){var b,c,d,e,f;for(e=a.views,f=[],c=0,d=e.length;c0&&this.$el.addClass("is_truncated"),rivets.bind(this.$el,{model:this.model}),this.$el.find(".fr_group_entries").append(a),null!=(i=this.form_renderer)&&i.trigger("viewRendered",this),this}}),FormRenderer.Views.ResponseFieldRepeatingGroupEntry=Backbone.View.extend({className:"fr_group_entry",initialize:function(a){return this.entry=a.entry,this.form_renderer=a.form_renderer,this.idx=a.idx,this.views=[],this.on("shown",function(a){return function(){var b,c,d,e,f;for(e=a.views,f=[],c=0,d=e.length;c0||this.get("value.other_checked")}}),FormRenderer.Views.ResponseFieldCheckboxes=FormRenderer.Views.ResponseField.extend({wrapper:"fieldset",field_type:"checkboxes"})}.call(this),function(){FormRenderer.Models.ResponseFieldConfirm=FormRenderer.Models.ResponseField.extend({field_type:"confirm",wrapper:"none",getValue:function(){return this.get("value")||!1},setExistingValue:function(a){if(null!=a)return this.set("value",a)},toText:function(){return this.get("value")?"Yes":"No"}}),FormRenderer.Views.ResponseFieldConfirm=FormRenderer.Views.ResponseField.extend({wrapper:"none",field_type:"confirm"})}.call(this),function(){FormRenderer.Models.ResponseFieldDate=FormRenderer.Models.ResponseField.extend({wrapper:"fieldset",field_type:"date",valueType:"hash",toText:function(){return _.values(_.pick(this.getValue(),"month","day","year")).join("/")},validateType:function(){var a,b,c,d,e,f;if(f=this.get("disable_year")?2e3:parseInt(this.get("value.year"),10)||0,a=parseInt(this.get("value.day"),10)||0,e=parseInt(this.get("value.month"),10)||0,c=1===new Date(f,1,29).getMonth()?29:28,b=[31,c,31,30,31,30,31,31,30,31,30,31],d=b[e-1],!(f>0&&06?"seven_plus":a>3?"four_six":"one_three"}})}.call(this),function(){FormRenderer.Models.ResponseFieldPageBreak=FormRenderer.Models.NonInputResponseField.extend({field_type:"page_break"}),FormRenderer.Views.ResponseFieldPageBreak=FormRenderer.Views.ResponseField.extend({field_type:"page_break"})}.call(this),function(){FormRenderer.Models.ResponseFieldParagraph=FormRenderer.Models.ResponseField.extend({field_type:"paragraph"}),FormRenderer.Views.ResponseFieldParagraph=FormRenderer.Views.ResponseField.extend({field_type:"paragraph"})}.call(this),function(){FormRenderer.Models.ResponseFieldPhone=FormRenderer.Models.ResponseField.extend({field_type:"phone",valueType:"string",validateType:function(){var a,b,c,d;if(b="us"===this.get("phone_format"),c=b?10:7,a=(null!=(d=this.get("value").match(/\d/g))?d.join(""):void 0)||"",!(a.length>=c))return b?"us_phone":"phone"}}),FormRenderer.Views.ResponseFieldPhone=FormRenderer.Views.ResponseField.extend({phonePlaceholder:function(){if("us"===this.model.get("phone_format"))return"(xxx) xxx-xxxx"}})}.call(this),function(){FormRenderer.Models.ResponseFieldPrice=FormRenderer.Models.ResponseField.extend({wrapper:"fieldset",field_type:"price",valueType:"hash",toText:function(){return(this.getValue().dollars||"0")+"."+(this.getValue().cents||"00")},validateType:function(){var a;if(a=[],this.get("value.dollars")&&a.push((""+this.get("value.dollars")).replace(/,/g,"").replace(/^\$/,"")),this.get("value.cents")&&a.push(""+this.get("value.cents")),!_.every(a,function(a){return a.match(/^-?\d+$/)}))return"price"}}),FormRenderer.Views.ResponseFieldPrice=FormRenderer.Views.ResponseField.extend({events:_.extend({},FormRenderer.Views.ResponseField.prototype.events,{'blur [data-rv-input="model.value.cents"]':"formatCents"}),formatCents:function(a){var c;if((c=b(a.target).val())&&c.match(/^\d$/))return this.model.set("value.cents","0"+c)}})}.call(this),function(){FormRenderer.Models.ResponseFieldRadio=FormRenderer.Models.ResponseFieldCheckboxes.extend({field_type:"radio",wrapper:"fieldset"}),FormRenderer.Views.ResponseFieldRadio=FormRenderer.Views.ResponseField.extend({wrapper:"fieldset",field_type:"radio"})}.call(this),function(){FormRenderer.Models.ResponseFieldSectionBreak=FormRenderer.Models.NonInputResponseField.extend({field_type:"section_break"}),FormRenderer.Views.ResponseFieldSectionBreak=FormRenderer.Views.ResponseField.extend({field_type:"section_break"})}.call(this),function(){FormRenderer.Models.ResponseFieldTable=FormRenderer.Models.ResponseField.extend({field_type:"table",initialize:function(){if(FormRenderer.Models.ResponseField.prototype.initialize.apply(this,arguments),this.get("column_totals"))return this.listenTo(this,"change:value.*",this.calculateColumnTotals)},canAddRows:function(){return this.numRows()=c;0<=c?a++:a--)k.push(a);return k}.apply(this),function(b){var d;return c.getPresetValue(f.label,b)||(null!=a&&null!=(d=a[f.label])?d[b]:void 0)}),j.push(d.push(e));return j}}(this)))},numRows:function(){var a;return a=this.get("value"),null!=a&&a.length?Math.max(this.minRows(),a[0].length||0,1):0},hasValue:function(){return _.some(this.getValue(),function(a){return function(b,c){return _.some(b,function(b,d){return!a.getPresetValue(c,d)&&!!b})}}(this))},getPresetValue:function(a,b){var c,d;return null!=(c=this.get("preset_values"))&&null!=(d=c[a])?d[b]:void 0},getValue:function(){return _.tap({},function(a){return function(b){var c,d,e,f,g,h,i;for(h=a.getColumns(),i=[],e=f=0,g=h.length;f=f;d=0<=f?++a:--a)g.push(b[c.label].push(this.get("value."+e+"."+d)||""));return g}.call(a));return i}}(this))},toText:function(){return _.flatten(_.values(this.getValue())).join(" ")},calculateColumnTotals:function(){var a,b,c,d,e,f,g,h,i,j;for(h=this.getColumns(),j=[],d=e=0,g=h.length;e=i;c=0<=i?++f:--f)b.push(parseFloat((this.get("value."+d+"."+c)||"").replace(/\$?,?/g,"")));a=_.reduce(b,function(a,b){return _.isNaN(b)?a:a+b},0),j.push(this.set("columnTotals."+d,this.formatColumnSum(a)))}return j},formatColumnSum:function(a){var b,d,e;return a>0?(b=parseFloat(a.toFixed(10)),d=(null!=(e=(""+b).split(".")[1])?e.length:void 0)||0,c.numberFormat(b,d,".",",")):""}}),FormRenderer.Views.ResponseFieldTable=FormRenderer.Views.ResponseField.extend({events:_.extend({},FormRenderer.Views.ResponseField.prototype.events,{"click .js-add-row":"addRow","click .js-remove-row":"removeRow"}),canRemoveRow:function(a){var b;return b=Math.max(1,this.model.minRows()),a>b-1},addRow:function(a){var b,c,d,e;a.preventDefault(),c={},e=this.model.get("value");for(b in e)d=e[b],c[b]=d.concat("");return this.model.set("value",c),this.render()},removeRow:function(a){var c,d,e,f,g;a.preventDefault(),d=b(a.currentTarget).closest("[data-row-index]").data("row-index"),e={},g=this.model.get("value");for(c in g)f=g[c],e[c]=_.tap([],function(a){var b,c,e;e=[];for(b in f)c=f[b],parseInt(b,10)!==d?e.push(a.push(c)):e.push(void 0);return e});return this.model.set("value",e),this.render()}})}.call(this),function(){FormRenderer.Models.ResponseFieldText=FormRenderer.Models.ResponseField.extend({field_type:"text",valueType:"string"}),FormRenderer.Views.ResponseFieldText=FormRenderer.Views.ResponseField.extend({field_type:"text"})}.call(this),function(){FormRenderer.Models.ResponseFieldTime=FormRenderer.Models.ResponseField.extend({field_type:"time",wrapper:"fieldset",valueType:"hash",ignoreKeysWhenCheckingPresence:function(){return["am_pm"]},setExistingValue:function(a){if(FormRenderer.Models.ResponseField.prototype.setExistingValue.apply(this,arguments),!(null!=a?a.am_pm:void 0))return this.set("value.am_pm","AM")},toText:function(){return(this.getValue().hours||"00")+":"+(this.getValue().minutes||"00")+":"+(this.getValue().seconds||"00")+" "+this.getValue().am_pm},validateType:function(){var a,b,c;if(a=parseInt(this.get("value.hours"),10),b=parseInt(this.get("value.minutes"),10),c=parseInt(this.get("value.seconds"),10)||0,!(1<=a&&a<=12&&0<=b&&b<=59&&0<=c&&c<=59))return"time"}}),FormRenderer.Views.ResponseFieldTime=FormRenderer.Views.ResponseField.extend({wrapper:"fieldset",field_type:"time"})}.call(this),function(){FormRenderer.Models.ResponseFieldWebsite=FormRenderer.Models.ResponseField.extend({field_type:"website",valueType:"string"}),FormRenderer.Views.ResponseFieldWebsite=FormRenderer.Views.ResponseField.extend({field_type:"website"})}.call(this),function(){var a;a={validateType:function(){},validationFns:["validateType","validateInteger","validateLength","validateMinMax"],validateComponent:function(a){var b,c,d,e,f,g,h;if(null==a&&(a={}),d=this.get("error"),this.errors=[],this.isVisible&&!this.parentGroupIsHidden()){if(this.hasValue())for(h=this.validationFns,f=0,g=h.length;fb?"long":void 0},hasMinMaxValidation:function(){var a;return("number"===(a=this.field_type)||"price"===a)&&(this.get("min")||this.get("max"))},validateMinMax:function(){var a,b,c;if(this.hasMinMaxValidation())return b=this.get("min")&&parseFloat(this.get("min")),a=this.get("max")&&parseFloat(this.get("max")),c="price"===this.field_type?parseFloat((this.get("value.dollars")||0)+"."+(this.get("value.cents")||0)):parseFloat(this.get("value").replace(/,/g,"")),b&&ca?"large":void 0}},_.extend(FormRenderer.Models.ResponseField.prototype,a)}.call(this),function(){var a;a={_sharedInitialize:function(a){return this.form_renderer=a.form_renderer,this.model=a.model,this.model.id&&this.$el.addClass("fr_response_field_"+this.model.id),this.showLabels=this.form_renderer?this.form_renderer.options.showLabels:this.showLabels=a.showLabels},reflectConditions:function(){return this.model.isVisible?this.$el.show():this.$el.hide()},domId:function(){return this.model.cid},getDomId:function(){return domId}},_.extend(FormRenderer.Views.ResponseFieldRepeatingGroup.prototype,a),_.extend(FormRenderer.Views.ResponseField.prototype,a)}.call(this),function(){var a;a={getValue:function(){return _.tap({},function(a){return function(b){return a.formComponents.each(function(a){if(a.shouldPersistValue())return b[a.get("id")]=a.getValue()})}}(this))},initFormComponents:function(a,b){var c,d,e,f;for(this.formComponents=new Backbone.Collection,this.response_fields=this.formComponents,e=0,f=a.length;e0})},isVisible:function(){return _.any(this.models,function(a){return a.isVisible})},isValid:function(){return!this.firstViewWithError()}})}.call(this),function(){FormRenderer.Views.Pagination=Backbone.View.extend({events:{"click [data-activate-page]":function(a){return a.preventDefault(),this.form_renderer.activatePage(b(a.currentTarget).data("activate-page"))}},initialize:function(a){return this.form_renderer=a.form_renderer,this.listenTo(this.form_renderer.state,"change:activePage",this.render),this.listenTo(this.form_renderer,"afterValidate",this.render)},render:function(){return this.$el.html(JST["partials/pagination"](this)),this.form_renderer.trigger("viewRendered",this),this}})}.call(this),FormRenderer.FILE_TYPES={images:["bmp","gif","jpg","jpeg","png","psd","tif","tiff"],videos:["m4v","mp4","mov","mpg"],audio:["m4a","mp3","wav"],docs:["doc","docx","pdf","rtf","txt"],spreadsheets:["csv","xls","xlsx"],presentations:["ppt","pptx"],pdfs:["pdf"]};var d={address:"Address",add_another:"Add another",answer:"Answer this question",back_to_page:"Back to page :num",blind:"Blind",bookmark_hint:"To finish your response later, copy the link below.",cents:"Cents",characters:"characters",choose_an_option:"Choose an option",city:"City",clear:"Clear",click_to_set:"Click to set location",coordinates:"Coordinates",country:"Country",dollars:"Dollars",email:"Email",enter_at_least:"Enter at least :min",enter_between:"Enter between :min and :max",enter_exactly:"Enter :num",enter_up_to:"Enter up to :max",error:"Error",errors:{blank:"This field can't be blank.",date:"Please enter a valid date.",email:"Please enter a valid email address.",identification:"Please enter your name and email address.",integer:"Please enter a whole number.",large:"Your answer is too large.",long:"Your answer is too long.",number:"Please enter a valid number.",phone:"Please enter a valid phone number.",price:"Please enter a valid price.",short:"Your answer is too short.",small:"Your answer is too small.",time:"Please enter a valid time.",us_phone:"Please enter a valid 10-digit phone number."},error_bar:{errors:"Your response has validation errors."},error_filename:"Error reading filename",error_loading:"Error loading form",error_saving:"Error saving",finishing_up:"Finishing up...",finish_later:"Finish this later",has_conditions:"Has conditions",hidden:"Hidden",loading_form:"Loading form...",na:"N/A",name:"Name",next_page:"Next page",not_supported:"Sorry, your browser does not support this embedded form. Please visit :url to fill out this form.",other:"Other",postal_code:"Postal Code",province:"Province",remove:"Remove",saved:"Saved",saving:"Saving...",skip:"Skip this question",skipped:"This question is skipped.",state:"State",state_province_region:"State / Province / Region",submit:"Submit",submitting:"Submitting",thanks:"Thanks for submitting our form!",upload:"Upload a file",uploading:"Uploading...",upload_another:"Upload another file",we_accept:"We'll accept",words:"words",write_here:"Write your answer here",zip_code:"ZIP Code"};"undefined"!=typeof FormRenderer&&(FormRenderer.t=d),a.JST||(a.JST={}),a.JST["fields/address"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f,g,h,i,j,k;if(a=this.model.get("address_format"),d(b("\n\n")),"city_state"!==a&&"city_state_zip"!==a&&"country"!==a&&(d(b("\n \n
\n \n \n
\n
\n"))),d(b("\n\n")),"country"!==a){if(d(b("\n \n
\n \n \n
\n\n
\n \n\n ")),"US"===(h=this.model.get("value.country"))||"CA"===h){for(d(b("\n \n "))}else d(b("\n \n "));d(b("\n
\n
\n"))}if(d(b("\n\n\n ")),"city_state"!==a&&"country"!==a&&(d(b("\n
\n \n \n
\n "))),d(b("\n\n ")),"city_state"!==a&&"city_state_zip"!==a){for(d(b("\n
\n \n \n
\n "))}d(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/block_of_text"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b(JST["partials/labels"](this))),d(b("\n\n\n ")),d(this.safe(FormRenderer.formatAndSanitizeHTML(this.model.get("description")))),d(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/checkboxes"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;for(f=this.model.getOptions(),a=0,c=f.length;a\n \n ')),d(e.translated_label||e.label),d(b("\n \n"));d(b("\n\n")),this.model.get("include_other_option")&&(d(b("\n \n \n\n \n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/confirm"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/date"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
\n \n \n
\n\n
/
\n\n
\n \n \n
\n\n ')),this.model.get("disable_year")||(d(b("\n
/
\n\n
\n \n \n
\n '))),d(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/dropdown"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;for(d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/email"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/file"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],d=this,e=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:d.escape(b))};return function(){var a,d,f,g,h;for(e(b("\n ")),h=this.model.getFiles(),f=0,g=h.length;f\n ")),e(a.filename),e(b("\n \n
\n "));e(b("\n\n\n")),this.model.canAddFile()&&(e(b("\n \n
\n\n
\n\n
\n\n ")),(d=this.model.getAcceptedExtensions())&&(e(b("\n
\n ")),e(FormRenderer.t.we_accept),e(b(" ")),e(c.toSentence(d)),e(b("\n
\n "))),e(b("\n
\n"))),e(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/identification"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
\n
\n\n ")),this.dontRenderInputs()?(d(b("\n
")),d(this.model.get("value.name")),d(b("\n "))):(d(b("\n
\n "))),d(b("\n
\n\n
\n
\n\n ")),this.dontRenderInputs()?(d(b("\n
")),d(this.model.get("value.email")),d(b("\n "))):(d(b('\n
\n "))),d(b("\n
\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/map_marker"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
\n \n
\n\n
\n ")),d(FormRenderer.t.click_to_set),d(b("\n
\n\n
\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/number"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n\n')),this.model.get("units")&&(d(b("\n \n ")),d(this.model.get("units")),d(b("\n \n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/page_break"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n Page break\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/paragraph"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/phone"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n'))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/price"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
$
\n\n
\n \n \n
\n\n ")),this.model.get("disable_cents")||(d(b("\n
.
\n
\n \n \n
\n '))),d(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/radio"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f;for(f=this.model.getOptions(),a=0,c=f.length;a\n \n ')),d(e.translated_label||e.label),d(b("\n \n"));d(b("\n\n")),this.model.get("include_other_option")&&(d(b("\n \n \n\n \n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/section_break"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a;d(b(JST["partials/labels"](this))),d(b("\n\n")),a=FormRenderer.formatAndSanitizeHTML(this.model.get("description")),d(b("\n<")),d(this.model.sizeToHeaderTag()),d(b(">")),d(this.model.get("label")),d(b("")),d(this.model.sizeToHeaderTag()),d(b(">\n")),a&&(d(b("\n \n ")),d(this.safe(a)),d(b("\n
\n"))),d(b("\n\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/table"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f,g,h,i,j,k,l,m,n,o,p;for(d(b("\n \n \n ")),m=this.model.getColumns(),f=0,h=m.length;f")),d(a.translated_label||a.label),d(b("\n "));for(d(b("\n\n | \n
\n \n\n \n ")),c=g=0,n=this.model.numRows()-1;0<=n?g<=n:g>=n;c=0<=n?++g:--g){for(d(b('\n \n ')),o=this.model.getColumns(),e=k=0,i=o.length;k\n \n "))):(d(b("\n \n \n "))),d(b("\n | \n "));d(b("\n\n \n ")),this.canRemoveRow(c)&&(d(b("\n \n ")),d(b(FormRenderer.REMOVE_ROW_ICON)),d(b("\n \n "))),d(b("\n | \n
\n "))}if(d(b("\n \n\n ")),this.model.get("column_totals")){for(d(b("\n \n \n ")),p=this.model.getColumns(),e=l=0,j=p.length;l\n "));d(b('\n | \n
\n \n '))}d(b("\n
\n\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/text"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/time"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
\n \n \n
\n\n
:
\n\n
\n \n \n
\n\n ')),this.model.get("disable_seconds")||(d(b("\n
:
\n\n
\n \n \n
\n '))),d(b("\n\n
\n \n
\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["fields/website"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b('\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST.main=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n ")),d(FormRenderer.t.loading_form),d(b("\n
\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/description"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.model.get("description")&&(d(b("\n \n ")),d(this.safe(FormRenderer.formatAndSanitizeHTML(this.model.get("description")))),d(b("\n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/email_sent"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("")),d(this.message),d(b("
\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/error"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/label"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/labels"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.showLabels&&(d(b("\n ")),this.model.get("admin_only")&&(d(b("\n ")),d(FormRenderer.t.hidden),d(b("\n "))),d(b("\n ")),this.model.get("blind")&&(d(b("\n ")),d(FormRenderer.t.blind),d(b("\n "))),d(b("\n ")),this.model.isConditional()&&(d(b("\n ")),d(FormRenderer.t.has_conditions),d(b("\n "))),d(b("\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/length_counter"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/length_validations"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e;c=this.model.get("minlength"),d(b("\n")),a=this.model.get("maxlength"),d(b("\n")),e=this.model.getLengthValidationUnits(),d(b("\n\n")),this.model.hasLengthValidation()&&(d(b("\n \n \n ")),c&&a?(d(b("\n ")),c===a?(d(b("\n ")),d(FormRenderer.t.enter_exactly.replace(":num",c)),d(b(" ")),d(FormRenderer.t[e]),d(b(".\n "))):(d(b("\n ")),d(FormRenderer.t.enter_between.replace(":min",c).replace(":max",a)),d(b(" ")),d(FormRenderer.t[e]),d(b(".\n "))),d(b("\n "))):c?(d(b("\n ")),d(FormRenderer.t.enter_at_least.replace(":min",c)),d(b(" ")),d(FormRenderer.t[e]),d(b(".\n "))):a&&(d(b("\n ")),d(FormRenderer.t.enter_up_to.replace(":max",a)),d(b(" ")),d(FormRenderer.t[e]),d(b(".\n "))),d(b("\n \n\n ")),d(b(JST["partials/length_counter"](this))),d(b("\n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/min_max_validations"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c;this.model.hasMinMaxValidation()&&(d(b("\n ")),c=this.model.get("min"),d(b("\n ")),a=this.model.get("max"),d(b("\n\n \n ")),c&&a?(d(b("\n ")),d(FormRenderer.t.enter_between.replace(":min",c).replace(":max",a)),d(b(".\n "))):c?(d(b("\n ")),d(FormRenderer.t.enter_at_least.replace(":min",c)),d(b(".\n "))):a&&(d(b("\n ")),d(FormRenderer.t.enter_up_to.replace(":max",a)),d(b(".\n "))),d(b("\n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/non_input_response_field"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b(JST["fields/"+this.model.field_type](this))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/pagination"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a,c,e,f,g;if(this.form_renderer.visiblePages().length>1){for(d(b("\n \n"))}d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/repeating_group"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/repeating_group_entry"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("")),d(this.idx+1),d(b("
\n\n\n
\n\n")),this.entry.canRemove()&&(d(b("\n ")),d(b(FormRenderer.REMOVE_ENTRY_LINK_HTML)),d(b("\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/required"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.model.get("required")&&d(b(" *")),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/response_field"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){"fieldset"===this.model.wrapper?(d(b("\n \n"))):"label"===this.model.wrapper?(d(b("\n ")),d(b(JST["partials/label"](this))),d(b("\n \n ")),d(b(JST["fields/"+this.model.field_type](this))),d(b("\n
\n"))):(d(b("\n \n ")),d(b(JST["fields/"+this.model.field_type](this))),d(b("\n
\n"))),d(b("\n\n")),d(b(JST["partials/length_validations"](this))),d(b("\n")),d(b(JST["partials/min_max_validations"](this))),d(b("\n")),d(b(JST["partials/error"](this))),d(b("\n")),d(b(JST["partials/description"](this))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["partials/verify"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n
")),d(this.safe(this.template)),d(b("
\n ")),null!=this.href&&(d(b("\n
\n \n
\n "))),d(b("\n
\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["plugins/bookmark_draft"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["plugins/bottom_bar"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;b\n ")),a.call(this.form_renderer.options.plugins,"Autosave")>=0&&(d(b("\n \n ")),this.form_renderer.state.get("hasServerErrors")?(d(b("\n ")),d(this.form_renderer.state.get("serverErrorText")||FormRenderer.t.error_saving),d(b("\n "))):this.form_renderer.state.get("hasChanges")?(d(b("\n ")),d(FormRenderer.t.saving),d(b("\n "))):(d(b("\n ")),d(FormRenderer.t.saved),d(b("\n "))),d(b("\n
\n "))),d(b("\n\n \n ")),this.form_renderer.isFirstPage()||(d(b("\n \n "))),d(b("\n\n ")),this.form_renderer.state.get("submitting")?(d(b("\n \n "))):(d(b("\n \n "))),d(b("\n
\n\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())},a.JST||(a.JST={}),a.JST["plugins/error_bar"]=function(a){var b=function(a){void 0===a&&null==a&&(a="");var b=new String(a);return b.ecoSafe=!0,b};return function(){var a=[],c=this,d=function(b){void 0!==b&&null!=b&&a.push(b.ecoSafe?b:c.escape(b))};return function(){this.form_renderer.areAllPagesValid()||(d(b("\n \n ")),d(b(FormRenderer.t.error_bar.errors)),d(b("\n
\n"))),d(b("\n"))}.call(this),a.join("")}.call(function(){var c,d={escape:function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},safe:b};for(c in a)d[c]=a[c];return d}())}}(window);
\ No newline at end of file
+!function(s){var l=jQuery,a=_.str;rivets.inputEvent=document.addEventListener?"input":"keyup",rivets.binders.input={publishes:!0,routine:rivets.binders.value.routine,bind:function(e){return l(e).bind(rivets.inputEvent+".rivets",this.publish)},unbind:function(e){return l(e).unbind(rivets.inputEvent+".rivets")}},rivets.binders.checkedarray={publishes:!0,routine:function(e,t){return e.checked=_.contains(t,e.value)},bind:function(t){return l(t).bind("change.rivets",()=>{var e=this.model.get(this.keypath)||[],e=t.checked?_.uniq(e.concat(t.value)):_.without(e,t.value);return this.model.set(this.keypath,e)})},unbind:function(e){return l(e).unbind("change.rivets")}},rivets.binders.dobtradiogroup={publishes:!0,routine:function(e,t){return e.checked=l(e).hasClass("js_other_option")?this.model.get("value.other_checked"):_.contains(t,e.value)},bind:function(e){return l(e).bind("change.rivets",()=>l(e).hasClass("js_other_option")?(this.model.set("value.other_checked",!0),this.model.set(this.keypath,[])):(this.model.unset("value.other_checked"),this.model.unset("value.other_text"),this.model.set(this.keypath,[e.value])))}},rivets.configure({prefix:"rv",adapter:{subscribe:function(e,t,n){return n.wrapped=function(e,t){return n(t)},e.on("change:"+t,n.wrapped)},unsubscribe:function(e,t,n){return e.off("change:"+t,n.wrapped)},read:function(e,t){return"cid"===t?e.cid:e.get(t)},publish:function(e,t,n){return e.cid?e.set(t,n):e[t]=n}}}),function(){var o;s.FormRenderer=o=Backbone.View.extend({defaults:{enablePages:!0,screendoorBase:"https://screendoor.dobt.co",target:"[data-formrenderer]",validateImmediately:!1,response:{},responderLanguage:void 0,preview:!1,skipValidation:void 0,skipConditions:void 0,saveParams:{},showLabels:!1,scrollToPadding:0,plugins:["Autosave","WarnBeforeUnload","BottomBar","ErrorBar","SavedSession"]},events:{"click button#screendoor-verify-identity":"verifyIdentity"},verifyIdentity:function(e){return e.preventDefault(),e=l(e.currentTarget).data("href"),l.ajax({url:e,type:"get",success:function(e){return l("div.fr_loading").html(JST["partials/email_sent"]({message:e.message}))}})},constructor:function(e){var t,n,s,r;for((this.fr=this).options=l.extend({},this.defaults,e),this.requests=0,this.state=new Backbone.Model({hasChanges:!1}),this.setElement(l(this.options.target)),this.$el.addClass("fr_form"),this.$el.data("formrenderer-instance",this),this.subviews={pages:{}},this.serverHeaders={"X-FR-Version":o.VERSION,"X-FR-URL":document.URL},this.plugins=_.map(this.options.plugins,e=>new o.Plugins[e](this)),t=0,n=(r=this.plugins).length;t{var e,t,n,r;for(this.$el.find(".fr_loading").remove(),this.initFormComponents(this.options.response_fields,this.options.response.responses),this.initPages(),this.options.enablePages?this.initPagination():this.initNoPagination(),t=0,n=(r=this.plugins).length;t{if(null!=n.getResponseHeader("jwt_token")&&(s.sessionStorage.jwtToken=n.getResponseHeader("jwt_token")),(n=this.options).response_fields||(n.response_fields=e.project.response_fields),(n=this.options.response).responses||(n.responses=(null!=(n=e.response)?n.responses:void 0)||{}),null==this.options.afterSubmit&&(this.options.afterSubmit={method:"page",html:e.project.after_response_page_html||`${o.t.thanks}
`}),r(),document.location.search.match(/respondent_auth_token/))return document.location.search=this.tokenlessQueryParams(document.location.search)},error:e=>{var t;return this.corsSupported()?"Token expired. Verify identity."===(null!=(t=e.responseJSON)?t.error:void 0)?(this.$el.html(JST["partials/verify"]({template:null!=(t=e.responseJSON)?t.template:void 0,href:null!=(t=e.responseJSON)?t.verify_api_endpoint:void 0,button:null!=(t=e.responseJSON)?t.verify_email_button:void 0})),this.maybe_delete_jwt_token(e)):(this.$el.find(".fr_loading").text(""+o.t.error_loading+`: "${(null!=(t=e.responseJSON)?t.error:void 0)||"Unknown"}"`),this.trigger("errorSaving",e)):this.$el.find(".fr_loading").html(o.t.not_supported.replace(/\:url/g,this.projectUrl()))}})},initPages:function(){var t,e,n,r,s,i=()=>this.subviews.pages[t]=new o.Views.Page({form_renderer:this});for(n in this.numPages=this.formComponents.where({field_type:"page_break"}).length+1,this.state.set("activePage",1),t=1,i(),this.formComponents.each(e=>"page_break"===e.get("field_type")?(t++,i()):this.subviews.pages[t].models.push(e)),s=[],r=this.subviews.pages)e=r[n],s.push(this.$el.append(e.render().el));return s},initPagination:function(){return this.subviews.pagination=new o.Views.Pagination({form_renderer:this}),this.$el.prepend(this.subviews.pagination.render().el),this.subviews.pages[this.state.get("activePage")].show()},initNoPagination:function(){var e,t,n=this.subviews.pages,r=[];for(t in n)e=n[t],r.push(e.show());return r},activatePage:function(e){return this.subviews.pages[this.state.get("activePage")].hide(),this.subviews.pages[e].show(),s.scrollTo(0,this.options.scrollToPadding),this.state.set("activePage",e)},validate:function(){var e,t=this.subviews.pages;for(e in t)t[e].validate();return this.trigger("afterValidate afterValidate:all"),this.areAllPagesValid()},isPageVisible:function(e){return null!=(e=this.subviews.pages[e])?e.isVisible():void 0},isPageValid:function(e){return null!=(e=this.subviews.pages[e])?e.isValid():void 0},focusFirstError:function(){var e=this.invalidPages()[0];return this.activatePage(e),e=this.subviews.pages[e].firstViewWithError(),s.scrollTo(0,e.$el.offset().top-this.options.scrollToPadding),e.focus()},invalidPages:function(){return _.filter(function(){for(var e=[],t=1,n=this.numPages;1<=n?t<=n:n<=t;1<=n?t++:t--)e.push(t);return e}.apply(this),e=>!1===this.isPageValid(e))},areAllPagesValid:function(){return 0===this.invalidPages().length},visiblePages:function(){return _.tap([],e=>{var t,n=this.subviews.pages,r=[];for(t in n)n[t],this.isPageVisible(t)?r.push(e.push(parseInt(t,10))):r.push(void 0);return r})},isFirstPage:function(){var e=this.visiblePages()[0];return!e||this.state.get("activePage")===e},isLastPage:function(){var e=_.last(this.visiblePages());return!e||this.state.get("activePage")===e},previousPage:function(){return this.visiblePages()[_.indexOf(this.visiblePages(),this.state.get("activePage"))-1]},nextPage:function(){return this.visiblePages()[_.indexOf(this.visiblePages(),this.state.get("activePage"))+1]},handlePreviousPage:function(){return this.activatePage(this.previousPage())},handleNextPage:function(){return this.isLastPage()||!this.options.enablePages?this.submit():this.activatePage(this.nextPage())},queryParams:function(){return o.queryParams(document.location.search)},loadParams:function(){return _.extend({v:0,response_id:this.options.response.id,project_id:this.options.project_id,responder_language:this.options.responderLanguage,query_params:this.queryParams()},this.followUpFormParams())},saveParams:function(){return _.extend(this.loadParams(),{skip_validation:this.options.skipValidation},this.options.saveParams)},followUpFormParams:function(){return this.isRenderingFollowUpForm()?{follow_up_form_id:this.options.follow_up_form_id,initial_response_id:this.options.initial_response_id}:{}},isRenderingFollowUpForm:function(){return!!this.options.follow_up_form_id},responsesChanged:function(){if(this.state.set("hasChanges",!0),this.isSaving)return this.changedWhileSaving=!0},save:function(r={}){if(!this.isSaving)return this.requests+=1,this.isSaving=!0,this.changedWhileSaving=!1,l.ajax({url:this.options.screendoorBase+"/api/form_renderer/save",type:"post",contentType:"application/json",dataType:"json",data:JSON.stringify(_.extend(this.saveParams(),{raw_responses:this.getValue(),submit:!!r.submit||void 0})),headers:_.extend(this.serverHeaders,this.authorizationHeader()),complete:()=>(--this.requests,this.isSaving=!1,this.trigger("afterSave")),success:(e,t,n)=>{return null!=n.getResponseHeader("jwt_token")&&(s.sessionStorage.jwtToken=n.getResponseHeader("jwt_token")),this.state.set({hasChanges:this.changedWhileSaving,hasServerErrors:!1}),this.options.response.id=e.response_id,null!=(n=r.cb)?n.apply(this,arguments):void 0},error:e=>{var t;if(this.state.set({hasServerErrors:!0,serverErrorText:null!=(t=e.responseJSON)?t.error:void 0,serverErrorKey:null!=(t=e.responseJSON)?t.error_key:void 0,submitting:!1}),"Token expired. Verify identity."===(null!=(t=e.responseJSON)?t.error:void 0))return this.$el.html(JST["partials/verify"]({template:null!=(t=e.responseJSON)?t.template:void 0,href:null!=(t=e.responseJSON)?t.verify_api_endpoint:void 0,button:null!=(t=e.responseJSON)?t.verify_email_button:void 0})),this.maybe_delete_jwt_token(e)}})},waitForRequests:function(e){return 0this.waitForRequests(e),100):e()},submit:function(e={}){if(e.skipValidation||this.options.skipValidation||this.validate())return this.state.set("submitting",!0),this.waitForRequests(()=>this.options.preview?this._preview():this.save({submit:!0,cb:()=>(this.trigger("afterSubmit"),this._afterSubmit())}))},_afterSubmit:function(){var e=this.options.afterSubmit;return"function"==typeof e?e.call(this):"string"==typeof e?s.location=e.replace(":id",this.options.response.id.split(",")[0]):"object"==typeof e&&"page"===e.method?(e=l(`${e.html}
`),this.$el.replaceWith(e)):console.log("[FormRenderer] Not sure what to do...")},_preview:function(){var e=()=>s.location=this.options.preview.replace(":id",this.options.response.id.split(",")[0]);return!this.state.get("hasChanges")&&this.options.response.id?e():this.save({cb:e})},reflectConditions:function(){var e,t,n=this.subviews.pages;for(e in n)n[e].reflectConditions();return null!=(t=this.subviews.pagination)?t.render():void 0}}),o.BUTTON_CLASS="fr_button",o.DEFAULT_LAT_LNG=[40.7700118,-73.9800453],o.MAPBOX_URL="https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js",o.EMAIL_REGEX=/^\s*([^@\s]{1,64})@((?:[-a-z0-9]+\.)+[a-z]{2,})\s*$/i,o.ADD_ROW_ICON="+",o.REMOVE_ROW_ICON="-",o.REMOVE_ENTRY_LINK_CLASS="fr_group_entry_remove",o.REMOVE_ENTRY_LINK_HTML="Remove",o.Views={},o.Models={},o.Plugins={},o.Validators={EmailValidator:{VALID_REGEX:o.EMAIL_REGEX}},o.addPlugin=function(e){return this.prototype.defaults.plugins.push(e)},o.removePlugin=function(e){return this.prototype.defaults.plugins=_.without(this.prototype.defaults.plugins,e)}}.call(this),function(){FormRenderer.formComponentViewClass=function(e){return e.group?FormRenderer.Views.ResponseFieldRepeatingGroup:FormRenderer.Views["ResponseField"+a.classify(e.field_type)]||FormRenderer.Views.ResponseField},FormRenderer.buildFormComponentView=function(e,t){return new(FormRenderer.formComponentViewClass(e))({model:e,form_renderer:t})},FormRenderer.formComponentModelClass=function(e){return FormRenderer.Models["ResponseField"+a.classify(e.field_type)]},FormRenderer.buildFormComponentModel=function(e,t,n){return new(FormRenderer.formComponentModelClass(e))(e,t,n)}}.call(this),function(){var t=["a","p","br","b","strong","em","i"],n=["href","target"],r=function(e){return e.replace(/(^|[\s\n]|
)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,"$1$2")},s=function(e=""){return(""+e).replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1
$2")},i=function(e){return DOMPurify.sanitize(e,{ALLOWED_TAGS:t,ALLOWED_ATTR:n})};FormRenderer.formatAndSanitizeHTML=function(e){return i(r(s(e)))}}.call(this),function(){FormRenderer.getLength=function(e,t){t=a.trim(t);return("words"===e?t.replace(/['";:,.?¿\-!¡]+/g,"").match(/\S+/g)||"":t).length}}.call(this),function(){FormRenderer.normalizeNumber=function(e,t){e=e.replace(/,/g,"").replace(/-/g,"").replace(/^\+/,"").trim();return e=t?e.replace(new RegExp(t+"$","i"),"").trim():e}}.call(this),function(){FormRenderer.queryParams=function(e){return e.substring(1).split("&").filter(function(e){return""!==e}).reduce(function(e,t){return 2===(t=t.split("=")).length&&(e[t[0]]=t[1]),e},{})}}.call(this),function(){FormRenderer.toBoolean=function(e){return _.contains(["True","Yes","true","1",1,"yes",!0],e)}}.call(this),function(){FormRenderer.VERSION="1.4.1"}.call(this),function(){FormRenderer.ORDERED_COUNTRIES=_.uniq(_.union(["US","GB","CA"],[void 0],_.keys(ISOCountryNames))),FormRenderer.PROVINCES_CA=["Alberta","British Columbia","Labrador","Manitoba","New Brunswick","Newfoundland","Nova Scotia","Nunavut","Northwest Territories","Ontario","Prince Edward Island","Quebec","Saskatchewen","Yukon"],FormRenderer.PROVINCES_US=["Alabama","Alaska","American Samoa","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District Of Columbia","Federated States Of Micronesia","Florida","Georgia","Guam","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Marshall Islands","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Northern Mariana Islands","Ohio","Oklahoma","Oregon","Palau","Pennsylvania","Puerto Rico","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virgin Islands","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]}.call(this),function(){var t=[].indexOf,n=["present","blank"];FormRenderer.ConditionChecker=class{constructor(e,t){this.responseField=e,this.condition=t,this.value=(null!=(e=this.responseField)?e.toText():void 0)||""}method_eq(){return this.value.toLowerCase()===this.condition.value.toLowerCase()}method_contains(){return-1parseFloat(this.condition.value)}method_lt(){return parseFloat(this.value)parseInt(this.condition.value,10)}method_present(){return!!this.value.match(/\S/)}method_blank(){return!this.method_present()}length(){return FormRenderer.getLength(this.responseField.getLengthValidationUnits(),this.value)}isValid(){var e;return this.responseField&&_.all(["response_field_id","method"],e=>this.condition[e])&&(e=this.condition.method,0<=t.call(n,e)||this.condition.value)}isVisible(){var e;return!(null==(e=this.responseField)||null==(e=e.fr)||null==(e=e.options)||!e.skipConditions)||!this.isValid()||(e=this.condition.method,(0<=t.call(n,e)||this.method_present())&&this["method_"+this.condition.method]())}}}.call(this),function(){FormRenderer.Models.BaseFormComponent=Backbone.DeepModel.extend({initialize:function(e,t,n){return this.fr=t,this.parent=n,this.calculateVisibility()},sync:function(){},validateComponent:function(){},setExistingValue:function(){},shouldPersistValue:function(){return this.isVisible&&(this.group||this.input_field)},getConditions:function(){return this.get("conditions")||[]},isRequired:function(){return this.get("required")},isConditional:function(){return 0{return new FormRenderer.ConditionChecker(t.get(e.response_field_id),e).isVisible()})},conditionMethod:function(){return"any"===this.get("condition_method")?"any":"all"},renderingRespondentForm:function(){return!!this.fr}})}.call(this),function(){var n=[].indexOf,t=function(e){return e&&(e.hasAttribute("data-fr-next-page")||e.hasAttribute("data-fr-previous-page"))};FormRenderer.Models.ResponseField=FormRenderer.Models.BaseFormComponent.extend({input_field:!0,wrapper:"label",field_type:void 0,validators:[],ignoreKeysWhenCheckingPresence:function(){return[]},initialize:function(){if(FormRenderer.Models.BaseFormComponent.prototype.initialize.apply(this,arguments),this.errors=[],this.hasLengthValidation())return this.listenTo(this,"change:value",this.calculateLength)},getError:function(){if(0!(0<=n.call(this.ignoreKeysWhenCheckingPresence(),t)||!e)):!!this.get("value")},getOptions:function(){return this.get("options")||[]},getColumns:function(){return this.get("columns")||[]},getSize:function(){return this.get("size")||"small"},sizeToHeaderTag:function(){return{large:"h2",medium:"h3",small:"h4"}[this.getSize()]}}),FormRenderer.Views.ResponseField=Backbone.View.extend({className:"fr_response_field",events:{"blur input, textarea, select":"_onBlur"},initialize:function(e){return this._sharedInitialize(e),this.listenTo(this.model,"afterValidate",this.render),this.listenTo(this.model,"change",this._onInput),this.listenTo(this.model,"change:currentLength",this.auditLength),this.listenTo(this.model,"change:error",this.toggleErrorModifier),this.$el.addClass("fr_response_field_"+this.model.field_type)},_onBlur:function(e){if(this.model.hasValue())return setTimeout(()=>{var e=document.activeElement;if(!l.contains(this.el,e))return t(e)?l(document).one("mouseup",()=>this.model.validateComponent()):this.model.validateComponent()},1)},_onInput:function(){if(0new FormRenderer.Models.ResponseFieldRepeatingGroupEntry({value:e},this.fr,this))},addEntry:function(){return this.entries.push(new FormRenderer.Models.ResponseFieldRepeatingGroupEntry({},this.fr,this)),this.fr.responsesChanged()},removeEntry:function(e){return this.entries.splice(e,1),0===this.entries.length&&this.set("skipped",!0),this.fr.responsesChanged()},isSkipped:function(){return!!this.get("skipped")},getValue:function(){return this.isSkipped()?[]:_.invoke(this.entries,"getValue")},getTruncatedDescription:function(){var e=this.get("description");return e=e&&140{for(var e,t=this.views,n=[],r=0,s=t.length;r{for(var e,t=this.views,n=[],r=0,s=t.length;r{for(var e,t=this.views,n=[],r=0,s=t.length;r{for(var e,t=this.views,n=[],r=0,s=t.length;r{e=FormRenderer.buildFormComponentView(e,this.form_renderer);return t.append(e.render().el),e.reflectConditions(),this.views.push(e)}),this},reflectConditions:function(){for(var e,t=this.views,n=[],r=0,s=t.length;rthis.$label.addClass("highlight")),this.$input.on("blur",()=>this.$label.removeClass("highlight")),this.form_renderer&&this.$input.inlineFileUpload({method:"post",action:this.form_renderer.options.screendoorBase+"/api/form_renderer/file",ajaxOpts:{headers:this.form_renderer.serverHeaders},additionalParams:{project_id:this.form_renderer.options.project_id,response_field_id:this.model.get("id"),v:0},start:e=>(t=e.filename,this.$label.addClass("disabled"),this.$label.text(FormRenderer.t.uploading),this.form_renderer.requests+=1),progress:e=>this.$label.text(100===e.percent?FormRenderer.t.finishing_up:`${FormRenderer.t.uploading} (${e.percent}%)`),complete:()=>--this.form_renderer.requests,success:e=>(this.model.addFile(e.data.file_id,t),this.render()),error:e=>{return this.render(),e=null!=(e=e.xhr.responseJSON)?e.errors:void 0,this.$error.text(e||FormRenderer.t.error).show(),setTimeout(()=>this.$error.hide(),2e3)}}),this},doRemove:function(e){e=this.$el.find("[data-fr-remove-file]").index(e.target);return this.model.removeFile(e),this.render()}})}.call(this),function(){FormRenderer.Models.ResponseFieldIdentification=FormRenderer.Models.ResponseField.extend({field_type:"identification",valueType:"hash",isRequired:function(){return!0},validateType:function(){return this.get("value.email")&&this.get("value.name")?this.get("value.email").match(FormRenderer.EMAIL_REGEX)?void 0:"email":"identification"},shouldPersistValue:function(){var e;return(null==(e=this.fr)||!e.isRenderingFollowUpForm())&&FormRenderer.Models.ResponseField.prototype.shouldPersistValue.apply(this,arguments)},getValue:function(){var e;return null!=(e=this.fr)&&e.isRenderingFollowUpForm()?null:FormRenderer.Models.ResponseField.prototype.getValue.apply(this,arguments)}}),FormRenderer.Views.ResponseFieldIdentification=FormRenderer.Views.ResponseField.extend({field_type:"identification",disableInput:function(){return this.isInputDisabled=!0},dontRenderInputs:function(){var e;return!!this.isInputDisabled||(null!=(e=this.form_renderer)?e.isRenderingFollowUpForm():void 0)}})}.call(this),function(){FormRenderer.loadLeaflet=function(e){return null!=("undefined"!=typeof L&&null!==L?L.GeoJSON:void 0)?e():requireOnce(FormRenderer.MAPBOX_URL,e)},FormRenderer.initMap=function(e){return L.mapbox.accessToken="pk.eyJ1IjoiYWRhbWphY29iYmVja2VyIiwiYSI6Im1SVEQtSm8ifQ.ZgEOSXsv9eLfGQ-9yAmtIg",L.mapbox.map(e,"adamjacobbecker.ja7plkah")},FormRenderer.Models.ResponseFieldMapMarker=FormRenderer.Models.ResponseField.extend({field_type:"map_marker",latLng:function(){return this.get("value")},defaultLatLng:function(){var e,t;if((e=this.get("default_lat"))&&(t=this.get("default_lng")))return[e,t]}}),FormRenderer.Views.ResponseFieldMapMarker=FormRenderer.Views.ResponseField.extend({events:_.extend({},FormRenderer.Views.ResponseField.prototype.events,{"click .fr_map_cover":"enable","click [data-fr-clear-map]":"disable"}),initialize:function(){return FormRenderer.Views.ResponseField.prototype.initialize.apply(this,arguments),this.on("shown",function(){var e;return this.refreshing=!0,null!=(e=this.map)&&e._onResize(),setTimeout(()=>this.refreshing=!1,0)})},render:function(){return FormRenderer.Views.ResponseField.prototype.render.apply(this,arguments),this.$cover=this.$el.find(".fr_map_cover"),FormRenderer.loadLeaflet(()=>{if(this.initMap(),this.model.latLng())return this.enable()}),this},initMap:function(){return this.map=FormRenderer.initMap(this.$el.find(".fr_map_map")[0]),this.$el.find(".fr_map_map").data("map",this.map),this.map.setView(this.model.latLng()||this.model.defaultLatLng()||FormRenderer.DEFAULT_LAT_LNG,13),this.marker=L.marker([0,0]),this.map.on("move",l.proxy(this._onMove,this))},_onMove:function(){var e;if(!this.refreshing)return e=this.map.getCenter(),this.marker.setLatLng(e),this.model.set({value:[e.lat.toFixed(7),e.lng.toFixed(7)]}),this.model.trigger("change:value.0 change:value.1")},enable:function(){if(this.map)return this.map.addLayer(this.marker),this.$cover.hide(),this._onMove()},disable:function(e){return e.preventDefault(),this.map.removeLayer(this.marker),this.$el.find(".fr_map_cover").show(),this.model.unset("value")}})}.call(this),function(){FormRenderer.Models.ResponseFieldNumber=FormRenderer.Models.ResponseField.extend({field_type:"number",valueType:"string",validateType:function(){if(!FormRenderer.normalizeNumber(this.get("value"),this.get("units")).match(/^-?\d*(\.\d+)?$/))return"number"}}),FormRenderer.Views.ResponseFieldNumber=FormRenderer.Views.ResponseField.extend({calculateSize:function(){var e=(e=parseInt(this.model.get("max"),10))?(""+e).length:6;return this.model.get("integer_only")||(e+=2),6=n))return t?"us_phone":"phone"}}),FormRenderer.Views.ResponseFieldPhone=FormRenderer.Views.ResponseField.extend({phonePlaceholder:function(){if("us"===this.model.get("phone_format"))return"(xxx) xxx-xxxx"}})}.call(this),function(){FormRenderer.Models.ResponseFieldPrice=FormRenderer.Models.ResponseField.extend({wrapper:"fieldset",field_type:"price",valueType:"hash",toText:function(){return`${this.getValue().dollars||"0"}.`+(this.getValue().cents||"00")},validateType:function(){var e=[];if(this.get("value.dollars")&&e.push((""+this.get("value.dollars")).replace(/,/g,"").replace(/^\$/,"")),this.get("value.cents")&&e.push(""+this.get("value.cents")),!_.every(e,function(e){return e.match(/^-?\d+$/)}))return"price"}}),FormRenderer.Views.ResponseFieldPrice=FormRenderer.Views.ResponseField.extend({events:_.extend({},FormRenderer.Views.ResponseField.prototype.events,{'blur [data-rv-input="model.value.cents"]':"formatCents"}),formatCents:function(e){e=l(e.target).val();if(e&&e.match(/^\d$/))return this.model.set("value.cents","0"+e)}})}.call(this),function(){FormRenderer.Models.ResponseFieldRadio=FormRenderer.Models.ResponseFieldCheckboxes.extend({field_type:"radio",wrapper:"fieldset"}),FormRenderer.Views.ResponseFieldRadio=FormRenderer.Views.ResponseField.extend({wrapper:"fieldset",field_type:"radio"})}.call(this),function(){FormRenderer.Models.ResponseFieldSectionBreak=FormRenderer.Models.NonInputResponseField.extend({field_type:"section_break"}),FormRenderer.Views.ResponseFieldSectionBreak=FormRenderer.Views.ResponseField.extend({field_type:"section_break"})}.call(this),function(){FormRenderer.Models.ResponseFieldTable=FormRenderer.Models.ResponseField.extend({field_type:"table",initialize:function(){if(FormRenderer.Models.ResponseField.prototype.initialize.apply(this,arguments),this.get("column_totals"))return this.listenTo(this,"change:value.*",this.calculateColumnTotals)},canAddRows:function(){return this.numRows(){for(var t,n,r=this.getColumns(),s=[],i=0,o=r.length;i{var t;return this.getPresetValue(n.label,e)||(null!=a&&null!=(t=a[n.label])?t[e]:void 0)}),s.push(e.push(t));return s}))},numRows:function(){var e=this.get("value");return null!=e&&e.length?Math.max(this.minRows(),e[0].length||0,1):0},hasValue:function(){return _.some(this.getValue(),(e,n)=>_.some(e,(e,t)=>!this.getPresetValue(n,t)&&!!e))},getPresetValue:function(e,t){var n;return null!=(n=this.get("preset_values"))&&null!=(n=n[e])?n[t]:void 0},getValue:function(){return _.tap({},r=>{for(var s,i,e,t=this.getColumns(),n=[],o=e=0,a=t.length;ethis.formComponents.each(function(e){if(e.shouldPersistValue())return t[e.get("id")]=e.getValue()}))},initFormComponents:function(e,t){var n,r,s;for(this.formComponents=new Backbone.Collection,this.response_fields=this.formComponents,n=0,r=e.length;n{if(this.fr.state.get("hasChanges"))return this.fr.save()},5e3)}}}.call(this),function(){var t="frDraft",n=function(e){var t=s.location.href;return e=e.replace(/[\[\]]/g,"\\$&"),(e=new RegExp("[?&]"+e+"(=([^]*)|&|#|$)").exec(t))?e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):"":null};FormRenderer.Plugins.BookmarkDraft=class extends FormRenderer.Plugins.Base{beforeFormLoad(){var e;if(e=n(t))return this.fr.options.response.id=e}afterFormLoad(){return this.fr.subviews.bookmarkDraft=new FormRenderer.Plugins.BookmarkDraft.View({form_renderer:this.fr}),this.fr.$el.append(this.fr.subviews.bookmarkDraft.render().el)}},FormRenderer.Plugins.BookmarkDraft.View=Backbone.View.extend({events:{"click .js-fr-bookmark":"requestBookmark"},initialize:function(e){return this.form_renderer=e.form_renderer},render:function(){return this.$el.html(JST["plugins/bookmark_draft"](this)),this.form_renderer.trigger("viewRendered",this),this},showBookmark:function(e){return prompt(FormRenderer.t.bookmark_hint,e)},getUrl:function(){var e=new Url;return e.query[t]=this.form_renderer.options.response.id,e.toString()},requestBookmark:function(e){var t;return e.preventDefault(),t=()=>(this.render(),this.showBookmark(this.getUrl())),this.form_renderer.options.response.id?t():(this.$el.find("a").text(FormRenderer.t.saving),this.form_renderer.waitForRequests(()=>this.form_renderer.options.response.id?t():this.form_renderer.save({cb:t})))}})}.call(this),function(){FormRenderer.Plugins.BottomBar=class extends FormRenderer.Plugins.Base{afterFormLoad(){return this.fr.subviews.bottomBar=new FormRenderer.Plugins.BottomBar.View({form_renderer:this.fr}),this.fr.$el.append(this.fr.subviews.bottomBar.render().el)}},FormRenderer.Plugins.BottomBar.View=Backbone.View.extend({events:{"click [data-fr-previous-page]":function(e){return e.preventDefault(),this.form_renderer.handlePreviousPage()},"click [data-fr-next-page]":function(e){return e.preventDefault(),this.form_renderer.handleNextPage()}},initialize:function(e){return this.form_renderer=e.form_renderer,this.listenTo(this.form_renderer.state,"change:activePage change:hasChanges change:submitting change:hasServerErrors",this.render)},render:function(){return this.$el.html(JST["plugins/bottom_bar"](this)),this.form_renderer.trigger("viewRendered",this),this}})}.call(this),function(){FormRenderer.Plugins.ErrorBar=class extends FormRenderer.Plugins.Base{afterFormLoad(){return this.fr.subviews.errorBar=new FormRenderer.Plugins.ErrorBar.View({form_renderer:this.fr}),this.fr.$el.prepend(this.fr.subviews.errorBar.render().el)}},FormRenderer.Plugins.ErrorBar.View=Backbone.View.extend({events:{"click a":function(e){return e.preventDefault(),this.form_renderer.focusFirstError()}},initialize:function(e){return this.form_renderer=e.form_renderer,this.listenTo(this.form_renderer,"afterValidate:all",()=>(this.render(),this.$el.find(".fr_error_alert_bar a").focus())),this.listenTo(this.form_renderer,"afterValidate:one",function(){if(this.form_renderer.areAllPagesValid())return this.render()})},render:function(){return this.$el.html(JST["plugins/error_bar"](this)),this.form_renderer.trigger("viewRendered",this),this.form_renderer.areAllPagesValid()||s.scrollTo(0,this.$el.offset().top-this.form_renderer.options.scrollToPadding),this}})}.call(this),function(){FormRenderer.Plugins.PageState=class extends FormRenderer.Plugins.Base{afterFormLoad(){var e;return(e=null!=(e=s.location.hash.match(/page([0-9]+)/))?e[1]:void 0)&&(e=parseInt(e,10),this.fr.isPageVisible(e))&&this.fr.activatePage(e),this.fr.state.on("change:activePage",function(e,t){return s.location.hash="page"+t})}}}.call(this),function(){FormRenderer.Plugins.SavedSession=class extends FormRenderer.Plugins.Base{beforeFormLoad(){var e,t,n=`project-${this.fr.options.project_id}-response-id`;return null!=(t=null==this.fr.options.response.id?Cookies.get(n):t)&&(-1!==t.indexOf(",")?(e=this.fr.options.response).id||(e.id=t):Cookies.remove(n)),this.fr.on("afterSave",function(){if(!this.state.get("submitting"))return Cookies.set(n,this.options.response.id)}),this.fr.on("afterSubmit",function(){return Cookies.remove(n)}),this.fr.on("errorSaving",function(){return Cookies.remove(n)})}}}.call(this),function(){FormRenderer.Plugins.WarnBeforeUnload=class extends FormRenderer.Plugins.Base{afterFormLoad(){return BeforeUnload.enable({if:()=>this.fr.state.get("hasChanges")})}}}.call(this),function(){FormRenderer.Views.Page=Backbone.View.extend({className:"fr_page",initialize:function(e){return this.form_renderer=e.form_renderer,this.models=[],this.views=[]},render:function(){var e,t,n,r;for(this.hide(),e=0,t=(n=this.models).length;e{for(var i,o,a,e=this.views,t=[],n=0,r=e.length;nvalidation errors."},error_filename:"Error reading filename",error_loading:"Error loading form",error_saving:"Error saving",finishing_up:"Finishing up...",finish_later:"Finish this later",has_conditions:"Has conditions",hidden:"Hidden",loading_form:"Loading form...",na:"N/A",name:"Name",next_page:"Next page",not_supported:"Sorry, your browser does not support this embedded form. Please visit :url to fill out this form.",other:"Other",postal_code:"Postal Code",province:"Province",remove:"Remove",saved:"Saved",saving:"Saving...",skip:"Skip this question",skipped:"This question is skipped.",state:"State",state_province_region:"State / Province / Region",submit:"Submit",submitting:"Submitting",thanks:"Thanks for submitting our form!",upload:"Upload a file",uploading:"Uploading...",upload_another:"Upload another file",we_accept:"We'll accept",words:"words",write_here:"Write your answer here",zip_code:"ZIP Code"}),s.JST||(s.JST={}),s.JST["fields/address"]=function(e){function u(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?n(e):""}var d=[],t=(e=e||{}).safe,n=e.escape,n=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e,t,n,r,s,i,o,a,l=this.model.get("address_format");if(d.push("\n\n"),"city_state"!==l&&"city_state_zip"!==l&&"country"!==l&&(d.push("\n \n
\n \n \n
\n
\n")),d.push("\n\n"),"country"!==l){if(d.push("\n \n
\n \n \n
\n\n
\n \n\n "),"US"===(s=this.model.get("value.country"))||"CA"===s){for(d.push("\n \n ")}else d.push("\n \n ");d.push("\n
\n
\n")}if(d.push("\n\n\n "),"city_state"!==l&&"country"!==l&&(d.push("\n
\n \n \n
\n ")),d.push("\n\n "),"city_state"!==l&&"city_state_zip"!==l){for(d.push("\n
\n \n \n
\n ")}d.push("\n
\n")}.call(this)}.call(e),e.safe=t,e.escape=n,d.join("")},s.JST||(s.JST={}),s.JST["fields/block_of_text"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push(JST["partials/labels"](this)),n.push("\n\n\n "),n.push(t(this.safe(FormRenderer.formatAndSanitizeHTML(this.model.get("description"))))),n.push("\n
\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/checkboxes"]=function(e){function s(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?n(e):""}var i=[],t=(e=e||{}).safe,n=e.escape,n=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){for(var e,t=this.model.getOptions(),n=0,r=t.length;n\n \n '),i.push(s(e.translated_label||e.label)),i.push("\n \n");i.push("\n\n"),this.model.get("include_other_option")&&(i.push("\n \n \n\n \n
\n")),i.push("\n")}.call(this)}.call(e),e.safe=t,e.escape=n,i.join("")},s.JST||(s.JST={}),s.JST["fields/confirm"]=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e;t.push("\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST["fields/date"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push("\n
\n \n \n
\n\n
/
\n\n
\n \n \n
\n\n '),this.model.get("disable_year")||(n.push("\n
/
\n\n
\n \n \n
\n ')),n.push("\n
\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/dropdown"]=function(e){function s(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?n(e):""}var i=[],t=(e=e||{}).safe,n=e.escape,n=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e,t,n,r;for(i.push('\n")}.call(this)}.call(e),e.safe=t,e.escape=n,i.join("")},s.JST||(s.JST={}),s.JST["fields/email"]=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e;t.push('\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST["fields/file"]=function(e){function i(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?n(e):""}var o=[],t=(e=e||{}).safe,n=e.escape,n=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e,t,n,r,s;for(o.push("\n "),n=0,r=(s=this.model.getFiles()).length;n\n "),o.push(i(e.filename)),o.push("\n \n
\n ");o.push("\n\n\n"),this.model.canAddFile()&&(o.push("\n \n
\n\n
\n\n
\n\n "),(t=this.model.getAcceptedExtensions())&&(o.push("\n
\n "),o.push(i(FormRenderer.t.we_accept)),o.push(" "),o.push(i(a.toSentence(t))),o.push("\n
\n ")),o.push("\n
\n")),o.push("\n")}.call(this)}.call(e),e.safe=t,e.escape=n,o.join("")},s.JST||(s.JST={}),s.JST["fields/identification"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push("\n
\n
\n\n "),this.dontRenderInputs()?(n.push("\n
"),n.push(t(this.model.get("value.name"))),n.push("\n ")):(n.push("\n
\n ")),n.push("\n
\n\n
\n
\n\n "),this.dontRenderInputs()?(n.push("\n
"),n.push(t(this.model.get("value.email"))),n.push("\n ")):(n.push('\n
\n ")),n.push("\n
\n
\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/map_marker"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push("\n
\n \n
\n\n
\n "),n.push(t(FormRenderer.t.click_to_set)),n.push("\n
\n\n
\n
\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/number"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push('\n\n'),this.model.get("units")&&(n.push("\n \n "),n.push(t(this.model.get("units"))),n.push("\n \n")),n.push("\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/page_break"]=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){t.push("\n Page break\n
\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST["fields/paragraph"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push('\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/phone"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push('\n')}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/price"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push("\n
$
\n\n
\n \n \n
\n\n "),this.model.get("disable_cents")||(n.push("\n
.
\n
\n \n \n
\n ')),n.push("\n
\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/radio"]=function(e){function s(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?n(e):""}var i=[],t=(e=e||{}).safe,n=e.escape,n=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){for(var e,t=this.model.getOptions(),n=0,r=t.length;n\n \n '),i.push(s(e.translated_label||e.label)),i.push("\n \n");i.push("\n\n"),this.model.get("include_other_option")&&(i.push("\n \n \n\n \n
\n")),i.push("\n")}.call(this)}.call(e),e.safe=t,e.escape=n,i.join("")},s.JST||(s.JST={}),s.JST["fields/section_break"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e;n.push(JST["partials/labels"](this)),n.push("\n\n"),e=FormRenderer.formatAndSanitizeHTML(this.model.get("description")),n.push("\n<"),n.push(t(this.model.sizeToHeaderTag())),n.push(">"),n.push(t(this.model.get("label"))),n.push(""),n.push(t(this.model.sizeToHeaderTag())),n.push(">\n"),e&&(n.push("\n \n "),n.push(t(this.safe(e))),n.push("\n
\n")),n.push("\n\n
\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/table"]=function(e){function f(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?n(e):""}var m=[],t=(e=e||{}).safe,n=e.escape,n=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e,t,n,r,s,i,o,a,l,u,d,p,h,c;for(m.push("\n \n \n "),r=0,i=(d=this.model.getColumns()).length;r"),m.push(f(e.translated_label||e.label)),m.push("\n ");for(m.push("\n\n | \n
\n \n\n \n "),t=s=0,p=this.model.numRows()-1;0<=p?s<=p:p<=s;t=0<=p?++s:--s){for(m.push('\n \n '),n=l=0,o=(h=this.model.getColumns()).length;l\n \n ")):(m.push("\n \n \n ")),m.push("\n | \n ");m.push("\n\n \n "),this.canRemoveRow(t)&&(m.push("\n \n "),m.push(FormRenderer.REMOVE_ROW_ICON),m.push("\n \n ")),m.push("\n | \n
\n ")}if(m.push("\n \n\n "),this.model.get("column_totals")){for(m.push("\n \n \n "),n=u=0,a=(c=this.model.getColumns()).length;u\n ");m.push('\n | \n
\n \n ')}m.push("\n
\n\n\n")}.call(this)}.call(e),e.safe=t,e.escape=n,m.join("")},s.JST||(s.JST={}),s.JST["fields/text"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push('\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/time"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push("\n
\n \n \n
\n\n
:
\n\n
\n \n \n
\n\n '),this.model.get("disable_seconds")||(n.push("\n
:
\n\n
\n \n \n
\n ')),n.push("\n\n
\n \n
\n
\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["fields/website"]=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e;t.push('\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST.main=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e;t.push("\n "),t.push((e=FormRenderer.t.loading_form)&&e.ecoSafe?e:void 0!==e&&null!=e?r(e):""),t.push("\n
\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST["partials/description"]=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e;this.model.get("description")&&(t.push("\n \n "),t.push((e=this.safe(FormRenderer.formatAndSanitizeHTML(this.model.get("description"))))&&e.ecoSafe?e:void 0!==e&&null!=e?r(e):""),t.push("\n
\n")),t.push("\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST["partials/email_sent"]=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e;t.push(""),t.push((e=this.message)&&e.ecoSafe?e:void 0!==e&&null!=e?r(e):""),t.push("
\n\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST["partials/error"]=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){t.push("\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST["partials/label"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push("\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["partials/labels"]=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],r=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){this.showLabels&&(n.push("\n "),this.model.get("admin_only")&&(n.push("\n "),n.push(t(FormRenderer.t.hidden)),n.push("\n ")),n.push("\n "),this.model.get("blind")&&(n.push("\n "),n.push(t(FormRenderer.t.blind)),n.push("\n ")),n.push("\n "),this.model.isConditional()&&(n.push("\n "),n.push(t(FormRenderer.t.has_conditions)),n.push("\n ")),n.push("\n")),n.push("\n")}.call(this)}.call(e),e.safe=r,e.escape=s,n.join("")},s.JST||(s.JST={}),s.JST["partials/length_counter"]=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){t.push("\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST["partials/length_validations"]=function(e){function r(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?n(e):""}var s=[],t=(e=e||{}).safe,n=e.escape,n=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e,t,n=this.model.get("minlength");s.push("\n"),e=this.model.get("maxlength"),s.push("\n"),t=this.model.getLengthValidationUnits(),s.push("\n\n"),this.model.hasLengthValidation()&&(s.push("\n \n \n "),n&&e?(s.push("\n "),n===e?(s.push("\n "),s.push(r(FormRenderer.t.enter_exactly.replace(":num",n)))):(s.push("\n "),s.push(r(FormRenderer.t.enter_between.replace(":min",n).replace(":max",e)))),s.push(" "),s.push(r(FormRenderer.t[t])),s.push(".\n "),s.push("\n ")):n?(s.push("\n "),s.push(r(FormRenderer.t.enter_at_least.replace(":min",n))),s.push(" "),s.push(r(FormRenderer.t[t])),s.push(".\n ")):e&&(s.push("\n "),s.push(r(FormRenderer.t.enter_up_to.replace(":max",e))),s.push(" "),s.push(r(FormRenderer.t[t])),s.push(".\n ")),s.push("\n \n\n "),s.push(JST["partials/length_counter"](this)),s.push("\n
\n")),s.push("\n")}.call(this)}.call(e),e.safe=t,e.escape=n,s.join("")},s.JST||(s.JST={}),s.JST["partials/min_max_validations"]=function(e){function n(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var r=[],t=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e,t;this.model.hasMinMaxValidation()&&(r.push("\n "),t=this.model.get("min"),r.push("\n "),e=this.model.get("max"),r.push("\n\n \n "),t&&e?(r.push("\n "),r.push(n(FormRenderer.t.enter_between.replace(":min",t).replace(":max",e))),r.push(".\n ")):t?(r.push("\n "),r.push(n(FormRenderer.t.enter_at_least.replace(":min",t))),r.push(".\n ")):e&&(r.push("\n "),r.push(n(FormRenderer.t.enter_up_to.replace(":max",e))),r.push(".\n ")),r.push("\n
\n")),r.push("\n")}.call(this)}.call(e),e.safe=t,e.escape=s,r.join("")},s.JST||(s.JST={}),s.JST["partials/non_input_response_field"]=function(e){var t=[],n=(e=e||{}).safe,r=e.escape,r=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},r||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){t.push(JST["fields/"+this.model.field_type](this)),t.push("\n")}.call(this)}.call(e),e.safe=n,e.escape=r,t.join("")},s.JST||(s.JST={}),s.JST["partials/pagination"]=function(e){function i(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?n(e):""}var o=[],t=(e=e||{}).safe,n=e.escape,n=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},n||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e,t,n,r,s;if(1