1/** 2 * FormsPlus Core Utility Library 3 * @preserve @author Sanford Whiteman, TEKNKL (blog.teknkl.com / [email protected]) 4 * @version v1.0.8 5 * @copyright Copyright 2016-2022 FigureOne, Inc. 6 * @license MIT License: http://www.opensource.org/licenses/mit-license 7 * You MUST include the licenses and credits herein in uses & reproductions of this software. 8 9 * includes JavaScript Cookie v2.1.4 https://github.com/js-cookie/js-cookie 10 * @copyright Copyright 2006, 2015 Klaus Hartl & Fagner Brack 11 * @license MIT License http://www.opensource.org/licenses/mit-license 12 13 * includes URI.js v1.18.0 http://medialize.github.io/URI.js/ URI.js - Mutating URLs 14 * @copyright Copyright 2011 Rodney Rehm 15 * @license MIT License http://www.opensource.org/licenses/mit-license 16 17 * includes Mozilla Object.assign polyfill https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#polyfill 18 * @license CC-BY-SA http://creativecommons.org/licenses/by-sa/2.5/legalcode 19 20 * contains [assignment.js v2.2.0](https://github.com/bevacqua/assignment) 21 * @copyright Copyright (c) 2015 Nicolas Bevacqua 22 * @license https://github.com/bevacqua/assignment/blob/master/license 23 * 24 * contains [TC39 RegExp.escape proposal polyfill](https://github.com/tc39/proposal-regex-escaping/blob/main/polyfill.js) 25 * @copyright Copyright (c) 2015 Benjamin Gruenbaum 26 * @license CC0 1.0 https://github.com/tc39/proposal-regex-escaping/blob/main/LICENSE.txt 27 */ 28window.FormsPlus={util:{}},"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),n=1;n<arguments.length;n++){var s=arguments[n];if(null!=s)for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])}return r},writable:!0,configurable:!0}),function(t){var e=!1;if("function"==typeof define&&define.amd&&(define(t),e=!0),"object"==typeof exports&&(module.exports=t(),e=!0),!e){var r=window.Cookies,n=window.Cookies=t();n.noConflict=function(){return window.Cookies=r,n}}}(function(){function t(){for(var t=0,e={};t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}return function e(r){function n(e,s,i){var a;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=t({path:"/"},n.defaults,i)).expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*i.expires),i.expires=o}i.expires=i.expires?i.expires.toUTCString():"";try{a=JSON.stringify(s),/^[\{\[]/.test(a)&&(s=a)}catch(t){}s=r.write?r.write(s,e):encodeURIComponent(String(s)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var u="";for(var h in i)i[h]&&(u+="; "+h,!0!==i[h]&&(u+="="+i[h]));return document.cookie=e+"="+s+u}e||(a={});for(var p=document.cookie?document.cookie.split("; "):[],c=0;c<p.length;c++){var l=p[c].split("="),d=l.slice(1).join("=");'"'===d.charAt(0)&&(d=d.slice(1,-1));try{var f=l[0].replace(/(%[0-9A-Z]{2}
28)+/g,decodeURIComponent);if(d=r.read?r.read(d,f):r(d,f)||d.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent),this.json)try{d=JSON.parse(d)}catch(t){}if(e===f){a=d;break}e||(a[f]=d)}catch(t){}}return a}}return n.set=n,n.get=function(t){return n.call(n,t)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(e,r){n(e,"",t(r,{expires:-1}))},n.withConverter=e,n}(function(){})}),window.FormsPlus.util.Cookies=window.Cookies.noConflict(),function(){var t,e;t=this,e=function(t,e,r,n){var s=n&&n.URI;function i(t,e){var r=arguments.length>=1;if(!(this instanceof i))return r?arguments.length>=2?new i(t,e):new i(t):new i;if(void 0===t){if(r)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}return this.href(t),void 0!==e?this.absoluteTo(e):this}i.version="1.18.0";var a=i.prototype,o=Object.prototype.hasOwnProperty;function u(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function h(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function p(t){return"Array"===h(t)}function c(t,e){var r,n,s={};if("RegExp"===h(e))s=null;else if(p(e))for(r=0,n=e.length;r<n;r++)s[e[r]]=!0;else s[e]=!0;for(r=0,n=t.length;r<n;r++)(s&&void 0!==s[t[r]]||!s&&e.test(t[r]))&&(t.splice(r,1),n--,r--);return t}function l(t,e){var r,n;if(p(e)){for(r=0,n=e.length;r<n;r++)if(!l(t,e[r]))return!1;return!0}var s=h(e);for(r=0,n=t.length;r<n;r++)if("RegExp"===s){if("string"==typeof t[r]&&t[r].match(e))return!0}else if(t[r]===e)return!0;return!1}function d(t,e){if(!p(t)||!p(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function f(t){return t.replace(/^\/+|\/+$/g,"")}function m(t){return escape(t)}function g(t){return encodeURIComponent(t).replace(/[!'()*]/g,m).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\.-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return i.domAttributes[e]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(t,e){var r=i.encode(t+"");return void 0===e&&(e=i.escapeQuerySpace),e?r.replace(/%20/g,"+"):r},i.decodeQuery=function(t,e){t+="",void 0===e&&(e=i.escapeQuerySpace);try{return i.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var y,_={encode:"encode",decode:"decode"},v=function(t,e){return function(r){try{return i[e](r+"").replace(i.characters[t][e].expression,function(r){return i.characters[t][e].map[r]})}catch(t){return r}}};for(y in _)i[y+"PathSegment"]=v("pathname",_[y]),i[y+"UrnPathSegment"]=v("urnpath",_[y]);var b=function(t,e,r){return function(n){var s;s=r?function(t){return i[e](i[r](t))}:i[e];for(var a=(n+"").split(t),o=0,u=a.length;o<u;o++)a[o]=s(a[o]);return a.join(t)}};function w(t){return function(e,r){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!r),this)}}function A(t,e){return function(r,n){return void 0===r?this._parts[t]||"":(null!==r&&(r+="").charAt(0)===e&&(r=r.substring(1)),this._parts[t]=r,this.build(!n),this)}}i.decodePath=b("/","decodePathSegment"),i.decodeUrnPath=b(":","decode
28UrnPathSegment"),i.recodePath=b("/","encodePathSegment","decode"),i.recodeUrnPath=b(":","encodeUrnPathSegment","decode"),i.encodeReserved=v("reserved","encode"),i.parse=function(t,e){var r;return e||(e={}),(r=t.indexOf("#"))>-1&&(e.fragment=t.substring(r+1)||null,t=t.substring(0,r)),(r=t.indexOf("?"))>-1&&(e.query=t.substring(r+1)||null,t=t.substring(0,r)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=i.parseAuthority(t,e)):(r=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,r)||null,e.protocol&&!e.protocol.match(i.protocol_expression)?e.protocol=void 0:"//"===t.substring(r+1,r+3)?(t=t.substring(r+3),t=i.parseAuthority(t,e)):(t=t.substring(r+1),e.urn=!0)),e.path=t,e},i.parseHost=function(t,e){var r,n,s=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===s&&(s=t.length),"["===t.charAt(0))r=t.indexOf("]"),e.hostname=t.substring(1,r)||null,e.port=t.substring(r+2,s)||null,"/"===e.port&&(e.port=null);else{var i=t.indexOf(":"),a=t.indexOf("/"),o=t.indexOf(":",i+1);-1!==o&&(-1===a||o<a)?(e.hostname=t.substring(0,s)||null,e.port=null):(n=t.substring(0,s).split(":"),e.hostname=n[0]||null,e.port=n[1]||null)}return e.hostname&&"/"!==t.substring(s).charAt(0)&&(s++,t="/"+t),t.substring(s)||"/"},i.parseAuthority=function(t,e){return t=i.parseUserinfo(t,e),i.parseHost(t,e)},i.parseUserinfo=function(t,e){var r,n=t.indexOf("/"),s=t.lastIndexOf("@",n>-1?n:t.length-1);return s>-1&&(-1===n||s<n)?(r=t.substring(0,s).split(":"),e.username=r[0]?i.decode(r[0]):null,r.shift(),e.password=r[0]?i.decode(r.join(":")):null,t=t.substring(s+1)):(e.username=null,e.password=null),t},i.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,s,a={},u=t.split("&"),h=u.length,p=0;p<h;p++)r=u[p].split("="),n=i.decodeQuery(r.shift(),e),s=r.length?i.decodeQuery(r.join("="),e):null,o.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(s)):a[n]=s;return a},i.build=function(t){var e="";return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//"),e+=i.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&"string"==typeof t.hostname&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},i.buildHost=function(t){var e="";return t.hostname?(i.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},i.buildAuthority=function(t){return i.buildUserinfo(t)+i.buildHost(t)},i.buildUserinfo=function(t){var e="";return t.username&&(e+=i.encode(t.username)),t.password&&(e+=":"+i.encode(t.password)),e&&(e+="@"),e},i.buildQuery=function(t,e,r){var n,s,a,u,h="";for(s in t)if(o.call(t,s)&&s)if(p(t[s]))for(n={},a=0,u=t[s].length;a<u;a++)void 0!==t[s][a]&&void 0===n[t[s][a]+""]&&(h+="&"+i.buildQueryParameter(s,t[s][a],r),!0!==e&&(n[t[s][a]+""]=!0));else void 0!==t[s]&&(h+="&"+i.buildQueryParameter(s,t[s],r));return h.substring(1)},i.buildQueryParameter=function(t,e,r){return i.encodeQuery(t,r)+(null!==e?"="+i.encodeQuery(e,r):"")},i.addQuery=function(t,e,r){if("object"==typeof e)for(var n in e)o.call(e,n)&&i.addQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=r);"string"==typeof t[e]&&(t[e]=[t[e]]),p(r)||(r=[r]),t[e]=(t[e]||[]).concat(r)}},i.removeQuery=function(t,e,r){var n,s,a;if(p(e))for(n=0,s=e.length;n<s;n++)t[e[n]]=void 0;else if("RegExp"===h(e))for(a in t)e.test(a)&&(t[a]=void 0);else if("object"==typeof e)for(a in e)o.call(e,a)&&i.removeQuery(t,a,e[a
28]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===h(r)?!p(t[e])&&r.test(t[e])?t[e]=void 0:t[e]=c(t[e],r):t[e]!==String(r)||p(r)&&1!==r.length?p(t[e])&&(t[e]=c(t[e],r)):t[e]=void 0:t[e]=void 0}},i.hasQuery=function(t,e,r,n){switch(h(e)){case"String":break;case"RegExp":for(var s in t)if(o.call(t,s)&&e.test(s)&&(void 0===r||i.hasQuery(t,s,r)))return!0;return!1;case"Object":for(var a in e)if(o.call(e,a)&&!i.hasQuery(t,a,e[a]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(h(r)){case"Undefined":return e in t;case"Boolean":return r===Boolean(p(t[e])?t[e].length:t[e]);case"Function":return!!r(t[e],e,t);case"Array":return!!p(t[e])&&(n?l:d)(t[e],r);case"RegExp":return p(t[e])?!!n&&l(t[e],r):Boolean(t[e]&&t[e].match(r));case"Number":r=String(r);case"String":return p(t[e])?!!n&&l(t[e],r):t[e]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var t=[],e=[],r=0,n=0;n<arguments.length;n++){var s=new i(arguments[n]);t.push(s);for(var a=s.segment(),o=0;o<a.length;o++)"string"==typeof a[o]&&e.push(a[o]),a[o]&&r++}if(!e.length||!r)return new i("");var u=new i("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},i.commonPath=function(t,e){var r,n=Math.min(t.length,e.length);for(r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r)){r--;break}return r<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(r)&&"/"===e.charAt(r)||(r=t.substring(0,r).lastIndexOf("/")),t.substring(0,r+1))},i.withinString=function(t,e,r){r||(r={});var n=r.start||i.findUri.start,s=r.end||i.findUri.end,a=r.trim||i.findUri.trim,o=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var u=n.exec(t);if(!u)break;var h=u.index;if(r.ignoreHtml){var p=t.slice(Math.max(h-3,0),h);if(p&&o.test(p))continue}var c=h+t.slice(h).search(s),l=t.slice(h,c).replace(a,"");if(!r.ignore||!r.ignore.test(l)){var d=e(l,h,c=h+l.length,t);t=t.slice(0,h)+d+t.slice(c),n.lastIndex=h+d.length}}return n.lastIndex=0,t},i.ensureValidHostname=function(e){if(e.match(i.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(t.toASCII(e).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]')}},i.noConflict=function(t){if(t){var e={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e}return n.URI===this&&(n.URI=s),this},a.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new i(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=w("protocol"),a.username=w("username"),a.password=w("password"),a.hostname=w("hostname"),a.port=w("port"),a.query=A("query","?"),a.fragment=A("fragment","#"),a.search=function(t,e){var r=this.query(t,e);return"string"==typeof r&&r.length?"?"+r:r},a.hash=function(t,e){var r=this.fragment(t,e);return"string"==typeof r&&r.length?"#"+r:r},a.pathname=function(t,e){if(void 0===t||!0===t){var r=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=t?i.recodeUrnPath(t):"":this._parts.path=t?i.recodePath(t):"/",this.build(!e),this},a.path=a.pathname,a.href=function(t,e){var r;if(void 0===t)return this.toString();this._string="",this._parts=i._parts();var n=t instanceof i,s="object"==typeof t&&(t.hostname||t.path||t.pathname);if(t.nodeName&&(t=t[i.getDomAttribute(t)]||"",s=!1),!n&&s&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=i.parse(String(t),this._parts);else{if(!n&&!s)throw new TypeError("invalid input");var a=n?t._parts:t;
28for(r in a)o.call(this._parts,r)&&(this._parts[r]=a[r])}return this.build(!e),this},a.is=function(t){var e=!1,n=!1,s=!1,a=!1,o=!1,u=!1,h=!1,p=!this._parts.urn;switch(this._parts.hostname&&(p=!1,n=i.ip4_expression.test(this._parts.hostname),s=i.ip6_expression.test(this._parts.hostname),o=(a=!(e=n||s))&&r&&r.has(this._parts.hostname),u=a&&i.idn_expression.test(this._parts.hostname),h=a&&i.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return p;case"absolute":return!p;case"domain":case"name":return a;case"sld":return o;case"ip":return e;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return s;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return h}return null};var P=a.protocol,x=a.port,Q=a.hostname;a.protocol=function(t,e){if(void 0!==t&&t&&!(t=t.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return P.call(this,t,e)},a.scheme=a.protocol,a.port=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),t.match(/[^0-9]/))))throw new TypeError('Port "'+t+'" contains characters other than [0-9]');return x.call(this,t,e)},a.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var r={};if("/"!==i.parseHost(t,r))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=r.hostname}return Q.call(this,t,e)},a.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(t);return this.protocol(n.protocol()).authority(n.authority()).build(!e),this},a.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==t[t.length-1]&&(t+="@"),i.parseUserinfo(t,this._parts),this.build(!e),this},a.resource=function(t,e){var r;return void 0===t?this.path()+this.search()+this.hash():(r=i.parse(t),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!e),this)},a.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,s=this._parts.hostname.substring(0,n),a=new RegExp("^"+u(s));return t&&"."!==t.charAt(t.length-1)&&(t+="."),t&&i.ensureValidHostname(t),this._parts.hostname=this._parts.hostname.replace(a,t),this.build(!e),this},a.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(e).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!t)throw new TypeError("cannot set domain empty");if(i.ensureValidHostname(t),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var s=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(s,t)}return this.build(!e),this},a.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),s=this._parts.hostname.substring(n+1);return!0!==e&&r&&r.list[s.toLowerCase()]&&r.get(this._parts.hostname)||s}var i;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');
28i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},a.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return t?i.decodePath(n):n}var s=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,s),o=new RegExp("^"+u(a));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(o,t),this.build(!e),this},a.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return t?i.decodePathSegment(n):n}var s=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(s=!0);var a=new RegExp(u(this.filename())+"$");return t=i.recodePath(t),this._parts.path=this._parts.path.replace(a,t),s?this.normalizePath(e):this.build(!e),this},a.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,s=this.filename(),a=s.lastIndexOf(".");return-1===a?"":(r=s.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",t?i.decodePathSegment(n):n)}"."===t.charAt(0)&&(t=t.substring(1));var o,h=this.suffix();if(h)o=t?new RegExp(u(h)+"$"):new RegExp(u("."+h)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return o&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(o,t)),this.build(!e),this},a.segment=function(t,e,r){var n=this._parts.urn?":":"/",s=this.path(),i="/"===s.substring(0,1),a=s.split(n);if(void 0!==t&&"number"!=typeof t&&(r=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(i&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(p(e)){a=[];for(var o=0,u=e.length;o<u;o++)(e[o].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(f(e[o])))}else(e||"string"==typeof e)&&(e=f(e),""===a[a.length-1]?a[a.length-1]=e:a.push(e));else e?a[t]=f(e):a.splice(t,1);return i&&a.unshift(""),this.path(a.join(n),r)},a.segmentCoded=function(t,e,r){var n,s,a;if("number"!=typeof t&&(r=e,e=t,t=void 0),void 0===e){if(p(n=this.segment(t,e,r)))for(s=0,a=n.length;s<a;s++)n[s]=i.decode(n[s]);else n=void 0!==n?i.decode(n):void 0;return n}if(p(e))for(s=0,a=e.length;s<a;s++)e[s]=i.encode(e[s]);else e="string"==typeof e||e instanceof String?i.encode(e):e;return this.segment(t,e,r)};var S=a.query;return a.query=function(t,e){if(!0===t)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=t.call(this,r);return this._parts.query=i.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=i.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):S.call(this,t,e)},a.setQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)n[t]=void 0!==e?e:null;else{if("object"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var s in t)o.call(t,s)&&(n[s]=t[s])}return this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},a.addQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(n,t,void 0===e?null:e),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},a.removeQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(n,t,e),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},a.hasQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(n,t,e,r)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},a.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},a.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},a.normalizePath=function(t){var e,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;var n,s,a="";for("/"!==(r=i.recodePath(r)).charAt(0)&&(e=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),e&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(s=r.substring(0,n).lastIndexOf("/"))&&(s=n),r=r.substring(0,s)+r.substring(n+3)):r=r.substring(3);return e&&this.is("relative")&&(r=a+r.substring(1)),this._parts.path=r,this.build(!t),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},a.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var t=i.encode,e=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},a.unicode=function(){var t=i.encode,e=i.decode;i.encode=g,i.decode=unescape;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},a.readable=function(){var e=this.clone();e.username("").password("").normalize();var r="";if(e._parts.protocol&&(r+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(r+=t.toUnicode(e._parts.hostname),e._parts.port&&(r+=":"+e._parts.port)):r+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.
28charAt(0)&&(r+="/"),r+=e.path(!0),e._parts.query){for(var n="",s=0,a=e._parts.query.split("&"),o=a.length;s<o;s++){var u=(a[s]||"").split("=");n+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(n+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=i.decodeQuery(e.hash(),!0)},a.absoluteTo=function(t){var e,r,n,s=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof i||(t=new i(t)),s._parts.protocol||(s._parts.protocol=t._parts.protocol),this._parts.hostname)return s;for(r=0;n=a[r];r++)s._parts[n]=t._parts[n];return s._parts.path?".."===s._parts.path.substring(-2)&&(s._parts.path+="/"):(s._parts.path=t._parts.path,s._parts.query||(s._parts.query=t._parts.query)),"/"!==s.path().charAt(0)&&(e=(e=t.directory())||(0===t.path().indexOf("/")?"/":""),s._parts.path=(e?e+"/":"")+s._parts.path,s.normalizePath()),s.build(),s},a.relativeTo=function(t){var e,r,n,s,a,o=this.clone().normalize();if(o._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new i(t).normalize(),e=o._parts,r=t._parts,s=o.path(),a=t.path(),"/"!==s.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===r.protocol&&(e.protocol=null),e.username!==r.username||e.password!==r.password)return o.build();if(null!==e.protocol||null!==e.username||null!==e.password)return o.build();if(e.hostname!==r.hostname||e.port!==r.port)return o.build();if(e.hostname=null,e.port=null,s===a)return e.path="",o.build();if(!(n=i.commonPath(s,a)))return o.build();var u=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=u+e.path.substring(n.length)||"./",o.build()},a.equals=function(t){var e,r,n,s,a,u=this.clone(),h=new i(t),c={};if(u.normalize(),h.normalize(),u.toString()===h.toString())return!0;if(n=u.query(),s=h.query(),u.query(""),h.query(""),u.toString()!==h.toString())return!1;if(n.length!==s.length)return!1;for(a in e=i.parseQuery(n,this._parts.escapeQuerySpace),r=i.parseQuery(s,this._parts.escapeQuerySpace),e)if(o.call(e,a)){if(p(e[a])){if(!d(e[a],r[a]))return!1}else if(e[a]!==r[a])return!1;c[a]=!0}for(a in r)if(o.call(r,a)&&!c[a])return!1;return!0},a.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},a.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},i},"object"==typeof exports?module.exports=e(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],e):t.URI=e(t.punycode,t.IPv6,t.SecondLevelDomains,t),window.FormsPlus.util.URI=window.URI.noConflict(!0)}(),window.FormsPlus.util.DNS={},window.FormsPlus.util.DNS.climbDomains=function(t,e,r){var n=[];t=t||[],(r=r||document.location.hostname).split(".").reverse().reduce(function(t,e){var r=[e,t].join(".");return n.push(r),r}),n.forEach(function(r){-1==t.indexOf(r)&&e(r)})},window.FormsPlus.util.DNS.findPrivateSuffix=function(t){var e={},r=RegExp("(?:^|\\s|;)(?:_mch_auto_domain=)(.*?)(?:;|$)","ig"),n={};t=t||{},e[2]=!0;try{var s=sessionStorage.getItem("shortestPrivateSuffix");if(t.cache&&!s)try{sessionStorage.setItem("_mch_cache_test",""),sessionStorage.removeItem("_mch_cache_test"),e[1]=!0}catch(t){}}catch(t){}if(t.cache&&s)n.source=1;else{for(var i=document.location.hostname.split(/\./),a=0,o=i.length;a<o;a++)t=i.slice(a).join("."),FormsPlus.util.Cookies.set("_mch_auto_domain",t,{domain:t});for(i=document.cookie.toString();t=r.exec(i);)t=t[1],(!s||t.length<s.length)&&(s=t,FormsPlus.util.Cookies.remove("_mch_auto_domain",{domain:t}));n.source=2,1==e[1]&&sessionStorage.setItem("shortestPrivateSuffix",s)}return n.cookieDomain="."+s,n.domainLevel=s.split(".").length,n},window.FormsPlus.strings={MARKETO_TRACKING_COOKIE:"_mkto_trk",MARKETO_EMAIL_ASSOCIATOR_TOKEN:"mkt_tok",MARKETO_FORM_DATA_CACHE:"aliId"},window.FormsPlus.util.Object={},window.FormsPlus.util.Object.assign2=function t(e){for(var r,n,s=Array.prototype.slice.call(arguments,1
28);s.length;)for(n in r=s.shift())r.hasOwnProperty(n)&&("object"==typeof e[n]&&e[n]&&"[object Array]"!==Object.prototype.toString.call(e[n])?e[n]="object"==typeof r[n]&&null!==r[n]?t(e[n],r[n]):r[n]:e[n]=r[n]);return e},window.FormsPlus.util.RegExp={},window.FormsPlus.util.RegExp.escape=RegExp.escape||function(t){return String(t).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},window.FormsPlus.util.Forms={},window.FormsPlus.util.Forms.freezeInput=function(t,e,r){if(!(t=t.getFormElem()[0].querySelector("input[name='"+e+"']"))||!/^(|text|email|tel|url|checkbox)$/.test(t.type))throw"Field not found in form. Note only <input type=checkbox>, <input type=text> and text subtypes are freezable by this function.";Object.defineProperty(t,"checkbox"==t.type?"checked":"value",{get:function(){return r},set:function(t){},enumerable:!0,configurable:!0})}; 29//# sourceMappingURL=teknkl-formsplus-core-1.0.8.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.