mirror of
https://github.com/wahyd4/cdnjs.git
synced 2026-08-16 08:15:55 +10:00
1 line
2.5 KiB
JavaScript
1 line
2.5 KiB
JavaScript
!function(e){function o(e){throw RangeError(q[e])}function n(e,o){for(var n=e.length;n--;)e[n]=o(e[n]);return e}function r(e,o){var r=".";return n(e.split(r),o).join(r)}function t(e){for(var n,r,t=[],i=0,u=e.length;u>i;)n=e.charCodeAt(i++),55296==(63488&n)&&(r=e.charCodeAt(i++),(55296!=(64512&n)||56320!=(64512&r))&&o("ucs2decode"),n=((1023&n)<<10)+(1023&r)+65536),t.push(n);return t}function i(e){return n(e,function(e){var n="";return 55296==(63488&e)&&o("ucs2encode"),e>65535&&(e-=65536,n+=M(e>>>10&1023|55296),e=56320|1023&e),n+=M(e)}).join("")}function u(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function c(e,o){return e+22+75*(26>e)-((0!=o)<<5)}function f(e,o,n){var r=0;for(e=n?L(e/A):e>>1,e+=L(e/o);e>E*b>>1;r+=x)e=L(e/E);return L(r+(E+1)*e/(e+j))}function d(e){var n,r,t,c,d,l,s,a,p,h,v=[],g=e.length,w=0,j=I,A=m;for(r=e.lastIndexOf(S),0>r&&(r=0),t=0;r>t;++t)e.charCodeAt(t)>=128&&o("not-basic"),v.push(e.charCodeAt(t));for(c=r>0?r+1:0;g>c;){for(d=w,l=1,s=x;c>=g&&o("invalid-input"),a=u(e.charCodeAt(c++)),(a>=x||a>L((C-w)/l))&&o("overflow"),w+=a*l,p=A>=s?y:s>=A+b?b:s-A,!(p>a);s+=x)h=x-p,l>L(C/h)&&o("overflow"),l*=h;n=v.length+1,A=f(w-d,n,0==d),L(w/n)>C-j&&o("overflow"),j+=L(w/n),w%=n,v.splice(w++,0,j)}return i(v)}function l(e){var n,r,i,u,d,l,s,a,p,h,v,g,w,j,A,O=[];for(e=t(e),g=e.length,n=I,r=0,d=m,l=0;g>l;++l)v=e[l],128>v&&O.push(M(v));for(i=u=O.length,u&&O.push(S);g>i;){for(s=C,l=0;g>l;++l)v=e[l],v>=n&&s>v&&(s=v);for(w=i+1,s-n>L((C-r)/w)&&o("overflow"),r+=(s-n)*w,n=s,l=0;g>l;++l)if(v=e[l],n>v&&++r>C&&o("overflow"),v==n){for(a=r,p=x;h=d>=p?y:p>=d+b?b:p-d,!(h>a);p+=x)A=a-h,j=x-h,O.push(M(c(h+A%j,0))),a=L(A/j);O.push(M(c(a,0))),d=f(r,w,i==u),r=0,++i}++r,++n}return O.join("")}function s(e){return r(e,function(e){return U.test(e)?d(e.slice(4).toLowerCase()):e})}function a(e){return r(e,function(e){return O.test(e)?"xn--"+l(e):e})}var p,h,v="function"==typeof define&&"object"==typeof define.amd&&define.amd&&define,g="object"==typeof exports&&exports,w="object"==typeof module&&module,C=2147483647,x=36,y=1,b=26,j=38,A=700,m=72,I=128,S="-",O=/[^ -~]/,U=/^xn--/,q={overflow:"Overflow: input needs wider integers to process.",ucs2decode:"UCS-2(decode): illegal sequence",ucs2encode:"UCS-2(encode): illegal value","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=x-y,L=Math.floor,M=String.fromCharCode;if(p={version:"0.2.2",ucs2:{decode:t,encode:i},decode:d,encode:l,toASCII:a,toUnicode:s},g)if(w&&w.exports==g)w.exports=p;else for(h in p)p.hasOwnProperty(h)&&(g[h]=p[h]);else v?define("punycode",p):e.punycode=p}(this); |