Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2187 from resurtm/punycode-js

punycode.js updated from 1.1.1 (June 27, 2012) to 1.2.0 (October 10, 2012).
  • Loading branch information...
commit 13aa5d11940a138705d42255a441bbdbbd7f6daa 2 parents 4a75ecf + 310505e
@samdark samdark authored
View
1  CHANGELOG
@@ -34,6 +34,7 @@ Version 1.1.14 work in progress
- Chg #1891: Changed order of methods in models generated by Gii and yiic, added better description of search method (hijarian, samdark)
- Chg #2069: Upgraded jQuery BBQ Plugin to 1.4pre to fix jQuery compatibility problems (samdark)
- Chg #2183: Vendors: phlymail's Net_IDNA was replaced by PEAR Net_IDNA2 (resurtm, DaSourcerer)
+- Chg #2187: Vendors: punycode.js updated from 1.1.1 (June 27, 2012) to 1.2.0 (October 10, 2012) (resurtm)
- New #575: Yii registering at Packagist, added composer info file (schmunk42)
- New #1785: Added CPasswordHelper (tom--)
- New #2178: Added Catalan Translation (ArnauAregall)
View
2  framework/vendors/README.html
@@ -104,7 +104,7 @@
<td><a href="http://www.yiiframework.com/doc/api/1.1/CUrlValidator">CUrlValidator</a>, <a href="http://www.yiiframework.com/doc/api/1.1/CEmailValidator">CEmailValidator</a></td>
</tr>
<tr>
- <td><a href="https://github.com/bestiejs/punycode.js">Punycode.js</a> (v1.1.1) - June 27 2012</td>
+ <td><a href="https://github.com/bestiejs/punycode.js">Punycode.js</a> (v1.2.0) - October 10 2012</td>
<td><a href="punycode/LICENSE-MIT.txt">MIT</a>, <a href="punycode/LICENSE-GPL.txt">GPL</a></td>
<td><a href="http://www.yiiframework.com/doc/api/1.1/CUrlValidator">CUrlValidator</a>, <a href="http://www.yiiframework.com/doc/api/1.1/CEmailValidator">CEmailValidator</a></td>
</tr>
View
14 framework/web/js/source/punycode.js
@@ -1,4 +1,4 @@
-/*! http://mths.be/punycode by @mathias */
+/*! http://mths.be/punycode v1.2.0 by @mathias */
;(function(root) {
/**
@@ -29,12 +29,13 @@
delimiter = '-', // '\x2D'
/** Regular expressions */
- regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
regexPunycode = /^xn--/,
+ regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
+ regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators
/** Error messages */
errors = {
- 'overflow': 'Overflow: input needs wider integers to process.',
+ 'overflow': 'Overflow: input needs wider integers to process',
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
'invalid-input': 'Invalid input'
},
@@ -85,8 +86,7 @@
* function.
*/
function mapDomain(string, fn) {
- var glue = '.';
- return map(string.split(glue), fn).join(glue);
+ return map(string.split(regexSeparators), fn).join('.');
}
/**
@@ -198,7 +198,7 @@
}
/**
- * Converts a basic code point to lowercase is `flag` is falsy, or to
+ * Converts a basic code point to lowercase if `flag` is falsy, or to
* uppercase if `flag` is truthy. The code point is unchanged if it's
* caseless. The behavior is undefined if `codePoint` is not a basic code
* point.
@@ -470,7 +470,7 @@
* @memberOf punycode
* @type String
*/
- 'version': '1.1.1',
+ 'version': '1.2.0',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to decimal Unicode code points, and back.
View
4 framework/web/js/source/punycode.min.js
@@ -1,2 +1,2 @@
-/*! http://mths.be/punycode by @mathias */
-;(function(y){var e,a=typeof define=='function'&&typeof define.amd=='object'&&define.amd&&define,p=typeof exports=='object'&&exports,I=typeof module=='object'&&module,A=typeof require=='function'&&require,s=2147483647,l=36,n=1,q=26,i=38,m=700,o=72,h=128,G='-',d=/[^ -~]/,v=/^xn--/,r={overflow:'Overflow: input needs wider integers to process.','not-basic':'Illegal input >= 0x80 (not a basic code point)','invalid-input':'Invalid input'},g=l-n,B=Math.floor,x=String.fromCharCode,H;function z(J){throw RangeError(r[J])}function E(L,J){var K=L.length;while(K--){L[K]=J(L[K])}return L}function c(J,K){var L='.';return E(J.split(L),K).join(L)}function k(M){var L=[],K=0,N=M.length,O,J;while(K<N){O=M.charCodeAt(K++);if((O&63488)==55296&&K<N){J=M.charCodeAt(K++);if((J&64512)==56320){L.push(((O&1023)<<10)+(J&1023)+65536)}else{L.push(O,J)}}else{L.push(O)}}return L}function D(J){return E(J,function(L){var K='';if(L>65535){L-=65536;K+=x(L>>>10&1023|55296);L=56320|L&1023}K+=x(L);return K}).join('')}function f(J){return J-48<10?J-22:J-65<26?J-65:J-97<26?J-97:l}function w(K,J){return K+22+75*(K<26)-((J!=0)<<5)}function b(M,K,L){var J=0;M=L?B(M/m):M>>1;M+=B(M/K);for(;M>g*q>>1;J+=l){M=B(M/g)}return B(J+(g+1)*M/(M+i))}function C(K,J){K-=(K-97<26)<<5;return K+(!J&&K-65<26)<<5}function u(W){var M=[],P=W.length,R,S=0,L=h,T=o,O,Q,U,K,X,N,V,Z,J,Y;O=W.lastIndexOf(G);if(O<0){O=0}for(Q=0;Q<O;++Q){if(W.charCodeAt(Q)>=128){z('not-basic')}M.push(W.charCodeAt(Q))}for(U=O>0?O+1:0;U<P;){for(K=S,X=1,N=l;;N+=l){if(U>=P){z('invalid-input')}V=f(W.charCodeAt(U++));if(V>=l||V>B((s-S)/X)){z('overflow')}S+=V*X;Z=N<=T?n:(N>=T+q?q:N-T);if(V<Z){break}Y=l-Z;if(X>B(s/Y)){z('overflow')}X*=Y}R=M.length+1;T=b(S-K,R,K==0);if(B(S/R)>s-L){z('overflow')}L+=B(S/R);S%=R;M.splice(S++,0,L)}return D(M)}function j(V){var M,X,S,K,T,R,N,J,Q,Z,W,L=[],P,O,Y,U;V=k(V);P=V.length;M=h;X=0;T=o;for(R=0;R<P;++R){W=V[R];if(W<128){L.push(x(W))}}S=K=L.length;if(K){L.push(G)}while(S<P){for(N=s,R=0;R<P;++R){W=V[R];if(W>=M&&W<N){N=W}}O=S+1;if(N-M>B((s-X)/O)){z('overflow')}X+=(N-M)*O;M=N;for(R=0;R<P;++R){W=V[R];if(W<M&&++X>s){z('overflow')}if(W==M){for(J=X,Q=l;;Q+=l){Z=Q<=T?n:(Q>=T+q?q:Q-T);if(J<Z){break}U=J-Z;Y=l-Z;L.push(x(w(Z+U%Y,0)));J=B(U/Y)}L.push(x(w(J,0)));T=b(X,O,S==K);X=0;++S}}++X;++M}return L.join('')}function t(J){return c(J,function(K){return v.test(K)?u(K.slice(4).toLowerCase()):K})}function F(J){return c(J,function(K){return d.test(K)?'xn--'+j(K):K})}e={version:'1.1.1',ucs2:{decode:k,encode:D},decode:u,encode:j,toASCII:F,toUnicode:t};if(p){if(I&&I.exports==p){I.exports=e}else{for(H in e){e.hasOwnProperty(H)&&(p[H]=e[H])}}}else{if(a){define('punycode',e)}else{y.punycode=e}}}(this));
+/*! http://mths.be/punycode v1.2.0 by @mathias */
+;(function(u){var I,e=typeof define=='function'&&typeof define.amd=='object'&&define.amd&&define,J=typeof exports=='object'&&exports,q=typeof module=='object'&&module,h=typeof require=='function'&&require,o=2147483647,p=36,i=1,H=26,B=38,b=700,m=72,G=128,C='-',E=/^xn--/,t=/[^ -~]/,l=/\x2E|\u3002|\uFF0E|\uFF61/g,s={overflow:'Overflow: input needs wider integers to process','not-basic':'Illegal input >= 0x80 (not a basic code point)','invalid-input':'Invalid input'},v=p-i,g=Math.floor,j=String.fromCharCode,n;function y(K){throw RangeError(s[K])}function z(M,K){var L=M.length;while(L--){M[L]=K(M[L])}return M}function f(K,L){return z(K.split(l),L).join('.')}function D(N){var M=[],L=0,O=N.length,P,K;while(L<O){P=N.charCodeAt(L++);if((P&63488)==55296&&L<O){K=N.charCodeAt(L++);if((K&64512)==56320){M.push(((P&1023)<<10)+(K&1023)+65536)}else{M.push(P,K)}}else{M.push(P)}}return M}function F(K){return z(K,function(M){var L='';if(M>65535){M-=65536;L+=j(M>>>10&1023|55296);M=56320|M&1023}L+=j(M);return L}).join('')}function c(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:p}function A(L,K){return L+22+75*(L<26)-((K!=0)<<5)}function w(N,L,M){var K=0;N=M?g(N/b):N>>1;N+=g(N/L);for(;N>v*H>>1;K+=p){N=g(N/v)}return g(K+(v+1)*N/(N+B))}function k(L,K){L-=(L-97<26)<<5;return L+(!K&&L-65<26)<<5}function a(X){var N=[],Q=X.length,S,T=0,M=G,U=m,P,R,V,L,Y,O,W,aa,K,Z;P=X.lastIndexOf(C);if(P<0){P=0}for(R=0;R<P;++R){if(X.charCodeAt(R)>=128){y('not-basic')}N.push(X.charCodeAt(R))}for(V=P>0?P+1:0;V<Q;){for(L=T,Y=1,O=p;;O+=p){if(V>=Q){y('invalid-input')}W=c(X.charCodeAt(V++));if(W>=p||W>g((o-T)/Y)){y('overflow')}T+=W*Y;aa=O<=U?i:(O>=U+H?H:O-U);if(W<aa){break}Z=p-aa;if(Y>g(o/Z)){y('overflow')}Y*=Z}S=N.length+1;U=w(T-L,S,L==0);if(g(T/S)>o-M){y('overflow')}M+=g(T/S);T%=S;N.splice(T++,0,M)}return F(N)}function d(W){var N,Y,T,L,U,S,O,K,R,aa,X,M=[],Q,P,Z,V;W=D(W);Q=W.length;N=G;Y=0;U=m;for(S=0;S<Q;++S){X=W[S];if(X<128){M.push(j(X))}}T=L=M.length;if(L){M.push(C)}while(T<Q){for(O=o,S=0;S<Q;++S){X=W[S];if(X>=N&&X<O){O=X}}P=T+1;if(O-N>g((o-Y)/P)){y('overflow')}Y+=(O-N)*P;N=O;for(S=0;S<Q;++S){X=W[S];if(X<N&&++Y>o){y('overflow')}if(X==N){for(K=Y,R=p;;R+=p){aa=R<=U?i:(R>=U+H?H:R-U);if(K<aa){break}V=K-aa;Z=p-aa;M.push(j(A(aa+V%Z,0)));K=g(V/Z)}M.push(j(A(K,0)));U=w(Y,P,T==L);Y=0;++T}}++Y;++N}return M.join('')}function r(K){return f(K,function(L){return E.test(L)?a(L.slice(4).toLowerCase()):L})}function x(K){return f(K,function(L){return t.test(L)?'xn--'+d(L):L})}I={version:'1.2.0',ucs2:{decode:D,encode:F},decode:a,encode:d,toASCII:x,toUnicode:r};if(J){if(q&&q.exports==J){q.exports=I}else{for(n in I){I.hasOwnProperty(n)&&(J[n]=I[n])}}}else{if(e){define('punycode',I)}else{u.punycode=I}}}(this));

0 comments on commit 13aa5d1

Please sign in to comment.
Something went wrong with that request. Please try again.