gt-react 9.2.0-alpha.0 → 9.2.0-alpha.2

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.
@@ -15,4 +15,4 @@ e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){
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=e,r=t.lib,n=r.WordArray,i=r.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]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=o.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,f,b,m,x,w,k,B,O,S,A,E=this._hash.words,j=u.words,T=d.words,C=a.words,H=s.words,z=c.words,P=l.words;for(w=o=E[0],k=f=E[1],B=b=E[2],O=m=E[3],S=x=E[4],r=0;r<80;r+=1)A=o+e[t+C[r]]|0,A+=r<16?h(f,b,m)+j[0]:r<32?p(f,b,m)+j[1]:r<48?v(f,b,m)+j[2]:r<64?y(f,b,m)+j[3]:g(f,b,m)+j[4],A=(A=_(A|=0,z[r]))+x|0,o=x,x=m,m=_(b,10),b=f,f=A,A=w+e[t+H[r]]|0,A+=r<16?g(k,B,O)+T[0]:r<32?y(k,B,O)+T[1]:r<48?v(k,B,O)+T[2]:r<64?p(k,B,O)+T[3]:h(k,B,O)+T[4],A=(A=_(A|=0,P[r]))+S|0,w=S,S=O,O=_(B,10),B=k,k=A;A=E[1]+b+O|0,E[1]=E[2]+m+S|0,E[2]=E[3]+x+w|0,E[3]=E[4]+o+k|0,E[4]=E[0]+f+B|0,E[0]=A},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.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 e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=i._createHelper(f),t.HmacRIPEMD160=i._createHmacHelper(f)}(),e.RIPEMD160)),Xe.exports;var e}(),Ze(),function(){return Qe||(Qe=1,et.exports=(c=he(),Ie(),Ze(),t=(e=c).lib,r=t.Base,n=t.WordArray,i=e.algo,o=i.SHA256,a=i.HMAC,s=i.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:o,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,i=a.create(r.hasher,e),o=n.create(),s=n.create([1]),c=o.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=i.update(t).finalize(s);i.reset();for(var h=f.words,p=h.length,v=f,y=1;y<d;y++){v=i.finalize(v),i.reset();for(var g=v.words,_=0;_<p;_++)h[_]^=g[_]}o.concat(f),l[0]++}return o.sigBytes=4*u,o}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),et.exports;var e,t,r,n,i,o,a,s,c}(),nt(),at(),lt(),ft(),vt(),_t(),function(){return bt?mt.exports:(bt=1,mt.exports=(t=he(),at(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return xt?wt.exports:(xt=1,wt.exports=(e=he(),at(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,o=r+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return kt?Bt.exports:(kt=1,Bt.exports=(e=he(),at(),e.pad.Iso10126={pad:function(t,r){var n=4*r,i=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return Ot?St.exports:(Ot=1,St.exports=(e=he(),at(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return At||(At=1,Et.exports=(e=he(),at(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),Et.exports;var e}(),function(){return jt?Tt.exports:(jt=1,Tt.exports=(e=he(),at(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return Ct?Ht.exports:(Ct=1,Ht.exports=(n=he(),at(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return zt||(zt=1,Pt.exports=(e=he(),Oe(),Ce(),nt(),at(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var v=e[r],y=e[v],g=e[y],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*g^65537*y^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[g^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(l=o[a-1],a%r?r>6&&a%r==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^=p[a/r|0]<<24),o[a]=o[a-r]^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:u[i[l>>>24]]^d[i[l>>>16&255]]^f[i[l>>>8&255]]^h[i[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^i[u>>>16&255]^o[d>>>8&255]^a[255&f]^r[h++],y=n[u>>>24]^i[d>>>16&255]^o[f>>>8&255]^a[255&l]^r[h++],g=n[d>>>24]^i[f>>>16&255]^o[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^i[l>>>16&255]^o[u>>>8&255]^a[255&d]^r[h++];l=v,u=y,d=g,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],y=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=y,e[t+2]=g,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),Pt.exports;var e}(),It(),function(){return Ft||(Ft=1,Mt.exports=(e=he(),Oe(),Ce(),nt(),at(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,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(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}t.RC4=r._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),Mt.exports;var e}(),function(){return Nt||(Nt=1,Lt.exports=(e=he(),Oe(),Ce(),nt(),at(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+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),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(i[0]^=l,i[1]^=d,i[2]^=u,i[3]^=f,i[4]^=l,i[5]^=d,i[6]^=u,i[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[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),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];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,r=0;r<8;r++){var n=e[r]+t[r],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[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),Lt.exports;var e}(),function(){return $t||($t=1,Ut.exports=(e=he(),Oe(),Ce(),nt(),at(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=r[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),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[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),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];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,r=0;r<8;r++){var n=e[r]+t[r],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[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),Ut.exports;var e}(),Kt())),le.exports),tr=oe(er),rr=function(){return rr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rr.apply(this,arguments)};function nr(e){return tr.SHA256(e).toString(tr.enc.Hex)}function ir(e,t){var r=e.source,n=e.context,i=e.id;return void 0===t&&(t=nr),t(ce(rr(rr({source:ar(r)},i&&{id:i}),n&&{context:n})))}"function"==typeof SuppressedError&&SuppressedError;var or=function(e){var t,r,n,i;if(e&&"object"==typeof e){if("props"in e){var o={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(o.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],ar(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(o.children=ar(e.props.children)),(null===(i=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===i?void 0:i.transformation)&&(o.transformation=e.props["data-_gt"].transformation),o}if("key"in e)return rr({key:e.key},e.variable&&{variable:e.variable})}return e};function ar(e){return Array.isArray(e)?e.map(or):or(e)}function sr(t){var{children:n,id:i}=t,o=x(t,["children","id"]);if(!n)return;const{variables:c,variablesOptions:l}=o,{translations:u,translationRequired:d,runtimeTranslationEnabled:f,dialectTranslationRequired:h,registerJsxForTranslation:p,renderSettings:v,locale:y,defaultLocale:g}=q("<T> used on the client-side outside of <GTProvider>"),_=a((()=>N(n)),[n]),b=o.context,[m,w]=a((()=>{if(d){const e=U(_);return[e,ir(Object.assign(Object.assign({source:e},b&&{context:b}),i&&{id:i}))]}return[void 0,""]}),[b,_,d,n]),k=null==u?void 0:u[w];s((()=>{f&&d&&u&&y&&!k&&p({source:m,targetLocale:y,metadata:{id:i,hash:w,context:b}})}),[f,u,k,d,i,w,b,y,n]);const B=()=>P({children:_,variables:c,variablesOptions:l,defaultLocale:g,renderVariable:te});if(!d||u&&!k&&!f||"error"===(null==k?void 0:k.state))return e(r.Fragment,{children:B()});if(!k||"loading"===(null==k?void 0:k.state)){let t;return t="skeleton"===v.method?"":"replace"===v.method||h?B():"",e(r.Fragment,{children:t})}return e(r.Fragment,{children:(O=k.target,G({source:_,target:O,variables:c,variablesOptions:l,locales:[y,g],renderVariable:te}))});var O}function cr(){const{translateContent:e}=q("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t="",r={}){return e?e(t,r):""}}function lr(e=""){const t=t=>e?`${e}.${t}`:t,{getDictionaryEntryTranslation:r}=q(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e="",n={}){const i=t(e);if(r){const t=r(i,n);return null==t&&console.warn(((e,t)=>`t('${e}') finding no translation for dictionary item ${t} !`)(e,i)),t}}}function ur(){return q("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale}function dr(){return q("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}sr.gtTransformation="translate-client";function fr(t){var{children:n,projectId:i="",devApiKey:o,dictionary:f={},locales:h=[],defaultLocale:p=C,locale:k,cacheUrl:B=j,runtimeUrl:O=T,renderSettings:S=J,loadTranslation:A,_versionId:E}=t,H=x(t,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadTranslation","_versionId"]);const{projectId:z,devApiKey:P}=function(e,t){try{return{projectId:e||import.meta.env.VITE_GT_PROJECT_ID||"",devApiKey:t||import.meta.env.VITE_GT_API_KEY}}catch(e){}try{if("undefined"!=typeof process)return{projectId:e||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(i,o);h=a((()=>(h.unshift(p),Array.from(new Set(h)))),[p,h]);const[D,N]=function({locale:e="",defaultLocale:t=C,locales:r=[],cookieName:n="generaltranslation.locale"}){const[i,o]=c(e&&v(e,r)||"");return s((()=>{var a;if(e&&e===i&&v(e,r)===i)return;const s=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[t],c=null===(a=document.cookie.split("; ").find((e=>e.startsWith(`${n}=`))))||void 0===a?void 0:a.split("=")[1],l=v([...e?[e]:[],...c?[c]:[],...s],r)||t;c&&c!==l&&(document.cookie=`${n}=${l};path=/`),o(l)}),[t,r]),[i,e=>{e=v(e,r)||i||t,o(e),document.cookie=`${n}=${e};path=/`}]}({defaultLocale:p,locales:h,locale:k}),L=!!(z&&O&&P&&"development"===process.env.NODE_ENV),$=(A?"custom":B&&"default")||"disabled";a((()=>{if("production"===process.env.NODE_ENV&&P)throw new Error("gt-react Error: Production environments cannot include a development api key.");if("custom"===$||!B&&!O||z||"development"!==process.env.NODE_ENV||console.warn("gt-react warn: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),z&&O&&"custom"!==$&&!P&&"development"===process.env.NODE_ENV&&console.warn("gt-react: An Development API key is required for runtime translation! Find your Development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),O===T||B===j&&"default"===$){const e=(h||h).filter((e=>!m(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:t}=d(e);return`${e} (${t})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,P,$,B,O,z,h]);const[U,W]=a((()=>{const e=_(p,D,h);return[e,e&&b(p,D)]}),[p,D,h]),[K,G]=c(U?null:{});s((()=>G(U?null:{})),[D]);const{registerContentForTranslation:q,registerJsxForTranslation:Y}=function(e){var{projectId:t,devApiKey:r,locale:n,versionId:i,defaultLocale:o,runtimeUrl:d,renderSettings:f,setTranslations:h,runtimeTranslationEnabled:p}=e,v=x(e,["projectId","devApiKey","locale","versionId","defaultLocale","runtimeUrl","renderSettings","setTranslations","runtimeTranslationEnabled"]);if(!p)return{registerContentForTranslation:()=>Promise.reject(new Error("registerContentForTranslation() failed because translation is disabled")),registerJsxForTranslation:()=>Promise.reject(new Error("registerJsxForTranslation() failed because translation is disabled"))};v=Object.assign(Object.assign({},v),{projectId:t,sourceLocale:o});const[y,g]=c(0),_=l(new Map),b=l(new Map);s((()=>{_.current.forEach((e=>e.resolve())),_.current.clear()}),[n]);const[m,k]=a((()=>{const e=e=>t=>{const r=`${t.metadata.hash}:${t.targetLocale}`,n=b.current.get(r);if(n)return n;const i=new Promise(((n,i)=>{_.current.set(r,{type:e,source:t.source,metadata:t.metadata,resolve:n,reject:i})})).catch((e=>{throw e})).finally((()=>{b.current.delete(r)}));return b.current.set(r,i),i};return[e("content"),e("jsx")]}),[]),B=u(((e,n)=>w(this,void 0,void 0,(function*(){if(0===_.current.size)return{};g((e=>e+1));const o=Array.from(e.values()),a={};try{const s=Object.entries(e).reduce(((e,[t,r])=>(e[r.metadata.hash]={state:"loading"},e)),{});h((e=>Object.assign(Object.assign({},e||{}),s)));const c=(e,t,r)=>w(this,void 0,void 0,(function*(){const n=new AbortController,i=void 0===r?void 0:setTimeout((()=>n.abort()),r);try{return yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}))}catch(e){if(console.error("timeout!"),e instanceof Error&&"AbortError"===e.name)throw new Error("Request timed out");throw e}finally{void 0!==i&&clearTimeout(i)}})),l=yield c(`${d}/v1/runtime/${t}/client`,{method:"POST",headers:Object.assign({"Content-Type":"application/json"},r&&{"x-gt-dev-api-key":r}),body:JSON.stringify({requests:o,targetLocale:n,metadata:v,versionId:i})},f.timeout);if(!l.ok)throw new Error(yield l.text());(yield l.json()).forEach(((e,t)=>{const r=o[t],n=r.metadata.hash;if("translation"in e&&e.translation&&e.reference){const{translation:t}=e;a[n]={state:"success",target:t}}else{if(void 0!==e.error&&null!==e.error&&void 0!==e.code&&null!==e.code)return console.error(F(r.metadata.id,r.metadata.hash),e.error),void(a[n]={state:"error",error:e.error,code:e.code});console.error(F(r.metadata.id,r.metadata.hash),e),a[n]={state:"error",error:"An error occurred.",code:500}}}))}catch(e){console.error(I,e),o.forEach((e=>{a[e.metadata.hash]={state:"error",error:"An error occurred.",code:500}}))}finally{return g((e=>e-1)),o.forEach((e=>e.resolve(a[e.metadata.hash]))),a}}))),[d,t,r,v,i,f.timeout,I,F]),O=l(y);return s((()=>{O.current=y}),[y]),s((()=>{let e=!0;const t=setInterval((()=>{if(_.current.size>0&&O.current<100){const t=Math.min(25,_.current.size),r=new Map(Array.from(_.current.entries()).slice(0,t));(()=>{w(this,void 0,void 0,(function*(){const t=yield B(r,n);e&&h((e=>Object.assign(Object.assign({},e||{}),t)))}))})(),r.forEach(((e,t)=>_.current.delete(t)))}}),50);return()=>{e=!1,clearInterval(t)}}),[n]),{registerContentForTranslation:m,registerJsxForTranslation:k}}(Object.assign({locale:D,versionId:E,projectId:z,runtimeTranslationEnabled:L,defaultLocale:p,devApiKey:P,runtimeUrl:O,renderSettings:S,setTranslations:G},H));s((()=>{if(K||!U)return;let e=!0;return(()=>{w(this,void 0,void 0,(function*(){try{let t;switch($){case"custom":A&&(t=yield A(D));break;case"default":t=yield function(e){return w(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const i=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield i.json()}))}({cacheUrl:B,projectId:z,locale:D,versionId:E});break;default:t={}}const r=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{});e&&G(r)}catch(t){console.error(t),e&&G({})}}))})(),()=>{e=!1}}),[K,U,$,B,z,D,E]);const[Z,Q]=a((()=>{const e=R(f),t={};for(const[r,n]of Object.entries(e)){const{entry:e,metadata:i}=V(n);if("string"==typeof e){if(!e.length){console.warn(`gt-react warn: Empty string found in dictionary with id: ${r}`);continue}const n=null==i?void 0:i.context,o=y(e),a=ir(Object.assign(Object.assign({source:o},n&&{context:n}),{id:r}));t[r]={source:o,hash:a,metadata:i}}}return[e,t]}),[f]),ee=a((()=>{if(!U||!K||!L)return!0;let e=!0;for(const[t,{hash:r,source:n,metadata:i}]of Object.entries(Q))(null==K?void 0:K[r])?"loading"===K[r].state&&(e=!1):(q({source:n,targetLocale:D,metadata:Object.assign(Object.assign({},i),{id:t,hash:r})}),e=!1);return e}),[U,L,Q,D,K]),te=u(((t,n={})=>{var i;const o=function(e,t){let n=e,i=t.split(".");for(const e of i){if("object"!=typeof n||Array.isArray(n)||r.isValidElement(n))return void console.error(M(t));n=n[e]}return n}(Z,t);if(!o)return;const{entry:a,metadata:s}=V(o),c=n,l=null==s?void 0:s.variablesOptions;if("string"==typeof a){if(!a.length)return console.warn(`gt-react warn: Empty string found in dictionary with id: ${t}`),a;const e=y(a),r=null==K?void 0:K[null===(i=Q[t])||void 0===i?void 0:i.hash];return U&&"success"===(null==r?void 0:r.state)?g(r.target,[D,p],c,l):g(e,h,c,l)}return e(sr,Object.assign({id:t,variables:c,variablesOptions:l},s,{children:a}))}),[f,K,U,D,p,Z,Q]),re=function(e,t,r,n){return u(((i,o={})=>{if(!i||"string"!=typeof i)return"";const a=y(i),s=(e,t)=>g(e,t,o.variables,o.variablesOptions);if(!n)return s(a,[r]);const c=ir(Object.assign(Object.assign({source:a},(null==o?void 0:o.context)&&{context:o.context}),(null==o?void 0:o.id)&&{id:o.id})),l=null==e?void 0:e[c];return"success"===(null==l?void 0:l.state)?s(l.target,[t,r]):s(a,[r])}),[e,t,r,n])}(K,D,p,U),ne=!(!(!U||ee&&K)||!D);return e(X.Provider,{value:{getDictionaryEntryTranslation:te,registerContentForTranslation:q,registerJsxForTranslation:Y,translateContent:re,runtimeTranslationEnabled:L,locale:D,locales:h,setLocale:N,defaultLocale:p,translations:K,translationRequired:U,dialectTranslationRequired:W,projectId:z,renderSettings:S},children:ne&&n})}function hr(t){var{children:r,n:n,locale:i}=t,a=x(t,["children","n","locale"]);const{"data-_gt":s}=a,c=x(a,["data-_gt"]),l=o(X);let u;l&&(i||(i=l.locale),u||(u=l.defaultLocale));const d=[...i?[i]:[],u||C];if("number"!=typeof n)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(r));const f=z(n,d,c)||r;return e("span",{"data-_gt":s,"data-_gt-n":n,style:{display:"contents"},children:f})}function pr(t){var{children:r,name:n="branch",branch:i}=t,o=x(t,["children","name","branch"]);const{"data-_gt":a}=o,s=x(o,["data-_gt"]),c=(i=null==i?void 0:i.toString())&&void 0!==s[i]?s[i]:r;return e("span",{"data-_gt":a,"data-_gt-branch-name":i,"data-_gt-name":n||"branch",style:{display:"contents"},children:c})}function vr(){return q("useLocales(): Unable to access user's locale outside of a <GTProvider>").locales}function yr(){const{setLocale:e}=q("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function gr({locales:r=vr().sort()}){const n=dr(),i=yr();return r&&0!==r.length&&i?t("select",{value:n||"",onChange:e=>i(e.target.value),children:[!n&&e("option",{value:""}),r.map((t=>{return e("option",{value:t,suppressHydrationWarning:!0,children:(r=d(t).nativeNameWithRegionCode,r?r.charAt(0).toUpperCase()+(r.length>1?r.slice(1):""):"")},t);var r}))]}):null}hr.gtTransformation="plural",pr.gtTransformation="branch";export{pr as Branch,Q as Currency,ee as DateTime,fr as GTProvider,gr as LocaleSelector,Y as Num,hr as Plural,sr as T,Z as Var,ur as useDefaultLocale,lr as useDict,cr as useGT,dr as useLocale,vr as useLocales,yr as useSetLocale};
18
+ function(){var t=e,r=t.lib,n=r.WordArray,i=r.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]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),d=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=o.RIPEMD160=i.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,f,b,m,x,w,k,B,O,S,A,E=this._hash.words,j=u.words,T=d.words,C=a.words,H=s.words,z=c.words,P=l.words;for(w=o=E[0],k=f=E[1],B=b=E[2],O=m=E[3],S=x=E[4],r=0;r<80;r+=1)A=o+e[t+C[r]]|0,A+=r<16?h(f,b,m)+j[0]:r<32?p(f,b,m)+j[1]:r<48?v(f,b,m)+j[2]:r<64?y(f,b,m)+j[3]:g(f,b,m)+j[4],A=(A=_(A|=0,z[r]))+x|0,o=x,x=m,m=_(b,10),b=f,f=A,A=w+e[t+H[r]]|0,A+=r<16?g(k,B,O)+T[0]:r<32?y(k,B,O)+T[1]:r<48?v(k,B,O)+T[2]:r<64?p(k,B,O)+T[3]:h(k,B,O)+T[4],A=(A=_(A|=0,P[r]))+S|0,w=S,S=O,O=_(B,10),B=k,k=A;A=E[1]+b+O|0,E[1]=E[2]+m+S|0,E[2]=E[3]+x+w|0,E[3]=E[4]+o+k|0,E[4]=E[0]+f+B|0,E[0]=A},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.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 e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function p(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=i._createHelper(f),t.HmacRIPEMD160=i._createHmacHelper(f)}(),e.RIPEMD160)),Xe.exports;var e}(),Ze(),function(){return Qe||(Qe=1,et.exports=(c=he(),Ie(),Ze(),t=(e=c).lib,r=t.Base,n=t.WordArray,i=e.algo,o=i.SHA256,a=i.HMAC,s=i.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:o,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,i=a.create(r.hasher,e),o=n.create(),s=n.create([1]),c=o.words,l=s.words,u=r.keySize,d=r.iterations;c.length<u;){var f=i.update(t).finalize(s);i.reset();for(var h=f.words,p=h.length,v=f,y=1;y<d;y++){v=i.finalize(v),i.reset();for(var g=v.words,_=0;_<p;_++)h[_]^=g[_]}o.concat(f),l[0]++}return o.sigBytes=4*u,o}}),e.PBKDF2=function(e,t,r){return s.create(r).compute(e,t)},c.PBKDF2)),et.exports;var e,t,r,n,i,o,a,s,c}(),nt(),at(),lt(),ft(),vt(),_t(),function(){return bt?mt.exports:(bt=1,mt.exports=(t=he(),at(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return xt?wt.exports:(xt=1,wt.exports=(e=he(),at(),e.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,o=r+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return kt?Bt.exports:(kt=1,Bt.exports=(e=he(),at(),e.pad.Iso10126={pad:function(t,r){var n=4*r,i=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return Ot?St.exports:(Ot=1,St.exports=(e=he(),at(),e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return At||(At=1,Et.exports=(e=he(),at(),e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding)),Et.exports;var e}(),function(){return jt?Tt.exports:(jt=1,Tt.exports=(e=he(),at(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return Ct?Ht.exports:(Ct=1,Ht.exports=(n=he(),at(),t=(e=n).lib.CipherParams,r=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var n=r.parse(e);return t.create({ciphertext:n})}},n.format.Hex));var e,t,r,n}(),function(){return zt||(zt=1,Pt.exports=(e=he(),Oe(),Ce(),nt(),at(),function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],l=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var v=e[r],y=e[v],g=e[y],_=257*e[p]^16843008*p;a[r]=_<<24|_>>>8,s[r]=_<<16|_>>>16,c[r]=_<<8|_>>>24,l[r]=_,_=16843009*g^65537*y^257*v^16843008*r,u[p]=_<<24|_>>>8,d[p]=_<<16|_>>>16,f[p]=_<<8|_>>>24,h[p]=_,r?(r=v^e[e[e[g^v]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(l=o[a-1],a%r?r>6&&a%r==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^=p[a/r|0]<<24),o[a]=o[a-r]^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:u[i[l>>>24]]^d[i[l>>>16&255]]^f[i[l>>>8&255]]^h[i[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<c;p++){var v=n[l>>>24]^i[u>>>16&255]^o[d>>>8&255]^a[255&f]^r[h++],y=n[u>>>24]^i[d>>>16&255]^o[f>>>8&255]^a[255&l]^r[h++],g=n[d>>>24]^i[f>>>16&255]^o[l>>>8&255]^a[255&u]^r[h++],_=n[f>>>24]^i[l>>>16&255]^o[u>>>8&255]^a[255&d]^r[h++];l=v,u=y,d=g,f=_}v=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],y=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^r[h++],g=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[h++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=v,e[t+1]=y,e[t+2]=g,e[t+3]=_},keySize:8});t.AES=r._createHelper(v)}(),e.AES)),Pt.exports;var e}(),It(),function(){return Ft||(Ft=1,Mt.exports=(e=he(),Oe(),Ce(),nt(),at(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,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(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}t.RC4=r._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4)),Mt.exports;var e}(),function(){return Nt||(Nt=1,Lt.exports=(e=he(),Oe(),Ce(),nt(),at(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+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),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(i[0]^=l,i[1]^=d,i[2]^=u,i[3]^=f,i[4]^=l,i[5]^=d,i[6]^=u,i[7]^=f,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[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),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];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,r=0;r<8;r++){var n=e[r]+t[r],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[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=r._createHelper(s)}(),e.Rabbit)),Lt.exports;var e}(),function(){return $t||($t=1,Ut.exports=(e=he(),Oe(),Ce(),nt(),at(),function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=r[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),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&u,f=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=f,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[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),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];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,r=0;r<8;r++){var n=e[r]+t[r],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[r]=c^l}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=r._createHelper(s)}(),e.RabbitLegacy)),Ut.exports;var e}(),Kt())),le.exports),tr=oe(er),rr=function(){return rr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rr.apply(this,arguments)};function nr(e){return tr.SHA256(e).toString(tr.enc.Hex)}function ir(e,t){var r=e.source,n=e.context,i=e.id;return void 0===t&&(t=nr),t(ce(rr(rr({source:ar(r)},i&&{id:i}),n&&{context:n})))}"function"==typeof SuppressedError&&SuppressedError;var or=function(e){var t,r,n,i;if(e&&"object"==typeof e){if("props"in e){var o={},a=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t["data-_gt"];return(null==a?void 0:a.branches)&&(o.branches=Object.fromEntries(Object.entries(a.branches).map((function(e){return[e[0],ar(e[1])]})))),(null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)&&(o.children=ar(e.props.children)),(null===(i=null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-_gt"])||void 0===i?void 0:i.transformation)&&(o.transformation=e.props["data-_gt"].transformation),o}if("key"in e)return rr({key:e.key},e.variable&&{variable:e.variable})}return e};function ar(e){return Array.isArray(e)?e.map(or):or(e)}function sr(t){var{children:n,id:i}=t,o=x(t,["children","id"]);if(!n)return;const{variables:c,variablesOptions:l}=o,{translations:u,translationRequired:d,runtimeTranslationEnabled:f,dialectTranslationRequired:h,registerJsxForTranslation:p,renderSettings:v,locale:y,defaultLocale:g}=q("<T> used on the client-side outside of <GTProvider>"),_=a((()=>N(n)),[n]),b=o.context,[m,w]=a((()=>{if(d){const e=U(_);return[e,ir(Object.assign(Object.assign({source:e},b&&{context:b}),i&&{id:i}))]}return[void 0,""]}),[b,_,d,n]),k=null==u?void 0:u[w];s((()=>{f&&d&&u&&y&&!k&&p({source:m,targetLocale:y,metadata:{id:i,hash:w,context:b}})}),[f,u,k,d,i,w,b,y,n]);const B=()=>P({children:_,variables:c,variablesOptions:l,defaultLocale:g,renderVariable:te});if(!d||u&&!k&&!f||"error"===(null==k?void 0:k.state))return e(r.Fragment,{children:B()});if(!k||"loading"===(null==k?void 0:k.state)){let t;return t="skeleton"===v.method?"":"replace"===v.method||h?B():"",e(r.Fragment,{children:t})}return e(r.Fragment,{children:(O=k.target,G({source:_,target:O,variables:c,variablesOptions:l,locales:[y,g],renderVariable:te}))});var O}function cr(){const{translateContent:e}=q("useGT(): No context provided. You're trying to get the t() function from the useGT() hook, which can be invoked within a <GTProvider>.");return function(t="",r={}){return e?e(t,r):""}}function lr(e=""){const t=t=>e?`${e}.${t}`:t,{getDictionaryEntryTranslation:r}=q(`useGT('${e}'): No context provided. You're trying to get the t() function on the client, which can only be done inside a <GTProvider>.`);return function(e="",n={}){const i=t(e);if(r){const t=r(i,n);return null==t&&console.warn(((e,t)=>`t('${e}') finding no translation for dictionary item ${t} !`)(e,i)),t}}}function ur(){return q("useDefaultLocale(): Unable to access default locale outside of a <GTProvider>").defaultLocale}function dr(){return q("useLocale(): Unable to access user's locale outside of a <GTProvider>").locale}sr.gtTransformation="translate-client";function fr(t){var{children:n,projectId:i="",devApiKey:o,dictionary:f={},locales:h=[],defaultLocale:p=C,locale:k,cacheUrl:B=j,runtimeUrl:O=T,renderSettings:S=J,loadTranslation:A,_versionId:E}=t,H=x(t,["children","projectId","devApiKey","dictionary","locales","defaultLocale","locale","cacheUrl","runtimeUrl","renderSettings","loadTranslation","_versionId"]);const{projectId:z,devApiKey:P}=function(e,t){try{return{projectId:e||import.meta.env.VITE_GT_PROJECT_ID||"",devApiKey:t||import.meta.env.VITE_GT_API_KEY}}catch(e){}try{if("undefined"!=typeof process)return{projectId:e||process.env.REACT_APP_GT_PROJECT_ID||process.env.NEXT_PUBLIC_GT_PROJECT_ID||process.env.GATSBY_GT_PROJECT_ID||"",devApiKey:t||process.env.REACT_APP_GT_API_KEY||process.env.NEXT_PUBLIC_GT_API_KEY||process.env.GATSBY_GT_API_KEY}}catch(e){console.error(e)}return{projectId:"",devApiKey:""}}(i,o);h=a((()=>(h.unshift(p),Array.from(new Set(h)))),[p,h]);const[D,N]=function({locale:e="",defaultLocale:t=C,locales:r=[],cookieName:n="generaltranslation.locale"}){const[i,o]=c(e&&v(e,r)||"");return s((()=>{var a;if(e&&e===i&&v(e,r)===i)return;const s=(null===navigator||void 0===navigator?void 0:navigator.languages)?navigator.languages:(null===navigator||void 0===navigator?void 0:navigator.language)?[navigator.language]:(null===navigator||void 0===navigator?void 0:navigator.userLanguage)?[null===navigator||void 0===navigator?void 0:navigator.userLanguage]:[t],c=null===(a=document.cookie.split("; ").find((e=>e.startsWith(`${n}=`))))||void 0===a?void 0:a.split("=")[1],l=v([...e?[e]:[],...c?[c]:[],...s],r)||t;c&&c!==l&&(document.cookie=`${n}=${l};path=/`),o(l)}),[t,r]),[i,e=>{e=v(e,r)||i||t,o(e),document.cookie=`${n}=${e};path=/`}]}({defaultLocale:p,locales:h,locale:k}),L=!!(z&&O&&P&&"development"===process.env.NODE_ENV),$=(A?"custom":B&&"default")||"disabled";a((()=>{if("production"===process.env.NODE_ENV&&P)throw new Error("gt-react Error: Production environments cannot include a development api key.");if("custom"===$||!B&&!O||z||"development"!==process.env.NODE_ENV||console.warn("gt-react warn: Translation cloud services require a project ID! Find yours at generaltranslation.com/dashboard."),z&&O&&"custom"!==$&&!P&&"development"===process.env.NODE_ENV&&console.warn("gt-react: An Development API key is required for runtime translation! Find your Development API key: generaltranslation.com/dashboard. (Or, disable this warning message by setting runtimeUrl to an empty string which disables runtime translation.)"),O===T||B===j&&"default"===$){const e=(h||h).filter((e=>!m(e)));e.length&&console.warn((e=>`gt-react: The following locales are currently unsupported by our service: ${e.map((e=>{const{name:t}=d(e);return`${e} (${t})`})).join(", ")}`)(e))}}),[process.env.NODE_ENV,P,$,B,O,z,h]);const[U,W]=a((()=>{const e=_(p,D,h);return[e,e&&b(p,D)]}),[p,D,h]),[K,G]=c(U?null:{});s((()=>G(U?null:{})),[D]);const{registerContentForTranslation:q,registerJsxForTranslation:Y}=function(e){var{projectId:t,devApiKey:r,locale:n,versionId:i,defaultLocale:o,runtimeUrl:d,renderSettings:f,setTranslations:h,runtimeTranslationEnabled:p}=e,v=x(e,["projectId","devApiKey","locale","versionId","defaultLocale","runtimeUrl","renderSettings","setTranslations","runtimeTranslationEnabled"]);if(!p)return{registerContentForTranslation:()=>Promise.reject(new Error("registerContentForTranslation() failed because translation is disabled")),registerJsxForTranslation:()=>Promise.reject(new Error("registerJsxForTranslation() failed because translation is disabled"))};v=Object.assign(Object.assign({},v),{projectId:t,sourceLocale:o});const[y,g]=c(0),_=l(new Map),b=l(new Map);s((()=>{_.current.forEach((e=>e.resolve())),_.current.clear()}),[n]);const[m,k]=a((()=>{const e=e=>t=>{const r=`${t.metadata.hash}:${t.targetLocale}`,n=b.current.get(r);if(n)return n;const i=new Promise(((n,i)=>{_.current.set(r,{type:e,source:t.source,metadata:t.metadata,resolve:n,reject:i})})).catch((e=>{throw e})).finally((()=>{b.current.delete(r)}));return b.current.set(r,i),i};return[e("content"),e("jsx")]}),[]),B=u(((e,n)=>w(this,void 0,void 0,(function*(){if(0===_.current.size)return{};g((e=>e+1));const o=Array.from(e.values()),a={};try{const s=Object.entries(e).reduce(((e,[t,r])=>(e[r.metadata.hash]={state:"loading"},e)),{});h((e=>Object.assign(Object.assign({},e||{}),s)));const c=(e,t,r)=>w(this,void 0,void 0,(function*(){const n=new AbortController,i=void 0===r?void 0:setTimeout((()=>n.abort()),r);try{return yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}))}catch(e){if(console.error("timeout!"),e instanceof Error&&"AbortError"===e.name)throw new Error("Request timed out");throw e}finally{void 0!==i&&clearTimeout(i)}})),l=yield c(`${d}/v1/runtime/${t}/client`,{method:"POST",headers:Object.assign({"Content-Type":"application/json"},r&&{"x-gt-dev-api-key":r}),body:JSON.stringify({requests:o,targetLocale:n,metadata:v,versionId:i})},f.timeout);if(!l.ok)throw new Error(yield l.text());(yield l.json()).forEach(((e,t)=>{const r=o[t],n=r.metadata.hash;if("translation"in e&&e.translation&&e.reference){const{translation:t}=e;a[n]={state:"success",target:t}}else{if(void 0!==e.error&&null!==e.error&&void 0!==e.code&&null!==e.code)return console.error(F(r.metadata.id,r.metadata.hash),e.error),void(a[n]={state:"error",error:e.error,code:e.code});console.error(F(r.metadata.id,r.metadata.hash),e),a[n]={state:"error",error:"An error occurred.",code:500}}}))}catch(e){console.error(I,e),o.forEach((e=>{a[e.metadata.hash]={state:"error",error:"An error occurred.",code:500}}))}finally{return g((e=>e-1)),o.forEach((e=>e.resolve(a[e.metadata.hash]))),a}}))),[d,t,r,v,i,f.timeout,I,F]),O=l(y);return s((()=>{O.current=y}),[y]),s((()=>{let e=!0;const t=setInterval((()=>{if(_.current.size>0&&O.current<100){const t=Math.min(25,_.current.size),r=new Map(Array.from(_.current.entries()).slice(0,t));(()=>{w(this,void 0,void 0,(function*(){const t=yield B(r,n);e&&h((e=>Object.assign(Object.assign({},e||{}),t)))}))})(),r.forEach(((e,t)=>_.current.delete(t)))}}),50);return()=>{e=!1,clearInterval(t)}}),[n]),{registerContentForTranslation:m,registerJsxForTranslation:k}}(Object.assign({locale:D,versionId:E,projectId:z,runtimeTranslationEnabled:L,defaultLocale:p,devApiKey:P,runtimeUrl:O,renderSettings:S,setTranslations:G},H));s((()=>{if(K||!U)return;let e=!0;return(()=>{w(this,void 0,void 0,(function*(){try{let t;switch($){case"custom":A&&(t=yield A(D));break;case"default":t=yield function(e){return w(this,arguments,void 0,(function*({cacheUrl:e,projectId:t,locale:r,versionId:n}){if(!t||!e||!r)return{};const i=yield fetch(n?`${e}/${t}/${r}/${n}`:`${e}/${t}/${r}`);return yield i.json()}))}({cacheUrl:B,projectId:z,locale:D,versionId:E});break;default:t={}}const r=Object.entries(t).reduce(((e,[t,r])=>(e[t]={state:"success",target:r},e)),{});e&&G(r)}catch(t){console.error(t),e&&G({})}}))})(),()=>{e=!1}}),[K,U,$,B,z,D,E]);const[Z,Q]=a((()=>{const e=R(f),t={};for(const[r,n]of Object.entries(e)){const{entry:e,metadata:i}=V(n);if("string"==typeof e){if(!e.length){console.warn(`gt-react warn: Empty string found in dictionary with id: ${r}`);continue}const n=null==i?void 0:i.context,o=y(e),a=ir(Object.assign(Object.assign({source:o},n&&{context:n}),{id:r}));t[r]={source:o,hash:a,metadata:i}}}return[e,t]}),[f]),ee=a((()=>{if(!U||!K||!L)return!0;let e=!0;for(const[t,{hash:r,source:n,metadata:i}]of Object.entries(Q))(null==K?void 0:K[r])?"loading"===K[r].state&&(e=!1):(q({source:n,targetLocale:D,metadata:Object.assign(Object.assign({},i),{id:t,hash:r})}),e=!1);return e}),[U,L,Q,D,K]),te=u(((t,n={})=>{var i;const o=function(e,t){let n=e,i=t.split(".");for(const e of i){if("object"!=typeof n||Array.isArray(n)||r.isValidElement(n))return void console.error(M(t));n=n[e]}return n}(Z,t);if(!o)return;const{entry:a,metadata:s}=V(o),c=n,l=null==s?void 0:s.variablesOptions;if("string"==typeof a){if(!a.length)return console.warn(`gt-react warn: Empty string found in dictionary with id: ${t}`),a;const e=y(a),r=null==K?void 0:K[null===(i=Q[t])||void 0===i?void 0:i.hash];return U&&"success"===(null==r?void 0:r.state)?g(r.target,[D,p],c,l):g(e,h,c,l)}return e(sr,Object.assign({id:t,variables:c,variablesOptions:l},s,{children:a}))}),[f,K,U,D,p,Z,Q]),re=function(e,t,r,n,i,o){return u(((a,s={})=>{if(!a||"string"!=typeof a)return"";const c=y(a),l=(e,t)=>g(e,t,s.variables,s.variablesOptions);if(!n)return l(c,[r]);const u=ir(Object.assign(Object.assign({source:c},(null==s?void 0:s.context)&&{context:s.context}),(null==s?void 0:s.id)&&{id:s.id})),d=null==e?void 0:e[u];return"success"===(null==d?void 0:d.state)?l(d.target,[t,r]):i?(o({source:c,targetLocale:t,metadata:Object.assign(Object.assign({},(null==s?void 0:s.context)&&{context:s.context}),{id:null==s?void 0:s.id,hash:u})}),l(c,[r])):l(c,[r])}),[e,t,r,n,i,o])}(K,D,p,U,L,q),ne=!(!(!U||ee&&K)||!D);return e(X.Provider,{value:{getDictionaryEntryTranslation:te,registerContentForTranslation:q,registerJsxForTranslation:Y,translateContent:re,runtimeTranslationEnabled:L,locale:D,locales:h,setLocale:N,defaultLocale:p,translations:K,translationRequired:U,dialectTranslationRequired:W,projectId:z,renderSettings:S},children:ne&&n})}function hr(t){var{children:r,n:n,locale:i}=t,a=x(t,["children","n","locale"]);const{"data-_gt":s}=a,c=x(a,["data-_gt"]),l=o(X);let u;l&&(i||(i=l.locale),u||(u=l.defaultLocale));const d=[...i?[i]:[],u||C];if("number"!=typeof n)throw new Error((e=>`<Plural> component with children "${e}" requires "n" option.`)(r));const f=z(n,d,c)||r;return e("span",{"data-_gt":s,"data-_gt-n":n,style:{display:"contents"},children:f})}function pr(t){var{children:r,name:n="branch",branch:i}=t,o=x(t,["children","name","branch"]);const{"data-_gt":a}=o,s=x(o,["data-_gt"]),c=(i=null==i?void 0:i.toString())&&void 0!==s[i]?s[i]:r;return e("span",{"data-_gt":a,"data-_gt-branch-name":i,"data-_gt-name":n||"branch",style:{display:"contents"},children:c})}function vr(){return q("useLocales(): Unable to access user's locale outside of a <GTProvider>").locales}function yr(){const{setLocale:e}=q("setLocale(): Unable to access user's locale outside of a <GTProvider>");return e}function gr({locales:r=vr().sort()}){const n=dr(),i=yr();return r&&0!==r.length&&i?t("select",{value:n||"",onChange:e=>i(e.target.value),children:[!n&&e("option",{value:""}),r.map((t=>{return e("option",{value:t,suppressHydrationWarning:!0,children:(r=d(t).nativeNameWithRegionCode,r?r.charAt(0).toUpperCase()+(r.length>1?r.slice(1):""):"")},t);var r}))]}):null}hr.gtTransformation="plural",pr.gtTransformation="branch";export{pr as Branch,Q as Currency,ee as DateTime,fr as GTProvider,gr as LocaleSelector,Y as Num,hr as Plural,sr as T,Z as Var,ur as useDefaultLocale,lr as useDict,cr as useGT,dr as useLocale,vr as useLocales,yr as useSetLocale};
@@ -1 +1 @@
1
- {"version":3,"file":"ClientProvider.d.ts","sourceRoot":"","sources":["../../src/provider/ClientProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAqBzD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,EAAE,OAAO,EACf,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAC1B,OAAY,EACZ,cAAc,EACd,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,yBAAyB,EACzB,cAAyB,EACzB,UAA6B,GAC9B,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgRzC"}
1
+ {"version":3,"file":"ClientProvider.d.ts","sourceRoot":"","sources":["../../src/provider/ClientProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAqBzD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,EAAE,OAAO,EACf,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAC1B,OAAY,EACZ,cAAc,EACd,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,yBAAyB,EACzB,cAAyB,EACzB,UAA6B,GAC9B,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkRzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GTProvider.d.ts","sourceRoot":"","sources":["../../src/provider/GTProvider.tsx"],"names":[],"mappings":"AASA,OAAO,EAEL,YAAY,EAGb,MAAM,gBAAgB,CAAC;AAoBxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,EACR,SAAS,EAAE,UAAe,EAC1B,SAAS,EAAE,UAAU,EACrB,UAAe,EACf,OAAY,EACZ,aAAoC,EACpC,MAAM,EAAE,OAAO,EACf,QAA0B,EAC1B,UAAiC,EACjC,cAAsC,EACtC,eAAe,EACf,UAAU,EACV,GAAG,QAAQ,EACZ,EAAE;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE;QACf,MAAM,EAAE,YAAY,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAgapB"}
1
+ {"version":3,"file":"GTProvider.d.ts","sourceRoot":"","sources":["../../src/provider/GTProvider.tsx"],"names":[],"mappings":"AASA,OAAO,EAEL,YAAY,EAGb,MAAM,gBAAgB,CAAC;AAoBxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,EACR,SAAS,EAAE,UAAe,EAC1B,SAAS,EAAE,UAAU,EACrB,UAAe,EACf,OAAY,EACZ,aAAoC,EACpC,MAAM,EAAE,OAAO,EACf,QAA0B,EAC1B,UAAiC,EACjC,cAAsC,EACtC,eAAe,EACf,UAAU,EACV,GAAG,QAAQ,EACZ,EAAE;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE;QACf,MAAM,EAAE,YAAY,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkapB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gt-react",
3
- "version": "9.2.0-alpha.0",
3
+ "version": "9.2.0-alpha.2",
4
4
  "description": "A React library for automatic internationalization.",
5
5
  "main": "./dist/index.cjs.min.cjs",
6
6
  "module": "./dist/index.esm.min.mjs",