@generaltranslation/react-core 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs.min.cjs +1 -1
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.esm.min.mjs +1 -1
- package/dist/index.esm.min.mjs.map +1 -1
- package/dist/internal.cjs.min.cjs +1 -1
- package/dist/internal.cjs.min.cjs.map +1 -1
- package/dist/internal.esm.min.mjs +1 -1
- package/dist/internal.esm.min.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -15,5 +15,5 @@ r.mode.CTRGladman=function(){var t=r.lib.BlockCipherMode.extend();function e(r){
|
|
|
15
15
|
|
|
16
16
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
17
17
|
*/
|
|
18
|
-
function(){var t=r,e=t.lib,n=e.WordArray,i=e.Hasher,o=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=n.create([0,1518500249,1859775393,2400959708,2840853838]),u=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(r,t){for(var e=0;e<16;e++){var n=t+e,i=r[n];r[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,h,b,x,m,w,B,k,A,S,E,O=this._hash.words,C=f.words,H=u.words,j=a.words,z=s.words,D=c.words,R=l.words;for(w=o=O[0],B=h=O[1],k=b=O[2],A=x=O[3],S=m=O[4],e=0;e<80;e+=1)E=o+r[t+j[e]]|0,E+=e<16?p(h,b,x)+C[0]:e<32?d(h,b,x)+C[1]:e<48?v(h,b,x)+C[2]:e<64?y(h,b,x)+C[3]:g(h,b,x)+C[4],E=(E=_(E|=0,D[e]))+m|0,o=m,m=x,x=_(b,10),b=h,h=E,E=w+r[t+z[e]]|0,E+=e<16?g(B,k,A)+H[0]:e<32?y(B,k,A)+H[1]:e<48?v(B,k,A)+H[2]:e<64?d(B,k,A)+H[3]:p(B,k,A)+H[4],E=(E=_(E|=0,R[e]))+S|0,w=S,S=A,A=_(k,10),k=B,B=E;E=O[1]+b+A|0,O[1]=O[2]+x+S|0,O[2]=O[3]+m+w|0,O[3]=O[4]+o+B|0,O[4]=O[0]+h+k|0,O[0]=E},_doFinalize:function(){var r=this._data,t=r.words,e=8*this._nDataBytes,n=8*r.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),r.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var r=i.clone.call(this);return r._hash=this._hash.clone(),r}});function p(r,t,e){return r^t^e}function d(r,t,e){return r&t|~r&e}function v(r,t,e){return(r|~t)^e}function y(r,t,e){return r&e|t&~e}function g(r,t,e){return r^(t|~e)}function _(r,t){return r<<t|r>>>32-t}t.RIPEMD160=i._createHelper(h),t.HmacRIPEMD160=i._createHmacHelper(h)}(),r.RIPEMD160)),tr.exports;var r}(),ir(),function(){return or||(or=1,ar.exports=(c=b(),N(),ir(),t=(r=c).lib,e=t.Base,n=t.WordArray,i=r.algo,o=i.SHA256,a=i.HMAC,s=i.PBKDF2=e.extend({cfg:e.extend({keySize:4,hasher:o,iterations:25e4}),init:function(r){this.cfg=this.cfg.extend(r)},compute:function(r,t){for(var e=this.cfg,i=a.create(e.hasher,r),o=n.create(),s=n.create([1]),c=o.words,l=s.words,f=e.keySize,u=e.iterations;c.length<f;){var h=i.update(t).finalize(s);i.reset();for(var p=h.words,d=p.length,v=h,y=1;y<u;y++){v=i.finalize(v),i.reset();for(var g=v.words,_=0;_<d;_++)p[_]^=g[_]}o.concat(h),l[0]++}return o.sigBytes=4*f,o}}),r.PBKDF2=function(r,t,e){return s.create(e).compute(r,t)},c.PBKDF2)),ar.exports;var r,t,e,n,i,o,a,s,c}(),lr(),hr(),vr(),_r(),mr(),kr(),function(){return Ar?Sr.exports:(Ar=1,Sr.exports=(t=b(),hr(),t.mode.ECB=((r=t.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(r,t){this._cipher.encryptBlock(r,t)}}),r.Decryptor=r.extend({processBlock:function(r,t){this._cipher.decryptBlock(r,t)}}),r),t.mode.ECB));var r,t}(),function(){return Er?Or.exports:(Er=1,Or.exports=(r=b(),hr(),r.pad.AnsiX923={pad:function(r,t){var e=r.sigBytes,n=4*t,i=n-e%n,o=e+i-1;r.clamp(),r.words[o>>>2]|=i<<24-o%4*8,r.sigBytes+=i},unpad:function(r){var t=255&r.words[r.sigBytes-1>>>2];r.sigBytes-=t}},r.pad.Ansix923));var r}(),function(){return Cr?Hr.exports:(Cr=1,Hr.exports=(r=b(),hr(),r.pad.Iso10126={pad:function(t,e){var n=4*e,i=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(r){var t=255&r.words[r.sigBytes-1>>>2];r.sigBytes-=t}},r.pad.Iso10126));var r}(),function(){return jr?zr.exports:(jr=1,zr.exports=(r=b(),hr(),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971));var r}(),function(){return Dr||(Dr=1,Rr.exports=(r=b(),hr(),r.pad.ZeroPadding={pad:function(r,t){var e=4*t;r.clamp(),r.sigBytes+=e-(r.sigBytes%e||e)},unpad:function(r){var t=r.words,e=r.sigBytes-1;for(e=r.sigBytes-1;e>=0;e--)if(t[e>>>2]>>>24-e%4*8&255){r.sigBytes=e+1;break}}},r.pad.ZeroPadding)),Rr.exports;var r}(),function(){return Mr?Pr.exports:(Mr=1,Pr.exports=(r=b(),hr(),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding));var r}(),function(){return Fr?$r.exports:(Fr=1,$r.exports=(n=b(),hr(),t=(r=n).lib.CipherParams,e=r.enc.Hex,r.format.Hex={stringify:function(r){return r.ciphertext.toString(e)},parse:function(r){var n=e.parse(r);return t.create({ciphertext:n})}},n.format.Hex));var r,t,e,n}(),function(){return Vr||(Vr=1,Ir.exports=(r=b(),j(),F(),lr(),hr(),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],l=[],f=[],u=[],h=[],p=[];!function(){for(var r=[],t=0;t<256;t++)r[t]=t<128?t<<1:t<<1^283;var e=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[e]=d,o[d]=e;var v=r[e],y=r[v],g=r[y],_=257*r[d]^16843008*d;a[e]=_<<24|_>>>8,s[e]=_<<16|_>>>16,c[e]=_<<8|_>>>24,l[e]=_,_=16843009*g^65537*y^257*v^16843008*e,f[d]=_<<24|_>>>8,u[d]=_<<16|_>>>16,h[d]=_<<8|_>>>24,p[d]=_,e?(e=v^r[r[r[g^v]]],n^=r[r[n]]):e=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var r=this._keyPriorReset=this._key,t=r.words,e=r.sigBytes/4,n=4*((this._nRounds=e+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<e?o[a]=t[a]:(l=o[a-1],a%e?e>6&&a%e==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=d[a/e|0]<<24),o[a]=o[a-e]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=o[a];else l=o[a-4];s[c]=c<4||a<=4?l:f[i[l>>>24]]^u[i[l>>>16&255]]^h[i[l>>>8&255]]^p[i[255&l]]}}},encryptBlock:function(r,t){this._doCryptBlock(r,t,this._keySchedule,a,s,c,l,i)},decryptBlock:function(r,t){var e=r[t+1];r[t+1]=r[t+3],r[t+3]=e,this._doCryptBlock(r,t,this._invKeySchedule,f,u,h,p,o),e=r[t+1],r[t+1]=r[t+3],r[t+3]=e},_doCryptBlock:function(r,t,e,n,i,o,a,s){for(var c=this._nRounds,l=r[t]^e[0],f=r[t+1]^e[1],u=r[t+2]^e[2],h=r[t+3]^e[3],p=4,d=1;d<c;d++){var v=n[l>>>24]^i[f>>>16&255]^o[u>>>8&255]^a[255&h]^e[p++],y=n[f>>>24]^i[u>>>16&255]^o[h>>>8&255]^a[255&l]^e[p++],g=n[u>>>24]^i[h>>>16&255]^o[l>>>8&255]^a[255&f]^e[p++],_=n[h>>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&u]^e[p++];l=v,f=y,u=g,h=_}v=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^e[p++],y=(s[f>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&l])^e[p++],g=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^e[p++],_=(s[h>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&u])^e[p++],r[t]=v,r[t+1]=y,r[t+2]=g,r[t+3]=_},keySize:8});t.AES=e._createHelper(v)}(),r.AES)),Ir.exports;var r}(),Nr(),function(){return Ur||(Ur=1,Kr.exports=(r=b(),j(),F(),lr(),hr(),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=n.RC4=e.extend({_doReset:function(){for(var r=this._key,t=r.words,e=r.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%e,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var c=n[i];n[i]=n[o],n[o]=c}this._i=this._j=0},_doProcessBlock:function(r,t){r[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var r=this._S,t=this._i,e=this._j,n=0,i=0;i<4;i++){e=(e+r[t=(t+1)%256])%256;var o=r[t];r[t]=r[e],r[e]=o,n|=r[(r[t]+r[e])%256]<<24-8*i}return this._i=t,this._j=e,n}t.RC4=e._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var r=this.cfg.drop;r>0;r--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),r.RC4)),Kr.exports;var r}(),function(){return Lr||(Lr=1,Xr.exports=(r=b(),j(),F(),lr(),hr(),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=e.extend({_doReset:function(){for(var r=this._key.words,t=this.cfg.iv,e=0;e<4;e++)r[e]=16711935&(r[e]<<8|r[e]>>>24)|4278255360&(r[e]<<24|r[e]>>>8);var n=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],i=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];for(this._b=0,e=0;e<4;e++)c.call(this);for(e=0;e<8;e++)i[e]^=n[e+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=l>>>16|4294901760&f,h=f<<16|65535&l;for(i[0]^=l,i[1]^=u,i[2]^=f,i[3]^=h,i[4]^=l,i[5]^=u,i[6]^=f,i[7]^=h,e=0;e<4;e++)c.call(this)}},_doProcessBlock:function(r,t){var e=this._X;c.call(this),i[0]=e[0]^e[5]>>>16^e[3]<<16,i[1]=e[2]^e[7]>>>16^e[5]<<16,i[2]=e[4]^e[1]>>>16^e[7]<<16,i[3]=e[6]^e[3]>>>16^e[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),r[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var r=this._X,t=this._C,e=0;e<8;e++)o[e]=t[e];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,e=0;e<8;e++){var n=r[e]+t[e],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[e]=c^l}r[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,r[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,r[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,r[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,r[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,r[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,r[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,r[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),r.Rabbit)),Xr.exports;var r}(),function(){return Jr||(Jr=1,qr.exports=(r=b(),j(),F(),lr(),hr(),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.RabbitLegacy=e.extend({_doReset:function(){var r=this._key.words,t=this.cfg.iv,e=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],n=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=e[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=l>>>16|4294901760&f,h=f<<16|65535&l;for(n[0]^=l,n[1]^=u,n[2]^=f,n[3]^=h,n[4]^=l,n[5]^=u,n[6]^=f,n[7]^=h,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(r,t){var e=this._X;c.call(this),i[0]=e[0]^e[5]>>>16^e[3]<<16,i[1]=e[2]^e[7]>>>16^e[5]<<16,i[2]=e[4]^e[1]>>>16^e[7]<<16,i[3]=e[6]^e[3]>>>16^e[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),r[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var r=this._X,t=this._C,e=0;e<8;e++)o[e]=t[e];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,e=0;e<8;e++){var n=r[e]+t[e],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[e]=c^l}r[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,r[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,r[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,r[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,r[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,r[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,r[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,r[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),r.RabbitLegacy)),qr.exports;var r}(),Qr())),v.exports),st=u(at),ct="en",lt=["singular","plural","dual","zero","one","two","few","many","other"];var ft=new(function(){function r(){this.cache=new Map}return r.prototype._generateKey=function(r,t,e){void 0===e&&(e={});var n=Array.isArray(t)?t.join(","):t,i=e?JSON.stringify(e,Object.keys(e).sort()):"{}";return"".concat(r,":").concat(n,":").concat(i)},r.prototype.get=function(r,t,e){void 0===e&&(e={});var n=this._generateKey(r,t,e);if(!this.cache.has(n)){var i=new Intl[r](t,e);this.cache.set(n,i)}return this.cache.get(n)},r}());function ut(r){var t=r;if(t&&"object"==typeof t&&"string"==typeof t.k){var e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===e.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1}var ht={variable:"v",number:"n",datetime:"d",currency:"c",static:"s"};function pt(r){return ht[r]}"function"==typeof SuppressedError&&SuppressedError;const dt={variable:"value",number:"n",datetime:"date",currency:"cost"};function vt(r={},t){if(r.name)return r.name;return`_gt_${dt[t]||"value"}_${r["data-_gt"]?.id}`}const yt="@generaltranslation/react-core";var gt={pl:"placeholder",ti:"title",alt:"alt",arl:"aria-label",arb:"aria-labelledby",ard:"aria-describedby"};const _t=r=>{if(!r)return"";const{type:t,props:e}=r;if(t&&"function"==typeof t){if("displayName"in t&&"string"==typeof t.displayName&&t.displayName)return t.displayName;if("name"in t&&"string"==typeof t.name&&t.name)return t.name}return t&&"string"==typeof t?t:e.href?"a":e["data-_gt"]?.id?`C${e["data-_gt"].id}`:"function"},bt=r=>{const{props:t}=r,e={t:_t(r)};if(t["data-_gt"]){const r=t["data-_gt"],n=r.transformation;if("variable"===n){const e=r.variableType||"variable",n=vt(t,e),i=pt(e);return{i:r.id,k:n,v:i}}e.i=r.id,e.d=((r,t,e)=>{let n=Object.entries(gt).reduce((r,[e,n])=>(t[n]&&(r[e]=t[n]),r),{});if("plural"===r&&e){const r={};Object.entries(e).forEach(([t,e])=>{r[t]=mt(e)}),n={...n,b:r,t:"p"}}if("branch"===r&&e){const r={};Object.entries(e).forEach(([t,e])=>{r[t]=mt(e)}),n={...n,b:r,t:"b"}}return Object.keys(n).length?n:void 0})(n,t,r.branches);let i=Object.entries(gt).reduce((r,[e,n])=>(t[n]&&(r[e]=t[n]),r),{});if("plural"===n&&r.branches){const t={};Object.entries(r.branches).forEach(([r,e])=>{t[r]=mt(e)}),i={...i,b:t,t:"p"}}if("branch"===n&&r.branches){const t={};Object.entries(r.branches).forEach(([r,e])=>{t[r]=mt(e)}),i={...i,b:t,t:"b"}}e.d=Object.keys(i).length?i:void 0}return t.children&&(e.c=mt(t.children)),e},xt=t=>{return e=t,r.isValidElement(e)?bt(t):"number"==typeof t?t.toString():t;var e};function mt(r){return Array.isArray(r)?r.map(xt):xt(r)}function wt(r,t,e){let n="",i=null;return"number"==typeof r&&!i&&e&&(n=function(r,t,e){void 0===t&&(t=lt),void 0===e&&(e=["en"]);var n=ft.get("PluralRules",e).select(r),i=Math.abs(r);if(0===i&&t.includes("zero"))return"zero";if(1===i){if(t.includes("singular"))return"singular";if(t.includes("one"))return"one"}if("one"===n&&t.includes("singular"))return"singular";if(2===i){if(t.includes("dual"))return"dual";if(t.includes("two"))return"two"}return"two"===n&&t.includes("dual")?"dual":t.includes(n)?n:"two"===n&&t.includes("dual")?"dual":"two"===n&&t.includes("plural")?"plural":"two"===n&&t.includes("other")?"other":"few"===n&&t.includes("plural")?"plural":"few"===n&&t.includes("other")?"other":"many"===n&&t.includes("plural")?"plural":"many"===n&&t.includes("other")?"other":"other"===n&&t.includes("plural")?"plural":""}(r,Object.keys(e),t)),n&&!i&&(i=e[n]),i}function Bt(r,t){let e=r;const n=t.split(".");for(const r of n){if("object"!=typeof e&&!Array.isArray(e))return;e=o(e,r)}return e}function kt(r){if(Array.isArray(r)){if(1===r.length)return{entry:r[0]};if(2===r.length)return{entry:r[0],metadata:r[1]}}return{entry:r}}function At(r){return"object"==typeof r&&!!r&&"data-_gt"in r&&"object"==typeof r["data-_gt"]&&!!r["data-_gt"]&&"transformation"in r["data-_gt"]&&"variable"===r["data-_gt"]?.transformation}function St(r){const t=r["data-_gt"]?.variableType||"variable";return{variableName:vt(r,t),variableType:pt(t),variableValue:void 0!==r.value?r.value:void 0!==r["data-_gt-unformatted-value"]?r["data-_gt-unformatted-value"]:void 0!==r.children?r.children:void 0,variableOptions:(()=>{const t={...void 0!==r.currency&&{currency:r.currency},...void 0!==r.options&&r.options};return Object.keys(t).length?t:"string"==typeof r["data-_gt-variable-options"]?JSON.parse(r["data-_gt-variable-options"]):r["data-_gt-variable-options"]||void 0})()}}function Et(r){return r&&r.props&&r.props["data-_gt"]?r.props["data-_gt"]:null}function Ot({children:t,defaultLocale:e=ct,renderVariable:n}){const i=t=>r.isValidElement(t)?(t=>{const i=Et(t);if(At(t.props)){const{variableType:r,variableValue:i,variableOptions:o}=St(t.props);return n({variableType:r,variableValue:i,variableOptions:o,locales:[e]})}if("plural"===i?.transformation){const r=i.branches||{};return o(wt(t.props.n,[e],r)||t.props.children)}if("branch"===i?.transformation){let{children:r,branch:e,"data-_gt":n,...a}=t.props;return a=i.branches||{},o(void 0!==a[e]?a[e]:r)}return"fragment"===i?.transformation?r.createElement(r.Fragment,{key:t.props.key,children:o(t.props.children)}):t.props.children?r.cloneElement(t,{...t.props,"data-_gt":void 0,children:o(t.props.children)}):r.cloneElement(t,{...t.props,"data-_gt":void 0})})(t):t,o=t=>Array.isArray(t)?r.Children.map(t,i):i(t);return o(t)}function Ct({sourceElement:t,targetElement:e,locales:n=[ct],renderVariable:i}){const{props:o}=t,a=o["data-_gt"],s=a?.transformation,c=e.d,l={};if(c&&Object.entries(gt).forEach(([r,t])=>{c[r]&&(l[t]=c[r])}),"plural"===s){const r=t.props.n;return Ht({source:wt(r,n,a.branches||{})||t.props.children,target:wt(r,n,e.d?.b||{})||e.c,locales:n,renderVariable:i})}if("branch"===s){const{branch:r,children:t}=o;return Ht({source:(a.branches||{})[r]||t,target:(e.d?.b||{})[r]||e.c,locales:n,renderVariable:i})}return"fragment"===s&&e.c?r.createElement(r.Fragment,{key:t.props.key,children:Ht({source:o.children,target:e.c,locales:n,renderVariable:i})}):o?.children&&e?.c?r.cloneElement(t,{...o,...l,"data-_gt":void 0,children:Ht({source:o.children,target:e.c,locales:n,renderVariable:i})}):Ot({children:t,defaultLocale:n[0],renderVariable:i})}function Ht({source:e,target:n,locales:i=[ct],renderVariable:o}){if(null==n&&e)return Ot({children:e,defaultLocale:i[0],renderVariable:o});if("string"==typeof n)return n;if(Array.isArray(n)&&!Array.isArray(e)&&e&&(e=[e]),Array.isArray(e)&&Array.isArray(n)){const a={},s={},c=e.filter(t=>{if(r.isValidElement(t)){if(!At(t.props))return!0;{const{variableName:r,variableValue:e,variableOptions:n}=St(t.props);a[r]=e,s[r]=n}}return!1}),l=r=>c.find(t=>{const e=Et(t);if(void 0!==e?.id){return e.id===r.i}return!1})||c.shift();return n.map((e,n)=>{if("string"==typeof e)return t.jsx(r.Fragment,{children:e},`string_${n}`);if(ut(e))return t.jsx(r.Fragment,{children:o({variableType:e.v||"v",variableValue:a[e.k],variableOptions:s[e.k],locales:i})},`var_${n}`);const c=l(e);return c?t.jsx(r.Fragment,{children:Ct({sourceElement:c,targetElement:e,locales:i,renderVariable:o})},`element_${n}`):void 0})}if(n&&"object"==typeof n&&!Array.isArray(n)){const t=ut(n)?"variable":"element";if(r.isValidElement(e)){if("element"===t)return Ct({sourceElement:e,targetElement:n,locales:i,renderVariable:o});if(At(e.props)){const{variableValue:r,variableOptions:t,variableType:n}=St(e.props);return o({variableType:n,variableValue:r,variableOptions:t,locales:i})}}}return Ot({children:e,defaultLocale:i[0],renderVariable:o})}function jt(r){return void 0!==r&&("string"==typeof r||!!Array.isArray(r)&&((1===r.length||2===r.length)&&("string"==typeof r[0]&&(2!==r.length||"object"==typeof r[1]&&null!==r[1]&&("$context"in r[1]||"$_hash"in r[1])))))}const zt=r=>"string"==typeof r||Array.isArray(r),Dt=r=>"object"==typeof r&&null!==r&&!Array.isArray(r);function Rt(r,t){if(Array.isArray(r))return r.map((r,e)=>jt(r)?t[e]:Rt(r,t[e]));const e={...Object.fromEntries(Object.entries(r).filter(([,r])=>zt(r))),...Object.fromEntries(Object.entries(t).filter(([,r])=>zt(r)))},n=Object.entries(r).filter(([,r])=>Dt(r)).map(([r])=>r),i=Object.entries(t).filter(([,r])=>Dt(r)).map(([r])=>r),a=new Set([...n,...i]);for(const n of a)e[n]=Rt(o(r,n)||{},o(t,n)||{});return e}const Mt="function"==typeof i.use;function Pt({dictionary:r,id:t}){if(""===t)return r;let e=r;const n=t.split(".");for(const r of n)e=o(e,r);return e}const Ft=["constructor","prototype","__proto__"];function $t(r,t,e,n){if(jt(t))return r;const i=e.split(".");i.forEach(r=>{if(function(r){return!!Ft.includes(r)}(r))throw new Error(`Invalid key: ${r}`)}),t||={};for(const r of i.slice(0,-1))null==o(t,r)&&a(t,r,Array.isArray(o(n,r))?[]:{}),t=o(t,r),n=o(n,r);a(t,i[i.length-1],r)}var Vt=function(){return Vt=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r},Vt.apply(this,arguments)};function It(r){return st.SHA256(r).toString(st.enc.Hex).slice(0,16)}function Tt(r,t){var e=r.source,n=r.context,i=r.id,o=r.dataFormat;void 0===t&&(t=It);var a={};return a.source="JSX"===o?Nt(e):e,a=Vt(Vt(Vt(Vt({},a),i&&{id:i}),n&&{context:n}),o&&{dataFormat:o}),t(d(a))}"function"==typeof SuppressedError&&SuppressedError;var Wt=function(r){if(r&&"object"==typeof r){var t={};if("c"in r&&r.c&&(t.c=Nt(r.c)),"d"in r){var e=null==r?void 0:r.d;(null==e?void 0:e.b)&&(t.b=Object.fromEntries(Object.entries(e.b).map(function(r){return[r[0],Nt(r[1])]}))),(null==e?void 0:e.t)&&(t.t=e.t)}return function(r){var t=r;if(t&&"object"==typeof t&&"string"==typeof t.k){var e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===e.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1}(r)?Vt({k:r.k},r.v&&{v:r.v}):t}return r};function Nt(r){return Array.isArray(r)?r.map(Wt):Wt(r)}const Ut=r=>`${yt} Error: Dictionary subtree not found for id: "${r}"`;exports.addGTIdentifier=function t(e,n=0){let i=n;const o=r=>{const{type:e,props:n}=r;i+=1;const o={id:i};let a;try{a="function"==typeof e&&e._gtt||""}catch{}if(a){const r=a.split("-");if("translate"===r[0]&&(r[0]="fragment"),"variable"===r[0]&&(o.variableType=r?.[1]||"variable"),"plural"===r[0]){const r=Object.entries(n).reduce((r,[e,n])=>(function(r){return lt.includes(r)}(e)&&(r[e]=t(n,i)),r),{});Object.keys(r).length&&(o.branches=r)}if("branch"===r[0]){const{children:r,branch:e,...a}=n,s=Object.entries(a).reduce((r,[e,n])=>(r[e]=t(n,i),r),{});Object.keys(s).length&&(o.branches=s)}o.transformation=r[0]}return o};function a(t){return r.isValidElement(t)?function(t){const{props:e}=t,n=o(t),i={...e,"data-_gt":n};return e.children&&!n.variableType&&(i.children=s(e.children)),t.type===r.Fragment&&(i["data-_gt"].transformation="fragment"),r.cloneElement(t,i)}(t):t}function s(t){return Array.isArray(t)?r.Children.map(t,a):a(t)}return s(e)},exports.collectUntranslatedEntries=function r(t,e,n=""){const i=[];return Object.entries(t).forEach(([t,a])=>{const s=n?`${n}.${t}`:t;if(jt(a)){const{entry:r,metadata:n}=kt(a);o(e,t)||i.push({source:r,metadata:{$id:s,$context:n?.$context,$_hash:n?.$_hash||""}})}else i.push(...r(a,o(e,t)||(Array.isArray(a)?[]:{}),s))}),i},exports.decodeMsg=function(r){return r&&-1!==r.lastIndexOf(":")?r.slice(0,r.lastIndexOf(":")):r},exports.decodeOptions=function(r){if(-1===r.lastIndexOf(":"))return null;const t=r.slice(r.lastIndexOf(":")+1);try{const r=JSON.parse(function(r){if("undefined"!=typeof Buffer)return Buffer.from(r,"base64").toString("utf8");for(var t=atob(r),e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return(new TextDecoder).decode(e)}(t));return r}catch{return null}},exports.defaultLocaleCookieName="generaltranslation.locale",exports.defaultRegionCookieName="generaltranslation.region",exports.flattenDictionary=function r(t,e=""){const n={};for(const i in t)if(t.hasOwnProperty(i)){const a=e?`${e}.${i}`:i;if("object"!=typeof o(t,i)||null===o(t,i)||Array.isArray(o(t,i))){if(n.hasOwnProperty(a))throw new Error(s(a));n[a]=o(t,i)}else{const e=r(o(t,i),a);for(const r in e){if(n.hasOwnProperty(r))throw new Error(s(r));n[r]=e[r]}}}return n},exports.getDefaultRenderSettings=(r="production")=>({method:"default",timeout:"development"===r?8e3:12e3}),exports.getDictionaryEntry=Bt,exports.getEntryAndMetadata=kt,exports.getPluralBranch=wt,exports.getSubtree=Pt,exports.getSubtreeWithCreation=function({dictionary:r,id:t,sourceDictionary:e}){if(""===t)return r;let n=r;const i=e,s=t.split(".");for(const r of s)void 0===o(n,r)&&(Array.isArray(o(i,r))?a(n,r,[]):a(n,r,{})),n=o(n,r);return n},exports.getVariableName=vt,exports.getVariableProps=St,exports.injectAndMerge=function(r,t,e){const n=Pt({dictionary:r,id:e});if(!n)throw new Error(Ut(e));if(jt(n))throw new Error(`${yt} Error: Cannot inject and merge a dictionary entry`);return function(r,t,e){const n=Bt(r,e);if(!n)throw new Error(Ut(e));if(jt(n))throw new Error(`${yt} Error: Cannot inject and merge a dictionary entry`);const i=e.split("."),s=i.slice(0,-1),c=i[i.length-1];let l=r;return s.forEach(r=>{l=o(l,r)}),a(l,c,t),r}(r,Rt(n,t),e)},exports.injectEntry=$t,exports.injectFallbacks=function(r,t,e,n=""){const i=n?n.split("."):[];return e.forEach(({source:e,metadata:n})=>{const{$id:o}=n,a=i.length>0?o.split(".").slice(i.length).join("."):o,s=Bt(t,a);let c;jt(s)&&(c=kt(s).entry);$t(c||e,t,a,r)}),t},exports.injectHashes=function r(t,e=""){let n=!1;return Object.entries(t).forEach(([i,o])=>{const s=e?`${e}.${i}`:i;if(jt(o)){let{entry:r,metadata:e}=kt(o);e?.$_hash||(e||={},e.$_hash=Tt({source:r,...e?.$context&&{context:e.$context},id:s,dataFormat:"ICU"}),a(t,i,[r,e]),n=!0)}else{const{updateDictionary:t}=r(o,s);n=n||t}}),{dictionary:t,updateDictionary:n}},exports.injectTranslations=function(r,t,e,n,i=""){let o=!1;const a=i?i.split("."):[];return n.forEach(({metadata:n})=>{const{$_hash:i,$id:s}=n,c=a.length>0?s.split(".").slice(a.length).join("."):s,l=Bt(t,c);let f;jt(l)&&(f=kt(l).entry);const u=e[i]||f;u&&($t(u,t,c,r),o=!0)}),{dictionary:t,updateDictionary:o}},exports.isDictionaryEntry=jt,exports.isValidDictionaryEntry=function(r){if("string"==typeof r)return!0;if(Array.isArray(r)){if("string"!=typeof r?.[0])return!1;const t=r?.[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1},exports.isVariableObject=function(r){const t=r;if(t&&"object"==typeof t&&"string"==typeof t.k){const r=Object.keys(t);if(1===r.length)return!0;if(2===r.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===r.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1},exports.mergeDictionaries=Rt,exports.msg=function(r,t){if(!t)return r;t.$_source=r,t.$_hash||=Tt({source:r,...t?.$context&&{context:t.$context},...t?.$id&&{id:t.$id},dataFormat:"ICU"});let n=r;if(function(r){let t=0,e=!1;for(;t<r.length;){const n=r[t];if("'"!==n){if(!e&&"{"===n){let e=t+1,n="";for(;e<r.length&&"}"!==r[e];)n+=r[e],e++;if(e<r.length&&n.trim().length>0)return!0;t=e<r.length?e+1:e;continue}t++}else{if(t+1<r.length&&"'"===r[t+1]){t+=2;continue}e=!e,t++}}return!1}(r)&&Object.keys(t||{}).length>2)try{n=e.formatMessage(r,{locales:[ct],variables:t})}catch(t){return console.warn((r=>`${yt} Warning: error formatting string. Expect translation resolution to fail. Original message: "${r}"`)(r),"Error: ",t),r}const i=function(r){if("undefined"!=typeof Buffer)return Buffer.from(r,"utf8").toString("base64");for(var t=(new TextEncoder).encode(r),e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}(JSON.stringify(t));return`${n}:${i}`},exports.reactHasUse=Mt,exports.renderDefaultChildren=Ot,exports.renderSkeleton=function(){return""},exports.renderTranslatedChildren=Ht,exports.stripMetadataFromEntries=function r(t){let e={};return Array.isArray(t)&&(e=[]),Object.entries(t).forEach(([t,n])=>{if(jt(n)){const{entry:r}=kt(n);a(e,t,r)}else a(e,t,r(n))}),e},exports.writeChildrenAsObjects=mt;
|
|
18
|
+
function(){var t=r,e=t.lib,n=e.WordArray,i=e.Hasher,o=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=n.create([0,1518500249,1859775393,2400959708,2840853838]),u=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(r,t){for(var e=0;e<16;e++){var n=t+e,i=r[n];r[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,h,b,x,m,w,B,k,A,S,E,O=this._hash.words,C=f.words,H=u.words,j=a.words,z=s.words,D=c.words,R=l.words;for(w=o=O[0],B=h=O[1],k=b=O[2],A=x=O[3],S=m=O[4],e=0;e<80;e+=1)E=o+r[t+j[e]]|0,E+=e<16?p(h,b,x)+C[0]:e<32?d(h,b,x)+C[1]:e<48?v(h,b,x)+C[2]:e<64?y(h,b,x)+C[3]:g(h,b,x)+C[4],E=(E=_(E|=0,D[e]))+m|0,o=m,m=x,x=_(b,10),b=h,h=E,E=w+r[t+z[e]]|0,E+=e<16?g(B,k,A)+H[0]:e<32?y(B,k,A)+H[1]:e<48?v(B,k,A)+H[2]:e<64?d(B,k,A)+H[3]:p(B,k,A)+H[4],E=(E=_(E|=0,R[e]))+S|0,w=S,S=A,A=_(k,10),k=B,B=E;E=O[1]+b+A|0,O[1]=O[2]+x+S|0,O[2]=O[3]+m+w|0,O[3]=O[4]+o+B|0,O[4]=O[0]+h+k|0,O[0]=E},_doFinalize:function(){var r=this._data,t=r.words,e=8*this._nDataBytes,n=8*r.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),r.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var r=i.clone.call(this);return r._hash=this._hash.clone(),r}});function p(r,t,e){return r^t^e}function d(r,t,e){return r&t|~r&e}function v(r,t,e){return(r|~t)^e}function y(r,t,e){return r&e|t&~e}function g(r,t,e){return r^(t|~e)}function _(r,t){return r<<t|r>>>32-t}t.RIPEMD160=i._createHelper(h),t.HmacRIPEMD160=i._createHmacHelper(h)}(),r.RIPEMD160)),tr.exports;var r}(),ir(),function(){return or||(or=1,ar.exports=(c=b(),N(),ir(),t=(r=c).lib,e=t.Base,n=t.WordArray,i=r.algo,o=i.SHA256,a=i.HMAC,s=i.PBKDF2=e.extend({cfg:e.extend({keySize:4,hasher:o,iterations:25e4}),init:function(r){this.cfg=this.cfg.extend(r)},compute:function(r,t){for(var e=this.cfg,i=a.create(e.hasher,r),o=n.create(),s=n.create([1]),c=o.words,l=s.words,f=e.keySize,u=e.iterations;c.length<f;){var h=i.update(t).finalize(s);i.reset();for(var p=h.words,d=p.length,v=h,y=1;y<u;y++){v=i.finalize(v),i.reset();for(var g=v.words,_=0;_<d;_++)p[_]^=g[_]}o.concat(h),l[0]++}return o.sigBytes=4*f,o}}),r.PBKDF2=function(r,t,e){return s.create(e).compute(r,t)},c.PBKDF2)),ar.exports;var r,t,e,n,i,o,a,s,c}(),lr(),hr(),vr(),_r(),mr(),kr(),function(){return Ar?Sr.exports:(Ar=1,Sr.exports=(t=b(),hr(),t.mode.ECB=((r=t.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(r,t){this._cipher.encryptBlock(r,t)}}),r.Decryptor=r.extend({processBlock:function(r,t){this._cipher.decryptBlock(r,t)}}),r),t.mode.ECB));var r,t}(),function(){return Er?Or.exports:(Er=1,Or.exports=(r=b(),hr(),r.pad.AnsiX923={pad:function(r,t){var e=r.sigBytes,n=4*t,i=n-e%n,o=e+i-1;r.clamp(),r.words[o>>>2]|=i<<24-o%4*8,r.sigBytes+=i},unpad:function(r){var t=255&r.words[r.sigBytes-1>>>2];r.sigBytes-=t}},r.pad.Ansix923));var r}(),function(){return Cr?Hr.exports:(Cr=1,Hr.exports=(r=b(),hr(),r.pad.Iso10126={pad:function(t,e){var n=4*e,i=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(r){var t=255&r.words[r.sigBytes-1>>>2];r.sigBytes-=t}},r.pad.Iso10126));var r}(),function(){return jr?zr.exports:(jr=1,zr.exports=(r=b(),hr(),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971));var r}(),function(){return Dr||(Dr=1,Rr.exports=(r=b(),hr(),r.pad.ZeroPadding={pad:function(r,t){var e=4*t;r.clamp(),r.sigBytes+=e-(r.sigBytes%e||e)},unpad:function(r){var t=r.words,e=r.sigBytes-1;for(e=r.sigBytes-1;e>=0;e--)if(t[e>>>2]>>>24-e%4*8&255){r.sigBytes=e+1;break}}},r.pad.ZeroPadding)),Rr.exports;var r}(),function(){return Mr?Pr.exports:(Mr=1,Pr.exports=(r=b(),hr(),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding));var r}(),function(){return Fr?$r.exports:(Fr=1,$r.exports=(n=b(),hr(),t=(r=n).lib.CipherParams,e=r.enc.Hex,r.format.Hex={stringify:function(r){return r.ciphertext.toString(e)},parse:function(r){var n=e.parse(r);return t.create({ciphertext:n})}},n.format.Hex));var r,t,e,n}(),function(){return Vr||(Vr=1,Ir.exports=(r=b(),j(),F(),lr(),hr(),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],l=[],f=[],u=[],h=[],p=[];!function(){for(var r=[],t=0;t<256;t++)r[t]=t<128?t<<1:t<<1^283;var e=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[e]=d,o[d]=e;var v=r[e],y=r[v],g=r[y],_=257*r[d]^16843008*d;a[e]=_<<24|_>>>8,s[e]=_<<16|_>>>16,c[e]=_<<8|_>>>24,l[e]=_,_=16843009*g^65537*y^257*v^16843008*e,f[d]=_<<24|_>>>8,u[d]=_<<16|_>>>16,h[d]=_<<8|_>>>24,p[d]=_,e?(e=v^r[r[r[g^v]]],n^=r[r[n]]):e=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var r=this._keyPriorReset=this._key,t=r.words,e=r.sigBytes/4,n=4*((this._nRounds=e+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<e?o[a]=t[a]:(l=o[a-1],a%e?e>6&&a%e==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=d[a/e|0]<<24),o[a]=o[a-e]^l);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var l=o[a];else l=o[a-4];s[c]=c<4||a<=4?l:f[i[l>>>24]]^u[i[l>>>16&255]]^h[i[l>>>8&255]]^p[i[255&l]]}}},encryptBlock:function(r,t){this._doCryptBlock(r,t,this._keySchedule,a,s,c,l,i)},decryptBlock:function(r,t){var e=r[t+1];r[t+1]=r[t+3],r[t+3]=e,this._doCryptBlock(r,t,this._invKeySchedule,f,u,h,p,o),e=r[t+1],r[t+1]=r[t+3],r[t+3]=e},_doCryptBlock:function(r,t,e,n,i,o,a,s){for(var c=this._nRounds,l=r[t]^e[0],f=r[t+1]^e[1],u=r[t+2]^e[2],h=r[t+3]^e[3],p=4,d=1;d<c;d++){var v=n[l>>>24]^i[f>>>16&255]^o[u>>>8&255]^a[255&h]^e[p++],y=n[f>>>24]^i[u>>>16&255]^o[h>>>8&255]^a[255&l]^e[p++],g=n[u>>>24]^i[h>>>16&255]^o[l>>>8&255]^a[255&f]^e[p++],_=n[h>>>24]^i[l>>>16&255]^o[f>>>8&255]^a[255&u]^e[p++];l=v,f=y,u=g,h=_}v=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^e[p++],y=(s[f>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&l])^e[p++],g=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^e[p++],_=(s[h>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&u])^e[p++],r[t]=v,r[t+1]=y,r[t+2]=g,r[t+3]=_},keySize:8});t.AES=e._createHelper(v)}(),r.AES)),Ir.exports;var r}(),Nr(),function(){return Ur||(Ur=1,Kr.exports=(r=b(),j(),F(),lr(),hr(),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=n.RC4=e.extend({_doReset:function(){for(var r=this._key,t=r.words,e=r.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%e,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var c=n[i];n[i]=n[o],n[o]=c}this._i=this._j=0},_doProcessBlock:function(r,t){r[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var r=this._S,t=this._i,e=this._j,n=0,i=0;i<4;i++){e=(e+r[t=(t+1)%256])%256;var o=r[t];r[t]=r[e],r[e]=o,n|=r[(r[t]+r[e])%256]<<24-8*i}return this._i=t,this._j=e,n}t.RC4=e._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var r=this.cfg.drop;r>0;r--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),r.RC4)),Kr.exports;var r}(),function(){return Lr||(Lr=1,Xr.exports=(r=b(),j(),F(),lr(),hr(),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=e.extend({_doReset:function(){for(var r=this._key.words,t=this.cfg.iv,e=0;e<4;e++)r[e]=16711935&(r[e]<<8|r[e]>>>24)|4278255360&(r[e]<<24|r[e]>>>8);var n=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],i=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];for(this._b=0,e=0;e<4;e++)c.call(this);for(e=0;e<8;e++)i[e]^=n[e+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=l>>>16|4294901760&f,h=f<<16|65535&l;for(i[0]^=l,i[1]^=u,i[2]^=f,i[3]^=h,i[4]^=l,i[5]^=u,i[6]^=f,i[7]^=h,e=0;e<4;e++)c.call(this)}},_doProcessBlock:function(r,t){var e=this._X;c.call(this),i[0]=e[0]^e[5]>>>16^e[3]<<16,i[1]=e[2]^e[7]>>>16^e[5]<<16,i[2]=e[4]^e[1]>>>16^e[7]<<16,i[3]=e[6]^e[3]>>>16^e[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),r[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var r=this._X,t=this._C,e=0;e<8;e++)o[e]=t[e];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,e=0;e<8;e++){var n=r[e]+t[e],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[e]=c^l}r[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,r[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,r[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,r[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,r[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,r[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,r[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,r[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),r.Rabbit)),Xr.exports;var r}(),function(){return Jr||(Jr=1,qr.exports=(r=b(),j(),F(),lr(),hr(),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.RabbitLegacy=e.extend({_doReset:function(){var r=this._key.words,t=this.cfg.iv,e=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],n=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=e[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=l>>>16|4294901760&f,h=f<<16|65535&l;for(n[0]^=l,n[1]^=u,n[2]^=f,n[3]^=h,n[4]^=l,n[5]^=u,n[6]^=f,n[7]^=h,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(r,t){var e=this._X;c.call(this),i[0]=e[0]^e[5]>>>16^e[3]<<16,i[1]=e[2]^e[7]>>>16^e[5]<<16,i[2]=e[4]^e[1]>>>16^e[7]<<16,i[3]=e[6]^e[3]>>>16^e[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),r[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var r=this._X,t=this._C,e=0;e<8;e++)o[e]=t[e];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,e=0;e<8;e++){var n=r[e]+t[e],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,l=((4294901760&n)*n|0)+((65535&n)*n|0);a[e]=c^l}r[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,r[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,r[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,r[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,r[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,r[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,r[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,r[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),r.RabbitLegacy)),qr.exports;var r}(),Qr())),v.exports),st=u(at),ct="en",lt=["singular","plural","dual","zero","one","two","few","many","other"];var ft=new(function(){function r(){this.cache=new Map}return r.prototype._generateKey=function(r,t,e){void 0===e&&(e={});var n=Array.isArray(t)?t.join(","):t,i=e?JSON.stringify(e,Object.keys(e).sort()):"{}";return"".concat(r,":").concat(n,":").concat(i)},r.prototype.get=function(r,t,e){void 0===e&&(e={});var n=this._generateKey(r,t,e);if(!this.cache.has(n)){var i=new Intl[r](t,e);this.cache.set(n,i)}return this.cache.get(n)},r}());function ut(r){var t=r;if(t&&"object"==typeof t&&"string"==typeof t.k){var e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===e.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1}var ht={variable:"v",number:"n",datetime:"d",currency:"c"};function pt(r){return ht[r]}"function"==typeof SuppressedError&&SuppressedError;const dt={variable:"value",number:"n",datetime:"date",currency:"cost"};function vt(r={},t){if(r.name)return r.name;return`_gt_${dt[t]||"value"}_${r["data-_gt"]?.id}`}const yt="@generaltranslation/react-core";var gt={pl:"placeholder",ti:"title",alt:"alt",arl:"aria-label",arb:"aria-labelledby",ard:"aria-describedby"};const _t=r=>{if(!r)return"";const{type:t,props:e}=r;if(t&&"function"==typeof t){if("displayName"in t&&"string"==typeof t.displayName&&t.displayName)return t.displayName;if("name"in t&&"string"==typeof t.name&&t.name)return t.name}return t&&"string"==typeof t?t:e.href?"a":e["data-_gt"]?.id?`C${e["data-_gt"].id}`:"function"},bt=r=>{const{props:t}=r,e={t:_t(r)};if(t["data-_gt"]){const r=t["data-_gt"],n=r.transformation;if("variable"===n){const e=r.variableType||"variable",n=vt(t,e),i=pt(e);return{i:r.id,k:n,v:i}}e.i=r.id,e.d=((r,t,e)=>{let n=Object.entries(gt).reduce((r,[e,n])=>(t[n]&&(r[e]=t[n]),r),{});if("plural"===r&&e){const r={};Object.entries(e).forEach(([t,e])=>{r[t]=mt(e)}),n={...n,b:r,t:"p"}}if("branch"===r&&e){const r={};Object.entries(e).forEach(([t,e])=>{r[t]=mt(e)}),n={...n,b:r,t:"b"}}return Object.keys(n).length?n:void 0})(n,t,r.branches);let i=Object.entries(gt).reduce((r,[e,n])=>(t[n]&&(r[e]=t[n]),r),{});if("plural"===n&&r.branches){const t={};Object.entries(r.branches).forEach(([r,e])=>{t[r]=mt(e)}),i={...i,b:t,t:"p"}}if("branch"===n&&r.branches){const t={};Object.entries(r.branches).forEach(([r,e])=>{t[r]=mt(e)}),i={...i,b:t,t:"b"}}e.d=Object.keys(i).length?i:void 0}return t.children&&(e.c=mt(t.children)),e},xt=t=>{return e=t,r.isValidElement(e)?bt(t):"number"==typeof t?t.toString():t;var e};function mt(r){return Array.isArray(r)?r.map(xt):xt(r)}function wt(r,t,e){let n="",i=null;return"number"==typeof r&&!i&&e&&(n=function(r,t,e){void 0===t&&(t=lt),void 0===e&&(e=["en"]);var n=ft.get("PluralRules",e).select(r),i=Math.abs(r);if(0===i&&t.includes("zero"))return"zero";if(1===i){if(t.includes("singular"))return"singular";if(t.includes("one"))return"one"}if("one"===n&&t.includes("singular"))return"singular";if(2===i){if(t.includes("dual"))return"dual";if(t.includes("two"))return"two"}return"two"===n&&t.includes("dual")?"dual":t.includes(n)?n:"two"===n&&t.includes("dual")?"dual":"two"===n&&t.includes("plural")?"plural":"two"===n&&t.includes("other")?"other":"few"===n&&t.includes("plural")?"plural":"few"===n&&t.includes("other")?"other":"many"===n&&t.includes("plural")?"plural":"many"===n&&t.includes("other")?"other":"other"===n&&t.includes("plural")?"plural":""}(r,Object.keys(e),t)),n&&!i&&(i=e[n]),i}function Bt(r,t){let e=r;const n=t.split(".");for(const r of n){if("object"!=typeof e&&!Array.isArray(e))return;e=o(e,r)}return e}function kt(r){if(Array.isArray(r)){if(1===r.length)return{entry:r[0]};if(2===r.length)return{entry:r[0],metadata:r[1]}}return{entry:r}}function At(r){return"object"==typeof r&&!!r&&"data-_gt"in r&&"object"==typeof r["data-_gt"]&&!!r["data-_gt"]&&"transformation"in r["data-_gt"]&&"variable"===r["data-_gt"]?.transformation}function St(r){const t=r["data-_gt"]?.variableType||"variable";return{variableName:vt(r,t),variableType:pt(t),variableValue:void 0!==r.value?r.value:void 0!==r["data-_gt-unformatted-value"]?r["data-_gt-unformatted-value"]:void 0!==r.children?r.children:void 0,variableOptions:(()=>{const t={...void 0!==r.currency&&{currency:r.currency},...void 0!==r.options&&r.options};return Object.keys(t).length?t:"string"==typeof r["data-_gt-variable-options"]?JSON.parse(r["data-_gt-variable-options"]):r["data-_gt-variable-options"]||void 0})()}}function Et(r){return r&&r.props&&r.props["data-_gt"]?r.props["data-_gt"]:null}function Ot({children:t,defaultLocale:e=ct,renderVariable:n}){const i=t=>r.isValidElement(t)?(t=>{const i=Et(t);if(At(t.props)){const{variableType:r,variableValue:i,variableOptions:o}=St(t.props);return n({variableType:r,variableValue:i,variableOptions:o,locales:[e]})}if("plural"===i?.transformation){const r=i.branches||{};return o(wt(t.props.n,[e],r)||t.props.children)}if("branch"===i?.transformation){let{children:r,branch:e,"data-_gt":n,...a}=t.props;return a=i.branches||{},o(void 0!==a[e]?a[e]:r)}return"fragment"===i?.transformation?r.createElement(r.Fragment,{key:t.props.key,children:o(t.props.children)}):t.props.children?r.cloneElement(t,{...t.props,"data-_gt":void 0,children:o(t.props.children)}):r.cloneElement(t,{...t.props,"data-_gt":void 0})})(t):t,o=t=>Array.isArray(t)?r.Children.map(t,i):i(t);return o(t)}function Ct({sourceElement:t,targetElement:e,locales:n=[ct],renderVariable:i}){const{props:o}=t,a=o["data-_gt"],s=a?.transformation,c=e.d,l={};if(c&&Object.entries(gt).forEach(([r,t])=>{c[r]&&(l[t]=c[r])}),"plural"===s){const r=t.props.n;return Ht({source:wt(r,n,a.branches||{})||t.props.children,target:wt(r,n,e.d?.b||{})||e.c,locales:n,renderVariable:i})}if("branch"===s){const{branch:r,children:t}=o;return Ht({source:(a.branches||{})[r]||t,target:(e.d?.b||{})[r]||e.c,locales:n,renderVariable:i})}return"fragment"===s&&e.c?r.createElement(r.Fragment,{key:t.props.key,children:Ht({source:o.children,target:e.c,locales:n,renderVariable:i})}):o?.children&&e?.c?r.cloneElement(t,{...o,...l,"data-_gt":void 0,children:Ht({source:o.children,target:e.c,locales:n,renderVariable:i})}):Ot({children:t,defaultLocale:n[0],renderVariable:i})}function Ht({source:e,target:n,locales:i=[ct],renderVariable:o}){if(null==n&&e)return Ot({children:e,defaultLocale:i[0],renderVariable:o});if("string"==typeof n)return n;if(Array.isArray(n)&&!Array.isArray(e)&&e&&(e=[e]),Array.isArray(e)&&Array.isArray(n)){const a={},s={},c=e.filter(t=>{if(r.isValidElement(t)){if(!At(t.props))return!0;{const{variableName:r,variableValue:e,variableOptions:n}=St(t.props);a[r]=e,s[r]=n}}return!1}),l=r=>c.find(t=>{const e=Et(t);if(void 0!==e?.id){return e.id===r.i}return!1})||c.shift();return n.map((e,n)=>{if("string"==typeof e)return t.jsx(r.Fragment,{children:e},`string_${n}`);if(ut(e))return t.jsx(r.Fragment,{children:o({variableType:e.v||"v",variableValue:a[e.k],variableOptions:s[e.k],locales:i})},`var_${n}`);const c=l(e);return c?t.jsx(r.Fragment,{children:Ct({sourceElement:c,targetElement:e,locales:i,renderVariable:o})},`element_${n}`):void 0})}if(n&&"object"==typeof n&&!Array.isArray(n)){const t=ut(n)?"variable":"element";if(r.isValidElement(e)){if("element"===t)return Ct({sourceElement:e,targetElement:n,locales:i,renderVariable:o});if(At(e.props)){const{variableValue:r,variableOptions:t,variableType:n}=St(e.props);return o({variableType:n,variableValue:r,variableOptions:t,locales:i})}}}return Ot({children:e,defaultLocale:i[0],renderVariable:o})}function jt(r){return void 0!==r&&("string"==typeof r||!!Array.isArray(r)&&((1===r.length||2===r.length)&&("string"==typeof r[0]&&(2!==r.length||"object"==typeof r[1]&&null!==r[1]&&("$context"in r[1]||"$_hash"in r[1])))))}const zt=r=>"string"==typeof r||Array.isArray(r),Dt=r=>"object"==typeof r&&null!==r&&!Array.isArray(r);function Rt(r,t){if(Array.isArray(r))return r.map((r,e)=>jt(r)?t[e]:Rt(r,t[e]));const e={...Object.fromEntries(Object.entries(r).filter(([,r])=>zt(r))),...Object.fromEntries(Object.entries(t).filter(([,r])=>zt(r)))},n=Object.entries(r).filter(([,r])=>Dt(r)).map(([r])=>r),i=Object.entries(t).filter(([,r])=>Dt(r)).map(([r])=>r),a=new Set([...n,...i]);for(const n of a)e[n]=Rt(o(r,n)||{},o(t,n)||{});return e}const Mt="function"==typeof i.use;function Pt({dictionary:r,id:t}){if(""===t)return r;let e=r;const n=t.split(".");for(const r of n)e=o(e,r);return e}const Ft=["constructor","prototype","__proto__"];function $t(r,t,e,n){if(jt(t))return r;const i=e.split(".");i.forEach(r=>{if(function(r){return!!Ft.includes(r)}(r))throw new Error(`Invalid key: ${r}`)}),t||={};for(const r of i.slice(0,-1))null==o(t,r)&&a(t,r,Array.isArray(o(n,r))?[]:{}),t=o(t,r),n=o(n,r);a(t,i[i.length-1],r)}var Vt=function(){return Vt=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);return r},Vt.apply(this,arguments)};function It(r){return st.SHA256(r).toString(st.enc.Hex).slice(0,16)}function Tt(r,t){var e=r.source,n=r.context,i=r.id,o=r.dataFormat;void 0===t&&(t=It);var a={};return a.source="JSX"===o?Nt(e):e,a=Vt(Vt(Vt(Vt({},a),i&&{id:i}),n&&{context:n}),o&&{dataFormat:o}),t(d(a))}"function"==typeof SuppressedError&&SuppressedError;var Wt=function(r){if(r&&"object"==typeof r){var t={};if("c"in r&&r.c&&(t.c=Nt(r.c)),"d"in r){var e=null==r?void 0:r.d;(null==e?void 0:e.b)&&(t.b=Object.fromEntries(Object.entries(e.b).map(function(r){return[r[0],Nt(r[1])]}))),(null==e?void 0:e.t)&&(t.t=e.t)}return function(r){var t=r;if(t&&"object"==typeof t&&"string"==typeof t.k){var e=Object.keys(t);if(1===e.length)return!0;if(2===e.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===e.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1}(r)?Vt({k:r.k},r.v&&{v:r.v}):t}return r};function Nt(r){return Array.isArray(r)?r.map(Wt):Wt(r)}const Ut=r=>`${yt} Error: Dictionary subtree not found for id: "${r}"`;exports.addGTIdentifier=function t(e,n=0){let i=n;const o=r=>{const{type:e,props:n}=r;i+=1;const o={id:i};let a;try{a="function"==typeof e&&e._gtt||""}catch{}if(a){const r=a.split("-");if("translate"===r[0]&&(r[0]="fragment"),"variable"===r[0]&&(o.variableType=r?.[1]||"variable"),"plural"===r[0]){const r=Object.entries(n).reduce((r,[e,n])=>(function(r){return lt.includes(r)}(e)&&(r[e]=t(n,i)),r),{});Object.keys(r).length&&(o.branches=r)}if("branch"===r[0]){const{children:r,branch:e,...a}=n,s=Object.entries(a).reduce((r,[e,n])=>(r[e]=t(n,i),r),{});Object.keys(s).length&&(o.branches=s)}o.transformation=r[0]}return o};function a(t){return r.isValidElement(t)?function(t){const{props:e}=t,n=o(t),i={...e,"data-_gt":n};return e.children&&!n.variableType&&(i.children=s(e.children)),t.type===r.Fragment&&(i["data-_gt"].transformation="fragment"),r.cloneElement(t,i)}(t):t}function s(t){return Array.isArray(t)?r.Children.map(t,a):a(t)}return s(e)},exports.collectUntranslatedEntries=function r(t,e,n=""){const i=[];return Object.entries(t).forEach(([t,a])=>{const s=n?`${n}.${t}`:t;if(jt(a)){const{entry:r,metadata:n}=kt(a);o(e,t)||i.push({source:r,metadata:{$id:s,$context:n?.$context,$_hash:n?.$_hash||""}})}else i.push(...r(a,o(e,t)||(Array.isArray(a)?[]:{}),s))}),i},exports.decodeMsg=function(r){return r&&-1!==r.lastIndexOf(":")?r.slice(0,r.lastIndexOf(":")):r},exports.decodeOptions=function(r){if(-1===r.lastIndexOf(":"))return null;const t=r.slice(r.lastIndexOf(":")+1);try{const r=JSON.parse(function(r){if("undefined"!=typeof Buffer)return Buffer.from(r,"base64").toString("utf8");for(var t=atob(r),e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return(new TextDecoder).decode(e)}(t));return r}catch{return null}},exports.defaultLocaleCookieName="generaltranslation.locale",exports.defaultRegionCookieName="generaltranslation.region",exports.flattenDictionary=function r(t,e=""){const n={};for(const i in t)if(t.hasOwnProperty(i)){const a=e?`${e}.${i}`:i;if("object"!=typeof o(t,i)||null===o(t,i)||Array.isArray(o(t,i))){if(n.hasOwnProperty(a))throw new Error(s(a));n[a]=o(t,i)}else{const e=r(o(t,i),a);for(const r in e){if(n.hasOwnProperty(r))throw new Error(s(r));n[r]=e[r]}}}return n},exports.getDefaultRenderSettings=(r="production")=>({method:"default",timeout:"development"===r?8e3:12e3}),exports.getDictionaryEntry=Bt,exports.getEntryAndMetadata=kt,exports.getPluralBranch=wt,exports.getSubtree=Pt,exports.getSubtreeWithCreation=function({dictionary:r,id:t,sourceDictionary:e}){if(""===t)return r;let n=r;const i=e,s=t.split(".");for(const r of s)void 0===o(n,r)&&(Array.isArray(o(i,r))?a(n,r,[]):a(n,r,{})),n=o(n,r);return n},exports.getVariableName=vt,exports.getVariableProps=St,exports.injectAndMerge=function(r,t,e){const n=Pt({dictionary:r,id:e});if(!n)throw new Error(Ut(e));if(jt(n))throw new Error(`${yt} Error: Cannot inject and merge a dictionary entry`);return function(r,t,e){const n=Bt(r,e);if(!n)throw new Error(Ut(e));if(jt(n))throw new Error(`${yt} Error: Cannot inject and merge a dictionary entry`);const i=e.split("."),s=i.slice(0,-1),c=i[i.length-1];let l=r;return s.forEach(r=>{l=o(l,r)}),a(l,c,t),r}(r,Rt(n,t),e)},exports.injectEntry=$t,exports.injectFallbacks=function(r,t,e,n=""){const i=n?n.split("."):[];return e.forEach(({source:e,metadata:n})=>{const{$id:o}=n,a=i.length>0?o.split(".").slice(i.length).join("."):o,s=Bt(t,a);let c;jt(s)&&(c=kt(s).entry);$t(c||e,t,a,r)}),t},exports.injectHashes=function r(t,e=""){let n=!1;return Object.entries(t).forEach(([i,o])=>{const s=e?`${e}.${i}`:i;if(jt(o)){let{entry:r,metadata:e}=kt(o);e?.$_hash||(e||={},e.$_hash=Tt({source:r,...e?.$context&&{context:e.$context},id:s,dataFormat:"ICU"}),a(t,i,[r,e]),n=!0)}else{const{updateDictionary:t}=r(o,s);n=n||t}}),{dictionary:t,updateDictionary:n}},exports.injectTranslations=function(r,t,e,n,i=""){let o=!1;const a=i?i.split("."):[];return n.forEach(({metadata:n})=>{const{$_hash:i,$id:s}=n,c=a.length>0?s.split(".").slice(a.length).join("."):s,l=Bt(t,c);let f;jt(l)&&(f=kt(l).entry);const u=e[i]||f;u&&($t(u,t,c,r),o=!0)}),{dictionary:t,updateDictionary:o}},exports.isDictionaryEntry=jt,exports.isValidDictionaryEntry=function(r){if("string"==typeof r)return!0;if(Array.isArray(r)){if("string"!=typeof r?.[0])return!1;const t=r?.[1];if(void 0===t)return!0;if(t&&"object"==typeof t)return!0}return!1},exports.isVariableObject=function(r){const t=r;if(t&&"object"==typeof t&&"string"==typeof t.k){const r=Object.keys(t);if(1===r.length)return!0;if(2===r.length){if("number"==typeof t.i)return!0;if("string"==typeof t.v)return!0}if(3===r.length&&"string"==typeof t.v&&"number"==typeof t.i)return!0}return!1},exports.mergeDictionaries=Rt,exports.msg=function(r,t){if(!t)return r;t.$_source=r,t.$_hash||=Tt({source:r,...t?.$context&&{context:t.$context},...t?.$id&&{id:t.$id},dataFormat:"ICU"});let n=r;if(function(r){let t=0,e=!1;for(;t<r.length;){const n=r[t];if("'"!==n){if(!e&&"{"===n){let e=t+1,n="";for(;e<r.length&&"}"!==r[e];)n+=r[e],e++;if(e<r.length&&n.trim().length>0)return!0;t=e<r.length?e+1:e;continue}t++}else{if(t+1<r.length&&"'"===r[t+1]){t+=2;continue}e=!e,t++}}return!1}(r)&&Object.keys(t||{}).length>2)try{n=e.formatMessage(r,{locales:[ct],variables:t})}catch(t){return console.warn((r=>`${yt} Warning: error formatting string. Expect translation resolution to fail. Original message: "${r}"`)(r),"Error: ",t),r}const i=function(r){if("undefined"!=typeof Buffer)return Buffer.from(r,"utf8").toString("base64");for(var t=(new TextEncoder).encode(r),e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}(JSON.stringify(t));return`${n}:${i}`},exports.reactHasUse=Mt,exports.renderDefaultChildren=Ot,exports.renderSkeleton=function(){return""},exports.renderTranslatedChildren=Ht,exports.stripMetadataFromEntries=function r(t){let e={};return Array.isArray(t)&&(e=[]),Object.entries(t).forEach(([t,n])=>{if(jt(n)){const{entry:r}=kt(n);a(e,t,r)}else a(e,t,r(n))}),e},exports.writeChildrenAsObjects=mt;
|
|
19
19
|
//# sourceMappingURL=internal.cjs.min.cjs.map
|