1/*! jQuery Migrate v1.4.1 | (c) jQuery Foundation and other contributors | jquery.org/license */ 2"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}a.migrateVersion="1.4.1";var f={};a.migrateWarnings=[],a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("<input/>",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') might use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.find,s=a.parseJSON,t=/^\s*</,u=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,v=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,w=/^([^<]*)(<[\w\W]+>)([^>]*)$/;a.fn.init=function(b,e,f){var g,h;return b&&"string"==typeof b&&!a.isPlainObject(e)&&(g=w.exec(a.trim(b)))&&g[0]&&(t.test(b)||d("$(html) HTML strings must start with '<' character"),g[3]&&d("$(html) HTML text after last tag is ignored"),"#"===g[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),e&&e.context&&e.context.nodeType&&(e=e.context),a.parseHTML)?q.call(this,a.parseHTML(g[2],e&&e.ownerDocument||e||document,!0),e,f):(h=q.apply(this,arguments),b&&b.selector!==c?(h.selector=b.selector,h.context=b.context):(h.selector="string"==typeof b?b:"",b&&(h.context=b.nodeType?b:e||document)),h)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&u.test(a))try{document.querySelector(a)}catch(c){a=a.replace(v,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),d("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){d("Attribute selector with '#' was not fixed: "+b[0])}}return r.apply(this,b)};var x;for(x in r)Object.prototype.hasOwnProperty.call(r,x)&&(a.find[x]=r[x]);a.parseJSON=function(a){return a?s.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.boxModel=a.support.boxModel="CSS1Compat"===document.compatMode,e(a,"boxModel",a.boxModel,"jQuery.boxModel is deprecated"),e(
2a.support,"boxModel",a.support.boxModel,"jQuery.support.boxModel is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){var f=a.fn.init.call(this,d,e,c);return f instanceof b?f:b(f)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.fn.size=function(){return d("jQuery.fn.size() is deprecated; use the .length property"),this.length};var y=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return y=!0,a=d.apply(this,arguments),y=!1,a})}),a.swap=function(a,b,c,e){var f,g,h={};y||d("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=c.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f},a.ajaxSetup({converters:{"text json":a.parseJSON}});var z=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?z.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var A=/\/(java|ecma)script/i;a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||A.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var B=a.event.add,C=a.event.remove,D=a.event.trigger,E=a.fn.toggle,F=a.fn.live,G=a.fn.die,H=a.fn.load,I="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",J=new RegExp("\\b(?:"+I+")\\b"),K=/(?:^|\s)hover(\.\S+|)\b/,L=function(b){return"string"!=typeof b||a.event.special.hover?b:(K.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(K,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&J.test(b)&&d("AJAX events should be attached to document: "+b),B.call(this,a,L(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){C.call(this,a,L(b)||"",c,d,e)},a.each(["load","unload","error"],function(b,c){a.fn[c]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===c&&"string"==typeof a[0]?H.apply(this,a):(d("jQuery.fn."+c+"() is deprecated"),a.splice(0,0,c),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return E.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g<e.length;)e[g++].guid=f;return this.click(h)},a.fn.live=function(b,c,e){return d("jQuery.fn.live() is deprecated"),F?F.apply(this,arguments):(a(this.context).on(b,this.selector,c,e),this)},a.fn.die=function(b,c){return d("jQuery.fn.die() is deprecated"),G?G.apply(this,arguments):(a(this.context).off(b,this.selector||"**",c),this)},a.event.trigger=function(a,b,c,e){return c||J.test(a)||d("Global events are undocumented and deprecated"),D.call(this,a,b,c||document,e)},a.each(I.split("|"),function(b,c){a.event.special[c]={setup:function(){var b=this;return b!==document&&(a.event.add(document,c+"."+a.guid,function(){a.event.trigger(c,Array.prototype.slice.call(arguments,1),b,!0)}),a._data(this,c,a.guid++)),!1},teardown:function(){return this!==document&&a.event.remove(document,c+"."+a._data(this,c)),!1}}}),a.event.special.ready={setup:function(){this===document&&d("'ready' event is deprecated")}};var M=a.fn.andSelf||a.fn.addBack,N=a.fn.find;if(a.fn.andSelf=function(){return d("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),M.apply(this,arguments)},a.fn.find=function(a){var b=N.apply(this,arguments);return b.context=this.context,b.selector=this.selector?this.selector+" "+a:a,b},a.Callbacks){var O=a.Deferred,P=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var c=O(),e=c.promise();return c.pipe=e.pipe=function(){var b=arguments;return d("deferred.pipe() is deprecated"),a.Deferred(function(d){a.each(P,function(f,g){var h=a.isFunction(b[f])&&b[f];c[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(d.resolve).fail(d.reject).progress(d.notify):d[g[0]+"With"](this===e?d.promise():this,h?[b]:arguments)})}),b=null}).promise()},c.isResolved=function(){return d("deferred.isResolved is deprecated"),"resolved"===c.state()},c.isRejected=function(){return d("deferred.isRejected is deprecated"),"rejected"===c.state()},b&&b.call(c,c),c}}}(jQuery,window);!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();
2t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{/^[\{\[]/.test(c=JSON.stringify(r))&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<p.length;u++){var l=p[u].split("="),C=l.slice(1).join("=");this.json||'"'!==C.charAt(0)||(C=C.slice(1,-1));try{var g=l[0].replace(d,decodeURIComponent);if(C=o.read?o.read(C,g):o(C,g)||C.replace(d,decodeURIComponent),this.json)try{C=JSON.parse(C)}catch(e){}if(n===g){c=C;break}n||(c[g]=C)}catch(e){}}return c}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}return n(function(){})});/** 3 * blankshield - Prevent reverse tabnabbing phishing attacks caused by _blank 4 * 5 * @version 0.6.0 6 * @link https://github.com/danielstjules/blankshield 7 * @author Daniel St. Jules <[email protected]> 8 * @license MIT 9 */ 10!function(e){"use strict";function n(e){if("undefined"==typeof e.length)o(e,"click",t);else if("string"!=typeof e&&!(e instanceof String))for(var n=0;n<e.length;n++)o(e[n],"click",t)}function t(e){var t,o,i,d;return e=e||window.event,t=e.currentTarget||e.srcElement,i=t.getAttribute("href"),i&&(d=e.ctrlKey||e.shiftKey||e.metaKey,o=t.getAttribute("target"),d||o&&!r(o))?(n.open(i),e.preventDefault?e.preventDefault():e.returnValue=!1,!1):void 0}function o(e,n,t){var o,i;return e.addEventListener?e.addEventListener(n,t,!1):(o="on"+n,e.attachEvent?e.attachEvent(o,t):e[o]?(i=e[o],e[o]=function(){t(),i()}):e[o]=t,void 0)}function i(e,n,t){var o,i,r,d,u;return o=document.createElement("iframe"),o.style.display="none",document.body.appendChild(o),i=o.contentDocument||o.contentWindow.document,d='"'+e+'"',n&&(d+=', "'+n+'"'),t&&(d+=', "'+t+'"'),r=i.createElement("script"),r.type="text/javascript",r.text="window.parent = null; window.top = null;window.frameElement = null; var child = window.open("+d+");child.opener = null",i.body.appendChild(r),u=o.contentWindow.child,document.body.removeChild(o),u}function r(e){return"_top"===e||"_self"===e||"_parent"===e}var d=-1!==navigator.userAgent.indexOf("MSIE"),u=window.open;n.open=function(e,n,t){var o;return r(n)?u.apply(window,arguments):d?(o=u.apply(window,arguments),o.opener=null,o):i(e,n,t)},n.patch=function(){window.open=function(){return n.open.apply(this,arguments)}},"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports?module.exports=n:exports.blankshield=n),"function"==typeof define&&"object"==typeof define.amd&&define("blankshield",[],function(){return n}),e.blankshield=n}(this);/*! URI.js v1.18.12 http://medialize.github.io/URI.js/ */ 11(function(f,m){"object"===typeof module&&module.exports?module.exports=m():"function"===typeof define&&define.amd?define(m):f.IPv6=m(f)})(this,function(f){var m=f&&f.IPv6;return{best:function(h){h=h.toLowerCase().split(":");var k=h.length,b=8;""===h[0]&&""===h[1]&&""===h[2]?(h.shift(),h.shift()):""===h[0]&&""===h[1]?h.shift():""===h[k-1]&&""===h[k-2]&&h.pop();k=h.length;-1!==h[k-1].indexOf(".")&&(b=7);var q;for(q=0;q<k&&""!==h[q];q++);if(q<b)for(h.splice(q,1,"0000");h.length<b;)h.splice(q,0,"0000");for(q=0;q<b;q++){for(var k=h[q].split(""),f=0;3>f;f++)if("0"===k[0]&&1<k.length)k.splice(0,1);else break;h[q]=k.join("")}var k=-1,m=f=0,g=-1,p=!1;for(q=0;q<b;q++)p?"0"===h[q]?m+=1:(p=!1,m>f&&(k=g,f=m)):"0"===h[q]&&(p=!0,g=q,m=1);m>f&&(k=g,f=m);1<f&&h.splice(k,f,"");k=h.length;b="";""===h[0]&&(b=":");for(q=0;q<k;q++){b+=h[q];
vendor: 4,372 bytes, line 11
11if(q===k-1)break;b+=":"}""===h[k-1]&&(b+=":");return b},noConflict:function(){f.IPv6===this&&(f.IPv6=m);return this}}});(function(f){function m(b){throw new RangeError(w[b])}function h(b,e){for(var g=b.length,h=[];g--;)h[g]=e(b[g]);return h}function k(b,e){var g=b.split("@"),f="";1<g.length&&(f=g[0]+"@",b=g[1]);b=b.replace(C,".");g=b.split(".");g=h(g,e).join(".");return f+g}function b(b){for(var e=[],g=0,h=b.length,f,a;g<h;)f=b.charCodeAt(g++),55296<=f&&56319>=f&&g<h?(a=b.charCodeAt(g++),56320==(a&64512)?e.push(((f&1023)<<10)+(a&1023)+65536):(e.push(f),g--)):e.push(f);return e}function q(b){return h(b,function(b){var e="";65535<b&&(b-=65536,e+=t(b>>>10&1023|55296),b=56320|b&1023);return e+=t(b)}).join("")}function z(b,e){return b+22+75*(26>b)-((0!=e)<<5)}function u(b,g,h){var f=0;b=h?e(b/700):b>>1;for(b+=e(b/g);455<b;f+=36)b=e(b/35);return e(f+36*b/(b+38))}function g(b){var g=[],h=b.length,f=0,k=128,a=72,c,d;var n=b.lastIndexOf("-");0>n&&(n=0);for(c=0;c<n;++c)128<=b.charCodeAt(c)&&m("not-basic"),g.push(b.charCodeAt(c));for(n=0<n?n+1:0;n<h;){c=f;var l=1;for(d=36;;d+=36){n>=h&&m("invalid-input");var x=b.charCodeAt(n++);x=10>x-48?x-22:26>x-65?x-65:26>x-97?x-97:36;(36<=x||x>e((2147483647-f)/l))&&m("overflow");f+=x*l;var p=d<=a?1:d>=a+26?26:d-a;if(x<p)break;x=36-p;l>e(2147483647/x)&&m("overflow");l*=x}l=g.length+1;a=u(f-c,l,0==c);e(f/l)>2147483647-k&&m("overflow");k+=e(f/l);f%=l;g.splice(f++,0,k)}return q(g)}function p(g){var h,f,k,p=[];g=b(g);var a=g.length;var c=128;var d=0;var n=72;for(k=0;k<a;++k){var l=g[k];128>l&&p.push(t(l))}for((h=f=p.length)&&p.push("-");h<a;){var x=2147483647;for(k=0;k<a;++k)l=g[k],l>=c&&l<x&&(x=l);var q=h+1;x-c>e((2147483647-d)/q)&&m("overflow");d+=(x-c)*q;c=x;for(k=0;k<a;++k)if(l=g[k],l<c&&2147483647<++d&&m("overflow"),l==c){var r=d;for(x=36;;x+=36){l=x<=n?1:x>=n+26?26:x-n;if(r<l)break;var A=r-l;r=36-l;p.push(t(z(l+A%r,0)));r=e(A/r)}p.push(t(z(r,0)));n=u(d,q,h==f);d=0;++h}++d;++c}return p.join("")}var D="object"==typeof exports&&exports&&!exports.nodeType&&exports,A="object"==typeof module&&module&&!module.nodeType&&module,B="object"==typeof global&&global;if(B.global===B||B.window===B||B.self===B)f=B;var E=/^xn--/,r=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},e=Math.floor,t=String.fromCharCode,y;var v={version:"1.3.2",ucs2:{decode:b,encode:q},decode:g,encode:p,toASCII:function(b){return k(b,function(b){return r.test(b)?"xn--"+p(b):b})},toUnicode:function(b){return k(b,function(b){return E.test(b)?g(b.slice(4).toLowerCase()):b})}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return v});else if(D&&A)if(module.exports==D)A.exports=v;else for(y in v)v.hasOwnProperty(y)&&(D[y]=v[y]);else f.punycode=v})(this);(function(f,m){"object"===typeof module&&module.exports?module.exports=m():"function"===typeof define&&define.amd?define(m):f.SecondLevelDomains=m(f)})(this,function(f){var m=f&&f.SecondLevelDomains,h={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" c
11om edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk d
vendor: 33,965 bytes, line 11
11p edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return!1;var k=f.lastIndexOf(".",b-1);if(0>=k||k>=b-1)return!1;var m=h.list[f.slice(b+1)];return m?0<=m.indexOf(" "+f.slice(k+1,b)+" "):!1},is:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1||0<=f.lastIndexOf(".",b-1))return!1;var k=h.list[f.slice(b+1)];return k?0<=k.indexOf(" "+f.slice(0,b)+" "):!1},get:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return null;var k=f.lastIndexOf(".",b-1);if(0>=k||k>=b-1)return null;var m=h.list[f.slice(b+1)];return!m||0>m.indexOf(" "+f.slice(k+1,b)+" ")?null:f.slice(k+1)},noConflict:function(){f.SecondLevelDomains===this&&(f.SecondLevelDomains=m);return this}};return h});(function(f,m){"object"===typeof module&&module.exports?module.exports=m(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],m):f.URI=m(f.punycode,f.IPv6,f.SecondLevelDomains,f)})(this,function(f,m,h,k){function b(a,c){var d=1<=arguments.length,n=2<=arguments.length;if(!(this instanceof b))return d?n?new b(a,c):new b(a):new b;if(void 0===a){if(d)throw new TypeError("undefined is not a valid argument for URI");a="undefined"!==typeof location?location.href+"":""}if(null===a&&d)throw new TypeError("null is not a valid argument for URI");this.href(a);return void 0!==c?this.absoluteTo(c):this}function q(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function z(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function u(a){return"Array"===z(a)}function g(a,c){var d={},b;if("RegExp"===z(c))d=null;else if(u(c)){var l=0;for(b=c.length;l<b;l++)d[c[l]]=!0}else d[c]=!0;l=0;for(b=a.length;l<b;l++)if(d&&void 0!==d[a[l]]||!d&&c.test(a[l]))a.splice(l,1),b--,l--;return a}function p(a,c){var d;if(u(c)){var b=0;for(d=c.length;b<d;b++)if(!p(a,c[b]))return!1;return!0}var l=z(c);b=0;for(d=a.length;b<d;b++)if("RegExp"===l){if("string"===typeof a[b]&&a[b].match(c))return!0}else if(a[b]===c)return!0;return!1}function D(a,c){if(!u(a)||!u(c)||a.length!==c.length)return!1;a.sort();c.sort();for(var d=0,b=a.length;d<b;d++)if(a[d]!==c[d])return!1;return!0}function A(a){return a.replace(/^\/+|\/+$/g,"")}function B(a){return escape(a)}function E(a){return encodeURIComponent(a).replace(/[!'()*]/g,B).replace(/\*/g,"%2A")}function r(a){return function(c,d){if(void 0===c)return this._parts[a]||"";this._parts[a]=c||null;this.build(!d);return this}}function C(a,c){return function(d,b){if(void 0===d)return this._parts[a]||"";null!==d&&(d+="",d.charAt(0)===c&&(d=d.substring(1)));this._parts[a]=d;this.build(!b);return this}}var w=k&&k.URI;b.version="1.18.12";var e=b.prototype,t=Object.prototype.hasOwnProperty;b._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:b.duplicateQueryParameters,escapeQuerySpace:b.escapeQuerySpace}};b.duplicateQueryParameters=!1;b.escapeQuerySpace=!0;b.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;b.idn_expression=/[^a-z0-9\._-]/i;b.punycode_expression=/(xn--)/i;b.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;b.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*$/;b.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]))/ig;b.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g};b.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};b.hostProtocols=["http","https"];b.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/;b.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"};b.getDomAttribute=function(a){if(a&&a.nodeName){var c=a.nodeName.toLowerCase();if("input"!==c||"image"===a.type)return b.domAttributes[c]}};b.encode=E;b.decode=decodeURIComponent;b.iso8859=function(){b.encode=escape;b.decode=unescape};b.unicode=function(){b.encode=E;b.decode=decodeURIComponent};b.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,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)/ig,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)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}};b.encodeQuery=function(a,c){var d=b.encode(a+"");void 0===c&&(c=b.escapeQuerySpace);return c?d.replace(/%20/g,"+"):d};b.decodeQuery=function(a,c){a+="";void 0===c&&(c=b.escapeQuerySpace);try{return b.decode(c?a.replace(/\+/g,"%20"):a)}catch(d){return a}};var y={encode:"encode",decode:"decode"},v,F=function(a,c){return function(d){try{return b[c](d+"").replace(b.characters[a][c].expression,function(d){return b.characters[a][c].map[d]})}catch(n){return d}}};for(v in y)b[v+"PathSegment"]=F("pathname",y[v]),b[v+"UrnPathSegment"]=F("urnpath",y[v]);y=function(a,c,d){return function(n){var l=d?function(a){return b[c](b[d](a))}:b[c];n=(n+"").split(a);for(var e=0,g=n.length;e<g;e++)n[e]=l(n[e]);return n.join(a)}};b.decodePath=y("/","decodePathSegment");b.decodeUrnPath=y(":","decodeUrnPathSegment");b.recodePath=y("/","encodePathSegment","decode");b.recodeUrnPath=y(":","encodeUrnPathSegment","decode");b.encodeReserved=F("reserved","encode");b.parse=function(a,c){c||(c={});var d=a.indexOf("#");-1<d&&(c.fragment=a.substring(d+1)||null,a=a.substring(0,d));d=a.indexOf("?");-1<d&&(c.query=a.substring(d+1)||null,a=a.substring(0,d));"//"===a.substring(0,2)?(c.protocol=null,a=a.substring(2),a=b.parseAuthority(a,c)):(d=a.indexOf(":"),-1<d&&(c.protocol=a.substring(0,d)||null,c.protocol&&!c.protocol.match(b.protocol_expression)?c.protocol=void 0:"//"===a.substring(d+1,d+3)?(a=a.substring(d+3),a=b.parseAuthority(a,c)):(a=a.substring(d+1),c.urn=!0)));c.path=a;return c};b.parseHost=function(a,c){a=a.replace(/\\/g,"/");var d=a.indexOf("/");-1===d&&(d=a.length);if("["===a.charAt(0)){var n=a.indexOf("]");c.hostname=a.substring(1,n)||null;c.port=a.substring(n+2,d)||null;"/"===c.port&&(c.port=null)}else{var l=a.indexOf(":");n=a.indexOf("/");l=a.indexOf(":",l+1);-1!==l&&(-1===n||l<n)?(c.hostname=a.substring(0,d)||null,c.port=null):(n=a.substring(0,d).split(":"),c.hostname=n[0]||null,c.port=n[1]||null)}c.hostname&&"/"!==a.substring(d).charAt(0)&&(d++,a="/"+a);b.ensureValidHostname(c.hostname,c.protocol);c.port&&b.ensureValidPort(c.port);return a.substring(d)||"/"};b.parseAuthority=function(a,c){a=b.parseUserinfo(a,c);return b.parseHost(a,c)};b.parseUserinfo=function(a,c){var d=a.indexOf("/"),n=a.lastIndexOf("@",-1<d?d:a.length-1);-1<n&&(-1===d||n<d)?(d=a.substring(0,n).split(":"),c.username=d[0]?b.decode(d[0]):null,d.shift(),c.password=d[0]?b.decode(d.join(":")):null,a=a.substring(n+1)):(c.username=null,c.password=null);return a};b.parseQuery=function(a,c){if(!a)return{};a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a)return{};for(var d={},n=a.split("&"),l=n.length,e,g,f=0;f<l;f++)if(e=n[f].split("="),g=b.decodeQuery(e.shift(),c),e=e.length?b.decodeQuery(e.join("="),c):null,t.call(d,g)){if("string"===typeof d[g]||null===d[g])d[g]=[d[g]];d[g].push(e)}else d[g]=e;return d};b.build=function(a){var c="";a.protocol&&(c+=a.protocol+":");a.urn||!c&&!a.hostname||(c+="//");c+=b.buildAuthority(a)||"";"string"===typeof a.path&&("/"!==a.path.charAt(0)&&"string"===typeof a.hostname&&(c+="/"),c+=a.path);"string"===typeof a.query&&a.query&&(c+="?"+a.query);"string"===typeof a.fragment&&a.fragment&&(c+="#"+a.fragment);return c};b.buildHost=function(a){var c="";if(a.hostname)c=b.ip6_expression.test(a.hostname)?c+("["+a.hostname+"]"):c+a.hostname;else return"";a.port&&(c+=":"+a.port);return c};b.buildAuthority=function(a){return b.buildUserinfo(a)+b.buildHost(a)};b.buildUserinfo=function(a){var c="";a.username&&(c+=b.encode(a.username));a.password&&(c+=":"+b.encode(a.password));c&&(c+="@");return c};b.buildQuery=function(a,c,d){var n="",l,e;for(l in a)if(t.call(a,l)&&l)if(u(a[l])){var g={};var f=0;for(e=a[l].length;f<e;f++)void 0!==a[l][f]&&void 0===g[a[l][f]+""]&&(n+="&"+b.buildQueryParameter(l,a[l][f],d),!0!==c&&(g[a[l][f]+""]=!0))}else void 0!==a[l]&&(n+="&"+b.buildQueryParameter(l,a[l],d));return n.substring(1)};b.buildQueryParameter=function(a,c,d){return b.encodeQuery(a,d)+(null!==c?"="+b.encodeQuery(c,d):"")};b.addQuery=function(a,c,d){if("object"===typeof c)for(var n in c)t.call(c,n)&&b.addQuery(a,n,c[n]);else if("string"===typeof c)void 0===a[c]?a[c]=d:("string"===typeof a[c]&&(a[c]=[a[c]]),u(d)||(d=[d]),a[c]=(a[c]||[]).concat(d));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");};b.removeQuery=function(a,c,d){var n;if(u(c))for(d=0,n=c.length;d<n;d++)a[c[d]]=void 0;else if("RegExp"===z(c))for(n in a)c.test(n)&&(a[n]=void 0);else if("object"===typeof c)for(n in c)t.call(c,n)&&b.removeQuery(a,n,c[n]);else if("string"===typeof c)void 0!==d?"RegExp"===z(d)?!u(a[c])&&d.test(a[c])?a[c]=void 0:a[c]=g(a[c],d):a[c]!==String(d)||u(d)&&1!==d.length?u(a[c])&&(a[c]=g(a[c],d)):a[c]=void 0:a[c]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");};b.hasQuery=function(a,c,d,n){switch(z(c)){case "String":break;case "RegExp":for(var l in a)if(t.call(a,l)&&c.test(l)&&(void 0===d||b.hasQuery(a,l,d)))return!0;return!1;case "Object":for(var e in c)if(t.call(c,e)&&!b.hasQuery(a,e,c[e]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");}switch(z(d)){case "Undefined":return c in a;case "Boolean":return a=!(u(a[c])?!a[c].length:!a[c]),d===a;case "Function":return!!d(a[c],c,a);case "Array":return u(a[c])?(n?p:D)(a[c],d):!1;case "RegExp":return u(a[c])?n?p(a[c],d):!1:!(!a[c]||!a[c].match(d));case "Number":d=String(d);case "String":return u(a[c])?n?p(a[c],d):!1:a[c]===d;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}};b.joinPaths=function(){for(var a=[],c=[],d=0,n=0;n<arguments.length;n++){var l=new b(arguments[n]);a.push(l);for(var l=l.segment(),e=0;e<l.length;e++)"string"===typeof l[e]&&c.push(l[e]),l[e]&&d++}if(!c.length||!d)return new b("");c=(new b("")).segment(c);""!==a[0].path()&&"/"!==a[0].path().slice(0,1)||c.path("/"+c.path());return c.normalize()};b.commonPath=function(a,c){var d=Math.min(a.length,c.length),b;for(b=0;b<d;b++)if(a.charAt(b)!==c.charAt(b)){b--;break}if(1>b)return a.charAt(0)===c.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(b)||"/"!==c.charAt(b))b=a.substring(0,b).lastIndexOf("/");return a.substring(0,b+1)};b.withinString=function(a,c,d){d||(d={});var n=d.start||b.findUri.start,l=d.end||b.findUri.end,e=d.trim||b.findUri.trim,g=d.parens||b.findUri.parens,f=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var h=n.exec(a);if(!h)break;var k=h.index;if(d.ignoreHtml){var p=a.slice(Math.max(k-3,0),k);if(p&&f.test(p))continue}for(var m=k+a.slice(k).search(l),p=a.slice(k,m),m=-1;;){var r=g.exec(p);if(!r)break;m=Math.max(m,r.index+r[0].length)}p=-1<m?p.slice(0,m)+p.slice(m).replace(e,""):p.replace(e,"");p.length<=h[0].length||d.ignore&&d.ignore.test(p)||(m=k+p.length,h=c(p,k,m,a),void 0===h?n.lastIndex=m:(h=String(h),a=a.slice(0,k)+h+a.slice(m),n.lastIndex=k+h.length))}n.lastIndex=0;return a};b.ensureValidHostname=function(a,c){var d=!!a,e=!1;c&&(e=p(b.hostProtocols,c));if(e&&!d)throw new TypeError("Hostname cannot be empty, if protocol is "+c);if(a&&a.match(b.invalid_hostname_characters)){if(!f)throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(f.toASCII(a).match(b.invalid_hostname_characters))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-:_]');}};b.ensureValidPort=function(a){if(a){var c=Number(a);if(!(/^[0-9]+$/.test(c)&&0<c&&65536>c))throw new TypeError('Port "'+a+'" is not a valid port');}};b.noConflict=function(a){if(a)return a={URI:this.noConflict()},k.URITemplate&&"function"===typeof k.URITemplate.noConflict&&(a.URITemplate=k.URITemplate.noConflict()),k.IPv6&&"function"===typeof k.IPv6.noConflict&&(a.IPv6=k.IPv6.noConflict()),k.SecondLevelDomains&&"function"===typeof k.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=k.SecondLevelDomains.noConflict()),a;k.URI===this&&(k.URI=w);return this};e.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=b.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new b(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};e.protocol=r("protocol");e.username=r("username");e.password=r("password");e.hostname=r("hostname");e.port=r("port");e.query=C("query","?");e.fragment=C("fragment","#");e.search=function(a,c){var b=this.query(a,c);return"string"===typeof b&&b.length?"?"+b:b};e.hash=function(a,c){var b=this.fragment(a,c);return"string"===typeof b&&b.length?"#"+b:b};e.pathname=function(a,c){if(void 0===a||!0===a){var d=this._parts.path||(this._parts.hostname?"/":"");return a?(this._parts.urn?b.decodeUrnPath:b.decodePath)(d):d}this._parts.path=this._parts.urn?a?b.recodeUrnPath(a):"":a?b.recodePath(a):"/";this.build(!c);return this};e.path=e.pathname;e.href=function(a,c){var d;if(void 0===a)return this.toString();this._string="";this._parts=b._parts();var e=a instanceof b,l="object"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(l=b.getDomAttribute(a),a=a[l]||"",l=!1);!e&&l&&void 0!==a.pathname&&(a=a.toString());if("string"===typeof a||a instanceof String)this._parts=b.parse(String(a),this._parts);else if(e||l)for(d in e=e?a._parts:a,e)t.call(this._parts,d)&&(this._parts[d]=e[d]);else throw new TypeError("invalid input");this.build(!c);return this};e.is=function(a){var c=!1,d=!1,e=!1,l=!1,g=!1,f=!1,k=!1,p=!this._parts.urn;this._parts.hostname&&(p=!1,d=b.ip4_expression.test(this._parts.hostname),e=b.ip6_expression.test(this._parts.hostname),c=d||e,g=(l=!c)&&h&&h.has(this._parts.hostname),f=l&&b.idn_expression.test(this._parts.hostname),k=l&&b.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case "relative":return p;case "absolute":return!p;case "domain":case "name":return l;case "sld":return g;case "ip":return c;case "ip4":case "ipv4":case "inet4":return d;case "ip6":case "ipv6":case "inet6":return e;case "idn":return f;case "url":return!this._parts.urn;case "urn":return!!this._parts.urn;case "punycode":return k}return null};var G=e.protocol,H=e.port,I=e.hostname;e.protocol=function(a,c){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(b.protocol_expression)))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return G.call(this,a,c)};e.scheme=e.protocol;e.port=function(a,c){if(this._parts.urn)return void 0===a?"":this;void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),b.ensureValidPort(a)));return H.call(this,a,c)};e.hostname=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var d={};if("/"!==b.parseHost(a,d))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');a=d.hostname;b.ensureValidHostname(a,this._parts.protocol)}return I.call(this,a,c)};e.origin=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var d=this.protocol();return this.authority()?(d?d+"://":"")+this.authority():""}d=b(a);this.protocol(d.protocol()).authority(d.authority()).build(!c);return this};e.host=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildHost(this._parts):"";if("/"!==b.parseHost(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!c);return this};e.authority=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildAuthority(this._parts):"";if("/"!==b.parseAuthority(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!c);return this};e.userinfo=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var d=b.buildUserinfo(this._parts);return d?d.substring(0,d.length-1):d}"@"!==a[a.length-1]&&(a+="@");b.parseUserinfo(a,this._parts);this.build(!c);return this};e.resource=function(a,c){if(void 0===a)return this.path()+this.search()+this.hash();var d=b.parse(a);this._parts.path=d.path;this._parts.query=d.query;this._parts.fragment=d.fragment;this.build(!c);return this};e.subdomain=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,d)||""}d=this._parts.hostname.length-this.domain().length;d=this._parts.hostname.substring(0,d);d=new RegExp("^"+q(d));a&&"."!==a.charAt(a.length-1)&&(a+=".");if(-1!==a.indexOf(":"))throw new TypeError("Domains cannot contain colons");a&&b.ensureValidHostname(a,this._parts.protocol);this._parts.hostname=this._parts.hostname.replace(d,a);this.build(!c);return this};e.domain=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.match(/\./g);if(d&&2>d.length)return this._parts.hostname;d=this._parts.hostname.length-this.tld(c).length-1;d=this._parts.hostname.lastIndexOf(".",d-1)+1;return this._parts.hostname.substring(d)||""}if(!a)throw new TypeError("cannot set domain empty");if(-1!==a.indexOf(":"))throw new TypeError("Domains cannot contain colons");b.ensureValidHostname(a,this._parts.protocol);!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(d=new RegExp(q(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a));this.build(!c);return this};e.tld=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var b=this._parts.hostname.lastIndexOf("."),b=this._parts.hostname.substring(b+1);return!0!==c&&h&&h.list[b.toLowerCase()]?h.get(this._parts.hostname)||b:b}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(h&&h.is(a))b=new RegExp(q(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(b,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");b=new RegExp(q(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(b,a)}else throw new TypeError("cannot set TLD empty");this.build(!c);return this};e.directory=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var d=this._parts.path.length-this.filename().length-1,d=this._parts.path.substring(0,d)||(this._parts.hostname?"/":"");return a?b.decodePath(d):d}d=this._parts.path.length-this.filename().length;d=this._parts.path.substring(0,d);d=new RegExp("^"+q(d));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a));a&&"/"!==a.charAt(a.length-1)&&(a+="/");a=b.recodePath(a);this._parts.path=this._parts.path.replace(d,a);this.build(!c);return this};e.filename=function(a,c){if(this._parts.urn)return void 0===a?"":this;if("string"!==typeof a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this._parts.path.lastIndexOf("/"),d=this._parts.path.substring(d+1);return a?b.decodePathSegment(d):d}d=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&(d=!0);var e=new RegExp(q(this.filename())+"$");a=b.recodePath(a);this._parts.path=this._parts.path.replace(e,a);d?this.normalizePath(c):this.build(!c);return this};e.suffix=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this.filename(),e=d.lastIndexOf(".");if(-1===e)return"";d=d.substring(e+1);d=/^[a-z0-9%]+$/i.test(d)?d:"";return a?b.decodePathSegment(d):d}"."===a.charAt(0)&&(a=a.substring(1));if(d=this.suffix())e=a?new RegExp(q(d)+"$"):new RegExp(q("."+d)+"$");else{if(!a)return this;this._parts.path+="."+b.recodePath(a)}e&&(a=b.recodePath(a),this._parts.path=this._parts.path.replace(e,a));this.build(!c);return this};e.segment=function(a,c,b){var d=this._parts.urn?":":"/",e=this.path(),g="/"===e.substring(0,1),e=e.split(d);void 0!==a&&"number"!==typeof a&&(b=c,c=a,a=void 0);if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+a+'", must be 0-based integer');g&&e.shift();0>a&&(a=Math.max(e.length+a,0));if(void 0===c)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(u(c)){e=[];a=0;for(var f=c.length;a<f;a++)if(c[a].length||e.length&&e[e.length-1].length)e.length&&!e[e.length-1].length&&e.pop(),e.push(A(c[a]))}else{if(c||"string"===typeof c)c=A(c),""===e[e.length-1]?e[e.length-1]=c:e.push(c)}else c?e[a]=A(c):e.splice(a,1);g&&e.unshift("");return this.path(e.join(d),b)};e.segmentCoded=function(a,c,d){var e;"number"!==typeof a&&(d=c,c=a,a=void 0);if(void 0===c){a=this.segment(a,c,d);if(u(a)){var g=0;for(e=a.length;g<e;g++)a[g]=b.decode(a[g])}else a=void 0!==a?b.decode(a):void 0;return a}if(u(c))for(g=0,e=c.length;g<e;g++)c[g]=b.encode(c[g]);else c="string"===typeof c||c instanceof String?b.encode(c):c;return this.segment(a,c,d)};var J=e.query;e.query=function(a,c){if(!0===a)return b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"===typeof a){var d=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=a.call(this,d);this._parts.query=b.buildQuery(e||d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!c);return this}return void 0!==a&&"string"!==typeof a?(this._parts.query=b.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!c),this):J.call(this,a,c)};e.setQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"===typeof a||a instanceof String)e[a]=void 0!==c?c:null;else if("object"===typeof a)for(var g in a)t.call(a,g)&&(e[g]=a[g]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.addQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);b.addQuery(e,a,void 0===c?null:c);this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.removeQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);b.removeQuery(e,a,c);this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.hasQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return b.hasQuery(e,a,c,d)};e.setSearch=e.setQuery;e.addSearch=e.addQuery;e.removeSearch=e.removeQuery;e.hasSearch=e.hasQuery;e.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()};e.normalizeProtocol=function(a){"string"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a));return this};e.normalizeHostname=function(a){this._parts.hostname&&(this.is("IDN")&&f?this._parts.hostname=f.toASCII(this._parts.hostname):this.is("IPv6")&&m&&(this._parts.hostname=m.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!a));return this};e.normalizePort=function(a){"string"===typeof this._parts.protocol&&this._parts.port===b.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a));return this};e.normalizePath=function(a){var c=this._parts.path;if(!c)return this;if(this._parts.urn)return this._parts.path=b.recodeUrnPath(this._parts.path),this.build(!a),this;if("/"===this._parts.path)return this;var c=b.recodePath(c),d="";if("/"!==c.charAt(0)){var e=!0;c="/"+c}if("/.."===c.slice(-3)||"/."===c.slice(-2))c+="/";c=c.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");e&&(d=c.substring(1).match(/^(\.\.\/)+/)||"")&&(d=d[0]);for(;;){var g=c.search(/\/\.\.(\/|$)/);if(-1===g)break;else if(0===g){c=c.substring(3);continue}var f=c.substring(0,g).lastIndexOf("/");-1===f&&(f=g);c=c.substring(0,f)+c.substring(g+3)}e&&this.is("relative")&&(c=d+c.substring(1));this._parts.path=c;this.build(!a);return this};e.normalizePathname=e.normalizePath;e.normalizeQuery=function(a){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(b.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a));return this};e.normalizeFragment=function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));return this};e.normalizeSearch=e.normalizeQuery;e.normalizeHash=e.normalizeFragment;e.iso8859=function(){var a=b.encode,c=b.decode;b.encode=escape;b.decode=decodeURIComponent;try{this.normalize()}finally{b.encode=a,b.decode=c}return this};e.unicode=function(){var a=b.encode,c=b.decode;b.encode=E;b.decode=unescape;try{this.normalize()}finally{b.encode=a,b.decode=c}return this};e.readable=function(){var a=this.clone();a.username("").password("").normalize();var c="";a._parts.protocol&&(c+=a._parts.protocol+"://");a._parts.hostname&&(a.is("punycode")&&f?(c+=f.toUnicode(a._parts.hostname),a._parts.port&&(c+=":"+a._parts.port)):c+=a.host());a._parts.hostname&&a._parts.path&&"/"!==a._parts.path.charAt(0)&&(c+="/");c+=a.path(!0);if(a._parts.query){for(var d="",e=0,g=a._parts.query.split("&"),h=g.length;e<h;e++){var k=(g[e]||"").split("="),d=d+("&"+b.decodeQuery(k[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==k[1]&&(d+="="+b.decodeQuery(k[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}c+="?"+d.substring(1)}return c+=b.decodeQuery(a.hash(),!0)};e.absoluteTo=function(a){var c=this.clone(),d=["protocol","username","password","hostname","port"],e,g;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a instanceof b||(a=new b(a));if(c._parts.protocol)return c;c._parts.protocol=a._parts.protocol;if(this._parts.hostname)return c;for(e=0;g=d[e];e++)c._parts[g]=a._parts[g];c._parts.path?(".."===c._parts.path.substring(-2)&&(c._parts.path+="/"),"/"!==c.path().charAt(0)&&(d=(d=a.directory())?d:0===a.path().indexOf("/")?"/":"",c._parts.path=(d?d+"/":"")+c._parts.path,c.normalizePath())):(c._parts.path=a._parts.path,c._parts.query||(c._parts.query=a._parts.query));c.build();return c};e.relativeTo=function(a){var c=this.clone().normalize();if(c._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a=(new b(a)).normalize();var d=c._parts;var e=a._parts;var g=c.path();a=a.path();if("/"!==g.charAt(0))throw Error("URI is already relative");if("/"!==a.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");d.protocol===e.protocol&&(d.protocol=null);if(d.username===e.username&&d.password===e.password&&null===d.protocol&&null===d.username&&null===d.password&&d.hostname===e.hostname&&d.port===e.port)d.hostname=null,d.port=null;else return c.build();if(g===a)return d.path="",c.build();g=b.commonPath(g,a);if(!g)return c.build();e=e.path.substring(g.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");d.path=e+d.path.substring(g.length)||"./";return c.build()};e.equals=function(a){var c=this.clone(),d=new b(a);a={};var e;c.normalize();d.normalize();if(c.toString()===d.toString())return!0;var g=c.query();var f=d.query();c.query("");d.query("");if(c.toString()!==d.toString()||g.length!==f.length)return!1;c=b.parseQuery(g,this._parts.escapeQuerySpace);f=b.parseQuery(f,this._parts.escapeQuerySpace);for(e in c)if(t.call(c,e)){if(!u(c[e])){if(c[e]!==f[e])return!1}else if(!D(c[e],f[e]))return!1;a[e]=!0}for(e in f)if(t.call(f,e)&&!a[e])return!1;return!0};e.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};e.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return b});(function(f,m){"object"===typeof module&&module.exports?module.exports=m(require("./URI")):"function"===typeof define&&define.amd?define(["./URI"],m):f.URITemplate=m(f.URI,f)})(this,function(f,m){function h(b){if(h._cache[b])return h._cache[b];if(!(this instanceof h))return new h(b);this.expression=b;h._cache[b]=this;return this}function k(b){this.data=b;this.cache={}}var b=m&&m.URITemplate,q=Object.prototype.hasOwnProperty,z=h.prototype,u={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};h._cache={};h.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g;h.VARIABLE_PATTERN=/^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/;h.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_.]/;h.LITERAL_PATTERN=/[<>{}"`^| \\]/;h.expand=function(b,f,k){var g=u[b.operator],p=g.named?"Named":"Unnamed";b=b.variables;var m=[],r,q;for(q=0;r=b[q];q++){var w=f.get(r.name);if(0===w.type&&k&&k.strict)throw Error('Missing expansion value for variable "'+r.name+'"');if(w.val.length){if(1<w.type&&r.maxlength)throw Error('Invalid expression: Prefix modifier not applicable to variable "'+r.name+'"');m.push(h["expand"+p](w,g,r.explode,r.explode&&g.separator||",",r.maxlength,r.name))}else w.type&&m.push("")}return m.length?g.prefix+m.join(g.separator):""};h.expandNamed=function(b,h,k,m,q,u){var g="",p=h.encode;h=h.empty_name_separator;var A=!b[p].length,e=2===b.type?"":f[p](u),t;var y=0;for(t=b.val.length;y<t;y++){if(q){var v=f[p](b.val[y][1].substring(0,q));2===b.type&&(e=f[p](b.val[y][0].substring(0,q)))}else A?(v=f[p](b.val[y][1]),2===b.type?(e=f[p](b.val[y][0]),b[p].push([e,v])):b[p].push([void 0,v])):(v=b[p][y][1],2===b.type&&(e=b[p][y][0]));g&&(g+=m);k?g+=e+(h||v?"=":"")+v:(y||(g+=f[p](u)+(h||v?"=":"")),2===b.type&&(g+=e+","),g+=v)}return g};h.expandUnnamed=function(b,h,k,m,q){var g="",p=h.encode;h=h.empty_name_separator;var A=!b[p].length,w;var e=0;for(w=b.val.length;e<w;e++){if(q)var t=f[p](b.val[e][1].substring(0,q));else A?(t=f[p](b.val[e][1]),b[p].push([2===b.type?f[p](b.val[e][0]):void 0,t])):t=b[p][e][1];g&&(g+=m);if(2===b.type){var u=q?f[p](b.val[e][0].substring(0,q)):b[p][e][0];g+=u;g=k?g+(h||t?"=":""):g+","}g+=t}return g};
11h.noConflict=function(){m.URITemplate===h&&(m.URITemplate=b);return h};z.expand=function(b,f){var g="";this.parts&&this.parts.length||this.parse();b instanceof k||(b=new k(b));for(var p=0,m=this.parts.length;p<m;p++)g+="string"===typeof this.parts[p]?this.parts[p]:h.expand(this.parts[p],b,f);return g};z.parse=function(){var b=this.expression,f=h.EXPRESSION_PATTERN,k=h.VARIABLE_PATTERN,m=h.VARIABLE_NAME_PATTERN,q=h.LITERAL_PATTERN,z=[],r=0,C=function(b){if(b.match(q))throw Error('Invalid Literal "'+b+'"');return b};for(f.lastIndex=0;;){var w=f.exec(b);if(null===w){z.push(C(b.substring(r)));break}else z.push(C(b.substring(r,w.index))),r=w.index+w[0].length;if(!u[w[1]])throw Error('Unknown Operator "'+w[1]+'" in "'+w[0]+'"');if(!w[3])throw Error('Unclosed Expression "'+w[0]+'"');var e=w[2].split(",");for(var t=0,y=e.length;t<y;t++){var v=e[t].match(k);if(null===v)throw Error('Invalid Variable "'+e[t]+'" in "'+w[0]+'"');if(v[1].match(m))throw Error('Invalid Variable Name "'+v[1]+'" in "'+w[0]+'"');e[t]={name:v[1],explode:!!v[3],maxlength:v[4]&&parseInt(v[4],10)}}if(!e.length)throw Error('Expression Missing Variable(s) "'+w[0]+'"');z.push({expression:w[0],operator:w[1],variables:e})}z.length||z.push(C(b));this.parts=z;return this};k.prototype.get=function(b){var f=this.data,g={type:0,val:[],encode:[],encodeReserved:[]};if(void 0!==this.cache[b])return this.cache[b];this.cache[b]=g;f="[object Function]"===String(Object.prototype.toString.call(f))?f(b):"[object Function]"===String(Object.prototype.toString.call(f[b]))?f[b](b):f[b];if(void 0!==f&&null!==f)if("[object Array]"===String(Object.prototype.toString.call(f))){var h=0;for(b=f.length;h<b;h++)void 0!==f[h]&&null!==f[h]&&g.val.push([void 0,String(f[h])]);g.val.length&&(g.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(f))){for(h in f)q.call(f,h)&&void 0!==f[h]&&null!==f[h]&&g.val.push([h,String(f[h])]);g.val.length&&(g.type=2)}else g.type=1,g.val.push([void 0,String(f)]);return g};f.expand=function(b,k){var g=(new h(b)).expand(k);return new f(g)};return h});function xDeprecate(funcName){var msg='DEPRECATED : '+funcName+'() is deprecated in Rhymix.';if(typeof console=='object'&&typeof console.warn=='function'){if(navigator.userAgent.match(/Firefox/)){console.error(msg)}else{console.warn(msg)}}} 12var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xIE6,xNN4,xUA=navigator.userAgent.toLowerCase();if(window.opera){var i=xUA.indexOf('opera');if(i!=-1){var v=parseInt(xUA.charAt(i+6));xOp7Up=v>=7;xOp6Dn=v<7}}else if(navigator.vendor!='KDE'&&document.all&&xUA.indexOf('msie')!=-1){xIE4Up=parseFloat(navigator.appVersion)>=4;xIE4=xUA.indexOf('msie 4')!=-1;xIE5=xUA.indexOf('msie 5')!=-1;xIE6=xUA.indexOf('msie 6')!=-1}else if(document.layers){xNN4=!0} 13var xMac=xUA.indexOf('mac')!=-1;var xFF=xUA.indexOf('firefox')!=-1;function xAddEventListener(e,eT,eL,cap){xDeprecate('xAddEventListener');if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if((!xIE4Up&&!xOp7Up)&&e==window){if(eT=='resize'){window.xPCW=xClientWidth();window.xPCH=xClientHeight();window.xREL=eL;xResizeEvent();return} 14if(eT=='scroll'){window.xPSL=xScrollLeft();window.xPST=xScrollTop();window.xSEL=eL;xScrollEvent();return}} 15var eh='e.on'+eT+'=eL';if(e.addEventListener)e.addEventListener(eT,eL,cap);else if(e.attachEvent)e.attachEvent('on'+eT,eL);else eval(eh)} 16function xResizeEvent(){xDeprecate('xResizeEvent');if(window.xREL)setTimeout('xResizeEvent()',250);var cw=xClientWidth(),ch=xClientHeight();if(window.xPCW!=cw||window.xPCH!=ch){window.xPCW=cw;window.xPCH=ch;if(window.xREL)window.xREL();}} 17function xScrollEvent(){xDeprecate('xScrollEvent');if(window.xSEL)setTimeout('xScrollEvent()',250);var sl=xScrollLeft(),st=xScrollTop();if(window.xPSL!=sl||window.xPST!=st){window.xPSL=sl;window.xPST=st;if(window.xSEL)window.xSEL();}} 18function xAppendChild(oParent,oChild){xDeprecate('xAppendChild');if(oParent.appendChild)return oParent.appendChild(oChild);else return null} 19function xClientHeight(){xDeprecate('xClientHeight');var h=0;if(xOp6Dn)h=window.innerHeight;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientHeight) 20h=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight) 21h=document.body.clientHeight;else if(xDef(window.innerWidth,window.innerHeight,document.width)){h=window.innerHeight;if(document.width>window.innerWidth)h-=16} 22return h} 23function xClientWidth(){xDeprecate('xClientWidth');var w=0;if(xOp6Dn)w=window.innerWidth;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientWidth) 24w=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth) 25w=document.body.clientWidth;else if(xDef(window.innerWidth,window.innerHeight,document.height)){w=window.innerWidth;if(document.height>window.innerHeight)w-=16} 26return w} 27function xCreateElement(sTag){xDeprecate('xCreateElement');if(document.createElement)return document.createElement(sTag);else return null} 28function xDef(){xDeprecate('xDef');for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return!1} 29return!0} 30function xDeleteCookie(name,path){xDeprecate('xDeleteCookie');if(xGetCookie(name)){document.cookie=name+"="+"; path="+((!path)?"/":path)+"; expires="+new Date(0).toGMTString()}} 31function xDisplay(e,s){xDeprecate('xDisplay');if(!(e=xGetElementById(e)))return null;if(e.style&&xDef(e.style.display)){if(xStr(s))e.style.display=s;return e.style.display} 32return null} 33function xEvent(evt){xDeprecate('xEvent');var e=evt||window.event;if(!e)return;if(e.type)this.type=e.type;if(e.target)this.target=e.target;else if(e.srcElement)this.target=e.srcElement;if(e.relatedTarget)this.relatedTarget=e.relatedTarget;else if(e.type=='mouseover'&&e.fromElement)this.relatedTarget=e.fromElement;else if(e.type=='mouseout')this.relatedTarget=e.toElement;if(xOp6Dn){this.pageX=e.clientX;this.pageY=e.clientY}else if(xDef(e.pageX,e.pageY)){this.pageX=e.pageX;this.pageY=e.pageY}else if(xDef(e.clientX,e.clientY)){this.pageX=e.clientX+xScrollLeft();this.pageY=e.clientY+xScrollTop()} 34if(xDef(e.offsetX,e.offsetY)){this.offsetX=e.offsetX;this.offsetY=e.offsetY}else if(xDef(e.layerX,e.layerY)){this.offsetX=e.layerX;this.offsetY=e.layerY}else{this.offsetX=this.pageX-xPageX(this.target);this.offsetY=this.pageY-xPageY(this.target)} 35if(e.keyCode){this.keyCode=e.keyCode}else if(xDef(e.which)&&e.type.indexOf('key')!=-1){this.keyCode=e.which} 36this.shiftKey=e.shiftKey;this.ctrlKey=e.ctrlKey;this.altKey=e.altKey} 37function xFirstChild(e,t){xDeprecate('xFirstChild');var c=e?e.firstChild:null;if(t)while(c&&c.nodeName!=t){c=c.nextSibling}else while(c&&c.nodeType!=1){c=c.nextSibling} 38return c} 39function xGetBodyWidth(){xDeprecate('xGetBodyWidth');var cw=xClientWidth();var sw=window.document.body.scrollWidth;return cw>sw?cw:sw} 40function xGetBodyHeight(){xDeprecate('xGetBodyHeight');var cw=xClientHeight();var sw=window.document.body.scrollHeight;return cw>sw?cw:sw} 41function xGetComputedStyle(oEle,sProp,bInt){xDeprecate('xGetComputedStyle');var s,p='undefined';var dv=document.defaultView;if(dv&&dv.getComputedStyle){s=dv.getComputedStyle(oEle,'');if(s)p=s.getPropertyValue(sProp);}else if(oEle.currentStyle){var a=sProp.split('-');sProp=a[0];for(var i=1;i<a.length;++i){c=a[i].charAt(0);sProp+=a[i].replace(c,c.toUpperCase())} 42p=oEle.currentStyle[sProp]}else return null;return bInt?(parseInt(p)||0):p} 43function xGetCookie(name){xDeprecate('xGetCookie');var value=null,search=name+"=";if(document.cookie.length>0){var offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;var end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;value=unescape(document.cookie.substring(offset,end))}} 44return value} 45function xGetElementById(e){xDeprecate('xGetElementById');if(typeof(e)!='string')return e;if(document.getElementById)e=document.getElementById(e);else if(document.all)e=document.all[e];else e=null;return e} 46function xGetElementsByAttribute(sTag,sAtt,sRE,fn){xDeprecate('xGetElementsByAttribute');
46var a,list,found=new Array(),re=new RegExp(sRE,'i');list=xGetElementsByTagName(sTag);for(var i=0;i<list.length;++i){a=list[i].getAttribute(sAtt);if(!a){a=list[i][sAtt]} 47if(typeof(a)=='string'&&a.search(re)!=-1){found[found.length]=list[i];if(fn)fn(list[i]);}} 48return found} 49function xGetElementsByClassName(c,p,t,f){xDeprecate('xGetElementsByClassName');var found=new Array();var re=new RegExp('\\b'+c+'\\b','i');var list=xGetElementsByTagName(t,p);for(var i=0;i<list.length;++i){if(list[i].className&&list[i].className.search(re)!=-1){found[found.length]=list[i];if(f)f(list[i]);}} 50return found} 51function xGetElementsByTagName(t,p){xDeprecate('xGetElementsByTagName');var list=null;t=t||'*';p=p||document;if(xIE4||xIE5){if(t=='*')list=p.all;else list=p.all.tags(t)}else if(p.getElementsByTagName)list=p.getElementsByTagName(t);return list||new Array()} 52function xGetURLArguments(){xDeprecate('xGetURLArguments');var idx=location.href.indexOf('?');var params=new Array();if(idx!=-1){var pairs=location.href.substring(idx+1,location.href.length).split('&');for(var i=0;i<pairs.length;i++){nameVal=pairs[i].split('=');params[i]=nameVal[1];params[nameVal[0]]=nameVal[1]}} 53return params} 54function xHeight(e,h){xDeprecate('xHeight');if(!(e=xGetElementById(e)))return 0;if(xNum(h)){if(h<0)h=0;else h=Math.round(h)}else h=-1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){h=xClientHeight()}else if(css&&xDef(e.offsetHeight)&&xStr(e.style.height)){if(h>=0){var pt=0,pb=0,bt=0,bb=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pt=gcs(e,'padding-top',1);if(pt!==null){pb=gcs(e,'padding-bottom',1);bt=gcs(e,'border-top-width',1);bb=gcs(e,'border-bottom-width',1)}else if(xDef(e.offsetHeight,e.style.height)){e.style.height=h+'px';pt=e.offsetHeight-h}} 55h-=(pt+pb+bt+bb);if(isNaN(h)||h<0)return null;else e.style.height=h+'px'} 56h=e.offsetHeight}else if(css&&xDef(e.style.pixelHeight)){if(h>=0)e.style.pixelHeight=h;h=e.style.pixelHeight} 57return h} 58function xHex(sn,digits,prefix){xDeprecate('xHex');var p='';var n=Math.ceil(sn);if(prefix)p=prefix;n=n.toString(16);for(var i=0;i<digits-n.length;++i){p+='0'} 59return p+n} 60function xHide(e){xDeprecate('xHide');return xVisibility(e,0)} 61function xInnerHtml(e,h){xDeprecate('xInnerHtml');if(!(e=xGetElementById(e))||!xStr(e.innerHTML))return null;var s=e.innerHTML;if(xStr(h)){e.innerHTML=h} 62return s} 63function xLeft(e,iX){xDeprecate('xLeft');if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.left)){if(xNum(iX))e.style.left=iX+'px';else{iX=parseInt(e.style.left);if(isNaN(iX))iX=0}}else if(css&&xDef(e.style.pixelLeft)){if(xNum(iX))e.style.pixelLeft=iX;else iX=e.style.pixelLeft} 64return iX} 65function xMoveTo(e,x,y){xDeprecate('xMoveTo');xLeft(e,x);xTop(e,y)} 66function xName(e){xDeprecate('xName');if(!e)return e;else if(e.id&&e.id!="")return e.id;else if(e.name&&e.name!="")return e.name;else if(e.nodeName&&e.nodeName!="")return e.nodeName;else if(e.tagName&&e.tagName!="")return e.tagName;else return e} 67function xNextSib(e,t){xDeprecate('xNextSib');var s=e?e.nextSibling:null;if(t)while(s&&s.nodeName!=t){s=s.nextSibling}else while(s&&s.nodeType!=1){s=s.nextSibling} 68return s} 69function xNum(){xDeprecate('xNum');for(var i=0;i<arguments.length;++i){if(isNaN(arguments[i])||typeof(arguments[i])!='number')return!1} 70return!0} 71function xOffsetLeft(e){xDeprecate('xOffsetLeft');if(!(e=xGetElementById(e)))return 0;if(xDef(e.offsetLeft))return e.offsetLeft;else return 0} 72function xOffsetTop(e){xDeprecate('xOffsetTop');if(!(e=xGetElementById(e)))return 0;if(xDef(e.offsetTop))return e.offsetTop;else return 0} 73function xPad(s,len,c,left){xDeprecate('xPad');if(typeof s!='string')s=s+'';if(left){for(var i=s.length;i<len;++i)s=c+s}else{for(i=s.length;i<len;++i)s+=c} 74return s} 75function xPageX(e){xDeprecate('xPageX');if(!(e=xGetElementById(e)))return 0;var x=0;while(e){if(xDef(e.offsetLeft))x+=e.offsetLeft;e=xDef(e.offsetParent)?e.offsetParent:null} 76return x} 77function xPageY(e){xDeprecate('xPageY');if(!(e=xGetElementById(e)))return 0;var y=0;while(e){if(xDef(e.offsetTop))y+=e.offsetTop;e=xDef(e.offsetParent)?e.offsetParent:null} 78return y} 79function xParent(e,bNode){xDeprecate('xParent');if(!(e=xGetElementById(e)))return null;var p=null;if(!bNode&&xDef(e.offsetParent))p=e.offsetParent;else if(xDef(e.parentNode))p=e.parentNode;else if(xDef(e.parentElement))p=e.parentElement;return p} 80function xPreventDefault(e){xDeprecate('xPreventDefault');if(e&&e.preventDefault)e.preventDefault() 81else if(window.event)window.event.returnValue=!1} 82function xPrevSib(e,t){xDeprecate('xPrevSib');var s=e?e.previousSibling:null;if(t)while(s&&s.nodeName!=t){s=s.previousSibling}else while(s&&s.nodeType!=1){s=s.previousSibling} 83return s} 84function xRemoveEventListener(e,eT,eL,cap){xDeprecate('xRemoveEventListener');if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if((!xIE4Up&&!xOp7Up)&&e==window){if(eT=='resize'){window.xREL=null;return} 85if(eT=='scroll'){window.xSEL=null;return}} 86var eh='e.on'+eT+'=null';if(e.removeEventListener)e.removeEventListener(eT,eL,cap);else if(e.detachEvent)e.detachEvent('on'+eT,eL);else eval(eh)} 87function xResizeTo(e,w,h){xDeprecate('xResizeTo');xWidth(e,w);xHeight(e,h)} 88function xScrollLeft(e,bWin){xDeprecate('xScrollLeft');var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollLeft)offset=w.document.documentElement.scrollLeft;else if(w.document.body&&xDef(w.document.body.scrollLeft))offset=w.document.body.scrollLeft}else{e=xGetElementById(e);if(e&&xNum(e.scrollLeft))offset=e.scrollLeft} 89return offset} 90function xScrollTop(e,bWin){xDeprecate('xScrollTop');var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollTop)offset=w.document.documentElement.scrollTop;else if(w.document.body&&xDef(w.document.body.scrollTop))offset=w.document.body.scrollTop}else{e=xGetElementById(e);if(e&&xNum(e.scrollTop))offset=e.scrollTop} 91return offset} 92function xSetCookie(name,value,expire,path){xDeprecate('xSetCookie');document.cookie=name+"="+escape(value)+((!expire)?"":("; expires="+expire.toGMTString()))+"; path="+((!path)?"/":path)} 93function xShow(e){xDeprecate('xShow');return xVisibility(e,1)} 94function xStr(s){xDeprecate('xStr');for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='string')return!1} 95return!0} 96function xTop(e,iY){xDeprecate('xTop');if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.top)){if(xNum(iY))e.style.top=iY+'px';else{iY=parseInt(e.style.top);if(isNaN(iY))iY=0}}else if(css&&xDef(e.style.pixelTop)){if(xNum(iY))e.style.pixelTop=iY;else iY=e.style.pixelTop} 97return iY} 98function xVisibility(e,bShow){xDeprecate('xVisibility');if(!(e=xGetElementById(e)))return null;if(e.style&&xDef(e.style.visibility)){if(xDef(bShow))e.style.visibility=bShow?'visible':'hidden';return e.style.visibility} 99return null} 100function xWidth(e,w){xDeprecate('xWidth');if(!(e=xGetElementById(e)))return 0;
100if(xNum(w)){if(w<0)w=0;else w=Math.round(w)}else w=-1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){w=xClientWidth()}else if(css&&xDef(e.offsetWidth)&&xStr(e.style.width)){if(w>=0){var pl=0,pr=0,bl=0,br=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pl=gcs(e,'padding-left',1);if(pl!==null){pr=gcs(e,'padding-right',1);bl=gcs(e,'border-left-width',1);br=gcs(e,'border-right-width',1)}else if(xDef(e.offsetWidth,e.style.width)){e.style.width=w+'px';pl=e.offsetWidth-w}} 101w-=(pl+pr+bl+br);if(isNaN(w)||w<0)return null;else e.style.width=w+'px'} 102w=e.offsetWidth}else if(css&&xDef(e.style.pixelWidth)){if(w>=0)e.style.pixelWidth=w;w=e.style.pixelWidth} 103return w} 104function xZIndex(e,uZ){xDeprecate('xZIndex');if(!(e=xGetElementById(e)))return 0;if(e.style&&xDef(e.style.zIndex)){if(xNum(uZ))e.style.zIndex=uZ;uZ=parseInt(e.style.zIndex)} 105return uZ} 106function xStopPropagation(evt){xDeprecate('xStopPropagation');if(evt&&evt.stopPropagation)evt.stopPropagation();else if(window.event)window.event.cancelBubble=!0};(function($){var UA=navigator.userAgent.toLowerCase();$.os={Linux:/linux/.test(UA),Unix:/x11/.test(UA),Mac:/mac/.test(UA),Windows:/win/.test(UA)};$.os.name=($.os.Windows)?'Windows':($.os.Linux)?'Linux':($.os.Unix)?'Unix':($.os.Mac)?'Mac':'';$(document).ajaxError(function(event,jqxhr,settings,thrownError){if(settings.dataType==="script"&&(jqxhr.status>=400||(jqxhr.responseText&&jqxhr.responseText.length<40))){var match=/^(.+)\.min\.(css|js)($|\?)/.exec(settings.url);if(match){$.getScript(match[1]+"."+match[2],settings.success)}}});window.isSameOrigin=function(url1,url2){if(!url1||!url2){return!1} 107if(url1.match(/^\.?\/[^\/]*/)||url2.match(/^\.?\/[^\/]*/)){return!0} 108if(url1.match(/^(https?:)?\/\/[^\/]*[^a-z0-9\/.:_-]/i)||url2.match(/^(https?:)?\/\/[^\/]*[^a-z0-9\/.:_-]/i)){return!1} 109try{url1=window.XE.URI(url1).normalizePort().normalizeHostname().normalizePathname().origin();url2=window.XE.URI(url2).normalizePort().normalizeHostname().normalizePathname().origin();return(url1===url2)?!0:!1}catch(err){return!1}};window.getCSRFToken=function(){return $("meta[name='csrf-token']").attr("content")};window.setCSRFToken=function(token){$("meta[name='csrf-token']").attr("content",token)};$.ajaxPrefilter(function(options){if(!isSameOrigin(location.href,options.url))return;var token=getCSRFToken();if(token){if(!options.headers)options.headers={};options.headers["X-CSRF-Token"]=token}});$.fn.addCSRFTokenToForm=function(){var token=getCSRFToken();if(token){return $(this).each(function(){if($(this).data("csrf-token-checked")==="Y")return;if($(this).attr("action")&&!isSameOrigin(location.href,$(this).attr("action"))){return $(this).data("csrf-token-checked","Y")} 110$("<input />").attr({type:"hidden",name:"_rx_csrf_token",value:token}).appendTo($(this));return $(this).data("csrf-token-checked","Y")})}else{return $(this)}};window.rhymix_alert_close=function(){if($('#rhymix_alert').is(':hidden')){return} 111$('#rhymix_alert').fadeOut(500,function(){$(this).empty()})};window.rhymix_alert=function(message,redirect_url,delay){if(!delay){delay=2500} 112if(!redirect_url){$('#rhymix_alert').text(message).show();setTimeout(rhymix_alert_close,delay)}else if(isSameOrigin(location.href,redirect_url)){Cookies.set('rhymix_alert_message',message,{expires:1/1440,path:'/'});Cookies.set('rhymix_alert_delay',delay,{expires:1/1440,path:'/'})}else{alert(message)}};$(document).ready(function(){if(Cookies.get('rhymix_alert_message')){rhymix_alert(Cookies.get('rhymix_alert_message'),null,Cookies.get('rhymix_alert_delay'));Cookies.remove('rhymix_alert_message',{path:'/'});Cookies.remove('rhymix_alert_delay',{path:'/'})} 113$('#rhymix_alert').click(rhymix_alert_close)});window.rhymix_debug_pending_data=[];window.XE={loaded_popup_menus:[],addedDocument:[],cookie:window.Cookies,URI:window.URI,URITemplate:window.URITemplate,SecondLevelDomains:window.SecondLevelDomains,IPv6:window.IPv6,baseurl:null,checkboxToggleAll:function(itemName){if(!is_def(itemName))itemName='cart';var obj;var options={wrap:null,checked:'toggle',doClick:!1};switch(arguments.length){case 1:if(typeof(arguments[0])=="string"){itemName=arguments[0]}else{$.extend(options,arguments[0]||{});itemName='cart'} 114break;case 2:itemName=arguments[0];$.extend(options,arguments[1]||{})} 115if(options.doClick===!0)options.checked=null;if(typeof(options.wrap)=="string")options.wrap='#'+options.wrap;if(options.wrap){obj=$(options.wrap).find('input[name="'+itemName+'"]:checkbox')}else{obj=$('input[name="'+itemName+'"]:checkbox')} 116if(options.checked=='toggle'){obj.each(function(){$(this).attr('checked',($(this).attr('checked'))?!1:!0)})}else{if(options.doClick===!0){obj.click()}else{obj.attr('checked',options.checked)}}},displayPopupMenu:function(ret_obj,response_tags,params){var target_srl=params.target_srl;var menu_id=params.menu_id;var menus=ret_obj.menus;var html="";if(this.loaded_popup_menus[menu_id]){html=this.loaded_popup_menus[menu_id]}else{if(menus){var item=menus.item||menus;if(typeof(item.length)=='undefined'||item.length<1)item=new Array(item);if(item.length){for(var i=0;i<item.length;i++){var url=item[i].url;var str=item[i].str;var classname=item[i]['class'];var icon=item[i].icon;var target=item[i].target;if(target==='self'){target='_self'} 117var actmatch=url.match(/\bact=(\w+)/)||url.match(/\b((?:disp|proc)\w+)/);var act=actmatch?actmatch[1]:null;var classText='class="'+(classname?classname:(act?(act+' '):''));var styleText="";var click_str="";var matches=[];if(target==='popup'){click_str='onclick="popopen(this.href, \''+target+'\'); return false;"';classText+='popup '}else if(target==='javascript'){click_str='onclick="'+url+'; return false; "';classText+='javascript ';url='#'}else if(target.match(/^_(self|blank|parent|top)$/)){click_str='target="'+target+'"';classText+='frame_'+target+' '}else if(matches=target.match(/^i?frame:([a-zA-Z0-9_]+)$/)){click_str='target="'+matches[1]+'"';classText+='frame_'+matches[1]+' '}else{click_str='target="_blank"'} 118classText=classText.trim()+'" ';html+='<li '+classText+styleText+'><a href="'+url+'" '+click_str+'>'+str+'</a></li> '}}} 119this.loaded_popup_menus[menu_id]=html} 120if(html){var area=$('#popup_menu_area').html('<ul>'+html+'</ul>');var areaOffset={top:params.page_y,left:params.page_x};if(area.outerHeight()+areaOffset.top>$(window).height()+$(window).scrollTop()) 121areaOffset.top=$(window).height()-area.outerHeight()+$(window).scrollTop();if(area.outerWidth()+areaOffset.left>$(window).width()+$(window).scrollLeft()) 122areaOffset.left=$(window).width()-area.outerWidth()+$(window).scrollLeft();
122area.css({top:areaOffset.top,left:areaOffset.left}).show().focus()}},isSameHost:function(url){if(typeof url!=="string"){return!1} 123if(url.match(/^\.?\/[^\/]/)){return!0} 124if(url.match(/^\w+:[^\/]*$/)||url.match(/^(https?:)?\/\/[^\/]*[^a-z0-9\/.:_-]/i)){return!1} 125if(!window.XE.baseurl){window.XE.baseurl=window.XE.URI(window.request_uri).normalizePort().normalizeHostname().normalizePathname();window.XE.baseurl=window.XE.baseurl.hostname()+window.XE.baseurl.directory()} 126try{var target_url=window.XE.URI(url).normalizePort().normalizeHostname().normalizePathname();if(target_url.is("urn")){return!1} 127if(!target_url.hostname()){target_url=target_url.absoluteTo(window.request_uri)} 128target_url=target_url.hostname()+target_url.directory();return target_url.indexOf(window.XE.baseurl)===0}catch(err){return!1}},filesizeFormat:function(size){if(size<2)return size+'Byte';if(size<1024)return size+'Bytes';if(size<1048576)return(size/1024).toFixed(1)+'KB';if(size<1073741824)return(size/1048576).toFixed(2)+'MB';if(size<1099511627776)return(size/1073741824).toFixed(2)+'GB';return(size/1099511627776).toFixed(2)+'TB'}};window.Modernizr={audio:!0,video:!0,canvas:!0,history:!0,postmessage:!0,geolocation:('geolocation' in navigator),touch:('ontouchstart' in window)||(navigator.maxTouchPoints>0),webgl:!!window.WebGLRenderingContext}})(jQuery);jQuery(function($){$("form[method]").filter(function(){return String($(this).attr("method")).toUpperCase()=="POST"}).addCSRFTokenToForm();$(document).on("submit","form[method='post']",$.fn.addCSRFTokenToForm);$(document).on("focus","input,select,textarea",function(){$(this).parents("form[method]").filter(function(){return String($(this).attr("method")).toUpperCase()=="POST"}).addCSRFTokenToForm()});var noopenerRequired=(function(){var isChromeBased=navigator.userAgent.match(/Chrome\/([0-9]+)/);if(isChromeBased&&parseInt(isChromeBased[1],10)>=72){return!1} 129var isAppleWebKit=navigator.userAgent.match(/AppleWebKit\/([0-9]+)/);if(isAppleWebKit&&parseInt(isAppleWebKit[1],10)>=605){return!1} 130var isFirefox=navigator.userAgent.match(/Firefox\/([0-9]+)/);if(isFirefox&&parseInt(isFirefox[1],10)>=79){return!1} 131return!0})();$('a[target]').each(function(){var $this=$(this);var href=String($this.attr('href')).trim();var target=String($this.attr('target')).trim();if(!href||!target||target==='_top'||target==='_self'||target==='_parent'){return} 132if(!window.XE.isSameHost(href)){var rel=$this.attr('rel');rel=(typeof rel==='undefined')?'':String(rel);if(!rel.match(/\bnoopener\b/)){$this.attr('rel',$.trim(rel+' noopener'))}}});$('body').on('click','a[target]',function(event){var $this=$(this);var href=String($this.attr('href')).trim();var target=String($this.attr('target')).trim();if(!href||!target||target==='_top'||target==='_self'||target==='_parent'){return} 133if(!window.XE.isSameHost(href)){var rel=$this.attr('rel');rel=(typeof rel==='undefined')?'':String(rel);if(!rel.match(/\bnoopener\b/)){$this.attr('rel',$.trim(rel+' noopener'))} 134if(noopenerRequired){event.preventDefault();blankshield.open(href)}}});$(".editable_preview").addClass("rhymix_content xe_content").attr("tabindex",0);$(".editable_preview").on("click",function(){var input=$(this).siblings(".editable_preview_content");if(input.size()){$(this).off("click").off("focus").hide();input=input.first();if(input.attr("type")!=="hidden"){input.hide()} 135var iframe=$('<iframe class="editable_preview_iframe"></iframe>');iframe.attr("src",current_url.setQuery("module","editor").setQuery("act","dispEditorFrame").setQuery("parent_input_id",input.attr("id")).replace(/^https?:/,''));iframe.insertAfter(input)}});$(".editable_preview").on("focus",function(){$(this).triggerHandler("click")});if(navigator.userAgent.match(/MSIE/)){$('select').each(function(i,sels){var disabled_exists=!1;var first_enable=[];for(var j=0;j<sels.options.length;j++){if(sels.options[j].disabled){sels.options[j].style.color='#CCCCCC';disabled_exists=!0}else{first_enable[i]=(first_enable[i]>-1)?first_enable[i]:j}} 136if(!disabled_exists)return;sels.oldonchange=sels.onchange;sels.onchange=function(){if(this.options[this.selectedIndex].disabled){this.selectedIndex=first_enable[i]}else{if(this.oldonchange)this.oldonchange();}};if(sels.selectedIndex>=0&&sels.options[sels.selectedIndex].disabled)sels.onchange();})} 137$(document).on('change','input[type=file]',function(){var max_filesize=$
137(this).data('max-filesize');if(!max_filesize)return;var files=$(this).get(0).files;if(!files||!files[0])return;if(files[0].size>max_filesize){var max_filesize_error=String($(this).data('max-filesize-error'));max_filesize_error=max_filesize_error.replace('%s',XE.filesizeFormat(max_filesize));this.value='';alert(max_filesize_error)}});jQuery('input[type="submit"],button[type="submit"]').click(function(ev){var $el=jQuery(ev.currentTarget);setTimeout(function(){return function(){$el.attr('disabled','disabled')}}(),0);setTimeout(function(){return function(){$el.removeAttr('disabled')}}(),3000)})});(function($){String.prototype.getQuery=function(key){var queries=window.XE.URI(this).search(!0);var result=queries[key];if(typeof result==='undefined'){return''}else{return result}};String.prototype.setQuery=function(key,val){var uri=window.XE.URI(this);if(typeof key!=='undefined'){if(typeof val==="undefined"||val===''||val===null){uri.removeSearch(key)}else{uri.setSearch(key,String(val))}} 138return normailzeUri(uri).toString()};String.prototype.escape=function(double_escape){var map={'&':'&','<':'<','>':'>','"':'"',"'":'''};var revmap={'&amp;':'&','&lt;':'<','&gt;':'>','&quot;':'"',"&#039;":'''};var result=String(this).replace(/[&<>"']/g,function(m){return map[m]});if(double_escape===!1){return result.replace(/&(amp|lt|gt|quot|#039);/g,function(m){return revmap[m]})}else{return result}};String.prototype.unescape=function(){var map={'&':'&','<':'<','>':'>','"':'"',''':"'"};return String(this).replace(/&(amp|lt|gt|quot|#039);/g,function(m){return map[m]})};String.prototype.stripTags=function(){return String(this).replace(/<\/?[a-z][^>]*>/ig,"")};if(!String.prototype.trim){String.prototype.trim=function(){return String(this).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,'')}} 139function normailzeUri(uri){var protocol=window.enforce_ssl?'https':uri.protocol();var port=(protocol==='http')?window.http_port:window.https_port;var filename=uri.filename()||'index.php';var queries=uri.search(!0);if(window.XE.isSameHost(uri.toString())&&filename==='index.php'&&$.isEmptyObject(queries)){filename=''} 140return uri.protocol(protocol).port(port||null).normalizePort().filename(filename)}})(jQuery);function xSleep(sec){sec=sec/1000;var now=new Date();var sleep=new Date();while(sleep.getTime()-now.getTime()<sec){sleep=new Date()}} 141function isDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=="undefined")return!1} 142return!0} 143var winopen_list={};function winopen(url,target,features){try{if(target!='_blank'&&winopen_list[target]){winopen_list[target].close();winopen_list[target]=null}}catch(e){} 144if(typeof target=='undefined')target='_blank';if(typeof features=='undefined')features='';if(!window.XE.isSameHost(url)){window.blankshield.open(url,target,features)}else{var win=window.open(url,target,features);win.focus();if(target!='_blank'){winopen_list[target]=win}}} 145function popopen(url,target){winopen(url,target,"width=800,height=600,scrollbars=yes,resizable=yes,toolbars=no")} 146function sendMailTo(to){location.href="mailto:"+to} 147function redirect(url){if(isCurrentPageUrl(url)){window.location.href=url;window.location.reload()}else{window.location.href=url}} 148function isCurrentPageUrl(url){var absolute_url=window.location.href;var relative_url=window.location.pathname+window.location.search;return url===absolute_url||url.indexOf(absolute_url.replace(/#.+$/,"")+"#")===0||url===relative_url||url.indexOf(relative_url.replace(/#.+$/,"")+"#")===0} 149function move_url(url,open_window){if(!url){return!1} 150if(/^\./.test(url)){url=window.request_uri+url} 151if(typeof open_window=='undefined'||open_window=='N'){redirect(url)}else{winopen(url)} 152return!1} 153function displayMultimedia(src,width,height,options){var html=_displayMultimedia(src,width,height,options);if(html)document.writeln(html);} 154function _displayMultimedia(src,width,height,options){if(src.indexOf('files')===0)src=request_uri+src;var defaults={wmode:'transparent',allowScriptAccess:'never',quality:'high',flashvars:'',autostart:!1};var params=jQuery.extend(defaults,options||{});var autostart=(params.autostart&¶ms.autostart!='false')?'true':'false';delete(params.autostart);var clsid="";var codebase="";var html="";var background="black";width=parseInt(width,10);height=parseInt(height,10);if(/\.(gif|jpe?g|bmp|png|webp)$/i.test(src)){html='<img src="'+src+'" width="'+width+'" height="'+height+'" class="thumb" />'}else{if(options.thumbnail){background+=" url('"+options.thumbnail+"');background-size:cover;background-position:center center"} 155html='<span style="position:relative;background:'+background+';width:'+width+'px;height:'+height+'px" class="thumb">';html+='<img style="width:24px;height:24px;position:absolute;
155left:50%;top:50%;border:0;margin:-12px 0 0 -12px;padding:0" src="'+request_uri+'common/img/play.png" alt="" />';html+='</span>'} 156return html} 157function zbxe_folder_open(id){jQuery("#folder_open_"+id).hide();jQuery("#folder_close_"+id).show();jQuery("#folder_"+id).show()} 158function zbxe_folder_close(id){jQuery("#folder_open_"+id).show();jQuery("#folder_close_"+id).hide();jQuery("#folder_"+id).hide()} 159function setFixedPopupSize(){var $=jQuery,$win=$(window),$pc=$('body>.popup'),w,h,dw,dh,offset,scbw;var $outer=$('<div>').css({visibility:'hidden',width:100,overflow:'scroll'}).appendTo('body'),widthWithScroll=$('<div>').css({width:'100%'}).appendTo($outer).outerWidth();$outer.remove();scbw=100-widthWithScroll;offset=$pc.css({overflow:'scroll'}).offset();w=$pc.width(10).height(10000).get(0).scrollWidth+offset.left*2;if(w<800)w=800+offset.left*2;w=Math.min(w,window.screen.availWidth);h=$pc.width(w-offset.left*2).height(10).get(0).scrollHeight+offset.top*2;dw=$win.width();dh=$win.height();h=Math.min(h,window.screen.availHeight-100);window.resizeBy(w-dw,h-dh);$pc.width('100%').css({overflow:'',height:'','box-sizing':'border-box'})} 160function doCallModuleAction(module,action,target_srl){var params={target_srl:target_srl,cur_mid:current_mid,mid:current_mid};exec_json(module+'.'+action,params,completeCallModuleAction)} 161function completeCallModuleAction(ret_obj,response_tags){if(ret_obj.message!='success')alert(ret_obj.message);location.reload()} 162function completeMessage(ret_obj){alert(ret_obj.message);location.reload()} 163function doChangeLangType(obj){if(typeof(obj)=="string"){setLangType(obj)}else{var val=obj.options[obj.selectedIndex].value;setLangType(val)} 164if(location.href.match(/[?&]l=[a-z]+/)){location.href=location.href.setQuery('l','')}else{location.reload()}} 165function setLangType(lang_type){var baseurl=XE.URI(default_url).pathname();if(baseurl!=='/'){XE.cookie.remove('lang_type',{path:'/'})} 166XE.cookie.set('lang_type',lang_type,{path:baseurl,expires:365})} 167function getColorScheme(){if($('body').hasClass('color_scheme_dark')){return'dark'}else{return'light'}} 168function setColorScheme(color_scheme){if(color_scheme==='dark'||c
168olor_scheme==='light'){$('body').addClass('color_scheme_'+color_scheme).removeClass('color_scheme_'+(color_scheme==='dark'?'light':'dark'));XE.cookie.set('rx_color_scheme',color_scheme,{path:window.XE.URI(default_url).pathname(),expires:365})}else{XE.cookie.remove('rx_color_scheme',{path:window.XE.URI(default_url).pathname()});color_scheme=(window.matchMedia&&window.matchMedia('(prefers-color-scheme:dark)').matches)?'dark':'light';$('body').addClass('color_scheme_'+color_scheme).removeClass('color_scheme_'+(color_scheme==='dark'?'light':'dark'))}} 169function detectColorScheme(){var body_element=$('body');if(body_element.hasClass('color_scheme_light')||body_element.hasClass('color_scheme_dark')){return} 170var color_scheme=XE.cookie.get('rx_color_scheme');var match_media=window.matchMedia?window.matchMedia('(prefers-color-scheme:dark)'):null;if(color_scheme!=='light'&&color_scheme!=='dark'){color_scheme=(match_media&&match_media.matches)?'dark':'light'} 171body_element.addClass('color_scheme_'+color_scheme);match_media&&match_media.addListener&&match_media.addListener(function(e){if(e.matches){body_element.removeClass('color_scheme_light').addClass('color_scheme_dark')}else{body_element.removeClass('color_scheme_dark').addClass('color_scheme_light')}})} 172function doDocumentPreview(obj){var fo_obj=obj;while(fo_obj.nodeName!="FORM"){fo_obj=fo_obj.parentNode} 173if(fo_obj.nodeName!="FORM")return;var editor_sequence=fo_obj.getAttribute('editor_sequence');var content=editorGetContent(editor_sequence);var win=window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var dummy_obj=jQuery("#previewDocument");if(!dummy_obj.length){jQuery('<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'">'+'<input type="hidden" name="_rx_csrf_token" value="'+getCSRFToken()+'" />'+'<input type="hidden" name="module" value="document" />'+'<input type="hidden" name="act" value="dispDocumentPreview" />'+'<input type="hidden" name="mid" value="'+current_mid+'" />'+'<input type="hidden" name="content" />'+'</form>').appendTo(document.body);dummy_obj=jQuery("#previewDocument")[0]}else{dummy_obj=dummy_obj[0]} 174if(dummy_obj){dummy_obj.content.value=content;dummy_obj.submit()}} 175function doDocumentSave(obj){var editor_sequence=obj.form.getAttribute('editor_sequence');var prev_content=editorRelKeys[editor_sequence].content.value;if(typeof(editor_sequence)!='undefined'&&editor_sequence&&typeof(editorRelKeys)!='undefined'&&typeof(editorGetContent)=='function'){var content=editorGetContent(editor_sequence);editorRelKeys[editor_sequence].content.value=content} 176var params={},data=jQuery(obj.form).serializeArray();jQuery.each(data,function(i,field){var val=jQuery.trim(field.value);if(!val)return!0;if(/\[\]$/.test(field.name))field.name=field.name.replace(/\[\]$/,'');if(params[field.name])params[field.name]+='|@|'+val;else params[field.name]=field.value});exec_json('document.procDocumentTempSave',params,completeDocumentSave);editorRelKeys[editor_sequence].content.value=prev_content;return!1} 177function completeDocumentSave(ret_obj){jQuery('input[name=document_srl]').eq(0).val(ret_obj.document_srl);alert(ret_obj.message)} 178var objForSavedDoc=null;function doDocumentLoad(obj){objForSavedDoc=obj.form;popopen(request_uri.setQuery('module','document').setQuery('act','dispTempSavedList'))} 179function doDocumentSelect(document_srl,module){if(!opener||!opener.objForSavedDoc){window.close();return} 180if(module===undefined){module='document'} 181switch(module){case 'page':var url=opener.current_url;url=url.setQuery('document_srl',document_srl);if(url.getQuery('act')==='dispPageAdminMobileContentModify'){url=url.setQuery('act','dispPageAdminMobileContentModify')}else{url=url.setQuery('act','dispPageAdminContentModify')} 182opener.location.href=url;break;default:opener.location.href=opener.current_url.setQuery('document_srl',document_srl).setQuery('act','dispBoardWrite');break} 183window.close()} 184function viewSkinInfo(module,skin){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+module+"&skin="+skin,'SkinInfo')} 185var addedDocument=[];function doAddDocumentCart(obj){var srl=obj.value;addedDocument[addedDocument.length]=srl;setTimeout(function(){callAddDocumentCart(addedDocument.length)},100)} 186function callAddDocumentCart(document_length){if(addedDocument.length<1||document_length!=addedDocument.length)return;exec_json('document.procDocumentAddCart',{srls:addedDocument.join(',')});addedDocument=[]} 187function transRGB2Hex(value){if(!value)return value;if(value.indexOf('#')>-1)return value.replace(/^#/,'');if(value.toLowerCase().indexOf('rgb')<0)return value;value=value.replace(/^rgb\(/i,'').replace(/\)$/,'');value_list=value.split(',');var hex='';for(var i=0;i<value_list.length;i++){var color=parseInt(value_list[i],10).toString(16);if(color.length==1)color='0'+color;hex+=color} 188return hex} 189function toggleSecuritySignIn(){var href=location.href;if(/https:\/\//i.test(href))location.href=href.replace(/^https/i,'http');else location.href=href.replace(/^http/i,'https')} 190function reloadDocument(){location.reload()} 191var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
191+/=",encode:function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=Base64._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64} 192output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4)} 193return output},decode:function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2)} 194if(enc4!=64){output=output+String.fromCharCode(chr3)}} 195output=Base64._utf8_decode(output);return output},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);
195utftext+=String.fromCharCode((c&63)|128)}} 196return utftext},_utf8_decode:function(utftext){var string="";var i=0;var c=0,c1=0,c2=0,c3=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++}else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3}} 197return string}};window.ssl_actions=[];if(typeof(resizeImageContents)=='undefined'){window.resizeImageContents=function(){}} 198if(typeof(activateOptionDisabled)=='undefined'){window.activateOptionDisabled=function(){}} 199objectExtend=jQuery.extend;function toggleDisplay(objId){jQuery('#'+objId).toggle()} 200function svc_folder_open(id){jQuery("#_folder_open_"+id).hide();jQuery("#_folder_close_"+id).show();jQuery("#_folder_"+id).show()} 201function svc_folder_close(id){jQuery("#_folder_open_"+id).show();jQuery("#_folder_close_"+id).hide();jQuery("#_folder_"+id).hide()} 202function open_calendar(fo_id,day_str,callback_func){if(typeof(day_str)=="undefined")day_str="";var url="./common/tpl/calendar.php?";if(fo_id)url+="fo_id="+fo_id;if(day_str)url+="&day_str="+day_str;if(callback_func)url+="&callback_func="+callback_func;popopen(url,'Calendar')} 203var loaded_popup_menus=XE.loaded_popup_menus;function createPopupMenu(){} 204function chkPopupMenu(){} 205function displayPopupMenu(ret_obj,response_tags,params){XE.displayPopupMenu(ret_obj,response_tags,params)} 206function GetObjLeft(obj){return jQuery(obj).offset().left} 207function GetObjTop(obj){return jQuery(obj).offset().top} 208function replaceOuterHTML(obj,html){jQuery(obj).replaceWith(html)} 209function getOuterHTML(obj){return jQuery(obj).html().trim()} 210function setCookie(name,value,expires,path){var options={path:path?path:"/",secure:cookies_ssl?!0:!1};if(expires){options.expires=expires} 211XE.cookie.set(name,value,options)} 212function getCookie(name){return XE.cookie.get(name)} 213function is_def(v){return typeof(v)!='undefined'&&v!==null} 214function ucfirst(str){return str.charAt(0).toUpperCase()+str.slice(1)} 215function get_by_id(id){return document.getElementById(id)} 216jQuery(function($){$(document).on('click',function(evt){var $area=$('#popup_menu_area');if(!$area.length)$area=$('<div id="popup_menu_area" tabindex="0" style="display:none;" />').appendTo(document.body);$area.hide();var $target=$(evt.target).filter('a,div,span');if(!$target.length)$target=$(evt.target).closest('a,div,span');if(!$target.length)return;var cls=$target.attr('class'),match;if(cls)match=cls.match(new RegExp('(?:^| )((document|comment|member)_([1-9]\\d*))(?: |$)',''));if(!match)return;if(evt.pageX===undefined||evt.pageY===undefined){var touch=evt.originalEvent.touches[0];if(touch!==undefined||!touch){touch=evt.originalEvent.changedTouches[0]} 217evt.pageX=touch.pageX;evt.pageY=touch.pageY} 218var module=match[2];var action='get'+ucfirst(module)+'Menu';var params={mid:current_mid,cur_mid:current_mid,menu_id:match[1],target_srl:match[3],cur_act:current_url.getQuery('act'),page_x:evt.pageX,page_y:evt.pageY};var response_tags='error message menus'.split(' ');evt.preventDefault();evt.stopPropagation();if(is_def(XE.loaded_popup_menus[params.menu_id])){return XE.displayPopupMenu(params,response_tags,params)} 219show_waiting_message=!1;exec_json(module+'.'+action,params,function(data){XE.displayPopupMenu(data,response_tags,params);show_waiting_message=!0})});$('body').on('click','a._xe_popup',function(event){var $this=$(this);var name=$this.attr('name');var href=$this.attr('href');if(!name)name='_xe_popup_'+Math.floor(Math.random()*1000);event.preventDefault();winopen(href,name,'left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no')});if($.datepicker){$.datepicker.setDefaults({dateFormat:'yy-mm-dd'})}});(function($){var _xe_base,_app_base,_plugin_base;var _apps=[];_xe_base={getName:function(){return'Core'},createApp:function(sName,oDef){var _base=getTypeBase();$.extend(_base.prototype,_app_base,oDef);_base.prototype.getName=function(){return sName};return _base},createPlugin:function(sName,oDef){var _base=getTypeBase();$.extend(_base.prototype,_plugin_base,oDef);_base.prototype.getName=function(){return sName};return _base},getApps:function(){return $.makeArray(_apps)},getApp:function(indexOrName){indexOrName=(indexOrName||'').toLowerCase();if(typeof _apps[indexOrName]!='undefined'){return _apps[indexOrName]}else{return null}},registerApp:function(oApp){var sName=oApp.getName().toLowerCase();_apps.push(oApp);if(!$.isArray(_apps[sName])){_apps[sName]=[]} 220_apps[sName].push(oApp);oApp.parent=this;if($.isFunction(oApp.activate))oApp.activate();},unregisterApp:function(oApp){var sName=oApp.getName().toLowerCase();var nIndex=$.inArray(oApp,_apps);if(nIndex>=0)_apps=_apps.splice(nIndex,1);if($.isArray(_apps[sName])){nIndex=$.inArray(oApp,_apps[sName]);if(nIndex>=0)_apps[sName]=_apps[sName].splice(nIndex,1);} 221if($.isFunction(oApp.deactivate))oApp.deactivate();},broadcast:function(msg,params){this._broadcast(this,msg,params)},_broadcast:function(sender,msg,params){for(var i=0;i<_apps.length;i++){_apps[i]._cast(sender,msg,params)} 222this._cast(sender,msg,params)}};_app_base={_plugins:[],_messages:{},getPlugin:function(sPluginName){sPluginName=sPluginName.toLowerCase();if($.isArray(this._plugins[sPluginName])){return this._plugins[sPluginName]}else{return[]}},registerPlugin:function(oPlugin){var self=this;var sName=oPlugin.getName().toLowerCase();if($.inArray(oPlugin,this._plugins)>=0)return!1;this._plugins.push(oPlugin);if(!$.isArray(this._plugins[sName]))this._plugins[sName]=[];this._plugins[sName].push(oPlugin);$.each(oPlugin._binded_fn,function(api,fn){self.registerHandler(api,fn)});oPlugin.oApp=this;if($.isFunction(oPlugin.activate))oPlugin.activate();return!0},registerHandler:function(api,func){var msgs=this._messages;api=api.toUpperCase();if(!$.isArray(msgs[api]))msgs[api]=[];msgs[api].push(func)},cast:function(msg,params){return this._cast(this,msg,params||[])},broadcast:function(sender,msg,params){if(this.parent&&this.parent._broadcast){this.parent._broadcast(sender,msg,params)}},_cast:function(sender,msg,params){var i,len;var aMsg=this._messages;msg=msg.toUpperCase();if(aMsg['BEFORE_'+msg]||this['API_BEFORE_'+msg]){var bContinue=this._cast(sender,'BEFORE_'+msg,params);if(!bContinue)return} 223var vRet=[],sFn='API_'+msg;if($.isArray(aMsg[msg])){for(i=0;i<aMsg[msg].length;i++){vRet.push(aMsg[msg][i](sender,params))}} 224if(vRet.length<2)vRet=vRet[0];if(aMsg['AFTER_'+msg]||this['API_AFTER_'+msg]){this._cast(sender,'AFTER_'+msg,params)}
225if(!/^(?:AFTER|BEFORE)_/.test(msg)){return vRet}else{return $.isArray(vRet)?($.inArray(!1,vRet)<0):((typeof vRet=='undefined')?true:!!vRet)}}};_plugin_base={oApp:null,cast:function(msg,params){if(this.oApp&&this.oApp._cast){return this.oApp._cast(this,msg,params||[])}},broadcast:function(msg,params){if(this.oApp&&this.oApp.broadcast){this.oApp.broadcast(this,mag,params||[])}}};function getTypeBase(){var _base=function(){var self=this;var pool=null;if($.isArray(this._plugins))this._plugins=[];if(this._messages)this._messages={};else this._binded_fn={};$.each(this,function(key,val){if(!$.isFunction(val))return!0;if(!/^API_([A-Z0-9_]+)$/.test(key))return!0;var api=RegExp.$1;var fn=function(sender,params){return self[key](sender,params)};if(self._messages)self._messages[api]=[fn];else self._binded_fn[api]=fn});if($.isFunction(this.init))this.init.apply(this,arguments);};return _base} 226window.xe=$.extend(_app_base,_xe_base);window.xe.lang={};$(function(){xe.broadcast('ONREADY')});$(window).load(function(){xe.broadcast('ONLOAD')})})(jQuery);(function($){"use strict";window.show_ajax_errors=['ALL'];window.show_leaving_warning=!1;var page_unloading=!1;window.exec_xml=$.exec_xml=function(module,act,params,callback_success,return_fields,callback_success_arg,fo_obj){if(typeof console=="object"&&typeof console.warn=="function"){var msg="DEPRECATED : exec_xml() is deprecated in Rhymix. Use exec_json() instead.";if(navigator.userAgent.match(/Firefox/)){console.error(msg)}else{console.warn(msg)}} 227var successHandler,errorHandler,xmlHandler;params=params?($.isArray(params)?arr2obj(params):params):{};params.module=module;params.act=act;var url=request_uri;if(!isSameOrigin(location.href,url))return send_by_form(url,params);successHandler=function(data,textStatus,xhr){var result={};$.each(data,function(key,val){if($.inArray(key,["error","message","act","redirect_url"])>=0||$.inArray(key,return_fields)>=0){result[key]=val}});if(data._rx_debug){data._rx_debug.page_title="AJAX : "+params.module+"."+params.act;if(window.rhymix_debug_add_data){window.rhymix_debug_add_data(data._rx_debug)}else{window.rhymix_debug_pending_data.push(data._rx_debug)}} 228if(data.error!="0"){if($.isFunction($.exec_xml.onerror)){if(typeof console=="object"&&typeof console.warn=="function"){var msg="DEPRECATED : $.exec_xml.onerror() is deprecated in Rhymix.";if(navigator.userAgent.match(/Firefox/)){console.error(msg)}else{console.warn(msg)}} 229return $.exec_xml.onerror(module,act,data,callback_success,return_fields,callback_success_arg,fo_obj)}
230if(data.message){var full_message=data.message.replace(/\\n/g,"\n");if(data.errorDetail){full_message+="\n\n"+data.errorDetail} 231alert(full_message)}else{var msg="AJAX communication error while requesting "+params.module+"."+params.act;console.error(msg);if(window.show_ajax_errors.indexOf('ALL')>=0||window.show_ajax_errors.indexOf(xhr.status)>=0){alert(msg)}} 232return null} 233if(data.redirect_url){data.redirect_url=data.redirect_url.replace(/&/g,"&")} 234if(data.redirect_url&&!$.isFunction(callback_success)){return redirect(data.redirect_url)} 235if($.isFunction(callback_success)){callback_success(result,return_fields,callback_success_arg,fo_obj)}};errorHandler=function(xhr,textStatus,doNotHandleXml){if(textStatus==='parsererror'&&doNotHandleXml!==!0&&xhr.responseText&&xhr.responseText.match(/<response/)){return xmlHandler(xhr,textStatus)} 236if(xhr.status==0&&page_unloading){return} 237var error_info,msg;if($(".x_modal-body").size()){if(xhr.status==0){error_info='Connection failed: '+xhr.statusText+" ("+textStatus+")"+"<br><br><pre>"+xhr.responseText+"</pre>"}else{error_info=xhr.status+" "+xhr.statusText+" ("+textStatus+")"+"<br><br><pre>"+xhr.responseText+"</pre>"} 238msg="AJAX communication error while requesting "+params.module+"."+params.act+"<br><br>"+error_info;console.error(msg.replace(/(<br>)+/g,"\n").trim());if(window.show_ajax_errors.indexOf('ALL')>=0||window.show_ajax_errors.indexOf(xhr.status)>=0){alert(msg)}}else{if(xhr.status==0){error_info='Connection failed: '+xhr.statusText+" ("+textStatus+")"+"\n\n"+xhr.responseText}else{error_info=xhr.status+" "+xhr.statusText+" ("+textStatus+")"+"\n\n"+xhr.responseText} 239msg="AJAX communication error while requesting "+params.module+"."+params.act+"\n\n"+error_info;console.error(msg.trim().replace(/\n+/g,"\n"));if(window.show_ajax_errors.indexOf('ALL')>=0||window.show_ajax_errors.indexOf(xhr.status)>=0){alert(msg)}}};xmlHandler=function(xhr,textStatus){var parseXmlAndReturn=function(){var x2js=new X2JS();var data=x2js.xml_str2json($.trim(xhr.responseText));if(data&&data.response){return successHandler(data.response,textStatus,xhr)}else{return errorHandler(xhr,textStatus,!0)}};if(window.X2JS){parseXmlAndReturn()}else{$.ajax({url:request_uri+"common/js/xml2json.js",dataType:"script",cache:!0,success:parseXmlAndReturn,error:function(){return errorHandler(xhr,textStatus,!0)}})}};try{$.ajax({url:XE.URI(request_uri).pathname(),type:"POST",dataType:"json",data:params,headers:{'X-AJAX-Compat':'XMLRPC','X-CSRF-Token':getCSRFToken()},success:successHandler,error:errorHandler})}catch(e){alert(e);return}};window.exec_json=$.exec_json=function(action,params,callback_success,callback_error){var url=XE.URI(request_uri).pathname();var action_parts=action.split('.');var request_info;if(params instanceof FormData){request_info=(params.get('module')||params.get('mid'))+'.'+params.get('act')}else if(action==='raw'){request_info='RAW FORM SUBMISSION'}else{params=params?($.isArray(params)?arr2obj(params):params):{};params.module=action_parts[0];params.act=action_parts[1];request_info=params.module+"."+params.act} 240var successHandler=function(data,textStatus,xhr){if(data._rx_debug){data._rx_debug.page_title="AJAX : "+request_info;if(window.rhymix_debug_add_data){window.rhymix_debug_add_data(data._rx_debug)}else{window.rhymix_debug_pending_data.push(data._rx_debug)}} 241if(data.error!="0"&&data.error>-1000){if(data.errorDetail==='ERR_CSRF_CHECK_FAILED'&&action!=='member.getLoginStatus'){return window.exec_json('member.getLoginStatus',{},function(data){if(data.csrf_token){setCSRFToken(data.csrf_token);window.exec_json(action,params,callback_success,callback_error)}})} 242if($.isFunction(callback_error)&&callback_error(data,xhr)===!1){return} 243if(data.error==-1&&data.message=="admin.msg_is_not_administrator"){alert("You are not logged in as an administrator.");return}else{if(data.message){var full_message=data.message.replace(/\\n
243/g,"\n");if(data.errorDetail){full_message+="\n\n"+data.errorDetail} 244alert(full_message)}else{var msg="AJAX communication error while requesting "+request_info;console.error(msg);if(window.show_ajax_errors.indexOf('ALL')>=0||window.show_ajax_errors.indexOf(xhr.status)>=0){alert(msg)}} 245return}} 246if(data.redirect_url){data.redirect_url=data.redirect_url.replace(/&/g,"&")} 247if(data.redirect_url&&!$.isFunction(callback_success)){return redirect(data.redirect_url)} 248if($.isFunction(callback_success)){callback_success(data)}};var errorHandler=function(xhr,textStatus){if(xhr.status==0&&page_unloading){return} 249var error_info,msg;if($.isFunction(callback_error)){var data={error:-3,message:textStatus};if(callback_error(data,xhr)===!1){return}} 250if($(".x_modal-body").size()){if(xhr.status==0){error_info='Connection failed: '+url+' ('+textStatus+')'+"<br><br><pre>"+xhr.responseText+"</pre>"}else{error_info=xhr.status+" "+xhr.statusText+" ("+textStatus+")"+"<br><br><pre>"+xhr.responseText+"</pre>"} 251msg="AJAX communication error while requesting "+(params.act?(params.module+"."+params.act):url)+"<br><br>"+error_info;console.error(msg.replace(/(<br>)+/g,"\n").trim());if(window.show_ajax_errors.indexOf('ALL')>=0||window.show_ajax_errors.indexOf(xhr.status)>=0){alert(msg)}}else{if(xhr.status==0){error_info='Connection failed: '+url+' ('+textStatus+')'+"\n\n"+xhr.responseText}else{error_info=xhr.status+" "+xhr.statusText+" ("+textStatus+")"+"\n\n"+xhr.responseText} 252msg="AJAX communication error while requesting "+(params.act?(params.module+"."+params.act):url)+"\n\n"+error_info;console.error(msg.trim().replace(/\n+/g,"\n"));if(window.show_ajax_errors.indexOf('ALL')>=0||window.show_ajax_errors.indexOf(xhr.status)>=0){alert(msg)}}};var headers={};if(action!=='raw'){headers['X-CSRF-Token']=getCSRFToken();if(!params._rx_ajax_compat){headers['X-AJAX-Compat']='JSON'}};try{var args={type:"POST",dataType:"json",url:url,data:params,processData:(action!=='raw'),headers:headers,success:successHandler,error:errorHandler};if(params instanceof FormData){args.contentType=!1} 253$.ajax(args)}catch(e){alert(e);return}};window.exec_html=$.fn.exec_html=function(){if(typeof console=="object"&&typeof console.warn=="function"){var msg="DEPRECATED : exec_html() is obsolete in Rhymix.";if(navigator.userAgent.match(/Firefox/)){console.error(msg)}else{console.warn(msg)}}};XE.ajaxForm=function(form,callback_success,callback_error){form=$(form);if(typeof callback_success==='undefined'){callback_success=form.data('callbackSuccess');if(callback_success&&window[callback_success]&&$.isFunction(window[callback_success])){callback_success=window[callback_success]}else{callback_success=function(data){if(data.message&&data.message!=='success'){rhymix_alert(data.message,data.redirect_url)} 254if(data.redirect_url){redirect(data.redirect_url)}}}} 255if(typeof callback_error==='undefined'){callback_error=form.data('callbackError');if(callback_error&&window[callback_error]&&$.isFunction(window[callback_error])){callback_error=window[callback_error]}else{callback_error=null}} 256window.exec_json('raw',new FormData(form[0]),callback_success,callback_error)};$(document).on('submit','form.rx_ajax',function(event){if(!$(this).attr('target')){event.preventDefault();XE.ajaxForm(this)}});var beforeUnloadHandler=function(){page_unloading=!0;return""};$(function(){if(show_leaving_warning){$(document).ajaxStart(function(){$(window).bind("beforeunload",beforeUnloadHandler)}).bind("ajaxStop cancel_confirm",function(){$(window).unbind("beforeunload",beforeUnloadHandler)})}else{$(window).on('beforeunload',function(){page_unloading=!0})}})})(jQuery);function send_by_form(url,params){if(typeof console=="object"&&typeof console.warn=="function"){var msg="DEPRECATED : send_by_form() is deprecated in Rhymix.";if(navigator.userAgent.match(/Firefox/)){console.error(msg)}else{console.warn(msg)}} 257var frame_id="xeTmpIframe";if(!$("#"+frame_id).length){$('<iframe name="%id%" id="%id%" style="position:absolute;left:-1px;top:1px;width:1px;height:1px"></iframe>'.replace(/%id%/g,frame_id)).appendTo(document.body)} 258var form_id="xeVirtualForm";$("#"+form_id).remove();var form=$('<form id="%id%"></form>'.replace(/%id%/g,form_id)).attr({"id":form_id,"method":"post","action":url,"target":frame_id});params.xeVirtualRequestMethod="xml";params.xeRequestURI=location.href.replace(/#(.*)$/i,"");params.xeVirtualRequestUrl=request_uri;$.each(params,function(key,value){$('<input type="hidden">').attr("name",key).attr("value",value).appendTo(form)});form.appendTo(document.body).submit()} 259function arr2obj(arr){var ret={};for(var key in arr){if(arr.hasOwnProperty(key)){ret[key]=arr[key]}} 260return ret};(function($){var messages=[];var rules=[];var filters={};var callbacks=[];var extras={};var Validator=xe.createApp('Validator',{init:function(){var regEmail=
260/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast('ADD_RULE',['email',regEmail]);this.cast('ADD_RULE',['email_address',regEmail]);var regUserid=/^[a-z]+[\w-]*[a-z0-9_]+$/i;this.cast('ADD_RULE',['userid',regUserid]);this.cast('ADD_RULE',['user_id',regUserid]);var regUrl=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/;this.cast('ADD_RULE',['url',regUrl]);this.cast('ADD_RULE',['homepage',regUrl]);var regKor=new RegExp('^[\uAC00-\uD7A3]*$');this.cast('ADD_RULE',['korean',regKor]);var regKorNum=new RegExp('^[\uAC00-\uD7A30-9]*$');this.cast('ADD_RULE',['korean_number',regKorNum]);var regAlpha=/^[a-z]*$/i;this.cast('ADD_RULE',['alpha',regAlpha]);var regAlphaNum=/^[a-z][a-z0-9_]*$/i;this.cast('ADD_RULE',['alpha_number',regAlphaNum]);var regNum=/^[0-9]*$/;this.cast('ADD_RULE',['number',regNum]);var regFloat=/^\d+(\.\d+)?$/;this.cast('ADD_RULE',['float',regFloat])},run:function(oForm){var filter='';if(oForm._filter)filter=oForm._filter.value;var params=[oForm,filter];var result=this.cast('VALIDATE',params);if(typeof result=='undefined')result=!1;return result},API_ONREADY:function(){var self=this;$('form').each(function(){if(this.onsubmit){this['xe:onsubmit']=this.onsubmit;this.onsubmit=null}}).submit(function(e){var legacyFn=this['xe:onsubmit'];var hasLegacyFn=$.isFunction(legacyFn);var bResult=hasLegacyFn?legacyFn.apply(this):self.run(this);if(!bResult){e.stopImmediatePropagation()} 261return bResult})},API_VALIDATE:function(sender,params){var result=!0,form=params[0],elems=form.elements,filter,filter_to_add,ruleset,callback;var fields,names,name,el,val,mod,len,lenb,max,min,maxb,minb,rules,e_el,e_val,i,c,r,if_,fn;if(elems.ruleset){filter=form.elements.ruleset.value}else if(elems._filter){filter=form.elements._filter.value} 262if(!filter)return!0;if($.isFunction(callbacks[filter]))callback=callbacks[filter];filter=$.extend({},filters[filter.toLowerCase()]||{},extras);function regex_quote(str){return str.replace(/([\.\+\-\[\]\{\}\(\)\\])/g,'\\$1')} 263fields=[];for(i=0,c=form.elements.length;i<c;i++){el=elems[i];name=el.name;if(!name||!elems[name])continue;if(!elems[name].length||elems[name][0]===el)fields.push(name);} 264fields=fields.join('\n');filter_to_add={};for(name in filter){if(!filter.hasOwnProperty(name))continue;names=[];if(name.substr(0,1)=='^'){names=fields.match((new RegExp('^'+regex_quote(name.substr(1))+'.*$','gm')))}else{continue} 265if(!names)names=[];for(i=0,c=names.length;i<c;i++){filter_to_add[names[i]]=filter[name]} 266filter[name]=null;delete filter[name]} 267filter=$.extend(filter,filter_to_add);for(name in filter){if(!filter.hasOwnProperty(name))continue;f=filter[name];el=elems[name];if(!el){el=elems[name+'[]']}
268val=el?$.trim(get_value($(el))):'';mod=(f.modifier||'')+',';if(!el||el.disabled)continue;if(f['if']){if(!$.isArray(f['if']))f['if']=[f['if']];for(i=0;i<f['if'].length;i++){if_=f['if'][i];fn=new Function('el','return !!('+(if_.test.replace(/\$(\w+)/g,'(jQuery(\'[name=$1]\').is(\':radio, :checkbox\') ? jQuery(\'[name=$1]:checked\').val() : jQuery(\'[name=$1]\').val())'))+')');if(fn(elems))f[if_.attr]=if_.value;else delete f[if_.attr]}} 269if(!val){if(f['default'])val=f['default'];if(f.required)return this.cast('ALERT',[form,name,'isnull'])&&!1;else continue} 270min=parseInt(f.minlength)||0;max=parseInt(f.maxlength)||0;minb=/b$/.test(f.minlength||'');maxb=/b$/.test(f.maxlength||'');len=val.length;if(minb||maxb)lenb=get_bytes(val);if((min&&min>(minb?lenb:len))||(max&&max<(maxb?lenb:len))){return this.cast('ALERT',[form,name,'outofrange',min,max])&&!1} 271if(f.equalto){e_el=elems[f.equalto];e_val=e_el?$.trim(get_value($(e_el))):'';if(e_el&&e_val!==val){return this.cast('ALERT',[form,name,'equalto'])&&!1}} 272rules=(f.rule||'').split(',');for(i=0,c=rules.length;i<c;i++){if(!(r=rules[i]))continue;result=this.cast('APPLY_RULE',[r,val]);if(mod.indexOf('not,')>-1)result=!result;if(!result){return this.cast('ALERT',[form,name,'invalid_'+r])&&!1}}} 273if($.isFunction(callback))return callback(form);return!0},API_ADD_RULE:function(sender,params){var name=params[0].toLowerCase();rules[name]=params[1]},API_DEL_RULE:function(sender,params){var name=params[0].toLowerCase();delete rules[name]},API_GET_RULE:function(sender,params){var name=params[0].toLowerCase();if(rules[name]){return rules[name]}else{return null}},API_ADD_FILTER:function(sender,params){var name=params[0].toLowerCase();var filter=params[1];filters[name]=filter},API_DEL_FILTER:function(sender,params){var name=params[0].toLowerCase();delete filters[name]},API_GET_FILTER:function(sender,params){var name=params[0].toLowerCase();if(filters[name]){return filters[name]}else{return null}},API_ADD_EXTRA_FIELD:function(sender,params){var name=params[0].toLowerCase();var prop=params[1];extras[name]=prop},API_GET_EXTRA_FIELD:function(sender,params){var name=params[0].toLowerCase();return extras[name]},API_DEL_EXTRA_FIELD:function(sender,params){var name=params[0].toLowerCase();delete extras[name]},API_APPLY_RULE:function(sender,params){var name=params[0];var value=params[1];if(typeof(rules[name])=='undefined')return!0;if($.isFunction(rules[name]))return rules[name](value);if(rules[name]instanceof RegExp)return rules[name].test(value);if($.isArray(rules[name]))return($.inArray(value,rules[name])>-1);return!0},API_ALERT:function(sender,params){var form=params[0];var field_name=params[1];var msg_code=params[2];var minlen=params[3];var maxlen=params[4];var field_msg=this.cast('GET_MESSAGE',[field_name]);var msg=this.cast('GET_MESSAGE',[msg_code]);if(msg!=msg_code)msg=(msg.indexOf('%s')<0)?(field_msg+msg):(msg.replace('%s',field_msg));if(minlen||maxlen)msg+='('+(minlen||'')+'~'+(maxlen||'')+')';this.cast('SHOW_ALERT',[msg]);$(form.elements[field_name]).focus()},API_SHOW_ALERT:function(sender,params){alert(params[0])},API_ADD_MESSAGE:function(sender,params){var msg_code=params[0];var msg_str=params[1];messages[msg_code]=msg_str},API_GET_MESSAGE:function(sender,params){var msg_code=params[0];return messages[msg_code]||msg_code},API_ADD_CALLBACK:function(sender,params){var name=params[0];var func=params[1];callbacks[name]=func},API_REMOVE_CALLBACK:function(sender,params){var name=params[0];delete callbacks[name]}});var oValidator=new Validator();xe.registerApp(oValidator);var EditorStub=xe.createPlugin('editor_stub',{API_BEFORE_VALIDATE:function(sender,params){var form=params[0];var seq=form.getAttribute('editor_sequence');if(seq&&typeof seq=='object')seq=seq.value;if(seq){try{editorRelKeys[seq].content.value=editorRelKeys[seq].func(seq)||''}catch(e){}}}});oValidator.registerPlugin(new EditorStub());function get_value($elem){var vals=[];if($elem.is(':radio')){return $elem.filter(':checked').val()}else if($elem.is(':checkbox')){$elem.filter(':checked').each(function(){vals.push(this.value)});return vals.join('|@|')}else{return $elem.val()}} 274function get_bytes(str){str+='';if(!str.length)return 0;str=encodeURI(str);var c=str.split('%').length-1;return str.length-c*2}})(jQuery);function filterAlertMessage(ret_obj){var error=ret_obj.error;var message=ret_obj.message;var act=ret_obj.act;var redirect_url=ret_obj.redirect_url;var url=location.href;if(typeof(message)!="undefined"&&message&&message!="success")alert(message);if(typeof(act)!="undefined"&&act)url=current_url.setQuery("act",act);else if(typeof(redirect_url)!="undefined"&&redirect_url)url=redirect_url;if(url==location.href)url=url.replace(/#(.*)$/,'');location.href=url} 275function procFilter(form,filter_func){var msg="DEPRECATED : procFilter() is deprecated
275in Rhymix.";if(navigator.userAgent.match(/Firefox/)){console.error(msg)}else{console.warn(msg)} 276filter_func(form);return!1} 277function legacy_filter(filter_name,form,module,act,callback,responses,confirm_msg,rename_params){var v=xe.getApp('Validator')[0],$=jQuery,args=[];if(!v)return!1;if(!form.elements._filter)$(form).prepend('<input type="hidden" name="_filter" />');form.elements._filter.value=filter_name;args[0]=filter_name;args[1]=function(f){var hasFile=!1;var params={},res=[],elms=f.elements,data=$(f).serializeArray();$.each(data,function(i,field){var v=$.trim(field.value),n=field.name;if(!v||!n)return!0;if(rename_params[n])n=rename_params[n];n=n.replace(/\[\]$/,'');if(params[n]){params[n]+='|@|'+v}else{params[n]=field.value}});$(f).find('input[type=file][name^=extra_vars]').each(function(){if(this.files&&this.files[0]){params[this.name]=this.files[0];hasFile=!0}});if(confirm_msg&&!confirm(confirm_msg))return!1;params.module=module;params.act=act;params._rx_ajax_compat='XMLRPC';var callback_wrapper=function(result){if(!result){result={}} 278if($.isFunction(callback)){var filtered_result={};Object.keys(result).forEach(function(key){if(responses&&responses.indexOf(key)>=0){filtered_result[key]=result[key]}else if(['error','message','act','redirect_url'].indexOf(key)>=0){filtered_result[key]=result[key]}});callback(filtered_result,responses,params,form)}};if(!hasFile){exec_json(module+'.'+act,params,callback_wrapper)}else{var fd=new FormData();for(let key in params){fd.append(key,params[key])} 279exec_json('raw',fd,callback_wrapper)}};v.cast('ADD_CALLBACK',args);v.cast('VALIDATE',[form,filter_name]);return!1}
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.