Produced by Araxis Merge on 2/1/2017 2:58:00 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\Araxis_Merge_Comprasion\Pub_un\BTSSS_CIF_122016.zip\BTSSS_CIF_12_20_16\clean\CRM Portal\trunk\BTSSSPortal\js | URI.min.js | Tue Dec 20 19:50:42 2016 UTC |
| 2 | Wed Feb 1 19:58:00 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 1 | 62 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /* | |||||
| 2 | URI.js v1. 13.2 | |||||
| 3 | http://med ialize.git hub.io/URI .js | |||||
| 4 | Copyright (c) 2011 R odney Rehm | |||||
| 5 | ||||||
| 6 | Permission is hereby granted, free of ch arge, to a ny person obtaining a copy of this softw are and as sociated d ocumentati on files ( the "Softw are"), to deal in th e Software without r estriction , includin g without limitation the right s to use, copy, modi fy, merge, publish, distribute , sublicen se, and/or sell copi es of the Software, and to per mit person s to whom the Softwa re is furn ished to d o so, subj ect to the following condition s: | |||||
| 7 | ||||||
| 8 | The above copyright notice and this perm ission not ice shall be include d in all c opies or s ubstantial portions of the Sof tware. | |||||
| 9 | ||||||
| 10 | THE SOFTWA RE IS PROV IDED "AS I S", WITHOU T WARRANTY OF ANY KI ND, EXPRES S OR IMPLI ED, INCLUD ING BUT NO T LIMITED TO THE WAR RANTIES OF MERCHANTA BILITY, FI TNESS FOR A PARTICUL AR PURPOSE AND NONIN FRINGEMENT . IN NO EV ENT SHALL THE AUTHOR S OR COPYR IGHT HOLDE RS BE LIAB LE FOR ANY CLAIM, DA MAGES OR O THER LIABI LITY, WHET HER IN AN ACTION OF CONTRACT, TORT OR OT HERWISE, A RISING FRO M, OUT OF OR IN CONN ECTION WIT H THE SOFT WARE OR TH E USE OR O THER DEALI NGS IN THE SOFTWARE. | |||||
| 11 | */ | |||||
| 12 | (function( q,w){"obje ct"===type of exports ?module.ex ports=w(re quire("./p unycode"), require(". /IPv6"),re quire("./S econdLevel Domains")) :"function "===typeof define&&d efine.amd? define([". /punycode" ,"./IPv6", "./SecondL evelDomain s"],w):q.U RI=w(q.pun ycode,q.IP v6,q.Secon dLevelDoma ins,q)})(t his,functi on(q,w,v,p ){function e(a,b){if (!(this in stanceof e ))return n ew e(a,b); void 0===a &&(a="unde fined"!==t ypeof loca tion?locat ion.href+" ":"");this .href(a);r eturn void 0!==b?thi s.absolute To(b):this }function s(a){retur n a.replac e(/([.*+?^ =!:${}()|[ \]\/\\])/g , | |||||
| 13 | "\\$1")}fu nction y(a ){return v oid 0===a? "Undefined ":String(O bject.prot otype.toSt ring.call( a)).slice( 8,-1)}func tion l(a){ return"Arr ay"===y(a) }function x(a,b){var c,e;if(l( b)){c=0;fo r(e=b.leng th;c<e;c++ )if(!x(a,b [c]))retur n!1;return !0}var f=y (b);c=0;fo r(e=a.leng th;c<e;c++ )if("RegEx p"===f){if ("string"= ==typeof a [c]&&a[c]. match(b))r eturn!0}el se if(a[c] ===b)retur n!0;return !1}functio n A(a,b){i f(!l(a)||! l(b)||a.le ngth!==b.l ength)retu rn!1;a.sor t();b.sort ();for(var c=0,e=a.l ength;c<e; c++)if(a[c ]!==b[c])r eturn!1; | |||||
| 14 | return!0}f unction B( a){return escape(a)} function z (a){return encodeURI Component( a).replace (/[!'()*]/ g,B).repla ce(/\*/g," %2A")}var C=p&&p.URI ;e.version ="1.13.2"; var d=e.pr ototype,t= Object.pro totype.has OwnPropert y;e._parts =function( ){return{p rotocol:nu ll,usernam e:null,pas sword:null ,hostname: null,urn:n ull,port:n ull,path:n ull,query: null,fragm ent:null,d uplicateQu eryParamet ers:e.dupl icateQuery Parameters ,escapeQue rySpace:e. escapeQuer ySpace}};e .duplicate QueryParam eters=!1;e .escapeQue rySpace=!0 ;e.protoco l_expressi on= | |||||
| 15 | /^[a-z][a- z0-9.+-]*$ /i;e.idn_e xpression= /[^a-z0-9\ .-]/i;e.pu nycode_exp ression=/( xn--)/i;e. ip4_expres sion=/^\d{ 1,3}\.\d{1 ,3}\.\d{1, 3}\.\d{1,3 }$/;e.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-9 A-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-F a-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}:((2 5[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-F a-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* $/; | |||||
| 16 | e.find_uri _expressio n=/\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`!( )\[\]{};:' ".,<>?\u00 ab\u00bb\u 201c\u201d \u2018\u20 19]))/ig;e .findUri={ start:/\b( ?:([a-z][a -z0-9.+-]* :\/\/)|www \.)/gi,end :/[\s\r\n] |$/,trim:/ [`!()\[\]{ };:'".,<>? \u00ab\u00 bb\u201c\u 201d\u201e \u2018\u20 19]+$/};e. defaultPor ts={http:" 80",https: "443",ftp: "21",gophe r:"70",ws: "80",wss:" 443"};e.in valid_host name_chara cters= | |||||
| 17 | /[^a-zA-Z0 -9\.-]/;e. domAttribu tes={a:"hr ef",blockq uote:"cite ",link:"hr ef",base:" href",scri pt:"src",f orm:"actio n",img:"sr c",area:"h ref",ifram e:"src",em bed:"src", source:"sr c",track:" src",input :"src"};e. getDomAttr ibute=func tion(a){if (a&&a.node Name){var b=a.nodeNa me.toLower Case();ret urn"input" ===b&&"ima ge"!==a.ty pe?void 0: e.domAttri butes[b]}} ;e.encode= z;e.decode =decodeURI Component; e.iso8859= function() {e.encode= escape;e.d ecode=unes cape};e.un icode=func tion(){e.e ncode=z;e. decode=dec odeURIComp onent};e.c haracters= | |||||
| 18 | {pathname: {encode:{e xpression: /%(24|26|2 B|2C|3B|3D |3A|40)/ig ,map:{"%24 ":"$","%26 ":"&","%2B ":"+","%2C ":",","%3B ":";","%3D ":"=","%3A ":":","%40 ":"@"}},de code:{expr ession:/[\ /\?#]/g,ma p:{"/":"%2 F","?":"%3 F","#":"%2 3"}}},rese rved:{enco de:{expres sion:/%(21 |23|24|26| 27|28|29|2 A|2B|2C|2F |3A|3B|3D| 3F|40|5B|5 D)/ig,map: {"%3A":":" ,"%2F":"/" ,"%3F":"?" ,"%23":"#" ,"%5B":"[" ,"%5D":"]" ,"%40":"@" ,"%21":"!" ,"%24":"$" ,"%26":"&" ,"%27":"'" ,"%28":"(" ,"%29":")" ,"%2A":"*" ,"%2B":"+" ,"%2C":"," ,"%3B":";" ,"%3D":"=" }}}};e.enc odeQuery= | |||||
| 19 | function(a ,b){var c= e.encode(a +"");void 0===b&&(b= e.escapeQu erySpace); return b?c .replace(/ %20/g,"+") :c};e.deco deQuery=fu nction(a,b ){a+="";vo id 0===b&& (b=e.escap eQuerySpac e);try{ret urn e.deco de(b?a.rep lace(/\+/g ,"%20"):a) }catch(c){ return a}} ;e.recodeP ath=functi on(a){a=(a +"").split ("/");for( var b=0,c= a.length;b <c;b++)a[b ]=e.encode PathSegmen t(e.decode (a[b]));re turn a.joi n("/")};e. decodePath =function( a){a=(a+"" ).split("/ ");for(var b=0,c=a.l ength;b<c; b++)a[b]=e .decodePat hSegment(a [b]);retur n a.join(" /")}; | |||||
| 20 | var r={enc ode:"encod e",decode: "decode"}, m,u=functi on(a,b){re turn funct ion(c){ret urn e[b](c +"").repla ce(e.chara cters[a][b ].expressi on,functio n(c){retur n e.charac ters[a][b] .map[c]})} };for(m in r)e[m+"Pa thSegment" ]=u("pathn ame",r[m]) ;e.encodeR eserved=u( "reserved" ,"encode") ;e.parse=f unction(a, b){var c;b ||(b={});c =a.indexOf ("#");-1<c &&(b.fragm ent=a.subs tring(c+1) ||null,a=a .substring (0,c));c=a .indexOf(" ?");-1<c&& (b.query=a .substring (c+1)||nul l,a=a.subs tring(0,c) );"//"===a .substring (0,2)?(b.p rotocol=nu ll, | |||||
| 21 | a=a.substr ing(2),a=e .parseAuth ority(a,b) ):(c=a.ind exOf(":"), -1<c&&(b.p rotocol=a. substring( 0,c)||null ,b.protoco l&&!b.prot ocol.match (e.protoco l_expressi on)?b.prot ocol=void 0:"file"== =b.protoco l?a=a.subs tring(c+3) :"//"===a. substring( c+1,c+3)?( a=a.substr ing(c+3),a =e.parseAu thority(a, b)):(a=a.s ubstring(c +1),b.urn= !0)));b.pa th=a;retur n b};e.par seHost=fun ction(a,b) {var c=a.i ndexOf("/" ),e;-1===c &&(c=a.len gth);"["== =a.charAt( 0)?(e=a.in dexOf("]") ,b.hostnam e=a.substr ing(1,e)|| null,b.por t=a.substr ing(e+2,c) || | |||||
| 22 | null,"/"== =b.port&&( b.port=nul l)):a.inde xOf(":")!= =a.lastInd exOf(":")? (b.hostnam e=a.substr ing(0,c)|| null,b.por t=null):(e =a.substri ng(0,c).sp lit(":"),b .hostname= e[0]||null ,b.port=e[ 1]||null); b.hostname &&"/"!==a. substring( c).charAt( 0)&&(c++,a ="/"+a);re turn a.sub string(c)| |"/"};e.pa rseAuthori ty=functio n(a,b){a=e .parseUser info(a,b); return e.p arseHost(a ,b)};e.par seUserinfo =function( a,b){var c =a.indexOf ("/"),g=-1 <c?a.lastI ndexOf("@" ,c):a.inde xOf("@");- 1<g&&(-1== =c||g<c)?( c=a.substr ing(0,g).s plit(":"), b.username = | |||||
| 23 | c[0]?e.dec ode(c[0]): null,c.shi ft(),b.pas sword=c[0] ?e.decode( c.join(":" )):null,a= a.substrin g(g+1)):(b .username= null,b.pas sword=null );return a };e.parseQ uery=funct ion(a,b){i f(!a)retur n{};a=a.re place(/&+/ g,"&").rep lace(/^\?* &*|&+$/g," ");if(!a)r eturn{};fo r(var c={} ,g=a.split ("&"),f=g. length,d,h ,n=0;n<f;n ++)d=g[n]. split("=") ,h=e.decod eQuery(d.s hift(),b), d=d.length ?e.decodeQ uery(d.joi n("="),b): null,c[h]? ("string"= ==typeof c [h]&&(c[h] =[c[h]]),c [h].push(d )):c[h]=d; return c}; e.build=fu nction(a){ var b="";a .protocol& & | |||||
| 24 | (b+=a.prot ocol+":"); a.urn||!b& &!a.hostna me||(b+="/ /");b+=e.b uildAuthor ity(a)||"" ;"string"= ==typeof a .path&&("/ "!==a.path .charAt(0) &&"string" ===typeof a.hostname &&(b+="/") ,b+=a.path );"string" ===typeof a.query&&a .query&&(b +="?"+a.qu ery);"stri ng"===type of a.fragm ent&&a.fra gment&&(b+ ="#"+a.fra gment);ret urn b};e.b uildHost=f unction(a) {var b=""; if(a.hostn ame)b=e.ip 6_expressi on.test(a. hostname)? b+("["+a.h ostname+"] "):b+a.hos tname;else return""; a.port&&(b +=":"+a.po rt);return b};e.buil dAuthority =function( a){return e.buildUse rinfo(a)+ | |||||
| 25 | e.buildHos t(a)};e.bu ildUserinf o=function (a){var b= "";a.usern ame&&(b+=e .encode(a. username), a.password &&(b+=":"+ e.encode(a .password) ),b+="@"); return b}; e.buildQue ry=functio n(a,b,c){v ar g="",f, d,h,n;for( d in a)if( t.call(a,d )&&d)if(l( a[d]))for( f={},h=0,n =a[d].leng th;h<n;h++ )void 0!== a[d][h]&&v oid 0===f[ a[d][h]+"" ]&&(g+="&" +e.buildQu eryParamet er(d,a[d][ h],c),!0!= =b&&(f[a[d ][h]+""]=! 0));else v oid 0!==a[ d]&&(g+="& "+e.buildQ ueryParame ter(d,a[d] ,c));retur n g.substr ing(1)};e. buildQuery Parameter= function(a , | |||||
| 26 | b,c){retur n e.encode Query(a,c) +(null!==b ?"="+e.enc odeQuery(b ,c):"")};e .addQuery= function(a ,b,c){if(" object"=== typeof b)f or(var g i n b)t.call (b,g)&&e.a ddQuery(a, g,b[g]);el se if("str ing"===typ eof b)void 0===a[b]? a[b]=c:("s tring"===t ypeof a[b] &&(a[b]=[a [b]]),l(c) ||(c=[c]), a[b]=a[b]. concat(c)) ;else thro w new Type Error("URI .addQuery( ) accepts an object, string as the name parameter" );};e.remo veQuery=fu nction(a,b ,c){var g; if(l(b))fo r(c=0,g=b. length;c<g ;c++)a[b[c ]]=void 0; else if("o bject"===t ypeof b)fo r(g in b)t .call(b, | |||||
| 27 | g)&&e.remo veQuery(a, g,b[g]);el se if("str ing"===typ eof b)if(v oid 0!==c) if(a[b]=== c)a[b]=voi d 0;else{i f(l(a[b])) {g=a[b];va r f={},d,h ;if(l(c))f or(d=0,h=c .length;d< h;d++)f[c[ d]]=!0;els e f[c]=!0; d=0;for(h= g.length;d <h;d++)voi d 0!==f[g[ d]]&&(g.sp lice(d,1), h--,d--);a [b]=g}}els e a[b]=voi d 0;else t hrow new T ypeError(" URI.addQue ry() accep ts an obje ct, string as the fi rst parame ter");};e. hasQuery=f unction(a, b,c,g){if( "object"== =typeof b) {for(var d in b)if(t .call(b,d) &&!e.hasQu ery(a,d,b[ d]))return !1;return! 0}if("stri ng"!== | |||||
| 28 | typeof b)t hrow new T ypeError(" URI.hasQue ry() accep ts an obje ct, string as the na me paramet er");switc h(y(c)){ca se "Undefi ned":retur n b in a;c ase "Boole an":return a=Boolean (l(a[b])?a [b].length :a[b]),c== =a;case "F unction":r eturn!!c(a [b],b,a);c ase "Array ":return l (a[b])?(g? x:A)(a[b], c):!1;case "RegExp": return l(a [b])?g?x(a [b],c):!1: Boolean(a[ b]&&a[b].m atch(c));c ase "Numbe r":c=Strin g(c);case "String":r eturn l(a[ b])?g?x(a[ b],c):!1:a [b]===c;de fault:thro w new Type Error("URI .hasQuery( ) accepts undefined, boolean, string, nu mber, RegE xp, Functi on as the value para meter"); | |||||
| 29 | }};e.commo nPath=func tion(a,b){ var c=Math .min(a.len gth,b.leng th),e;for( e=0;e<c;e+ +)if(a.cha rAt(e)!==b .charAt(e) ){e--;brea k}if(1>e)r eturn a.ch arAt(0)=== b.charAt(0 )&&"/"===a .charAt(0) ?"/":"";if ("/"!==a.c harAt(e)|| "/"!==b.ch arAt(e))e= a.substrin g(0,e).las tIndexOf(" /");return a.substri ng(0,e+1)} ;e.withinS tring=func tion(a,b,c ){c||(c={} );var g=c. start||e.f indUri.sta rt,d=c.end ||e.findUr i.end,k=c. trim||e.fi ndUri.trim ,h=/[a-z0- 9-]=["']?$ /i;for(g.l astIndex=0 ;;){var n= g.exec(a); if(!n)brea k;n=n.inde x;if(c.ign oreHtml){v ar l= | |||||
| 30 | a.slice(Ma th.max(n-3 ,0),n);if( l&&h.test( l))continu e}var l=n+ a.slice(n) .search(d) ,m=a.slice (n,l).repl ace(k,""); c.ignore&& c.ignore.t est(m)||(l =n+m.lengt h,m=b(m,n, l,a),a=a.s lice(0,n)+ m+a.slice( l),g.lastI ndex=n+m.l ength)}g.l astIndex=0 ;return a} ;e.ensureV alidHostna me=functio n(a){if(a. match(e.in valid_host name_chara cters)){if (!q)throw new TypeEr ror('Hostn ame "'+a+' " contains character s other th an [A-Z0-9 .-] and Pu nycode.js is not ava ilable');i f(q.toASCI I(a).match (e.invalid _hostname_ characters ))throw ne w TypeErro r('Hostnam e "'+ | |||||
| 31 | a+'" conta ins charac ters other than [A-Z 0-9.-]');} };e.noConf lict=funct ion(a){if( a)return a ={URI:this .noConflic t()},p.URI Template&& "function" ===typeof p.URITempl ate.noConf lict&&(a.U RITemplate =p.URITemp late.noCon flict()),p .IPv6&&"fu nction"=== typeof p.I Pv6.noConf lict&&(a.I Pv6=p.IPv6 .noConflic t()),p.Sec ondLevelDo mains&&"fu nction"=== typeof p.S econdLevel Domains.no Conflict&& (a.SecondL evelDomain s=p.Second LevelDomai ns.noConfl ict()),a;p .URI===thi s&&(p.URI= C);return this};d.bu ild=functi on(a){if(! 0===a)this ._deferred _build= | |||||
| 32 | !0;else if (void 0=== a||this._d eferred_bu ild)this._ string=e.b uild(this. _parts),th is._deferr ed_build=! 1;return t his};d.clo ne=functio n(){return new e(thi s)};d.valu eOf=d.toSt ring=funct ion(){retu rn this.bu ild(!1)._s tring};r={ protocol:" protocol", username:" username", password:" password", hostname:" hostname", port:"port "};u=funct ion(a){ret urn functi on(b,c){if (void 0=== b)return t his._parts [a]||"";th is._parts[ a]=b||null ;this.buil d(!c);retu rn this}}; for(m in r )d[m]=u(r[ m]);r={que ry:"?",fra gment:"#"} ;u=functio n(a, | |||||
| 33 | b){return function(c ,e){if(voi d 0===c)re turn this. _parts[a]| |"";null!= =c&&(c+="" ,c.charAt( 0)===b&&(c =c.substri ng(1)));th is._parts[ a]=c;this. build(!e); return thi s}};for(m in r)d[m]= u(m,r[m]); r={search: ["?","quer y"],hash:[ "#","fragm ent"]};u=f unction(a, b){return function(c ,e){var d= this[a](c, e);return" string"=== typeof d&& d.length?b +d:d}};for (m in r)d[ m]=u(r[m][ 1],r[m][0] );d.pathna me=functio n(a,b){if( void 0===a ||!0===a){ var c=this ._parts.pa th||(this. _parts.hos tname?"/": "");return a?e.decod ePath(c):c }this._par ts.path= | |||||
| 34 | a?e.recode Path(a):"/ ";this.bui ld(!b);ret urn this}; d.path=d.p athname;d. href=funct ion(a,b){v ar c;if(vo id 0===a)r eturn this .toString( );this._st ring="";th is._parts= e._parts() ;var g=a i nstanceof e,d="objec t"===typeo f a&&(a.ho stname||a. path||a.pa thname);a. nodeName&& (d=e.getDo mAttribute (a),a=a[d] ||"",d=!1) ;!g&&d&&vo id 0!==a.p athname&&( a=a.toStri ng());if(" string"=== typeof a)t his._parts =e.parse(a ,this._par ts);else i f(g||d)for (c in g=g? a._parts:a ,g)t.call( this._part s,c)&&(thi s._parts[c ]=g[c]);el se throw n ew TypeErr or("invali d input"); | |||||
| 35 | this.build (!b);retur n this};d. is=functio n(a){var b =!1,c=!1,d =!1,f=!1,k =!1,h=!1,l =!1,m=!thi s._parts.u rn;this._p arts.hostn ame&&(m=!1 ,c=e.ip4_e xpression. test(this. _parts.hos tname),d=e .ip6_expre ssion.test (this._par ts.hostnam e),b=c||d, k=(f=!b)&& v&&v.has(t his._parts .hostname) ,h=f&&e.id n_expressi on.test(th is._parts. hostname), l=f&&e.pun ycode_expr ession.tes t(this._pa rts.hostna me));switc h(a.toLowe rCase()){c ase "relat ive":retur n m;case " absolute": return!m;c ase "domai n":case "n ame":retur n f;case " sld":retur n k; | |||||
| 36 | case "ip": return b;c ase "ip4": case "ipv4 ":case "in et4":retur n c;case " ip6":case "ipv6":cas e "inet6": return d;c ase "idn": return h;c ase "url": return!thi s._parts.u rn;case "u rn":return !!this._pa rts.urn;ca se "punyco de":return l}return null};var D=d.protoc ol,E=d.por t,F=d.host name;d.pro tocol=func tion(a,b){ if(void 0! ==a&&a&&(a =a.replace (/:(\/\/)? $/,""),!a. match(e.pr otocol_exp ression))) throw new TypeError( 'Protocol "'+a+"\" c ontains ch aracters o ther than [A-Z0-9.+- ] or doesn 't start w ith [A-Z]" );return D .call(this , | |||||
| 37 | a,b)};d.sc heme=d.pro tocol;d.po rt=functio n(a,b){if( this._part s.urn)retu rn void 0= ==a?"":thi s;if(void 0!==a&&(0= ==a&&(a=nu ll),a&&(a+ ="",":"=== a.charAt(0 )&&(a=a.su bstring(1) ),a.match( /[^0-9]/)) ))throw ne w TypeErro r('Port "' +a+'" cont ains chara cters othe r than [0- 9]');retur n E.call(t his,a,b)}; d.hostname =function( a,b){if(th is._parts. urn)return void 0=== a?"":this; if(void 0! ==a){var c ={};e.pars eHost(a,c) ;a=c.hostn ame}return F.call(th is,a,b)};d .host=func tion(a,b){ if(this._p arts.urn)r eturn void 0===a?"": this; | |||||
| 38 | if(void 0= ==a)return this._par ts.hostnam e?e.buildH ost(this._ parts):""; e.parseHos t(a,this._ parts);thi s.build(!b );return t his};d.aut hority=fun ction(a,b) {if(this._ parts.urn) return voi d 0===a?"" :this;if(v oid 0===a) return thi s._parts.h ostname?e. buildAutho rity(this. _parts):"" ;e.parseAu thority(a, this._part s);this.bu ild(!b);re turn this} ;d.userinf o=function (a,b){if(t his._parts .urn)retur n void 0== =a?"":this ;if(void 0 ===a){if(! this._part s.username )return""; var c=e.bu ildUserinf o(this._pa rts);retur n c.substr ing(0, | |||||
| 39 | c.length-1 )}"@"!==a[ a.length-1 ]&&(a+="@" );e.parseU serinfo(a, this._part s);this.bu ild(!b);re turn this} ;d.resourc e=function (a,b){var c;if(void 0===a)retu rn this.pa th()+this. search()+t his.hash() ;c=e.parse (a);this._ parts.path =c.path;th is._parts. query=c.qu ery;this._ parts.frag ment=c.fra gment;this .build(!b) ;return th is};d.subd omain=func tion(a,b){ if(this._p arts.urn)r eturn void 0===a?"": this;if(vo id 0===a){ if(!this._ parts.host name||this .is("IP")) return"";v ar c=this. _parts.hos tname.leng th-this.do main().len gth- | |||||
| 40 | 1;return t his._parts .hostname. substring( 0,c)||""}c =this._par ts.hostnam e.length-t his.domain ().length; c=this._pa rts.hostna me.substri ng(0,c);c= new RegExp ("^"+s(c)) ;a&&"."!== a.charAt(a .length-1) &&(a+=".") ;a&&e.ensu reValidHos tname(a);t his._parts .hostname= this._part s.hostname .replace(c ,a);this.b uild(!b);r eturn this };d.domain =function( a,b){if(th is._parts. urn)return void 0=== a?"":this; "boolean"= ==typeof a &&(b=a,a=v oid 0);if( void 0===a ){if(!this ._parts.ho stname||th is.is("IP" ))return"" ;var c=thi s._parts.h ostname.ma tch(/\./g) ; | |||||
| 41 | if(c&&2>c. length)ret urn this._ parts.host name;c=thi s._parts.h ostname.le ngth-this. tld(b).len gth-1;c=th is._parts. hostname.l astIndexOf (".",c-1)+ 1;return t his._parts .hostname. substring( c)||""}if( !a)throw n ew TypeErr or("cannot set domai n empty"); e.ensureVa lidHostnam e(a);!this ._parts.ho stname||th is.is("IP" )?this._pa rts.hostna me=a:(c=ne w RegExp(s (this.doma in())+"$") ,this._par ts.hostnam e=this._pa rts.hostna me.replace (c,a));thi s.build(!b );return t his};d.tld =function( a,b){if(th is._parts. urn)return void 0=== a? | |||||
| 42 | "":this;"b oolean"=== typeof a&& (b=a,a=voi d 0);if(vo id 0===a){ if(!this._ parts.host name||this .is("IP")) return"";v ar c=this. _parts.hos tname.last IndexOf(". "),c=this. _parts.hos tname.subs tring(c+1) ;return!0! ==b&&v&&v. list[c.toL owerCase() ]?v.get(th is._parts. hostname)| |c:c}if(a) if(a.match (/[^a-zA-Z 0-9-]/))if (v&&v.is(a ))c=new Re gExp(s(thi s.tld())+" $"),this._ parts.host name=this. _parts.hos tname.repl ace(c,a);e lse throw new TypeEr ror('TLD " '+a+'" con tains char acters oth er than [A -Z0-9]');e lse{if(!th is._parts. hostname|| | |||||
| 43 | this.is("I P"))throw new Refere nceError(" cannot set TLD on no n-domain h ost");c=ne w RegExp(s (this.tld( ))+"$");th is._parts. hostname=t his._parts .hostname. replace(c, a)}else th row new Ty peError("c annot set TLD empty" );this.bui ld(!b);ret urn this}; d.director y=function (a,b){if(t his._parts .urn)retur n void 0== =a?"":this ;if(void 0 ===a||!0== =a){if(!th is._parts. path&&!thi s._parts.h ostname)re turn"";if( "/"===this ._parts.pa th)return" /";var c=t his._parts .path.leng th-this.fi lename().l ength-1,c= this._part s.path.sub string(0, | |||||
| 44 | c)||(this. _parts.hos tname?"/": "");return a?e.decod ePath(c):c }c=this._p arts.path. length-thi s.filename ().length; c=this._pa rts.path.s ubstring(0 ,c);c=new RegExp("^" +s(c));thi s.is("rela tive")||(a ||(a="/"), "/"!==a.ch arAt(0)&&( a="/"+a)); a&&"/"!==a .charAt(a. length-1)& &(a+="/"); a=e.recode Path(a);th is._parts. path=this. _parts.pat h.replace( c,a);this. build(!b); return thi s};d.filen ame=functi on(a,b){if (this._par ts.urn)ret urn void 0 ===a?"":th is;if(void 0===a||!0 ===a){if(! this._part s.path||"/ "===this._ parts.path )return""; | |||||
| 45 | var c=this ._parts.pa th.lastInd exOf("/"), c=this._pa rts.path.s ubstring(c +1);return a?e.decod ePathSegme nt(c):c}c= !1;"/"===a .charAt(0) &&(a=a.sub string(1)) ;a.match(/ \.?\//)&&( c=!0);var d=new RegE xp(s(this. filename() )+"$");a=e .recodePat h(a);this. _parts.pat h=this._pa rts.path.r eplace(d,a );c?this.n ormalizePa th(b):this .build(!b) ;return th is};d.suff ix=functio n(a,b){if( this._part s.urn)retu rn void 0= ==a?"":thi s;if(void 0===a||!0= ==a){if(!t his._parts .path||"/" ===this._p arts.path) return"";v ar c=this. filename() , | |||||
| 46 | d=c.lastIn dexOf(".") ;if(-1===d )return""; c=c.substr ing(d+1);c =/^[a-z0-9 %]+$/i.tes t(c)?c:""; return a?e .decodePat hSegment(c ):c}"."=== a.charAt(0 )&&(a=a.su bstring(1) );if(c=thi s.suffix() )d=a?new R egExp(s(c) +"$"):new RegExp(s(" ."+c)+"$") ;else{if(! a)return t his;this._ parts.path +="."+e.re codePath(a )}d&&(a=e. recodePath (a),this._ parts.path =this._par ts.path.re place(d,a) );this.bui ld(!b);ret urn this}; d.segment= function(a ,b,c){var e=this._pa rts.urn?": ":"/",d=th is.path(), k="/"===d. substring( 0,1),d=d.s plit(e);vo id 0!== | |||||
| 47 | a&&"number "!==typeof a&&(c=b,b =a,a=void 0);if(void 0!==a&&"n umber"!==t ypeof a)th row Error( 'Bad segme nt "'+a+'" , must be 0-based in teger');k& &d.shift() ;0>a&&(a=M ath.max(d. length+a,0 ));if(void 0===b)ret urn void 0 ===a?d:d[a ];if(null= ==a||void 0===d[a])i f(l(b)){d= [];a=0;for (var h=b.l ength;a<h; a++)if(b[a ].length|| d.length&& d[d.length -1].length )d.length& &!d[d.leng th-1].leng th&&d.pop( ),d.push(b [a])}else{ if(b||"str ing"===typ eof b)""== =d[d.lengt h-1]?d[d.l ength-1]=b :d.push(b) }else b||" string"=== typeof b&& b.length? | |||||
| 48 | d[a]=b:d.s plice(a,1) ;k&&d.unsh ift("");re turn this. path(d.joi n(e),c)};d .segmentCo ded=functi on(a,b,c){ var d,f;"n umber"!==t ypeof a&&( c=b,b=a,a= void 0);if (void 0=== b){a=this. segment(a, b,c);if(l( a))for(d=0 ,f=a.lengt h;d<f;d++) a[d]=e.dec ode(a[d]); else a=voi d 0!==a?e. decode(a): void 0;ret urn a}if(l (b))for(d= 0,f=b.leng th;d<f;d++ )b[d]=e.de code(b[d]) ;else b="s tring"===t ypeof b?e. encode(b): b;return t his.segmen t(a,b,c)}; var G=d.qu ery;d.quer y=function (a,b){if(! 0===a)retu rn e.parse Query(this ._parts.qu ery,this._ parts.esca peQuerySpa ce); | |||||
| 49 | if("functi on"===type of a){var c=e.parseQ uery(this. _parts.que ry,this._p arts.escap eQuerySpac e),d=a.cal l(this,c); this._part s.query=e. buildQuery (d||c,this ._parts.du plicateQue ryParamete rs,this._p arts.escap eQuerySpac e);this.bu ild(!b);re turn this} return voi d 0!==a&&" string"!== typeof a?( this._part s.query=e. buildQuery (a,this._p arts.dupli cateQueryP arameters, this._part s.escapeQu erySpace), this.build (!b),this) :G.call(th is,a,b)};d .setQuery= function(a ,b,c){var d=e.parseQ uery(this. _parts.que ry,this._p arts.escap eQuerySpac e); | |||||
| 50 | if("object "===typeof a)for(var f in a)t. call(a,f)& &(d[f]=a[f ]);else if ("string"= ==typeof a )d[a]=void 0!==b?b:n ull;else t hrow new T ypeError(" URI.addQue ry() accep ts an obje ct, string as the na me paramet er");this. _parts.que ry=e.build Query(d,th is._parts. duplicateQ ueryParame ters,this. _parts.esc apeQuerySp ace);"stri ng"!==type of a&&(c=b );this.bui ld(!c);ret urn this}; d.addQuery =function( a,b,c){var d=e.parse Query(this ._parts.qu ery,this._ parts.esca peQuerySpa ce);e.addQ uery(d,a,v oid 0===b? null:b);th is._parts. query= | |||||
| 51 | e.buildQue ry(d,this. _parts.dup licateQuer yParameter s,this._pa rts.escape QuerySpace );"string" !==typeof a&&(c=b);t his.build( !c);return this};d.r emoveQuery =function( a,b,c){var d=e.parse Query(this ._parts.qu ery,this._ parts.esca peQuerySpa ce);e.remo veQuery(d, a,b);this. _parts.que ry=e.build Query(d,th is._parts. duplicateQ ueryParame ters,this. _parts.esc apeQuerySp ace);"stri ng"!==type of a&&(c=b );this.bui ld(!c);ret urn this}; d.hasQuery =function( a,b,c){var d=e.parse Query(this ._parts.qu ery,this._ parts.esca peQuerySpa ce); | |||||
| 52 | return e.h asQuery(d, a,b,c)};d. setSearch= d.setQuery ;d.addSear ch=d.addQu ery;d.remo veSearch=d .removeQue ry;d.hasSe arch=d.has Query;d.no rmalize=fu nction(){r eturn this ._parts.ur n?this.nor malizeProt ocol(!1).n ormalizeQu ery(!1).no rmalizeFra gment(!1). build():th is.normali zeProtocol (!1).norma lizeHostna me(!1).nor malizePort (!1).norma lizePath(! 1).normali zeQuery(!1 ).normaliz eFragment( !1).build( )};d.norma lizeProtoc ol=functio n(a){"stri ng"===type of this._p arts.proto col&&(this ._parts.pr otocol=thi s._parts.p rotocol.to LowerCase( ), | |||||
| 53 | this.build (!a));retu rn this};d .normalize Hostname=f unction(a) {this._par ts.hostnam e&&(this.i s("IDN")&& q?this._pa rts.hostna me=q.toASC II(this._p arts.hostn ame):this. is("IPv6") &&w&&(this ._parts.ho stname=w.b est(this._ parts.host name)),thi s._parts.h ostname=th is._parts. hostname.t oLowerCase (),this.bu ild(!a));r eturn this };d.normal izePort=fu nction(a){ "string"== =typeof th is._parts. protocol&& this._part s.port===e .defaultPo rts[this._ parts.prot ocol]&&(th is._parts. port=null, this.build (!a));retu rn this};d .normalize Path= | |||||
| 54 | function(a ){if(this. _parts.urn ||!this._p arts.path| |"/"===thi s._parts.p ath)return this;var b,c=this._ parts.path ,d="",f,k; "/"!==c.ch arAt(0)&&( b=!0,c="/" +c);c=c.re place(/(\/ (\.\/)+)|( \/\.$)/g," /").replac e(/\/{2,}/ g,"/");b&& (d=c.subst ring(1).ma tch(/^(\.\ .\/)+/)||" ")&&(d=d[0 ]);for(;;) {f=c.index Of("/.."); if(-1===f) break;else if(0===f) {c=c.subst ring(3);co ntinue}k=c .substring (0,f).last IndexOf("/ ");-1===k& &(k=f);c=c .substring (0,k)+c.su bstring(f+ 3)}b&&this .is("relat ive")&&(c= d+c.substr ing(1));c= e.recodePa th(c); | |||||
| 55 | this._part s.path=c;t his.build( !a);return this};d.n ormalizePa thname=d.n ormalizePa th;d.norma lizeQuery= function(a ){"string" ===typeof this._part s.query&&( this._part s.query.le ngth?this. query(e.pa rseQuery(t his._parts .query,thi s._parts.e scapeQuery Space)):th is._parts. query=null ,this.buil d(!a));ret urn this}; d.normaliz eFragment= function(a ){this._pa rts.fragme nt||(this. _parts.fra gment=null ,this.buil d(!a));ret urn this}; d.normaliz eSearch=d. normalizeQ uery;d.nor malizeHash =d.normali zeFragment ;d.iso8859 =function( ){var a= | |||||
| 56 | e.encode,b =e.decode; e.encode=e scape;e.de code=decod eURICompon ent;this.n ormalize() ;e.encode= a;e.decode =b;return this};d.un icode=func tion(){var a=e.encod e,b=e.deco de;e.encod e=z;e.deco de=unescap e;this.nor malize();e .encode=a; e.decode=b ;return th is};d.read able=funct ion(){var a=this.clo ne();a.use rname(""). password(" ").normali ze();var b ="";a._par ts.protoco l&&(b+=a._ parts.prot ocol+"://" );a._parts .hostname& &(a.is("pu nycode")&& q?(b+=q.to Unicode(a. _parts.hos tname),a._ parts.port &&(b+=":"+ a._parts.p ort)):b+=a .host()); | |||||
| 57 | a._parts.h ostname&&a ._parts.pa th&&"/"!== a._parts.p ath.charAt (0)&&(b+=" /");b+=a.p ath(!0);if (a._parts. query){for (var c="", d=0,f=a._p arts.query .split("&" ),k=f.leng th;d<k;d++ ){var h=(f [d]||"").s plit("="), c=c+("&"+e .decodeQue ry(h[0],th is._parts. escapeQuer ySpace).re place(/&/g ,"%26"));v oid 0!==h[ 1]&&(c+="= "+e.decode Query(h[1] ,this._par ts.escapeQ uerySpace) .replace(/ &/g,"%26") )}b+="?"+c .substring (1)}return b+=e.deco deQuery(a. hash(),!0) };d.absolu teTo=funct ion(a){var b=this.cl one(),c=[" protocol", "username" , | |||||
| 58 | "password" ,"hostname ","port"], d,f;if(thi s._parts.u rn)throw E rror("URNs do not ha ve any gen erally def ined hiera rchical co mponents") ;a instanc eof e||(a= new e(a)); b._parts.p rotocol||( b._parts.p rotocol=a. _parts.pro tocol);if( this._part s.hostname )return b; for(d=0;f= c[d];d++)b ._parts[f] =a._parts[ f];b._part s.path?".. "===b._par ts.path.su bstring(-2 )&&(b._par ts.path+=" /"):(b._pa rts.path=a ._parts.pa th,b._part s.query||( b._parts.q uery=a._pa rts.query) );"/"!==b. path().cha rAt(0)&&(a =a.directo ry(),b._pa rts.path=( a? | |||||
| 59 | a+"/":"")+ b._parts.p ath,b.norm alizePath( ));b.build ();return b};d.relat iveTo=func tion(a){va r b=this.c lone().nor malize(),c ,d,f,k;if( b._parts.u rn)throw E rror("URNs do not ha ve any gen erally def ined hiera rchical co mponents") ;a=(new e( a)).normal ize();c=b. _parts;d=a ._parts;f= b.path();k =a.path(); if("/"!==f .charAt(0) )throw Err or("URI is already r elative"); if("/"!==k .charAt(0) )throw Err or("Cannot calculate a URI rel ative to a nother rel ative URI" );c.protoc ol===d.pro tocol&&(c. protocol=n ull);if(c. username== = | |||||
| 60 | d.username &&c.passwo rd===d.pas sword&&nul l===c.prot ocol&&null ===c.usern ame&&null= ==c.passwo rd&&c.host name===d.h ostname&&c .port===d. port)c.hos tname=null ,c.port=nu ll;else re turn b.bui ld();if(f= ==k)return c.path="" ,b.build() ;a=e.commo nPath(b.pa th(),a.pat h());if(!a )return b. build();d= d.path.sub string(a.l ength).rep lace(/[^\/ ]*$/,"").r eplace(/.* ?\//g,"../ ");c.path= d+c.path.s ubstring(a .length);r eturn b.bu ild()};d.e quals=func tion(a){va r b=this.c lone();a=n ew e(a);va r c={},d={ },f={},k;b .normalize ();a.norma lize(); | |||||
| 61 | if(b.toStr ing()===a. toString() )return!0; c=b.query( );d=a.quer y();b.quer y("");a.qu ery("");if (b.toStrin g()!==a.to String()|| c.length!= =d.length) return!1;c =e.parseQu ery(c,this ._parts.es capeQueryS pace);d=e. parseQuery (d,this._p arts.escap eQuerySpac e);for(k i n c)if(t.c all(c,k)){ if(!l(c[k] )){if(c[k] !==d[k])re turn!1}els e if(!A(c[ k],d[k]))r eturn!1;f[ k]=!0}for( k in d)if( t.call(d,k )&&!f[k])r eturn!1;re turn!0};d. duplicateQ ueryParame ters=funct ion(a){thi s._parts.d uplicateQu eryParamet ers=!!a;re turn this} ;d.escapeQ uerySpace= | |||||
| 62 | function(a ){this._pa rts.escape QuerySpace =!!a;retur n this};re turn e}); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.