25 lines
614 KiB
JavaScript
25 lines
614 KiB
JavaScript
/*! This file is auto-generated */
|
||
(()=>{var e,t,n={4660:e=>{e.exports=function(){function e(t,n,r){function s(a,o){if(!n[a]){if(!t[a]){if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return s(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i=void 0,a=0;a<r.length;a++)s(r[a]);return s}return e}()({1:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)s(n,r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,s){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),s);else for(var i=0;i<r;i++)e[s+i]=t[n+i]},flattenChunks:function(e){var t,n,r,s,i,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),s=0,t=0,n=e.length;t<n;t++)i=e[t],a.set(i,s),s+=i.length;return a}},a={arraySet:function(e,t,n,r,s){for(var i=0;i<r;i++)e[s+i]=t[n+i]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(r)},{}],2:[function(e,t,n){"use strict";var r=e("./common"),s=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var a=new r.Buf8(256),o=0;o<256;o++)a[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&s))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,s,i,a,o=e.length,l=0;for(i=0;i<o;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(s=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(s-56320),i++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),a=0,i=0;a<l;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(s=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(s-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,s=t.length;n<s;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,s,i,o=t||e.length,c=new Array(2*o);for(r=0,n=0;n<o;)if((s=e[n++])<128)c[r++]=s;else if((i=a[s])>4)c[r++]=65533,n+=i-1;else{for(s&=2===i?31:3===i?15:7;i>1&&n<o;)s=s<<6|63&e[n++],i--;i>1?c[r++]=65533:s<65536?c[r++]=s:(s-=65536,c[r++]=55296|s>>10&1023,c[r++]=56320|1023&s)}return l(c,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";function r(e,t,n,r){for(var s=65535&e|0,i=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{i=i+(s=s+t[r++]|0)|0}while(--a);s%=65521,i%=65521}return s|i<<16|0}t.exports=r},{}],4:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){"use strict";function r(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}var s=r();function i(e,t,n,r){var i=s,a=r+n;e^=-1;for(var o=r;o<a;o++)e=e>>>8^i[255&(e^t[o])];return-1^e}t.exports=i},{}],6:[function(e,t,n){"use strict";function r(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=r},{}],7:[function(e,t,n){"use strict";var r=30,s=12;t.exports=function(e,t){var n,i,a,o,l,c,u,d,m,p,h,f,g,v,y,b,w,_,E,S,x,C,k,P,I;n=e.state,i=e.next_in,P=e.input,a=i+(e.avail_in-5),o=e.next_out,I=e.output,l=o-(t-e.avail_out),c=o+(e.avail_out-257),u=n.dmax,d=n.wsize,m=n.whave,p=n.wnext,h=n.window,f=n.hold,g=n.bits,v=n.lencode,y=n.distcode,b=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;e:do{g<15&&(f+=P[i++]<<g,g+=8,f+=P[i++]<<g,g+=8),_=v[f&b];t:for(;;){if(f>>>=E=_>>>24,g-=E,0==(E=_>>>16&255))I[o++]=65535&_;else{if(!(16&E)){if(0==(64&E)){_=v[(65535&_)+(f&(1<<E)-1)];continue t}if(32&E){n.mode=s;break e}e.msg="invalid literal/length code",n.mode=r;break e}S=65535&_,(E&=15)&&(g<E&&(f+=P[i++]<<g,g+=8),S+=f&(1<<E)-1,f>>>=E,g-=E),g<15&&(f+=P[i++]<<g,g+=8,f+=P[i++]<<g,g+=8),_=y[f&w];n:for(;;){if(f>>>=E=_>>>24,g-=E,!(16&(E=_>>>16&255))){if(0==(64&E)){_=y[(65535&_)+(f&(1<<E)-1)];continue n}e.msg="invalid distance code",n.mode=r;break e}if(x=65535&_,g<(E&=15)&&(f+=P[i++]<<g,(g+=8)<E&&(f+=P[i++]<<g,g+=8)),(x+=f&(1<<E)-1)>u){e.msg="invalid distance too far back",n.mode=r;break e}if(f>>>=E,g-=E,x>(E=o-l)){if((E=x-E)>m&&n.sane){e.msg="invalid distance too far back",n.mode=r;break e}if(C=0,k=h,0===p){if(C+=d-E,E<S){S-=E;do{I[o++]=h[C++]}while(--E);C=o-x,k=I}}else if(p<E){if(C+=d+p-E,(E-=p)<S){S-=E;do{I[o++]=h[C++]}while(--E);if(C=0,p<S){S-=E=p;do{I[o++]=h[C++]}while(--E);C=o-x,k=I}}}else if(C+=p-E,E<S){S-=E;do{I[o++]=h[C++]}while(--E);C=o-x,k=I}for(;S>2;)I[o++]=k[C++],I[o++]=k[C++],I[o++]=k[C++],S-=3;S&&(I[o++]=k[C++],S>1&&(I[o++]=k[C++]))}else{C=o-x;do{I[o++]=I[C++],I[o++]=I[C++],I[o++]=I[C++],S-=3}while(S>2);S&&(I[o++]=I[C++],S>1&&(I[o++]=I[C++]))}break}}break}}while(i<a&&o<c);i-=S=g>>3,f&=(1<<(g-=S<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<a?a-i+5:5-(i-a),e.avail_out=o<c?c-o+257:257-(o-c),n.hold=f,n.bits=g}},{}],8:[function(e,t,n){"use strict";var r=e("../utils/common"),s=e("./adler32"),i=e("./crc32"),a=e("./inffast"),o=e("./inftrees"),l=0,c=1,u=2,d=4,m=5,p=6,h=0,f=1,g=2,v=-2,y=-3,b=-4,w=-5,_=8,E=1,S=2,x=3,C=4,k=5,P=6,I=7,T=8,O=9,A=10,M=11,N=12,F=13,V=14,R=15,B=16,D=17,L=18,z=19,H=20,G=21,U=22,j=23,W=24,q=25,Z=26,K=27,Y=28,X=29,J=30,Q=31,$=852,ee=592,te=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function re(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function se(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=E,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32($),t.distcode=t.distdyn=new r.Buf32(ee),t.sane=1,t.back=-1,h):v}function ie(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,se(e)):v}function ae(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,ie(e))):v}function oe(e,t){var n,r;return e?(r=new re,e.state=r,r.window=null,(n=ae(e,t))!==h&&(e.state=null),n):v}function le(e){return oe(e,te)}var ce,ue,de=!0;function me(e){if(de){var t;for(ce=new r.Buf32(512),ue=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(c,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(u,e.lens,0,32,ue,0,e.work,{bits:5}),de=!1}e.lencode=ce,e.lenbits=9,e.distcode=ue,e.distbits=5}function pe(e,t,n,s){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),s>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>s&&(i=s),r.arraySet(a.window,t,n-s,i,a.wnext),(s-=i)?(r.arraySet(a.window,t,n-s,s,0),a.wnext=s,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function he(e,t){var n,$,ee,te,re,se,ie,ae,oe,le,ce,ue,de,he,fe,ge,ve,ye,be,we,_e,Ee,Se,xe,Ce=0,ke=new r.Buf8(4),Pe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return v;(n=e.state).mode===N&&(n.mode=F),re=e.next_out,ee=e.output,ie=e.avail_out,te=e.next_in,$=e.input,se=e.avail_in,ae=n.hold,oe=n.bits,le=se,ce=ie,Ee=h;e:for(;;)switch(n.mode){case E:if(0===n.wrap){n.mode=F;break}for(;oe<16;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if(2&n.wrap&&35615===ae){n.check=0,ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=i(n.check,ke,2,0),ae=0,oe=0,n.mode=S;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",n.mode=J;break}if((15&ae)!==_){e.msg="unknown compression method",n.mode=J;break}if(oe-=4,_e=8+(15&(ae>>>=4)),0===n.wbits)n.wbits=_e;else if(_e>n.wbits){e.msg="invalid window size",n.mode=J;break}n.dmax=1<<_e,e.adler=n.check=1,n.mode=512&ae?A:N,ae=0,oe=0;break;case S:for(;oe<16;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if(n.flags=ae,(255&n.flags)!==_){e.msg="unknown compression method",n.mode=J;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=J;break}n.head&&(n.head.text=ae>>8&1),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=i(n.check,ke,2,0)),ae=0,oe=0,n.mode=x;case x:for(;oe<32;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}n.head&&(n.head.time=ae),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,ke[2]=ae>>>16&255,ke[3]=ae>>>24&255,n.check=i(n.check,ke,4,0)),ae=0,oe=0,n.mode=C;case C:for(;oe<16;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}n.head&&(n.head.xflags=255&ae,n.head.os=ae>>8),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=i(n.check,ke,2,0)),ae=0,oe=0,n.mode=k;case k:if(1024&n.flags){for(;oe<16;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}n.length=ae,n.head&&(n.head.extra_len=ae),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=i(n.check,ke,2,0)),ae=0,oe=0}else n.head&&(n.head.extra=null);n.mode=P;case P:if(1024&n.flags&&((ue=n.length)>se&&(ue=se),ue&&(n.head&&(_e=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,$,te,ue,_e)),512&n.flags&&(n.check=i(n.check,$,ue,te)),se-=ue,te+=ue,n.length-=ue),n.length))break e;n.length=0,n.mode=I;case I:if(2048&n.flags){if(0===se)break e;ue=0;do{_e=$[te+ue++],n.head&&_e&&n.length<65536&&(n.head.name+=String.fromCharCode(_e))}while(_e&&ue<se);if(512&n.flags&&(n.check=i(n.check,$,ue,te)),se-=ue,te+=ue,_e)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=T;case T:if(4096&n.flags){if(0===se)break e;ue=0;do{_e=$[te+ue++],n.head&&_e&&n.length<65536&&(n.head.comment+=String.fromCharCode(_e))}while(_e&&ue<se);if(512&n.flags&&(n.check=i(n.check,$,ue,te)),se-=ue,te+=ue,_e)break e}else n.head&&(n.head.comment=null);n.mode=O;case O:if(512&n.flags){for(;oe<16;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if(ae!==(65535&n.check)){e.msg="header crc mismatch",n.mode=J;break}ae=0,oe=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=N;break;case A:for(;oe<32;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}e.adler=n.check=ne(ae),ae=0,oe=0,n.mode=M;case M:if(0===n.havedict)return e.next_out=re,e.avail_out=ie,e.next_in=te,e.avail_in=se,n.hold=ae,n.bits=oe,g;e.adler=n.check=1,n.mode=N;case N:if(t===m||t===p)break e;case F:if(n.last){ae>>>=7&oe,oe-=7&oe,n.mode=K;break}for(;oe<3;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}switch(n.last=1&ae,oe-=1,3&(ae>>>=1)){case 0:n.mode=V;break;case 1:if(me(n),n.mode=H,t===p){ae>>>=2,oe-=2;break e}break;case 2:n.mode=D;break;case 3:e.msg="invalid block type",n.mode=J}ae>>>=2,oe-=2;break;case V:for(ae>>>=7&oe,oe-=7&oe;oe<32;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",n.mode=J;break}if(n.length=65535&ae,ae=0,oe=0,n.mode=R,t===p)break e;case R:n.mode=B;case B:if(ue=n.length){if(ue>se&&(ue=se),ue>ie&&(ue=ie),0===ue)break e;r.arraySet(ee,$,te,ue,re),se-=ue,te+=ue,ie-=ue,re+=ue,n.length-=ue;break}n.mode=N;break;case D:for(;oe<14;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if(n.nlen=257+(31&ae),ae>>>=5,oe-=5,n.ndist=1+(31&ae),ae>>>=5,oe-=5,n.ncode=4+(15&ae),ae>>>=4,oe-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=J;break}n.have=0,n.mode=L;case L:for(;n.have<n.ncode;){for(;oe<3;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}n.lens[Pe[n.have++]]=7&ae,ae>>>=3,oe-=3}for(;n.have<19;)n.lens[Pe[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Se={bits:n.lenbits},Ee=o(l,n.lens,0,19,n.lencode,0,n.work,Se),n.lenbits=Se.bits,Ee){e.msg="invalid code lengths set",n.mode=J;break}n.have=0,n.mode=z;case z:for(;n.have<n.nlen+n.ndist;){for(;ge=(Ce=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ve=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if(ve<16)ae>>>=fe,oe-=fe,n.lens[n.have++]=ve;else{if(16===ve){for(xe=fe+2;oe<xe;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if(ae>>>=fe,oe-=fe,0===n.have){e.msg="invalid bit length repeat",n.mode=J;break}_e=n.lens[n.have-1],ue=3+(3&ae),ae>>>=2,oe-=2}else if(17===ve){for(xe=fe+3;oe<xe;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}oe-=fe,_e=0,ue=3+(7&(ae>>>=fe)),ae>>>=3,oe-=3}else{for(xe=fe+7;oe<xe;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}oe-=fe,_e=0,ue=11+(127&(ae>>>=fe)),ae>>>=7,oe-=7}if(n.have+ue>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=J;break}for(;ue--;)n.lens[n.have++]=_e}}if(n.mode===J)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=J;break}if(n.lenbits=9,Se={bits:n.lenbits},Ee=o(c,n.lens,0,n.nlen,n.lencode,0,n.work,Se),n.lenbits=Se.bits,Ee){e.msg="invalid literal/lengths set",n.mode=J;break}if(n.distbits=6,n.distcode=n.distdyn,Se={bits:n.distbits},Ee=o(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Se),n.distbits=Se.bits,Ee){e.msg="invalid distances set",n.mode=J;break}if(n.mode=H,t===p)break e;case H:n.mode=G;case G:if(se>=6&&ie>=258){e.next_out=re,e.avail_out=ie,e.next_in=te,e.avail_in=se,n.hold=ae,n.bits=oe,a(e,ce),re=e.next_out,ee=e.output,ie=e.avail_out,te=e.next_in,$=e.input,se=e.avail_in,ae=n.hold,oe=n.bits,n.mode===N&&(n.back=-1);break}for(n.back=0;ge=(Ce=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ve=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if(ge&&0==(240&ge)){for(ye=fe,be=ge,we=ve;ge=(Ce=n.lencode[we+((ae&(1<<ye+be)-1)>>ye)])>>>16&255,ve=65535&Ce,!(ye+(fe=Ce>>>24)<=oe);){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}ae>>>=ye,oe-=ye,n.back+=ye}if(ae>>>=fe,oe-=fe,n.back+=fe,n.length=ve,0===ge){n.mode=Z;break}if(32&ge){n.back=-1,n.mode=N;break}if(64&ge){e.msg="invalid literal/length code",n.mode=J;break}n.extra=15&ge,n.mode=U;case U:if(n.extra){for(xe=n.extra;oe<xe;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}n.length+=ae&(1<<n.extra)-1,ae>>>=n.extra,oe-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=j;case j:for(;ge=(Ce=n.distcode[ae&(1<<n.distbits)-1])>>>16&255,ve=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if(0==(240&ge)){for(ye=fe,be=ge,we=ve;ge=(Ce=n.distcode[we+((ae&(1<<ye+be)-1)>>ye)])>>>16&255,ve=65535&Ce,!(ye+(fe=Ce>>>24)<=oe);){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}ae>>>=ye,oe-=ye,n.back+=ye}if(ae>>>=fe,oe-=fe,n.back+=fe,64&ge){e.msg="invalid distance code",n.mode=J;break}n.offset=ve,n.extra=15&ge,n.mode=W;case W:if(n.extra){for(xe=n.extra;oe<xe;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}n.offset+=ae&(1<<n.extra)-1,ae>>>=n.extra,oe-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=J;break}n.mode=q;case q:if(0===ie)break e;if(ue=ce-ie,n.offset>ue){if((ue=n.offset-ue)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=J;break}ue>n.wnext?(ue-=n.wnext,de=n.wsize-ue):de=n.wnext-ue,ue>n.length&&(ue=n.length),he=n.window}else he=ee,de=re-n.offset,ue=n.length;ue>ie&&(ue=ie),ie-=ue,n.length-=ue;do{ee[re++]=he[de++]}while(--ue);0===n.length&&(n.mode=G);break;case Z:if(0===ie)break e;ee[re++]=n.length,ie--,n.mode=G;break;case K:if(n.wrap){for(;oe<32;){if(0===se)break e;se--,ae|=$[te++]<<oe,oe+=8}if(ce-=ie,e.total_out+=ce,n.total+=ce,ce&&(e.adler=n.check=n.flags?i(n.check,ee,ce,re-ce):s(n.check,ee,ce,re-ce)),ce=ie,(n.flags?ae:ne(ae))!==n.check){e.msg="incorrect data check",n.mode=J;break}ae=0,oe=0}n.mode=Y;case Y:if(n.wrap&&n.flags){for(;oe<32;){if(0===se)break e;se--,ae+=$[te++]<<oe,oe+=8}if(ae!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=J;break}ae=0,oe=0}n.mode=X;case X:Ee=f;break e;case J:Ee=y;break e;case Q:return b;default:return v}return e.next_out=re,e.avail_out=ie,e.next_in=te,e.avail_in=se,n.hold=ae,n.bits=oe,(n.wsize||ce!==e.avail_out&&n.mode<J&&(n.mode<K||t!==d))&&pe(e,e.output,e.next_out,ce-e.avail_out)?(n.mode=Q,b):(le-=e.avail_in,ce-=e.avail_out,e.total_in+=le,e.total_out+=ce,n.total+=ce,n.wrap&&ce&&(e.adler=n.check=n.flags?i(n.check,ee,ce,e.next_out-ce):s(n.check,ee,ce,e.next_out-ce)),e.data_type=n.bits+(n.last?64:0)+(n.mode===N?128:0)+(n.mode===H||n.mode===R?256:0),(0===le&&0===ce||t===d)&&Ee===h&&(Ee=w),Ee)}function fe(e){if(!e||!e.state)return v;var t=e.state;return t.window&&(t.window=null),e.state=null,h}function ge(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?v:(n.head=t,t.done=!1,h):v}function ve(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==M?v:n.mode===M&&s(1,t,r,0)!==n.check?y:pe(e,t,r,r)?(n.mode=Q,b):(n.havedict=1,h):v}n.inflateReset=ie,n.inflateReset2=ae,n.inflateResetKeep=se,n.inflateInit=le,n.inflateInit2=oe,n.inflate=he,n.inflateEnd=fe,n.inflateGetHeader=ge,n.inflateSetDictionary=ve,n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){"use strict";var r=e("../utils/common"),s=15,i=852,a=592,o=0,l=1,c=2,u=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,h,f,g,v,y){var b,w,_,E,S,x,C,k,P,I=y.bits,T=0,O=0,A=0,M=0,N=0,F=0,V=0,R=0,B=0,D=0,L=null,z=0,H=new r.Buf16(s+1),G=new r.Buf16(s+1),U=null,j=0;for(T=0;T<=s;T++)H[T]=0;for(O=0;O<h;O++)H[t[n+O]]++;for(N=I,M=s;M>=1&&0===H[M];M--);if(N>M&&(N=M),0===M)return f[g++]=20971520,f[g++]=20971520,y.bits=1,0;for(A=1;A<M&&0===H[A];A++);for(N<A&&(N=A),R=1,T=1;T<=s;T++)if(R<<=1,(R-=H[T])<0)return-1;if(R>0&&(e===o||1!==M))return-1;for(G[1]=0,T=1;T<s;T++)G[T+1]=G[T]+H[T];for(O=0;O<h;O++)0!==t[n+O]&&(v[G[t[n+O]]++]=O);if(e===o?(L=U=v,x=19):e===l?(L=u,z-=257,U=d,j-=257,x=256):(L=m,U=p,x=-1),D=0,O=0,T=A,S=g,F=N,V=0,_=-1,E=(B=1<<N)-1,e===l&&B>i||e===c&&B>a)return 1;for(;;){C=T-V,v[O]<x?(k=0,P=v[O]):v[O]>x?(k=U[j+v[O]],P=L[z+v[O]]):(k=96,P=0),b=1<<T-V,A=w=1<<F;do{f[S+(D>>V)+(w-=b)]=C<<24|k<<16|P|0}while(0!==w);for(b=1<<T-1;D&b;)b>>=1;if(0!==b?(D&=b-1,D+=b):D=0,O++,0==--H[T]){if(T===M)break;T=t[n+v[O]]}if(T>N&&(D&E)!==_){for(0===V&&(V=N),S+=A,R=1<<(F=T-V);F+V<M&&!((R-=H[F+V])<=0);)F++,R<<=1;if(B+=1<<F,e===l&&B>i||e===c&&B>a)return 1;f[_=D&E]=N<<24|F<<16|S-g|0}}return 0!==D&&(f[S+D]=T-V<<24|64<<16|0),y.bits=N,0}},{"../utils/common":1}],10:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){"use strict";function r(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=r},{}],"/lib/inflate.js":[function(e,t,n){"use strict";var r=e("./zlib/inflate"),s=e("./utils/common"),i=e("./utils/strings"),a=e("./zlib/constants"),o=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(o[n]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(o[n])}function m(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}function p(e,t){return(t=t||{}).raw=!0,m(e,t)}d.prototype.push=function(e,t){var n,o,l,c,d,m=this.strm,p=this.options.chunkSize,h=this.options.dictionary,f=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?m.input=i.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?m.input=new Uint8Array(e):m.input=e,m.next_in=0,m.avail_in=m.input.length;do{if(0===m.avail_out&&(m.output=new s.Buf8(p),m.next_out=0,m.avail_out=p),(n=r.inflate(m,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&h&&(n=r.inflateSetDictionary(this.strm,h)),n===a.Z_BUF_ERROR&&!0===f&&(n=a.Z_OK,f=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&n!==a.Z_STREAM_END&&(0!==m.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=i.utf8border(m.output,m.next_out),c=m.next_out-l,d=i.buf2string(m.output,l),m.next_out=c,m.avail_out=p-c,c&&s.arraySet(m.output,m.output,l,c,0),this.onData(d)):this.onData(s.shrinkBuf(m.output,m.next_out)))),0===m.avail_in&&0===m.avail_out&&(f=!0)}while((m.avail_in>0||0===m.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=m,n.inflateRaw=p,n.ungzip=m},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")},8572:e=>{e.exports=function(){function e(t,n,r){function s(a,o){if(!n[a]){if(!t[a]){if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return s(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i=void 0,a=0;a<r.length;a++)s(r[a]);return s}return e}()({1:[function(e,t,n){var r=4096,s=2*r+32,i=2*r-1,a=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function o(e){this.buf_=new Uint8Array(s),this.input_=e,this.reset()}o.READ_SIZE=r,o.IBUF_MASK=i,o.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},o.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,t=this.input_.read(this.buf_,e,r);if(t<0)throw new Error("Unexpected end of input");if(t<r){this.eos_=1;for(var n=0;n<32;n++)this.buf_[e+t+n]=0}if(0===e){for(n=0;n<32;n++)this.buf_[(r<<1)+n]=this.buf_[n];this.buf_ptr_=r}else this.buf_ptr_=0;this.bit_end_pos_+=t<<3}},o.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&i]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},o.prototype.readBits=function(e){32-this.bit_pos_<e&&this.fillBitWindow();var t=this.val_>>>this.bit_pos_&a[e];return this.bit_pos_+=e,t},t.exports=o},{}],2:[function(e,t,n){n.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(e,t,n){var r=e("./streams").BrotliInput,s=e("./streams").BrotliOutput,i=e("./bit_reader"),a=e("./dictionary"),o=e("./huffman").HuffmanCode,l=e("./huffman").BrotliBuildHuffmanTable,c=e("./context"),u=e("./prefix"),d=e("./transform"),m=8,p=16,h=256,f=704,g=26,v=6,y=2,b=8,w=255,_=1080,E=18,S=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),x=16,C=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),k=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),P=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function I(e){var t;return 0===e.readBits(1)?16:(t=e.readBits(3))>0?17+t:(t=e.readBits(3))>0?8+t:17}function T(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<<t)}return 0}function O(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function A(e){var t,n,r,s=new O;if(s.input_end=e.readBits(1),s.input_end&&e.readBits(1))return s;if(7===(t=e.readBits(2)+4)){if(s.is_metadata=!0,0!==e.readBits(1))throw new Error("Invalid reserved bit");if(0===(n=e.readBits(2)))return s;for(r=0;r<n;r++){var i=e.readBits(8);if(r+1===n&&n>1&&0===i)throw new Error("Invalid size byte");s.meta_block_length|=i<<8*r}}else for(r=0;r<t;++r){var a=e.readBits(4);if(r+1===t&&t>4&&0===a)throw new Error("Invalid size nibble");s.meta_block_length|=a<<4*r}return++s.meta_block_length,s.input_end||s.is_metadata||(s.is_uncompressed=e.readBits(1)),s}function M(e,t,n){var r;return n.fillBitWindow(),(r=e[t+=n.val_>>>n.bit_pos_&w].bits-b)>0&&(n.bit_pos_+=b,t+=e[t].value,t+=n.val_>>>n.bit_pos_&(1<<r)-1),n.bit_pos_+=e[t].bits,e[t].value}function N(e,t,n,r){for(var s=0,i=m,a=0,c=0,u=32768,d=[],h=0;h<32;h++)d.push(new o(0,0));for(l(d,0,5,e,E);s<t&&u>0;){var f,g=0;if(r.readMoreInput(),r.fillBitWindow(),g+=r.val_>>>r.bit_pos_&31,r.bit_pos_+=d[g].bits,(f=255&d[g].value)<p)a=0,n[s++]=f,0!==f&&(i=f,u-=32768>>f);else{var v,y,b=f-14,w=0;if(f===p&&(w=i),c!==w&&(a=0,c=w),v=a,a>0&&(a-=2,a<<=b),s+(y=(a+=r.readBits(b)+3)-v)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var _=0;_<y;_++)n[s+_]=c;s+=y,0!==c&&(u-=y<<15-c)}}if(0!==u)throw new Error("[ReadHuffmanCodeLengths] space = "+u);for(;s<t;s++)n[s]=0}function F(e,t,n,r){var s,i=0,a=new Uint8Array(e);if(r.readMoreInput(),1===(s=r.readBits(2))){for(var c=e-1,u=0,d=new Int32Array(4),m=r.readBits(2)+1;c;)c>>=1,++u;for(p=0;p<m;++p)d[p]=r.readBits(u)%e,a[d[p]]=2;switch(a[d[0]]=1,m){case 1:break;case 3:if(d[0]===d[1]||d[0]===d[2]||d[1]===d[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(d[0]===d[1])throw new Error("[ReadHuffmanCode] invalid symbols");a[d[1]]=1;break;case 4:if(d[0]===d[1]||d[0]===d[2]||d[0]===d[3]||d[1]===d[2]||d[1]===d[3]||d[2]===d[3])throw new Error("[ReadHuffmanCode] invalid symbols");r.readBits(1)?(a[d[2]]=3,a[d[3]]=3):a[d[0]]=2}}else{var p,h=new Uint8Array(E),f=32,g=0,v=[new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,1),new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,5)];for(p=s;p<E&&f>0;++p){var y,w=S[p],_=0;r.fillBitWindow(),_+=r.val_>>>r.bit_pos_&15,r.bit_pos_+=v[_].bits,y=v[_].value,h[w]=y,0!==y&&(f-=32>>y,++g)}if(1!==g&&0!==f)throw new Error("[ReadHuffmanCode] invalid num_codes or space");N(h,e,a,r)}if(0===(i=l(t,n,b,a,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return i}function V(e,t,n){var r,s;return r=M(e,t,n),s=u.kBlockLengthPrefixCode[r].nbits,u.kBlockLengthPrefixCode[r].offset+n.readBits(s)}function R(e,t,n){var r;return e<x?(n+=C[e],r=t[n&=3]+k[e]):r=e-x+1,r}function B(e,t){for(var n=e[t],r=t;r;--r)e[r]=e[r-1];e[0]=n}function D(e,t){var n,r=new Uint8Array(256);for(n=0;n<256;++n)r[n]=n;for(n=0;n<t;++n){var s=e[n];e[n]=r[s],s&&B(r,s)}}function L(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*P[e+31>>>5]),this.htrees=new Uint32Array(t)}function z(e,t){var n,r,s={num_htrees:null,context_map:null},i=0;t.readMoreInput();var a=s.num_htrees=T(t)+1,l=s.context_map=new Uint8Array(e);if(a<=1)return s;for(t.readBits(1)&&(i=t.readBits(4)+1),n=[],r=0;r<_;r++)n[r]=new o(0,0);for(F(a+i,n,0,t),r=0;r<e;){var c;if(t.readMoreInput(),0===(c=M(n,0,t)))l[r]=0,++r;else if(c<=i)for(var u=1+(1<<c)+t.readBits(c);--u;){if(r>=e)throw new Error("[DecodeContextMap] i >= context_map_size");l[r]=0,++r}else l[r]=c-i,++r}return t.readBits(1)&&D(l,e),s}function H(e,t,n,r,s,i,a){var o,l=2*n,c=n,u=M(t,n*_,a);(o=0===u?s[l+(1&i[c])]:1===u?s[l+(i[c]-1&1)]+1:u-2)>=e&&(o-=e),r[n]=o,s[l+(1&i[c])]=o,++i[c]}function G(e,t,n,r,s,a){var o,l=s+1,c=n&s,u=a.pos_&i.IBUF_MASK;if(t<8||a.bit_pos_+(t<<3)<a.bit_end_pos_)for(;t-- >0;)a.readMoreInput(),r[c++]=a.readBits(8),c===l&&(e.write(r,l),c=0);else{if(a.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;a.bit_pos_<32;)r[c]=a.val_>>>a.bit_pos_,a.bit_pos_+=8,++c,--t;if(u+(o=a.bit_end_pos_-a.bit_pos_>>3)>i.IBUF_MASK){for(var d=i.IBUF_MASK+1-u,m=0;m<d;m++)r[c+m]=a.buf_[u+m];o-=d,c+=d,t-=d,u=0}for(m=0;m<o;m++)r[c+m]=a.buf_[u+m];if(t-=o,(c+=o)>=l)for(e.write(r,l),c-=l,m=0;m<c;m++)r[m]=r[l+m];for(;c+t>=l;){if(o=l-c,a.input_.read(r,c,o)<o)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(r,l),t-=o,c=0}if(a.input_.read(r,c,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");a.reset()}}function U(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function j(e){var t=new r(e),n=new i(t);return I(n),A(n).meta_block_length}function W(e,t){var n=new r(e);null==t&&(t=j(e));var i=new Uint8Array(t),a=new s(i);return q(n,a),a.pos<a.buffer.length&&(a.buffer=a.buffer.subarray(0,a.pos)),a.buffer}function q(e,t){var n,r,s,l,m,p,b,w,E,S=0,C=0,k=0,P=0,O=[16,15,11,4],N=0,B=0,D=0,j=[new L(0,0),new L(0,0),new L(0,0)],W=128+i.READ_SIZE;r=(1<<(k=I(E=new i(e))))-16,l=(s=1<<k)-1,m=new Uint8Array(s+W+a.maxDictionaryWordLength),p=s,b=[],w=[];for(var q=0;q<3*_;q++)b[q]=new o(0,0),w[q]=new o(0,0);for(;!C;){var Z,K,Y,X,J,Q,$,ee,te,ne=0,re=[1<<28,1<<28,1<<28],se=[0],ie=[1,1,1],ae=[0,1,0,1,0,1],oe=[0],le=null,ce=null,ue=null,de=null,me=0,pe=null,he=0,fe=0,ge=0;for(n=0;n<3;++n)j[n].codes=null,j[n].htrees=null;E.readMoreInput();var ve=A(E);if(S+(ne=ve.meta_block_length)>t.buffer.length){var ye=new Uint8Array(S+ne);ye.set(t.buffer),t.buffer=ye}if(C=ve.input_end,Z=ve.is_uncompressed,ve.is_metadata)for(U(E);ne>0;--ne)E.readMoreInput(),E.readBits(8);else if(0!==ne)if(Z)E.bit_pos_=E.bit_pos_+7&-8,G(t,ne,S,m,l,E),S+=ne;else{for(n=0;n<3;++n)ie[n]=T(E)+1,ie[n]>=2&&(F(ie[n]+2,b,n*_,E),F(g,w,n*_,E),re[n]=V(w,n*_,E),oe[n]=1);for(E.readMoreInput(),X=(1<<(K=E.readBits(2)))-1,J=(Y=x+(E.readBits(4)<<K))+(48<<K),ce=new Uint8Array(ie[0]),n=0;n<ie[0];++n)E.readMoreInput(),ce[n]=E.readBits(2)<<1;var be=z(ie[0]<<v,E);Q=be.num_htrees,le=be.context_map;var we=z(ie[2]<<y,E);for($=we.num_htrees,ue=we.context_map,j[0]=new L(h,Q),j[1]=new L(f,ie[1]),j[2]=new L(J,$),n=0;n<3;++n)j[n].decode(E);for(de=0,pe=0,ee=ce[se[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1],te=j[1].htrees[0];ne>0;){var _e,Ee,Se,xe,Ce,ke,Pe,Ie,Te,Oe,Ae,Me;for(E.readMoreInput(),0===re[1]&&(H(ie[1],b,1,se,ae,oe,E),re[1]=V(w,_,E),te=j[1].htrees[se[1]]),--re[1],(Ee=(_e=M(j[1].codes,te,E))>>6)>=2?(Ee-=2,Pe=-1):Pe=0,Se=u.kInsertRangeLut[Ee]+(_e>>3&7),xe=u.kCopyRangeLut[Ee]+(7&_e),Ce=u.kInsertLengthPrefixCode[Se].offset+E.readBits(u.kInsertLengthPrefixCode[Se].nbits),ke=u.kCopyLengthPrefixCode[xe].offset+E.readBits(u.kCopyLengthPrefixCode[xe].nbits),B=m[S-1&l],D=m[S-2&l],Te=0;Te<Ce;++Te)E.readMoreInput(),0===re[0]&&(H(ie[0],b,0,se,ae,oe,E),re[0]=V(w,0,E),de=se[0]<<v,ee=ce[se[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1]),me=le[de+(c.lookup[fe+B]|c.lookup[ge+D])],--re[0],D=B,B=M(j[0].codes,j[0].htrees[me],E),m[S&l]=B,(S&l)===l&&t.write(m,s),++S;if((ne-=Ce)<=0)break;if(Pe<0&&(E.readMoreInput(),0===re[2]&&(H(ie[2],b,2,se,ae,oe,E),re[2]=V(w,2*_,E),pe=se[2]<<y),--re[2],he=ue[pe+(255&(ke>4?3:ke-2))],(Pe=M(j[2].codes,j[2].htrees[he],E))>=Y&&(Me=(Pe-=Y)&X,Pe=Y+((Ne=(2+(1&(Pe>>=K))<<(Ae=1+(Pe>>1)))-4)+E.readBits(Ae)<<K)+Me)),(Ie=R(Pe,O,N))<0)throw new Error("[BrotliDecompress] invalid distance");if(Oe=S&l,Ie>(P=S<r&&P!==r?S:r)){if(!(ke>=a.minDictionaryWordLength&&ke<=a.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+S+" distance: "+Ie+" len: "+ke+" bytes left: "+ne);var Ne=a.offsetsByLength[ke],Fe=Ie-P-1,Ve=a.sizeBitsByLength[ke],Re=Fe>>Ve;if(Ne+=(Fe&(1<<Ve)-1)*ke,!(Re<d.kNumTransforms))throw new Error("Invalid backward reference. pos: "+S+" distance: "+Ie+" len: "+ke+" bytes left: "+ne);var Be=d.transformDictionaryWord(m,Oe,Ne,ke,Re);if(S+=Be,ne-=Be,(Oe+=Be)>=p){t.write(m,s);for(var De=0;De<Oe-p;De++)m[De]=m[p+De]}}else{if(Pe>0&&(O[3&N]=Ie,++N),ke>ne)throw new Error("Invalid backward reference. pos: "+S+" distance: "+Ie+" len: "+ke+" bytes left: "+ne);for(Te=0;Te<ke;++Te)m[S&l]=m[S-Ie&l],(S&l)===l&&t.write(m,s),++S,--ne}B=m[S-1&l],D=m[S-2&l]}S&=1073741823}}t.write(m,S&l)}L.prototype.decode=function(e){var t,n=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=n,n+=F(this.alphabet_size,this.codes,n,e)},n.BrotliDecompressedSize=j,n.BrotliDecompressBuffer=W,n.BrotliDecompress=q,a.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(e,t,n){var r=e("base64-js");n.init=function(){return(0,e("./decode").BrotliDecompressBuffer)(r.toByteArray(e("./dictionary.bin.js")))}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(e,t,n){t.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62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xUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(e,t,n){var r=e("./dictionary-browser");n.init=function(){n.dictionary=r.init()},n.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),n.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),n.minDictionaryWordLength=4,n.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(e,t,n){function r(e,t){this.bits=e,this.value=t}n.HuffmanCode=r;var s=15;function i(e,t){for(var n=1<<t-1;e&n;)n>>=1;return(e&n-1)+n}function a(e,t,n,s,i){do{e[t+(s-=n)]=new r(i.bits,i.value)}while(s>0)}function o(e,t,n){for(var r=1<<t-n;t<s&&!((r-=e[t])<=0);)++t,r<<=1;return t-n}n.BrotliBuildHuffmanTable=function(e,t,n,l,c){var u,d,m,p,h,f,g,v,y,b,w=t,_=new Int32Array(s+1),E=new Int32Array(s+1);for(b=new Int32Array(c),d=0;d<c;d++)_[l[d]]++;for(E[1]=0,u=1;u<s;u++)E[u+1]=E[u]+_[u];for(d=0;d<c;d++)0!==l[d]&&(b[E[l[d]]++]=d);if(y=v=1<<(g=n),1===E[s]){for(m=0;m<y;++m)e[t+m]=new r(0,65535&b[0]);return y}for(m=0,d=0,u=1,p=2;u<=n;++u,p<<=1)for(;_[u]>0;--_[u])a(e,t+m,p,v,new r(255&u,65535&b[d++])),m=i(m,u);for(f=y-1,h=-1,u=n+1,p=2;u<=s;++u,p<<=1)for(;_[u]>0;--_[u])(m&f)!==h&&(t+=v,y+=v=1<<(g=o(_,u,n)),e[w+(h=m&f)]=new r(g+n&255,t-w-h&65535)),a(e,t+(m>>n),p,v,new r(u-n&255,65535&b[d++])),m=i(m,u);return y}},{}],8:[function(e,t,n){"use strict";n.byteLength=u,n.toByteArray=m,n.fromByteArray=f;for(var r=[],s=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=a.length;o<l;++o)r[o]=a[o],s[a.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r}function d(e,t,n){return 3*(t+n)/4-n}function m(e){for(var t,n=c(e),r=n[0],a=n[1],o=new i(d(e,r,a)),l=0,u=a>0?r-4:r,m=0;m<u;m+=4)t=s[e.charCodeAt(m)]<<18|s[e.charCodeAt(m+1)]<<12|s[e.charCodeAt(m+2)]<<6|s[e.charCodeAt(m+3)],o[l++]=t>>16&255,o[l++]=t>>8&255,o[l++]=255&t;return 2===a&&(t=s[e.charCodeAt(m)]<<2|s[e.charCodeAt(m+1)]>>4,o[l++]=255&t),1===a&&(t=s[e.charCodeAt(m)]<<10|s[e.charCodeAt(m+1)]<<4|s[e.charCodeAt(m+2)]>>2,o[l++]=t>>8&255,o[l++]=255&t),o}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function h(e,t,n){for(var r,s=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),s.push(p(r));return s.join("")}function f(e){for(var t,n=e.length,s=n%3,i=[],a=16383,o=0,l=n-s;o<l;o+=a)i.push(h(e,o,o+a>l?l:o+a));return 1===s?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===s&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){function r(e,t){this.offset=e,this.nbits=t}n.kBlockLengthPrefixCode=[new r(1,2),new r(5,2),new r(9,2),new r(13,2),new r(17,3),new r(25,3),new r(33,3),new r(41,3),new r(49,4),new r(65,4),new r(81,4),new r(97,4),new r(113,5),new r(145,5),new r(177,5),new r(209,5),new r(241,6),new r(305,6),new r(369,7),new r(497,8),new r(753,9),new r(1265,10),new r(2289,11),new r(4337,12),new r(8433,13),new r(16625,24)],n.kInsertLengthPrefixCode=[new r(0,0),new r(1,0),new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,1),new r(8,1),new r(10,2),new r(14,2),new r(18,3),new r(26,3),new r(34,4),new r(50,4),new r(66,5),new r(98,5),new r(130,6),new r(194,7),new r(322,8),new r(578,9),new r(1090,10),new r(2114,12),new r(6210,14),new r(22594,24)],n.kCopyLengthPrefixCode=[new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,0),new r(7,0),new r(8,0),new r(9,0),new r(10,1),new r(12,1),new r(14,2),new r(18,2),new r(22,3),new r(30,3),new r(38,4),new r(54,4),new r(70,5),new r(102,5),new r(134,6),new r(198,7),new r(326,8),new r(582,9),new r(1094,10),new r(2118,24)],n.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],n.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(e,t,n){function r(e){this.buffer=e,this.pos=0}function s(e){this.buffer=e,this.pos=0}r.prototype.read=function(e,t,n){this.pos+n>this.buffer.length&&(n=this.buffer.length-this.pos);for(var r=0;r<n;r++)e[t+r]=this.buffer[this.pos+r];return this.pos+=n,n},n.BrotliInput=r,s.prototype.write=function(e,t){if(this.pos+t>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,t),this.pos),this.pos+=t,t},n.BrotliOutput=s},{}],11:[function(e,t,n){var r=e("./dictionary"),s=0,i=1,a=2,o=3,l=4,c=5,u=6,d=7,m=8,p=9,h=10,f=11,g=12,v=13,y=14,b=15,w=16,_=17,E=18,S=20;function x(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(var r=0;r<e.length;r++)this.prefix[r]=e.charCodeAt(r);for(r=0;r<n.length;r++)this.suffix[r]=n.charCodeAt(r)}var C=[new x("",s,""),new x("",s," "),new x(" ",s," "),new x("",g,""),new x("",h," "),new x("",s," the "),new x(" ",s,""),new x("s ",s," "),new x("",s," of "),new x("",h,""),new x("",s," and "),new x("",v,""),new x("",i,""),new x(", ",s," "),new x("",s,", "),new x(" ",h," "),new x("",s," in "),new x("",s," to "),new x("e ",s," "),new x("",s,'"'),new x("",s,"."),new x("",s,'">'),new x("",s,"\n"),new x("",o,""),new x("",s,"]"),new x("",s," for "),new x("",y,""),new x("",a,""),new x("",s," a "),new x("",s," that "),new x(" ",h,""),new x("",s,". "),new x(".",s,""),new x(" ",s,", "),new x("",b,""),new x("",s," with "),new x("",s,"'"),new x("",s," from "),new x("",s," by "),new x("",w,""),new x("",_,""),new x(" the ",s,""),new x("",l,""),new x("",s,". The "),new x("",f,""),new x("",s," on "),new x("",s," as "),new x("",s," is "),new x("",d,""),new x("",i,"ing "),new x("",s,"\n\t"),new x("",s,":"),new x(" ",s,". "),new x("",s,"ed "),new x("",S,""),new x("",E,""),new x("",u,""),new x("",s,"("),new x("",h,", "),new x("",m,""),new x("",s," at "),new x("",s,"ly "),new x(" the ",s," of "),new x("",c,""),new x("",p,""),new x(" ",h,", "),new x("",h,'"'),new x(".",s,"("),new x("",f," "),new x("",h,'">'),new x("",s,'="'),new x(" ",s,"."),new x(".com/",s,""),new x(" the ",s," of the "),new x("",h,"'"),new x("",s,". This "),new x("",s,","),new x(".",s," "),new x("",h,"("),new x("",h,"."),new x("",s," not "),new x(" ",s,'="'),new x("",s,"er "),new x(" ",f," "),new x("",s,"al "),new x(" ",f,""),new x("",s,"='"),new x("",f,'"'),new x("",h,". "),new x(" ",s,"("),new x("",s,"ful "),new x(" ",h,". "),new x("",s,"ive "),new x("",s,"less "),new x("",f,"'"),new x("",s,"est "),new x(" ",h,"."),new x("",f,'">'),new x(" ",s,"='"),new x("",h,","),new x("",s,"ize "),new x("",f,"."),new x("Â ",s,""),new x(" ",s,","),new x("",h,'="'),new x("",f,'="'),new x("",s,"ous "),new x("",f,", "),new x("",h,"='"),new x(" ",h,","),new x(" ",f,'="'),new x(" ",f,", "),new x("",f,","),new x("",f,"("),new x("",f,". "),new x(" ",f,"."),new x("",f,"='"),new x(" ",f,". "),new x(" ",h,'="'),new x(" ",f,"='"),new x(" ",h,"='")];function k(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}n.kTransforms=C,n.kNumTransforms=C.length,n.transformDictionaryWord=function(e,t,n,s,i){var a,o=C[i].prefix,l=C[i].suffix,c=C[i].transform,u=c<g?0:c-(g-1),d=0,m=t;u>s&&(u=s);for(var v=0;v<o.length;)e[t++]=o[v++];for(n+=u,s-=u,c<=p&&(s-=c),d=0;d<s;d++)e[t++]=r.dictionary[n+d];if(a=t-s,c===h)k(e,a);else if(c===f)for(;s>0;){var y=k(e,a);a+=y,s-=y}for(var b=0;b<l.length;)e[t++]=l[b++];return t-m}},{"./dictionary":6}],12:[function(e,t,n){t.exports=e("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)},4306:function(e,t){var n,r,s;
|
||
/*!
|
||
autosize 4.0.4
|
||
license: MIT
|
||
http://www.jacklmoore.com/autosize
|
||
*/r=[e,t],n=function(e,t){"use strict";var n,r,s="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function a(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!s.has(e)){var t=null,n=null,r=null,a=function(){e.clientWidth!==n&&m()},o=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",m,!1),e.removeEventListener("keyup",m,!1),e.removeEventListener("autosize:destroy",o,!1),e.removeEventListener("autosize:update",m,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),s.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",o,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",m,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",m,!1),e.addEventListener("autosize:update",m,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",s.set(e,{destroy:o,update:m}),l()}function l(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),m()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function d(){if(0!==e.scrollHeight){var r=u(e),s=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),s&&(document.documentElement.scrollTop=s)}}function m(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),s="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(s<t?"hidden"===n.overflowY&&(c("scroll"),d(),s="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),d(),s="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),r!==s){r=s;var a=i("autosize:resized");try{e.dispatchEvent(a)}catch(e){}}}}function o(e){var t=s.get(e);t&&t.destroy()}function l(e){var t=s.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return a(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(s="function"==typeof n?n.apply(t,r):n)||(e.exports=s)},6109:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},461:(e,t,n)=>{var r=n(6109);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var s=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),s?e.style.lineHeight=s:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,a=document.createElement(i);a.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&a.setAttribute("rows","1");var o=r(e,"font-size");a.style.fontSize=o,a.style.padding="0px",a.style.border="0px";var l=document.body;l.appendChild(a),n=a.offsetHeight,l.removeChild(a)}return n}},628:(e,t,n)=>{"use strict";var r=n(4067);function s(){}function i(){}i.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,i,a){if(a!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:s};return n.PropTypes=n,n}},5826:(e,t,n)=>{e.exports=n(628)()},4067:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4462:function(e,t,n){"use strict";var r,s=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&(n[r[s]]=e[r[s]])}return n};t.__esModule=!0;var o=n(1609),l=n(5826),c=n(4306),u=n(461),d="autosize:resized",m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return s(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),s=(t.innerRef,t.children),l=a(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return o.createElement("textarea",i({},l,{onChange:this.onChange,style:u?i({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),s)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(o.Component);t.TextareaAutosize=o.forwardRef((function(e,t){return o.createElement(m,i({},e,{innerRef:t}))}))},4132:(e,t,n)=>{"use strict";var r=n(4462);t.A=r.TextareaAutosize},3394:(e,t,n)=>{"use strict";var r=n(1609),s=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};
|
||
/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:s,type:e,key:c,ref:u,props:i,_owner:o.current}}t.jsx=c},4922:(e,t,n)=>{"use strict";e.exports=n(3394)},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u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",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),r=new RegExp(n,"g"),s=new RegExp(n,"");function i(e){return t[e]}var a=function(e){return e.replace(r,i)};e.exports=a,e.exports.has=function(e){return!!e.match(s)},e.exports.remove=a},8477:(e,t,n)=>{"use strict";
|
||
/**
|
||
* @license React
|
||
* use-sync-external-store-shim.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r=n(1609);var s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,o=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!s(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),s=r[0].inst,u=r[1];return o((function(){s.value=n,s.getSnapshot=t,c(s)&&u({inst:s})}),[e,n,t]),a((function(){return c(s)&&u({inst:s}),e((function(){c(s)&&u({inst:s})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},422:(e,t,n)=>{"use strict";e.exports=n(8477)},1609:e=>{"use strict";e.exports=window.React}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e].call(i.exports,i,i.exports,s),i.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);s.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,s.d(i,a),i},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";s.r(i),s.d(i,{PluginMoreMenuItem:()=>HP,PluginSidebar:()=>GP,PluginSidebarMoreMenuItem:()=>UP,PluginTemplateSettingPanel:()=>si,initializeEditor:()=>jP,reinitializeEditor:()=>WP,store:()=>tn});var e={};s.r(e),s.d(e,{__experimentalSetPreviewDeviceType:()=>at,addTemplate:()=>lt,closeGeneralSidebar:()=>Ct,openGeneralSidebar:()=>xt,openNavigationPanelToMenu:()=>vt,removeTemplate:()=>ct,revertTemplate:()=>St,setEditedEntity:()=>mt,setEditedPostContext:()=>ht,setHasPageContentFocus:()=>Pt,setHomeTemplateId:()=>pt,setIsInserterOpened:()=>bt,setIsListViewOpened:()=>wt,setIsNavigationPanelOpened:()=>yt,setIsSaveViewOpened:()=>Et,setNavigationMenu:()=>dt,setNavigationPanelActiveMenu:()=>gt,setPage:()=>ft,setTemplate:()=>ot,setTemplatePart:()=>ut,switchEditorMode:()=>kt,toggleDistractionFree:()=>It,toggleFeature:()=>it,updateSettings:()=>_t});var t={};s.r(t),s.d(t,{setCanvasMode:()=>Tt,setEditorCanvasContainerView:()=>Ot});var n={};s.r(n),s.d(n,{__experimentalGetInsertionPoint:()=>Gt,__experimentalGetPreviewDeviceType:()=>Mt,getCanUserCreateMedia:()=>Nt,getCurrentTemplateNavigationPanelSubMenu:()=>Zt,getCurrentTemplateTemplateParts:()=>Wt,getEditedPostContext:()=>Lt,getEditedPostId:()=>Dt,getEditedPostType:()=>Bt,getEditorMode:()=>qt,getHomeTemplateId:()=>Rt,getNavigationPanelActiveMenu:()=>Kt,getPage:()=>zt,getReusableBlocks:()=>Ft,getSettings:()=>Vt,hasPageContentFocus:()=>Jt,isFeatureActive:()=>At,isInserterOpened:()=>Ht,isListViewOpened:()=>Ut,isNavigationOpened:()=>Yt,isPage:()=>Xt,isSaveViewOpened:()=>jt});var r={};s.r(r),s.d(r,{getCanvasMode:()=>Qt,getEditorCanvasContainerView:()=>$t});var a=s(1609),o=s.t(a,2);const l=window.wp.blocks,c=window.wp.blockLibrary,u=window.wp.data,d=window.wp.deprecated;var m=s.n(d);const h=window.wp.element,f=window.wp.editor,g=window.wp.preferences,v=window.wp.widgets,y=window.wp.hooks,b=window.wp.mediaUtils;(0,y.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",(()=>b.MediaUpload));const w=window.wp.compose,_=window.wp.blockEditor,E=window.wp.components,S=window.wp.i18n,x=window.wp.notices,C=window.wp.coreData;var k={grad:.9,turn:360,rad:360/(2*Math.PI)},P=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},I=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},T=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},O=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},A=function(e){return{r:T(e.r,0,255),g:T(e.g,0,255),b:T(e.b,0,255),a:T(e.a)}},M=function(e){return{r:I(e.r),g:I(e.g),b:I(e.b),a:I(e.a,3)}},N=/^#([0-9a-f]{3,8})$/i,F=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},V=function(e){var t=e.r,n=e.g,r=e.b,s=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),o=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(o<0?o+6:o),s:i?a/i*100:0,v:i/255*100,a:s}},R=function(e){var t=e.h,n=e.s,r=e.v,s=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),o=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,o,a,a,l,r][c],g:255*[l,r,r,o,a,a][c],b:255*[a,a,l,r,r,o][c],a:s}},B=function(e){return{h:O(e.h),s:T(e.s,0,100),l:T(e.l,0,100),a:T(e.a)}},D=function(e){return{h:I(e.h),s:I(e.s),l:I(e.l),a:I(e.a,3)}},L=function(e){return R((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},z=function(e){return{h:(t=V(e)).h,s:(s=(200-(n=t.s))*(r=t.v)/100)>0&&s<200?n*r/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,n,r,s},H=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,G=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,U=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,j=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,W={string:[[function(e){var t=N.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?I(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?I(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=U.exec(e)||j.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:A({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=H.exec(e)||G.exec(e);if(!t)return null;var n,r,s=B({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(k[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return L(s)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,s=e.a,i=void 0===s?1:s;return P(t)&&P(n)&&P(r)?A({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,s=e.a,i=void 0===s?1:s;if(!P(t)||!P(n)||!P(r))return null;var a=B({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return L(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,s=e.a,i=void 0===s?1:s;if(!P(t)||!P(n)||!P(r))return null;var a=function(e){return{h:O(e.h),s:T(e.s,0,100),v:T(e.v,0,100),a:T(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return R(a)},"hsv"]]},q=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},Z=function(e){return"string"==typeof e?q(e.trim(),W.string):"object"==typeof e&&null!==e?q(e,W.object):[null,void 0]},K=function(e,t){var n=z(e);return{h:n.h,s:T(n.s+100*t,0,100),l:n.l,a:n.a}},Y=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},X=function(e,t){var n=z(e);return{h:n.h,s:n.s,l:T(n.l+100*t,0,100),a:n.a}},J=function(){function e(e){this.parsed=Z(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return I(Y(this.rgba),2)},e.prototype.isDark=function(){return Y(this.rgba)<.5},e.prototype.isLight=function(){return Y(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=M(this.rgba)).r,n=e.g,r=e.b,i=(s=e.a)<1?F(I(255*s)):"","#"+F(t)+F(n)+F(r)+i;var e,t,n,r,s,i},e.prototype.toRgb=function(){return M(this.rgba)},e.prototype.toRgbString=function(){return t=(e=M(this.rgba)).r,n=e.g,r=e.b,(s=e.a)<1?"rgba("+t+", "+n+", "+r+", "+s+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,s},e.prototype.toHsl=function(){return D(z(this.rgba))},e.prototype.toHslString=function(){return t=(e=D(z(this.rgba))).h,n=e.s,r=e.l,(s=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+s+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,s},e.prototype.toHsv=function(){return e=V(this.rgba),{h:I(e.h),s:I(e.s),v:I(e.v),a:I(e.a,3)};var e},e.prototype.invert=function(){return Q({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Q(K(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Q(K(this.rgba,-e))},e.prototype.grayscale=function(){return Q(K(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Q(X(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Q(X(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Q({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):I(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=z(this.rgba);return"number"==typeof e?Q({h:e,s:t.s,l:t.l,a:t.a}):I(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Q(e).toHex()},e}(),Q=function(e){return e instanceof J?e:new J(e)},$=[],ee=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},te=function(e){return.2126*ee(e.r)+.7152*ee(e.g)+.0722*ee(e.b)};function ne(e){return e?JSON.parse(JSON.stringify(e)):{}}const re=window.wp.privateApis,{lock:se,unlock:ie}=(0,re.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/edit-site"),{GlobalStylesContext:ae}=ie(_.privateApis),{mergeBaseAndUserConfigs:oe}=ie(f.privateApis);function le(e,t){if(!t||"string"!=typeof t)return e;if("object"!=typeof e||!e||!Object.keys(e).length)return e;for(const n in e)n===t?delete e[n]:"object"==typeof e[n]&&le(e[n],t);return e}function ce({property:e,filter:t}){const{variationsFromTheme:n}=(0,u.useSelect)((e=>({variationsFromTheme:e(C.store).__experimentalGetCurrentThemeGlobalStylesVariations()||[]})),[]),{user:r}=(0,h.useContext)(ae);return function({variations:e,property:t,filter:n,baseVariation:r}){return(0,h.useMemo)((()=>{if(!t||!e||0===e?.length)return e;const s="object"==typeof r&&Object.keys(r).length>0?ne(r):null;let i=e.reduce(((e,n)=>{const r=ue(ne(n),t);if(0===Object.keys(r).length)return e;let i={...r,title:n?.title,description:n?.description};s&&(i=oe(s,i));return e.some((e=>JSON.stringify(e.styles)===JSON.stringify(i?.styles)&&JSON.stringify(e.settings)===JSON.stringify(i?.settings)))||e.push(i),e}),[]);return"function"==typeof n&&(i=i.filter(n)),i}),[e,t,r,n])}({variations:(0,h.useMemo)((()=>[{title:(0,S.__)("Default"),settings:{},styles:{}},...n]),[n]),property:e,filter:t,baseVariation:le(ne(r),e)})}const ue=(e,t)=>{if(!e)return{};const n={};return Object.keys(e).forEach((r=>{if(r===t)n[r]=e[r];else if("object"==typeof e[r]){const s=ue(e[r],t);Object.keys(s).length&&(n[r]=s)}})),n};function de(e,t){const n=ue(ne(e),t);return JSON.stringify(n?.styles)===JSON.stringify(e?.styles)&&JSON.stringify(n?.settings)===JSON.stringify(e?.settings)}function me(e){return e?`is-style-${e}`:""}function pe(e,t){if(!Array.isArray(e)||!t)return null;const n=t.replace("var(","").replace(")",""),r=n?.split("--").slice(-1)[0];return e.find((e=>e.slug===r))}function he(e){const t=e?.settings?.typography?.fontFamilies?.theme,n=e?.styles?.typography?.fontFamily,r=pe(t,n),s=e?.styles?.elements?.heading?.typography?.fontFamily;let i;return i=s?pe(t,e?.styles?.elements?.heading?.typography?.fontFamily):r,[r,i]}const{mergeBaseAndUserConfigs:fe}=ie(f.privateApis),{useGlobalSetting:ge,useGlobalStyle:ve,GlobalStylesContext:ye}=ie(_.privateApis);function be(){const[e="black"]=ve("color.text"),[t="white"]=ve("color.background"),[n=e]=ve("elements.h1.color.text"),[r=n]=ve("elements.link.color.text"),[s=r]=ve("elements.button.color.background"),[i]=ge("color.palette.core"),[a]=ge("color.palette.theme"),[o]=ge("color.palette.custom"),l=(null!=a?a:[]).concat(null!=o?o:[]).concat(null!=i?i:[]),c=l.filter((({color:t})=>t===e)),u=l.filter((({color:e})=>e===s)),d=c.concat(u).concat(l).filter((({color:e})=>e!==t)).slice(0,2);return{paletteColors:l,highlightedColors:d}}function we(){const e=ce({property:"color"});return e?.length?e.filter((e=>{const{settings:t,styles:n,title:r}=e;return r===(0,S.__)("Default")||Object.keys(t).length>0||Object.keys(n).length>0})):[]}function _e(){const e=ce({property:"typography"}),{base:t}=(0,h.useContext)(ye);return e?.length?Object.values(e.reduce(((e,n)=>{const[r,s]=he(fe(t,n));return("Default"===n?.title||s?.name&&r?.name&&!e[`${s?.name}:${r?.name}`])&&(e[`${s?.name}:${r?.name}`]=n),e}),{})):[]}function Ee(e,t,n){return e&&"object"==typeof e?(t.reduce(((e,r,s)=>(void 0===e[r]&&(Number.isInteger(t[s+1])?e[r]=[]:e[r]={}),s===t.length-1&&(e[r]=n),e[r])),e),e):e}!function(e){e.forEach((function(e){$.indexOf(e)<0&&(e(J,W),$.push(e))}))}([function(e){e.prototype.luminance=function(){return e=te(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,s,i,a,o,l,c=t instanceof e?t:new e(t);return i=this.rgba,a=c.toRgb(),n=(o=te(i))>(l=te(a))?(o+.05)/(l+.05):(l+.05)/(o+.05),void 0===(r=2)&&(r=0),void 0===s&&(s=Math.pow(10,r)),Math.floor(s*n)/s+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(a=void 0===(i=(n=t).size)?"normal":i,"AAA"===(s=void 0===(r=n.level)?"AA":r)&&"normal"===a?7:"AA"===s&&"large"===a?3:4.5);var n,r,s,i,a}}]);const{cleanEmptyObject:Se,GlobalStylesContext:xe}=ie(_.privateApis),Ce={...l.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},ke={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},Pe={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},Ie=["border","color","spacing","typography"],Te=(e,t)=>{let n=e;return t.forEach((e=>{n=n?.[e]})),n},Oe=["borderColor","borderWidth","borderStyle"],Ae=["top","right","bottom","left"];function Me(e,t,n){if(!t?.[e]||n?.[e]?.style)return[];const{color:r,style:s,width:i}=t[e];return!(r||i)||s?[]:[{path:["border",e,"style"],value:"solid"}]}function Ne(e,t,n){const r=function(e,t){const{supportedPanels:n}=(0,u.useSelect)((n=>({supportedPanels:ie(n(l.store)).getSupportedStyles(e,t)})),[e,t]);return n}(e),s=n?.styles?.blocks?.[e];return(0,h.useMemo)((()=>{const e=r.flatMap((e=>{if(!Ce[e])return[];const{value:n}=Ce[e],r=n.join("."),s=t[Pe[r]],i=s?`var:preset|${ke[r]}|${s}`:Te(t.style,n);if("linkColor"===e){const e=i?[{path:n,value:i}]:[],r=["elements","link",":hover","color","text"],s=Te(t.style,r);return s&&e.push({path:r,value:s}),e}if(Oe.includes(e)&&i){const e=[{path:n,value:i}];return Ae.forEach((t=>{const r=[...n];r.splice(-1,0,t),e.push({path:r,value:i})})),e}return i?[{path:n,value:i}]:[]}));return function(e,t,n){if(!e&&!t)return[];const r=[...Me("top",e,n),...Me("right",e,n),...Me("bottom",e,n),...Me("left",e,n)],{color:s,style:i,width:a}=e||{};return(t||s||a)&&!i&&Ae.forEach((e=>{n?.[e]?.style||r.push({path:["border",e,"style"],value:"solid"})})),r}(t.style?.border,t.borderColor,s?.border).forEach((t=>e.push(t))),e}),[r,t,s])}function Fe({name:e,attributes:t,setAttributes:n}){const{user:r,setUserConfig:s}=(0,h.useContext)(xe),i=Ne(e,t,r),{__unstableMarkNextChangeAsNotPersistent:o}=(0,u.useDispatch)(_.store),{createSuccessNotice:c}=(0,u.useDispatch)(x.store),d=(0,h.useCallback)((()=>{if(0!==i.length&&i.length>0){const{style:a}=t,u=ne(a),d=ne(r);for(const{path:t,value:n}of i)Ee(u,t,void 0),Ee(d,["styles","blocks",e,...t],n);const m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:Se(u)};o(),n(m),s((()=>d),{undoIgnore:!0}),c((0,S.sprintf)((0,S.__)("%s styles applied."),(0,l.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,S.__)("Undo"),onClick(){o(),n(t),s((()=>r),{undoIgnore:!0})}}]})}}),[o,t,i,c,e,n,s,r]);return(0,a.createElement)(E.BaseControl,{className:"edit-site-push-changes-to-global-styles-control",help:(0,S.sprintf)((0,S.__)("Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks."),(0,l.getBlockType)(e).title)},(0,a.createElement)(E.BaseControl.VisualLabel,null,(0,S.__)("Styles")),(0,a.createElement)(E.Button,{variant:"primary",disabled:0===i.length,onClick:d},(0,S.__)("Apply globally")))}function Ve(e){const t=(0,_.useBlockEditingMode)(),n=(0,u.useSelect)((e=>e(C.store).getCurrentTheme()?.is_block_theme),[]),r=Ie.some((t=>(0,l.hasBlockSupport)(e.name,t)));return"default"===t&&r&&n?(0,a.createElement)(_.InspectorAdvancedControls,null,(0,a.createElement)(Fe,{...e})):null}const Re=(0,w.createHigherOrderComponent)((e=>t=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,{...t}),t.isSelected&&(0,a.createElement)(Ve,{...t}))));(0,y.addFilter)("editor.BlockEdit","core/edit-site/push-changes-to-global-styles",Re);const Be=(0,u.combineReducers)({settings:function(e={},t){return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},editedPost:function(e={},t){switch(t.type){case"SET_EDITED_POST":return{postType:t.postType,id:t.id,context:t.context};case"SET_EDITED_POST_CONTEXT":return{...e,context:t.context}}return e},saveViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_SAVE_VIEW_OPENED":return t.isOpen;case"SET_CANVAS_MODE":return!1}return e},canvasMode:function(e="init",t){return"SET_CANVAS_MODE"===t.type?t.mode:e},editorCanvasContainerView:function(e=void 0,t){return"SET_EDITOR_CANVAS_CONTAINER_VIEW"===t.type?t.view:e}}),De=window.wp.patterns,Le="wp_navigation",ze="wp_template",He="wp_template_part",Ge={custom:"custom",theme:"theme",plugin:"plugin"},Ue="uncategorized",je="all-parts",{PATTERN_TYPES:We,PATTERN_DEFAULT_CATEGORY:qe,PATTERN_USER_CATEGORY:Ze,EXCLUDED_PATTERN_SOURCES:Ke,PATTERN_SYNC_TYPES:Ye}=ie(De.privateApis),Xe=[He,Le,We.user],Je={[ze]:(0,S.__)("Template"),[He]:(0,S.__)("Template part"),[We.user]:(0,S.__)("Pattern"),[Le]:(0,S.__)("Navigation")},Qe="grid",$e="table",et="list",tt="is",nt="isAny",rt="isNone",{interfaceStore:st}=ie(f.privateApis);function it(e){return function({registry:t}){m()("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(g.store).toggle("core/edit-site",e)}}const at=e=>({registry:t})=>{m()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(f.store).setDeviceType(e)};function ot(){return m()("dispatch( 'core/edit-site' ).setTemplate",{since:"6.5",version:"6.8",hint:"The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}const lt=e=>async({dispatch:t,registry:n})=>{m()("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});const r=await n.dispatch(C.store).saveEntityRecord("postType",ze,e);e.content&&n.dispatch(C.store).editEntityRecord("postType",ze,r.id,{blocks:(0,l.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:ze,id:r.id})},ct=e=>({registry:t})=>ie(t.dispatch(f.store)).removeTemplates([e]);function ut(e){return{type:"SET_EDITED_POST",postType:He,id:e}}function dt(e){return{type:"SET_EDITED_POST",postType:Le,id:e}}function mt(e,t,n){return{type:"SET_EDITED_POST",postType:e,id:t,context:n}}function pt(){return m()("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function ht(e){return{type:"SET_EDITED_POST_CONTEXT",context:e}}function ft(){return m()("dispatch( 'core/edit-site' ).setPage",{since:"6.5",version:"6.8",hint:"The setPage is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}function gt(){return m()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function vt(){return m()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function yt(){return m()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}const bt=e=>({registry:t})=>{m()("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(f.store).setIsInserterOpened(e)},wt=e=>({registry:t})=>{m()("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(f.store).setIsListViewOpened(e)};function _t(e){return{type:"UPDATE_SETTINGS",settings:e}}function Et(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}const St=(e,t)=>({registry:n})=>ie(n.dispatch(f.store)).revertTemplate(e,t),xt=e=>({registry:t})=>{t.dispatch(st).enableComplementaryArea("core",e)},Ct=()=>({registry:e})=>{e.dispatch(st).disableComplementaryArea("core")},kt=e=>({registry:t})=>{m()("dispatch( 'core/edit-site' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(f.store).switchEditorMode(e)},Pt=e=>({dispatch:t,registry:n})=>{m()("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&n.dispatch(_.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},It=()=>({registry:e})=>{m()("dispatch( 'core/edit-site' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(f.store).toggleDistractionFree()},Tt=e=>({registry:t,dispatch:n})=>{const r=window.matchMedia("(min-width: 782px)").matches;t.dispatch(_.store).__unstableSetEditorMode("edit"),n({type:"SET_CANVAS_MODE",mode:e}),r&&"edit"===e&&t.select(g.store).get("core","showListViewByDefault")&&!t.select(g.store).get("core","distractionFree")?t.dispatch(f.store).setIsListViewOpened(!0):t.dispatch(f.store).setIsListViewOpened(!1),t.dispatch(f.store).setIsInserterOpened(!1)},Ot=e=>({dispatch:t})=>{t({type:"SET_EDITOR_CANVAS_CONTAINER_VIEW",view:e})},At=(0,u.createRegistrySelector)((e=>(t,n)=>(m()("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(g.store).get("core/edit-site",n)))),Mt=(0,u.createRegistrySelector)((e=>()=>(m()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(f.store).getDeviceType()))),Nt=(0,u.createRegistrySelector)((e=>()=>e(C.store).canUser("create","media"))),Ft=(0,u.createRegistrySelector)((e=>()=>{m()("select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )",{since:"6.5",version:"6.8"});return"web"===h.Platform.OS?e(C.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]}));function Vt(e){return e.settings}function Rt(){m()("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function Bt(e){return e.editedPost.postType}function Dt(e){return e.editedPost.id}function Lt(e){return e.editedPost.context}function zt(e){return{context:e.editedPost.context}}const Ht=(0,u.createRegistrySelector)((e=>()=>(m()("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(f.store).isInserterOpened()))),Gt=(0,u.createRegistrySelector)((e=>()=>(m()("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),ie(e(f.store)).getInsertionPoint()))),Ut=(0,u.createRegistrySelector)((e=>()=>(m()("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(f.store).isListViewOpened())));function jt(e){return e.saveViewPanel}const Wt=(0,u.createRegistrySelector)((e=>()=>ie(e(f.store)).getCurrentTemplateTemplateParts())),qt=(0,u.createRegistrySelector)((e=>()=>e(g.store).get("core","editorMode")));function Zt(){m()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function Kt(){m()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function Yt(){m()("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function Xt(e){return!!e.editedPost.context?.postId}function Jt(){return m()("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}function Qt(e){return e.canvasMode}function $t(e){return e.editorCanvasContainerView}const en={reducer:Be,actions:e,selectors:n},tn=(0,u.createReduxStore)("core/edit-site",en);(0,u.register)(tn),ie(tn).registerPrivateSelectors(r),ie(tn).registerPrivateActions(t);const nn=window.wp.plugins,rn=window.wp.router;function sn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=sn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const an=function(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=sn(e))&&(r&&(r+=" "),r+=t);return r},on=window.wp.keyboardShortcuts,ln=window.wp.commands,cn=window.wp.coreCommands;function un({text:e,children:t}){const n=(0,w.useCopyToClipboard)(e);return(0,a.createElement)(E.Button,{variant:"secondary",ref:n},t)}function dn({message:e,error:t}){const n=[(0,a.createElement)(un,{key:"copy-error",text:t.stack},(0,S.__)("Copy Error"))];return(0,a.createElement)(_.Warning,{className:"editor-error-boundary",actions:n},e)}class mn extends h.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,y.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,a.createElement)(dn,{message:(0,S.__)("The editor has encountered an unexpected error."),error:this.state.error}):this.props.children}}const{useLocation:pn}=ie(rn.privateApis),hn=[ze,He,Le,We.user];function fn(){const{params:e={}}=pn(),{postType:t,postId:n,context:r,isReady:s}=function({path:e,postId:t,postType:n}){const{hasLoadedAllDependencies:r,homepageId:s,postsPageId:i,url:a,frontPageTemplateId:o}=(0,u.useSelect)((e=>{const{getSite:t,getUnstableBase:n,getEntityRecords:r}=e(C.store),s=t(),i=n(),a=r("postType",ze,{per_page:-1}),o="page"===s?.show_on_front&&["number","string"].includes(typeof s.page_on_front)&&+s.page_on_front?s.page_on_front.toString():null,l="page"===s?.show_on_front&&["number","string"].includes(typeof s.page_for_posts)?s.page_for_posts.toString():null;let c;if(a){const e=a.find((e=>"front-page"===e.slug));c=!!e&&e.id}return{hasLoadedAllDependencies:!!i&&!!s,homepageId:o,postsPageId:l,url:i?.home,frontPageTemplateId:c}}),[]),l=(0,u.useSelect)((l=>{if(hn.includes(n))return;const{getEditedEntityRecord:c,getEntityRecords:u,getDefaultTemplateId:d,__experimentalGetTemplateForLink:m}=l(C.store);function p(e,t){if("page"===e&&s===t){if(void 0===o)return;if(o)return o}const n=c("postType",e,t);if(!n)return;if("page"===e&&i===t)return m(n.link)?.id;const r=n.template;if(r){const e=u("postType",ze,{per_page:-1})?.find((({slug:e})=>e===r));if(e)return e.id}let a;return a=n.slug?"page"===e?`${e}-${n.slug}`:`single-${e}-${n.slug}`:"page"===e?"page":`single-${e}`,d({slug:a})}if(r){if(n&&t)return p(n,t);if("/page"===e&&t)return p("page",t);if(s)return p("page",s);if(a){const e=m(a);return e?.id}}}),[s,i,r,a,t,n,e,o]),c=(0,h.useMemo)((()=>hn.includes(n)?{}:n&&t?{postType:n,postId:t}:"/page"===e&&t?{postType:"page",postId:t}:s?{postType:"page",postId:s}:{}),[s,n,t,e]);return"/wp_template"===e&&t?{isReady:!0,postType:"wp_template",postId:t,context:c}:hn.includes(n)?{isReady:!0,postType:n,postId:t,context:c}:r?{isReady:void 0!==l,postType:ze,postId:l,context:c}:{isReady:!1}}(e),{setEditedEntity:i}=(0,u.useDispatch)(tn);(0,h.useEffect)((()=>{s&&i(t,n,r)}),[s,t,n,r,i])}const gn=window.wp.htmlEntities,vn=window.wp.primitives,yn=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})),bn=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),wn=window.wp.keycodes,_n=window.wp.url,En=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(vn.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));const Sn=function({className:e}){const{isRequestingSite:t,siteIconUrl:n}=(0,u.useSelect)((e=>{const{getEntityRecord:t}=e(C.store),n=t("root","__unstableBase",void 0);return{isRequestingSite:!n,siteIconUrl:n?.site_icon_url}}),[]);if(t&&!n)return(0,a.createElement)("div",{className:"edit-site-site-icon__image"});const r=n?(0,a.createElement)("img",{className:"edit-site-site-icon__image",alt:(0,S.__)("Site Icon"),src:n}):(0,a.createElement)(E.Icon,{className:"edit-site-site-icon__icon",icon:En,size:48});return(0,a.createElement)("div",{className:an(e,"edit-site-site-icon")},r)},xn=(0,h.memo)((({isTransparent:e,className:t})=>{const{canvasMode:n,dashboardLink:r,homeUrl:s,siteTitle:i}=(0,u.useSelect)((e=>{const{getCanvasMode:t,getSettings:n}=ie(e(tn)),{getSite:r,getUnstableBase:s}=e(C.store),i=r();return{canvasMode:t(),dashboardLink:n().__experimentalDashboardLink||"index.php",homeUrl:s()?.home,siteTitle:!i?.title&&i?.url?(0,_n.filterURLForDisplay)(i?.url):i?.title}}),[]),{open:o}=(0,u.useDispatch)(ln.store),l=(0,w.useReducedMotion)(),{setCanvasMode:c}=ie((0,u.useDispatch)(tn)),{clearSelectedBlock:d}=(0,u.useDispatch)(_.store),{setDeviceType:m}=(0,u.useDispatch)(f.store),p="view"===n?{href:r,label:(0,S.__)("Go to the Dashboard")}:{href:r,role:"button",label:(0,S.__)("Open Navigation"),onClick:e=>{e.preventDefault(),"edit"===n&&(d(),m("Desktop"),c("view"))}};return(0,a.createElement)(E.__unstableMotion.div,{className:an("edit-site-site-hub",t),variants:{isDistractionFree:{x:"-100%"},isDistractionFreeHovering:{x:0},view:{x:0},edit:{x:0}},initial:!1,transition:{type:"tween",duration:l?0:.3,ease:"easeOut"}},(0,a.createElement)(E.__experimentalHStack,{justify:"flex-start",spacing:"0"},(0,a.createElement)(E.__unstableMotion.div,{className:an("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),layout:!0,transition:{type:"tween",duration:l?0:.3,ease:"easeOut"}},(0,a.createElement)(E.Button,{...p,className:"edit-site-layout__view-mode-toggle"},(0,a.createElement)(E.__unstableMotion.div,{initial:!1,animate:{scale:"view"===n?.5:1},whileHover:{scale:"view"===n?.5:.96},transition:{type:"tween",duration:l?0:.3,ease:"easeOut"}},(0,a.createElement)(Sn,{className:"edit-site-layout__view-mode-toggle-icon"})))),(0,a.createElement)(E.__unstableAnimatePresence,{initial:!1},"view"===n&&(0,a.createElement)(E.__experimentalHStack,{as:E.__unstableMotion.div,initial:{opacity:0},animate:{opacity:e?0:1},exit:{opacity:0},transition:{type:"tween",duration:l?0:.2,ease:"easeOut",delay:"view"===n?.1:0}},(0,a.createElement)("div",{className:"edit-site-site-hub__title"},(0,gn.decodeEntities)(i)),(0,a.createElement)(E.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions"},(0,a.createElement)(E.Button,{href:s,target:"_blank",label:(0,S.__)("View site (opens in a new tab)"),"aria-label":(0,S.__)("View site (opens in a new tab)"),icon:yn,className:"edit-site-site-hub__site-view-link"}),(0,a.createElement)(E.Button,{className:"edit-site-site-hub_toggle-command-center",icon:bn,onClick:()=>o(),label:(0,S.__)("Open command palette"),shortcut:wn.displayShortcut.primary("k")}))))))})),Cn=xn,kn={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},Pn=320,In=1300,Tn=9/19.5,On={width:"100%",height:"100%"};function An(e,t){const n=1-Math.max(0,Math.min(1,(e-Pn)/(In-Pn))),r=((e,t,n)=>e+(t-e)*n)(t,Tn,n);return e/r}const Mn=function e({isFullWidth:t,isOversized:n,setIsOversized:r,isReady:s,children:i,defaultSize:o,innerContentStyle:l}){const c=(0,w.useReducedMotion)(),[d,m]=(0,h.useState)(On),[p,f]=(0,h.useState)(),[g,v]=(0,h.useState)(!1),[y,b]=(0,h.useState)(!1),[_,x]=(0,h.useState)(1),C=(0,u.useSelect)((e=>ie(e(tn)).getCanvasMode()),[]),{setCanvasMode:k}=ie((0,u.useDispatch)(tn)),P={type:"tween",duration:g?0:.5},I=(0,h.useRef)(null),T=(0,w.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),O=o.width/o.height,A={default:{flexGrow:0,height:d.height},fullWidth:{flexGrow:1,height:d.height}},M=g?"active":y?"visible":"hidden";return(0,a.createElement)(E.ResizableBox,{as:E.__unstableMotion.div,ref:I,initial:!1,variants:A,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&m({width:"100%",height:"100%"})},whileHover:"view"===C?{scale:1.005,transition:{duration:c?0:.5,ease:"easeOut"}}:{},transition:P,size:d,enable:{top:!1,right:!1,bottom:!1,left:s,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:_,handleClasses:void 0,handleStyles:{left:kn,right:kn},minWidth:Pn,maxWidth:t?"100%":"150%",maxHeight:"100%",onFocus:()=>b(!0),onBlur:()=>b(!1),onMouseOver:()=>b(!0),onMouseOut:()=>b(!1),handleComponent:{left:"view"===C&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.Tooltip,{text:(0,S.__)("Drag to resize")},(0,a.createElement)(E.__unstableMotion.button,{key:"handle",role:"separator","aria-orientation":"vertical",className:an("edit-site-resizable-frame__handle",{"is-resizing":g}),variants:{hidden:{opacity:0,left:0},visible:{opacity:1,left:-14},active:{opacity:1,left:-14,scaleY:1.3}},animate:M,"aria-label":(0,S.__)("Drag to resize"),"aria-describedby":T,"aria-valuenow":I.current?.resizable?.offsetWidth||void 0,"aria-valuemin":Pn,"aria-valuemax":o.width,onKeyDown:e=>{if(!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const t=20*(e.shiftKey?5:1)*("ArrowLeft"===e.key?1:-1),n=Math.min(Math.max(Pn,I.current.resizable.offsetWidth+t),o.width);m({width:n,height:An(n,O)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"})),(0,a.createElement)("div",{hidden:!0,id:T},(0,S.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")))},onResizeStart:(e,t,n)=>{f(n.offsetWidth),v(!0)},onResize:(e,t,s,i)=>{const a=i.width/_,l=Math.abs(a),c=i.width<0?l:(o.width-p)/2,u=Math.min(l,c),d=0===l?0:u/l;x(1-d+2*d);const h=p+i.width;r(h>o.width),m({height:n?"100%":An(h,O)})},onResizeStop:(e,t,s)=>{if(v(!1),!n)return;r(!1);s.ownerDocument.documentElement.offsetWidth-s.offsetWidth>200?m(On):k("edit")},className:an("edit-site-resizable-frame__inner",{"is-resizing":g}),showHandle:!1},(0,a.createElement)("div",{className:"edit-site-resizable-frame__inner-content",style:l},i))},{useLocation:Nn,useHistory:Fn}=ie(rn.privateApis);function Vn(){return void 0!==(0,_n.getQueryArg)(window.location.href,"wp_theme_preview")}function Rn(){return Vn()?(0,_n.getQueryArg)(window.location.href,"wp_theme_preview"):null}const{useHistory:Bn,useLocation:Dn}=ie(rn.privateApis);const Ln=window.wp.apiFetch;var zn=s.n(Ln);const{EntitiesSavedStatesExtensible:Hn,NavigableRegion:Gn}=ie(f.privateApis),Un=({onClose:e})=>{var t,n;const r=(0,f.useEntitiesSavedStatesIsDirty)();let s;s=r.isDirty?(0,S.__)("Activate & Save"):(0,S.__)("Activate");const i=function(){const[e,t]=(0,h.useState)();return(0,h.useEffect)((()=>{const e=(0,_n.addQueryArgs)("/wp/v2/themes?status=active",{context:"edit",wp_theme_preview:""});zn()({path:e}).then((e=>t(e[0]))).catch((()=>{}))}),[]),e}(),o=(0,u.useSelect)((e=>e(C.store).getCurrentTheme()),[]),l=(0,a.createElement)("p",null,(0,S.sprintf)((0,S.__)("Saving your changes will change your active theme from %1$s to %2$s."),null!==(t=i?.name?.rendered)&&void 0!==t?t:"...",null!==(n=o?.name?.rendered)&&void 0!==n?n:"...")),c=function(){const e=Bn(),{params:t}=Dn(),{startResolution:n,finishResolution:r}=(0,u.useDispatch)(C.store);return async()=>{if(Vn()){const s="themes.php?action=activate&stylesheet="+Rn()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;n("activateTheme"),await window.fetch(s),r("activateTheme"),e.replace({...t,wp_theme_preview:void 0})}}}();return(0,a.createElement)(Hn,{...r,additionalPrompt:l,close:e,onSave:async e=>(await c(),e),saveEnabled:!0,saveLabel:s})},jn=({onClose:e,renderDialog:t})=>Vn()?(0,a.createElement)(Un,{onClose:e}):(0,a.createElement)(f.EntitiesSavedStates,{close:e,renderDialog:t});function Wn(){const{isSaveViewOpen:e,canvasMode:t,isDirty:n,isSaving:r}=(0,u.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n,isResolving:r}=e(C.store),s=t(),i=r("activateTheme"),{isSaveViewOpened:a,getCanvasMode:o}=ie(e(tn));return{isSaveViewOpen:a(),canvasMode:o(),isDirty:s.length>0,isSaving:s.some((e=>n(e.kind,e.name,e.key)))||i}}),[]),{setIsSaveViewOpened:s}=(0,u.useDispatch)(tn),i=()=>s(!1);if("view"===t)return e?(0,a.createElement)(E.Modal,{className:"edit-site-save-panel__modal",onRequestClose:i,__experimentalHideHeader:!0,contentLabel:(0,S.__)("Save site, content, and template changes")},(0,a.createElement)(jn,{onClose:i})):null;const o=Vn()||n,l=r||!o;return(0,a.createElement)(Gn,{className:an("edit-site-layout__actions",{"is-entity-save-view-open":e}),ariaLabel:(0,S.__)("Save panel")},(0,a.createElement)("div",{className:an("edit-site-editor__toggle-save-panel",{"screen-reader-text":e})},(0,a.createElement)(E.Button,{variant:"secondary",className:an("edit-site-editor__toggle-save-panel-button"),onClick:()=>s(!0),"aria-haspopup":"dialog",disabled:l,__experimentalIsFocusable:!0},(0,S.__)("Open save panel"))),e&&(0,a.createElement)(jn,{onClose:i,renderDialog:!0}))}const qn=function(){const{registerShortcut:e}=(0,u.useDispatch)(on.store);return(0,h.useEffect)((()=>{e({name:"core/edit-site/save",category:"global",description:(0,S.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}})}),[e]),null};const Zn=function(){const{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,u.useSelect)(C.store),{hasNonPostEntityChanges:n}=(0,u.useSelect)(f.store),{getCanvasMode:r}=ie((0,u.useSelect)(tn)),{setIsSaveViewOpened:s}=(0,u.useDispatch)(tn);return(0,on.useShortcut)("core/edit-site/save",(i=>{i.preventDefault();const a=e(),o=!!a.length,l=a.some((e=>t(e.kind,e.name,e.key))),c=n(),u="view"===r();(o&&c&&!l||u)&&s(!0)})),null},Kn=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"})),Yn=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})),Xn=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.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8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})),$n=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));function er({path:e,categoryType:t,categoryId:n},r){return["/wp_template","/pages"].includes(e)||"/patterns"===e&&(!r||!!t&&!!n)}const{useGlobalStylesReset:tr}=ie(_.privateApis),{useHistory:nr,useLocation:rr}=ie(rn.privateApis);function sr(){const{openGeneralSidebar:e,setCanvasMode:t}=ie((0,u.useDispatch)(tn)),{params:n}=rr(),r=!er(n,(0,w.useViewportMatch)("medium","<")),{getCanvasMode:s}=ie((0,u.useSelect)(tn)),i=nr(),a=(0,u.useSelect)((e=>e(C.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,h.useMemo)((()=>a?[{name:"core/edit-site/open-styles",label:(0,S.__)("Open styles"),callback:({close:n})=>{n(),r||i.push({path:"/wp_global_styles",canvas:"edit"}),r&&"edit"!==s()&&t("edit"),e("edit-site/global-styles")},icon:Kn}]:[]),[i,e,t,r,s,a])}}function ir(){const{openGeneralSidebar:e,setCanvasMode:t}=ie((0,u.useDispatch)(tn)),{params:n}=rr(),r=!er(n,(0,w.useViewportMatch)("medium","<")),{getCanvasMode:s}=ie((0,u.useSelect)(tn)),{set:i}=(0,u.useDispatch)(g.store),a=nr(),o=(0,u.useSelect)((e=>e(C.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,h.useMemo)((()=>o?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,S.__)("Learn about styles"),callback:({close:n})=>{n(),r||a.push({path:"/wp_global_styles",canvas:"edit"}),r&&"edit"!==s()&&t("edit"),e("edit-site/global-styles"),i("core/edit-site","welcomeGuideStyles",!0),setTimeout((()=>{i("core/edit-site","welcomeGuideStyles",!0)}),500)},icon:Yn}]:[]),[a,e,t,r,s,o,i])}}function ar(){const[e,t]=tr();return{isLoading:!1,commands:(0,h.useMemo)((()=>e?[{name:"core/edit-site/reset-global-styles",label:(0,S.__)("Reset styles"),icon:(0,S.isRTL)()?Xn:Jn,callback:({close:e})=>{e(),t()}}]:[]),[e,t])}}function or(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=ie((0,u.useDispatch)(tn)),{params:r}=rr(),s=!er(r,(0,w.useViewportMatch)("medium","<")),i=nr(),{canEditCSS:a}=(0,u.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(C.store),r=n(),s=r?t("root","globalStyles",r):void 0;return{canEditCSS:!!s?._links?.["wp:action-edit-css"]}}),[]),{getCanvasMode:o}=ie((0,u.useSelect)(tn));return{isLoading:!1,commands:(0,h.useMemo)((()=>a?[{name:"core/edit-site/open-styles-css",label:(0,S.__)("Customize CSS"),icon:Qn,callback:({close:r})=>{r(),s||i.push({path:"/wp_global_styles",canvas:"edit"}),s&&"edit"!==o()&&n("edit"),e("edit-site/global-styles"),t("global-styles-css")}}]:[]),[i,e,t,a,s,o,n])}}function lr(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=ie((0,u.useDispatch)(tn)),{getCanvasMode:r}=ie((0,u.useSelect)(tn)),{params:s}=rr(),i=!er(s,(0,w.useViewportMatch)("medium","<")),a=nr(),o=(0,u.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(C.store),r=n(),s=r?t("root","globalStyles",r):void 0;return!!s?._links?.["version-history"]?.[0]?.count}),[]);return{isLoading:!1,commands:(0,h.useMemo)((()=>o?[{name:"core/edit-site/open-global-styles-revisions",label:(0,S.__)("Style revisions"),icon:$n,callback:({close:s})=>{s(),i||a.push({path:"/wp_global_styles",canvas:"edit"}),i&&"edit"!==r()&&n("edit"),e("edit-site/global-styles"),t("global-styles-revisions")}}]:[]),[o,a,e,t,i,r,n])}}const cr=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),ur=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,a.createElement)(vn.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})),dr=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})),mr=(0,a.createElement)(vn.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})),pr=(0,a.createElement)(vn.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})),hr=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),fr=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),gr=fr,vr=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));function yr(e,t){const{record:n,title:r,description:s,isLoaded:i,icon:a}=(0,u.useSelect)((n=>{const{getEditedPostType:r,getEditedPostId:s}=n(tn),{getEditedEntityRecord:i,hasFinishedResolution:a}=n(C.store),{__experimentalGetTemplateInfo:o}=n(f.store),l=null!=e?e:r(),c=null!=t?t:s(),u=i("postType",l,c),d=c&&a("getEditedEntityRecord",["postType",l,c]),m=o(u);return{record:u,title:m.title,description:m.description,isLoaded:d,icon:m.icon}}),[e,t]);return{isLoaded:i,icon:a,record:n,getTitle:()=>r?(0,gn.decodeEntities)(r):null,getDescription:()=>s?(0,gn.decodeEntities)(s):null}}function br(e){return!!e&&(e.source===Ge.custom&&!e.has_theme_file)}function wr(e){return!!e&&(e?.source===Ge.custom&&e?.has_theme_file)}const{RenamePatternModal:_r}=ie(De.privateApis),{interfaceStore:Er}=ie(f.privateApis);function Sr(){const{record:e}=yr(),{closeModal:t}=(0,u.useDispatch)(Er);return(0,u.useSelect)((e=>e(Er).isModalActive(Tr.rename)))?(0,a.createElement)(_r,{onClose:t,pattern:e}):null}const{DuplicatePatternModal:xr}=ie(De.privateApis),{useHistory:Cr,useLocation:kr}=ie(rn.privateApis),{interfaceStore:Pr}=ie(f.privateApis);function Ir(){const{record:e}=yr(),{params:{categoryType:t,categoryId:n}}=kr(),{closeModal:r}=(0,u.useDispatch)(Pr),s=Cr();if(!(0,u.useSelect)((e=>e(Pr).isModalActive(Tr.duplicate))))return null;return(0,a.createElement)(xr,{onClose:r,onSuccess:function({pattern:e}){s.push({categoryType:t,categoryId:n,postType:We.user,postId:e.id}),r()},pattern:e})}const Tr={rename:"edit-site/pattern-rename",duplicate:"edit-site/pattern-duplicate"};function Or(){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Ir,null),(0,a.createElement)(Sr,null))}const{useHistory:Ar}=ie(rn.privateApis);function Mr(e,t,n=!1){const r=Ar();const s=(0,_n.getQueryArgs)(window.location.href),i=(0,_n.removeQueryArgs)(window.location.href,...Object.keys(s));Vn()&&(e={...e,wp_theme_preview:Rn()});return{href:(0,_n.addQueryArgs)(i,e),onClick:function(s){s?.preventDefault(),n?r.replace(e,t):r.push(e,t)}}}function Nr({params:e={},state:t,replace:n=!1,children:r,...s}){const{href:i,onClick:o}=Mr(e,t,n);return(0,a.createElement)("a",{href:i,onClick:o,...s},r)}const{interfaceStore:Fr}=ie(f.privateApis),{useHistory:Vr}=ie(rn.privateApis);function Rr(){const{record:e}=yr(),{isPage:t,canvasMode:n,templateId:r,currentPostType:s}=(0,u.useSelect)((e=>{const{isPage:t,getCanvasMode:n}=ie(e(tn)),{getCurrentPostType:r,getCurrentTemplateId:s}=e(f.store);return{isPage:t(),canvasMode:n(),templateId:s(),currentPostType:r()}}),[]),{onClick:i}=Mr({postType:"wp_template",postId:r}),{setRenderingMode:a}=(0,u.useDispatch)(f.store);if(!t||"edit"!==n)return{isLoading:!1,commands:[]};const o=[];return"wp_template"!==s?o.push({name:"core/switch-to-template-focus",label:(0,S.sprintf)((0,S.__)("Edit template: %s"),(0,gn.decodeEntities)(e.title)),icon:cr,callback:({close:e})=>{i(),e()}}):o.push({name:"core/switch-to-page-focus",label:(0,S.__)("Back to page"),icon:ur,callback:({close:e})=>{a("template-locked"),e()}}),{isLoading:!1,commands:o}}function Br(){const{isLoaded:e,record:t}=yr(),{removeTemplate:n,revertTemplate:r}=(0,u.useDispatch)(tn),s=Vr(),i=(0,u.useSelect)((e=>e(tn).isPage()&&"wp_template"!==e(f.store).getCurrentPostType()),[]);if(!e)return{isLoading:!0,commands:[]};const a=[];if(wr(t)&&!i){const e=t.type===ze?(0,S.sprintf)((0,S.__)("Reset template: %s"),(0,gn.decodeEntities)(t.title)):(0,S.sprintf)((0,S.__)("Reset template part: %s"),(0,gn.decodeEntities)(t.title));a.push({name:"core/reset-template",label:e,icon:(0,S.isRTL)()?Xn:Jn,callback:({close:e})=>{r(t),e()}})}if(br(t)&&!i){const e=t.type===ze?(0,S.sprintf)((0,S.__)("Delete template: %s"),(0,gn.decodeEntities)(t.title)):(0,S.sprintf)((0,S.__)("Delete template part: %s"),(0,gn.decodeEntities)(t.title)),r=t.type===ze?"/wp_template":"/patterns";a.push({name:"core/remove-template",label:e,icon:dr,callback:({close:e})=>{n(t),s.push({path:r}),e()}})}return{isLoading:!e,commands:a}}function Dr(){const{openGeneralSidebar:e,closeGeneralSidebar:t}=(0,u.useDispatch)(tn),{canvasMode:n,activeSidebar:r}=(0,u.useSelect)((e=>({canvasMode:ie(e(tn)).getCanvasMode(),activeSidebar:e(Fr).getActiveComplementaryArea("core")})),[]);if("edit"!==n)return{isLoading:!1,commands:[]};const s=[];return s.push({name:"core/open-settings-sidebar",label:(0,S.__)("Toggle settings sidebar"),icon:(0,S.isRTL)()?mr:pr,callback:({close:n})=>{n(),"edit-post/document"===r?t():e("edit-post/document")}}),s.push({name:"core/open-block-inspector",label:(0,S.__)("Toggle block inspector"),icon:hr,callback:({close:n})=>{n(),"edit-site/block"===r?t():e("edit-site/block")}}),{isLoading:!1,commands:s}}function Lr(){const{isLoaded:e,record:t}=yr(),{openModal:n}=(0,u.useDispatch)(Fr);if(!e)return{isLoading:!0,commands:[]};const r=[];return"wp_block"===t?.type&&(r.push({name:"core/rename-pattern",label:(0,S.__)("Rename pattern"),icon:gr,callback:({close:e})=>{n(Tr.rename),e()}}),r.push({name:"core/duplicate-pattern",label:(0,S.__)("Duplicate pattern"),icon:vr,callback:({close:e})=>{n(Tr.duplicate),e()}})),{isLoading:!1,commands:r}}const zr=1e4;function Hr(){const{isLoaded:e}=yr(),[t,n]=(0,h.useState)(!1),r=(0,u.useSelect)((e=>{const n=e(C.store).hasResolvingSelectors();return!t&&!n}),[t]);return(0,h.useEffect)((()=>{let e;return t||(e=setTimeout((()=>{n(!0)}),zr)),()=>{clearTimeout(e)}}),[t]),(0,h.useEffect)((()=>{if(r){const e=setTimeout((()=>{n(!0)}),100);return()=>{clearTimeout(e)}}}),[r]),!t||!e}var Gr=s(4132);function Ur(){const e=(0,w.useInstanceId)(Ur),{shortcut:t,content:n,blocks:r,type:s,id:i}=(0,u.useSelect)((e=>{const{getEditedEntityRecord:t}=e(C.store),{getEditedPostType:n,getEditedPostId:r}=e(tn),{getShortcutRepresentation:s}=e(on.store),i=n(),a=r(),o=t("postType",i,a);return{shortcut:s("core/editor/toggle-mode"),content:o?.content,blocks:o?.blocks,type:i,id:a}}),[]),{editEntityRecord:o}=(0,u.useDispatch)(C.store),c=(0,h.useMemo)((()=>n instanceof Function?n({blocks:r}):r?(0,l.__unstableSerializeAndClean)(r):n),[n,r]),{switchEditorMode:d}=(0,u.useDispatch)(f.store);return(0,a.createElement)("div",{className:"edit-site-code-editor"},(0,a.createElement)("div",{className:"edit-site-code-editor__toolbar"},(0,a.createElement)("h2",null,(0,S.__)("Editing code")),(0,a.createElement)(E.Button,{variant:"tertiary",onClick:()=>d("visual"),shortcut:t},(0,S.__)("Exit code editor"))),(0,a.createElement)("div",{className:"edit-site-code-editor__body"},(0,a.createElement)(E.VisuallyHidden,{as:"label",htmlFor:`code-editor-text-area-${e}`},(0,S.__)("Type text or HTML")),(0,a.createElement)(Gr.A,{autoComplete:"off",dir:"auto",value:c,onChange:e=>{o("postType",s,i,{content:e.target.value,blocks:void 0,selection:void 0})},className:"edit-site-code-editor-text-area",id:`code-editor-text-area-${e}`,placeholder:(0,S.__)("Start writing with text or HTML")})))}const jr=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})),Wr=window.wp.blob;function qr(){const{createErrorNotice:e}=(0,u.useDispatch)(x.store);return(0,a.createElement)(E.MenuItem,{role:"menuitem",icon:jr,onClick:async function(){try{const e=await zn()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),n=e.headers.get("content-disposition").match(/=(.+)\.zip/),r=n[1]?n[1]:"edit-site-export";(0,Wr.downloadBlob)(r+".zip",t,"application/zip")}catch(t){let n={};try{n=await t.json()}catch(e){}const r=n.message&&"unknown_error"!==n.code?n.message:(0,S.__)("An error occurred while creating the site export.");e(r,{type:"snackbar"})}},info:(0,S.__)("Download your theme with updated templates and styles.")},(0,S._x)("Export","site exporter menu item"))}function Zr(){const{toggle:e}=(0,u.useDispatch)(g.store);return(0,a.createElement)(E.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide")},(0,S.__)("Welcome Guide"))}const{ToolsMoreMenuGroup:Kr,PreferencesModal:Yr}=ie(f.privateApis);function Xr(){const e=(0,u.useSelect)((e=>e(C.store).getCurrentTheme().is_block_theme),[]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Kr,null,e&&(0,a.createElement)(qr,null),(0,a.createElement)(Zr,null)),(0,a.createElement)(Yr,null))}const{useLocation:Jr}=ie(rn.privateApis);function Qr({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:n=!0,showReviewMessage:r,icon:s,size:i,__next40pxDefaultSize:o=!1}){const{params:l}=Jr(),{setIsSaveViewOpened:c}=(0,u.useDispatch)(tn),{saveDirtyEntities:d}=ie((0,u.useDispatch)(f.store)),{dirtyEntityRecords:m}=(0,f.useEntitiesSavedStatesIsDirty)(),{isSaving:p,isSaveViewOpen:h,previewingThemeName:g}=(0,u.useSelect)((e=>{const{isSavingEntityRecord:t,isResolving:n}=e(C.store),{isSaveViewOpened:r}=e(tn),s=n("activateTheme"),i=Rn();return{isSaving:m.some((e=>t(e.kind,e.name,e.key)))||s,isSaveViewOpen:r(),previewingThemeName:i?e(C.store).getTheme(i)?.name?.rendered:void 0}}),[m]),v=!!m.length;let y;1===m.length&&(l.postId?y=`${m[0].key}`===l.postId&&m[0].name===l.postType:l.path?.includes("wp_global_styles")&&(y="globalStyles"===m[0].name));const b=p||!v&&!Vn(),w=Vn()?p?(0,S.sprintf)((0,S.__)("Activating %s"),g):b?(0,S.__)("Saved"):v?(0,S.sprintf)((0,S.__)("Activate %s & Save"),g):(0,S.sprintf)((0,S.__)("Activate %s"),g):p?(0,S.__)("Saving"):b?(0,S.__)("Saved"):!y&&r?(0,S.sprintf)((0,S._n)("Review %d change…","Review %d changes…",m.length),m.length):(0,S.__)("Save"),_=y?()=>d({dirtyEntityRecords:m}):()=>c(!0);return(0,a.createElement)(E.Button,{variant:t,className:e,"aria-disabled":b,"aria-expanded":h,isBusy:p,onClick:b?void 0:_,label:w,shortcut:b?void 0:wn.displayShortcut.primary("s"),showTooltip:n,icon:s,__next40pxDefaultSize:o,size:i},w)}const $r=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),es=20;function ts({variation:e="default",direction:t,resizeWidthBy:n}){const r=`resizable-editor__resize-help-${t}`;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.Tooltip,{text:(0,S.__)("Drag to resize")},(0,a.createElement)(E.__unstableMotion.button,{className:`resizable-editor__drag-handle is-${t} is-variation-${e}`,"aria-label":(0,S.__)("Drag to resize"),"aria-describedby":r,onKeyDown:function(e){const{keyCode:r}=e;"left"===t&&r===wn.LEFT||"right"===t&&r===wn.RIGHT?n(es):("left"===t&&r===wn.RIGHT||"right"===t&&r===wn.LEFT)&&n(-es)},variants:{active:{opacity:1,scaleY:1.3}},whileFocus:"active",whileHover:"active",whileTap:"active",key:"handle",role:"separator","aria-orientation":"vertical"})),(0,a.createElement)(E.VisuallyHidden,{id:r},(0,S.__)("Use left and right arrow keys to resize the canvas.")))}const ns={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};const rs=function({enableResizing:e,height:t,children:n}){const[r,s]=(0,h.useState)("100%"),i=(0,h.useRef)(),o=(0,h.useCallback)((e=>{i.current&&s(i.current.offsetWidth+e)}),[]);return(0,a.createElement)(E.ResizableBox,{ref:e=>{i.current=e?.resizable},size:{width:e?r:"100%",height:e&&t?t:"100%"},onResizeStop:(e,t,n)=>{s(n.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:e,right:e},showHandle:e,resizeRatio:2,handleComponent:{left:(0,a.createElement)(ts,{direction:"left",resizeWidthBy:o}),right:(0,a.createElement)(ts,{direction:"right",resizeWidthBy:o})},handleClasses:void 0,handleStyles:{left:ns,right:ns}},n)};function ss(e){switch(e){case"style-book":return(0,S.__)("Style Book");case"global-styles-revisions":case"global-styles-revisions:style-book":return(0,S.__)("Style Revisions");default:return""}}const{createPrivateSlotFill:is}=ie(E.privateApis),{privateKey:as,Slot:os,Fill:ls}=is("EditSiteEditorCanvasContainerSlot");function cs({children:e,closeButtonLabel:t,onClose:n,enableResizing:r=!1}){const{editorCanvasContainerView:s,showListViewByDefault:i}=(0,u.useSelect)((e=>({editorCanvasContainerView:ie(e(tn)).getEditorCanvasContainerView(),showListViewByDefault:e(g.store).get("core","showListViewByDefault")})),[]),[o,l]=(0,h.useState)(!1),{setEditorCanvasContainerView:c}=ie((0,u.useDispatch)(tn)),{setIsListViewOpened:d}=(0,u.useDispatch)(f.store),m=(0,w.useFocusOnMount)("firstElement"),p=(0,w.useFocusReturn)();function v(){d(i),c(void 0),l(!0),"function"==typeof n&&n()}const y=Array.isArray(e)?h.Children.map(e,((e,t)=>0===t?(0,h.cloneElement)(e,{ref:p}):e)):(0,h.cloneElement)(e,{ref:p});if(o)return null;const b=ss(s),_=n||t;return(0,a.createElement)(ls,null,(0,a.createElement)(rs,{enableResizing:r},(0,a.createElement)("section",{className:"edit-site-editor-canvas-container",ref:_?m:null,onKeyDown:function(e){e.keyCode!==wn.ESCAPE||e.defaultPrevented||(e.preventDefault(),v())},"aria-label":b},_&&(0,a.createElement)(E.Button,{className:"edit-site-editor-canvas-container__close-button",icon:$r,label:t||(0,S.__)("Close"),onClick:v}),y)))}cs.Slot=os;const us=cs,{Header:ds}=ie(f.privateApis);const ms=function({setEntitiesSavedStatesCallback:e}){const t=Vn(),n=!function(){const e=(0,E.__experimentalUseSlotFills)(as);return!!e?.length}(),{editorCanvasView:r}=(0,u.useSelect)((e=>({editorCanvasView:ie(e(tn)).getEditorCanvasContainerView()})),[]);return(0,a.createElement)(ds,{setEntitiesSavedStatesCallback:e,customSaveButton:t&&(0,a.createElement)(Qr,{size:"compact"}),forceDisableBlockTools:!n,title:n?void 0:ss(r)},(0,a.createElement)(Xr,null))};function ps({nonAnimatedSrc:e,animatedSrc:t}){return(0,a.createElement)("picture",{className:"edit-site-welcome-guide__image"},(0,a.createElement)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,a.createElement)("img",{src:t,width:"312",height:"240",alt:""}))}function hs(){const{toggle:e}=(0,u.useDispatch)(g.store),{isActive:t,isBlockBasedTheme:n}=(0,u.useSelect)((e=>({isActive:!!e(g.store).get("core/edit-site","welcomeGuide"),isBlockBasedTheme:e(C.store).getCurrentTheme()?.is_block_theme})),[]);return t&&n?(0,a.createElement)(E.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,S.__)("Welcome to the site editor"),finishButtonText:(0,S.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,a.createElement)(ps,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,S.__)("Edit your site")),(0,a.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,S.__)("Design everything on your site — from the header right down to the footer — using blocks.")),(0,a.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,h.createInterpolateElement)((0,S.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,a.createElement)("img",{alt:(0,S.__)("styles"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A"})})))}]}):null}const{interfaceStore:fs}=ie(f.privateApis);function gs(){const{toggle:e}=(0,u.useDispatch)(g.store),{isActive:t,isStylesOpen:n}=(0,u.useSelect)((e=>{const t=e(fs).getActiveComplementaryArea("core");return{isActive:!!e(g.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);if(!t||!n)return null;const r=(0,S.__)("Welcome to Styles");return(0,a.createElement)(E.Guide,{className:"edit-site-welcome-guide guide-styles",contentLabel:r,finishButtonText:(0,S.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,a.createElement)(ps,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},r),(0,a.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,S.__)("Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")))},{image:(0,a.createElement)(ps,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,S.__)("Set the design")),(0,a.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,S.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")))},{image:(0,a.createElement)(ps,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,S.__)("Personalize blocks")),(0,a.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,S.__)("You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")))},{image:(0,a.createElement)(ps,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,S.__)("Learn more")),(0,a.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,S.__)("New to block themes and styling your site?")," ",(0,a.createElement)(E.ExternalLink,{href:(0,S.__)("https://wordpress.org/documentation/article/styles-overview/")},(0,S.__)("Here’s a detailed guide to learn how to make the most of it."))))}]})}function vs(){const{toggle:e}=(0,u.useDispatch)(g.store),t=(0,u.useSelect)((e=>{const t=!!e(g.store).get("core/edit-site","welcomeGuidePage"),n=!!e(g.store).get("core/edit-site","welcomeGuide"),{isPage:r}=e(tn);return t&&!n&&r()}),[]);if(!t)return null;const n=(0,S.__)("Editing a page");return(0,a.createElement)(E.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:n,finishButtonText:(0,S.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,a.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,a.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,a.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,S.__)("It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.")))}]})}function ys(){const{toggle:e}=(0,u.useDispatch)(g.store),t=(0,u.useSelect)((e=>{const t=!!e(g.store).get("core/edit-site","welcomeGuideTemplate"),n=!!e(g.store).get("core/edit-site","welcomeGuide"),{isPage:r}=e(tn),{getCurrentPostType:s}=e(f.store);return t&&!n&&r()&&"wp_template"===s()}),[]);if(!t)return null;const n=(0,S.__)("Editing a template");return(0,a.createElement)(E.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:n,finishButtonText:(0,S.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,a.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,a.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,a.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,S.__)("Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.")))}]})}function bs(){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(hs,null),(0,a.createElement)(gs,null),(0,a.createElement)(vs,null),(0,a.createElement)(ys,null))}const{useGlobalStylesOutput:ws}=ie(_.privateApis);function _s(){return function(){const[e,t]=ws(),{getSettings:n}=(0,u.useSelect)(tn),{updateSettings:r}=(0,u.useDispatch)(tn);(0,h.useEffect)((()=>{var s;if(!e||!t)return;const i=n(),a=Object.values(null!==(s=i.styles)&&void 0!==s?s:[]).filter((e=>!e.isGlobalStyles));r({...i,styles:[...a,...e],__experimentalFeatures:t})}),[e,t,r,n])}(),null}const Es=window.wp.a11y,{useLocation:Ss}=ie(rn.privateApis);const{ProgressBar:xs,Theme:Cs}=ie(E.privateApis),{useGlobalStyle:ks}=ie(_.privateApis);function Ps({id:e}){var t;const[n]=ks("color.text"),[r]=ks("color.background"),{highlightedColors:s}=be(),i=null!==(t=s[0]?.color)&&void 0!==t?t:n,{elapsed:o,total:l}=(0,u.useSelect)((e=>{var t,n;const r=e(C.store).countSelectorsByStatus(),s=null!==(t=r.resolving)&&void 0!==t?t:0,i=null!==(n=r.finished)&&void 0!==n?n:0;return{elapsed:i,total:i+s}}),[]);return(0,a.createElement)("div",{className:"edit-site-canvas-loader"},(0,a.createElement)(Cs,{accent:i,background:r},(0,a.createElement)(xs,{id:e,max:l,value:o})))}const{EditorCanvas:Is}=ie(f.privateApis);const Ts=function({enableResizing:e,settings:t,children:n,onClick:r,...s}){const{hasBlocks:i,isFocusMode:o,templateType:l,canvasMode:c,currentPostIsTrashed:d}=(0,u.useSelect)((e=>{const{getBlockCount:t}=e(_.store),{getEditedPostType:n,getCanvasMode:r}=ie(e(tn)),s=n();return{templateType:s,isFocusMode:Xe.includes(s),canvasMode:r(),hasBlocks:!!t(),currentPostIsTrashed:"trash"===e(f.store).getCurrentPostAttribute("status")}}),[]),{setCanvasMode:m}=ie((0,u.useDispatch)(tn)),[p,g]=(0,h.useState)(!1);(0,h.useEffect)((()=>{"edit"===c&&g(!1)}),[c]);const v={"aria-label":(0,S.__)("Edit"),"aria-disabled":d,title:null,role:"button",tabIndex:0,onFocus:()=>g(!0),onBlur:()=>g(!1),onKeyDown:e=>{const{keyCode:t}=e;t!==wn.ENTER&&t!==wn.SPACE||d||(e.preventDefault(),m("edit"))},onClick:()=>{r?r():m("edit")},onClickCapture:e=>{d&&(e.preventDefault(),e.stopPropagation())},readonly:!0},y=l===Le,b=!(y&&o&&i||"view"===c)&&void 0,w=(0,h.useMemo)((()=>[...t.styles,{css:`.is-root-container{display:flow-root;${e?"min-height:0!important;":""}}body{position:relative; ${"view"===c?"min-height: 100vh; "+(d?"":"cursor: pointer;"):""}}}`}]),[t.styles,e,c,d]);return(0,a.createElement)(Is,{className:an("edit-site-editor-canvas__block-list",{"is-navigation-block":y}),renderAppender:b,styles:w,iframeProps:{className:an("edit-site-visual-editor__editor-canvas",{"is-focused":p&&"view"===c}),...s,..."view"===c?v:{}}},n)},{useHistory:Os}=ie(rn.privateApis);const{useBlockEditorSettings:As}=ie(f.privateApis),{useLocation:Ms,useHistory:Ns}=ie(rn.privateApis);function Fs(){const e=function(){const e=Os();return(0,h.useCallback)((t=>{e.push({...t,focusMode:!0,canvas:"edit"})}),[e])}(),{templateSlug:t,canvasMode:n,settings:r,postWithTemplate:s}=(0,u.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n,getEditedPostContext:r,getCanvasMode:s,getSettings:i}=ie(e(tn)),{getEditedEntityRecord:a}=e(C.store),o=a("postType",t(),n()),l=r();return{templateSlug:o.slug,canvasMode:s(),settings:i(),postWithTemplate:l?.postId}}),[]),i=function(e){const t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let n,r,s,i=!1;if(t)t[1]?n=t[2]?t[2]:t[1]:t[3]&&(n=t[6]?t[6]:t[4],r=t[7]),n="tag"===n?"post_tag":n;else{const t=e?.match(/^(author)$|^author-(.+)$/);t&&(i=!0,t[2]&&(s=t[2]))}return(0,u.useSelect)((e=>{const{getEntityRecords:t,getTaxonomy:a,getAuthors:o}=e(C.store);let l,c;if(n&&(l=a(n)?.labels?.singular_name),r){const e=t("taxonomy",n,{slug:r,per_page:1});e&&e[0]&&(c=e[0].name)}if(i&&(l="Author",s)){const e=o({slug:s});e&&e[0]&&(c=e[0].name)}return{archiveTypeLabel:l,archiveNameLabel:c}}),[s,i,n,r])}(t),a=s?"template-locked":"post-only",o=function(){const e=Ms(),t=(0,w.usePrevious)(e),n=Ns();return(0,h.useMemo)((()=>{const r=e.params.focusMode||e.params.postId&&Xe.includes(e.params.postType),s="edit"===t?.params.canvas;return r&&s?()=>n.back():void 0}),[e,n])}();return(0,h.useMemo)((()=>({...r,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:"view"!==n,defaultRenderingMode:a,onNavigateToEntityRecord:e,onNavigateToPreviousEntityRecord:o,__experimentalArchiveTitleTypeLabel:i.archiveTypeLabel,__experimentalArchiveTitleNameLabel:i.archiveNameLabel,__unstableIsPreviewMode:"view"===n})),[r,n,a,e,o,i.archiveTypeLabel,i.archiveNameLabel])}const{useLocation:Vs}=ie(rn.privateApis);function Rs({onClick:e}){const t=Vs(),{templateType:n,isFocusableEntity:r,isViewMode:s,isZoomOutMode:i}=(0,u.useSelect)((e=>{const{getEditedPostType:t,getCanvasMode:n}=ie(e(tn)),{__unstableGetEditorMode:r}=e(_.store),s=t();return{templateType:s,isFocusableEntity:Xe.includes(s),isViewMode:"view"===n(),isZoomOutMode:"zoom-out"===r()}}),[]),o=t.params.focusMode||r,[l,c]=(0,w.useResizeObserver)(),d=function(){const e=Fs(),{postType:t,postId:n}=(0,u.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=ie(e(tn));return{postType:t(),postId:n()}}),[]);return As(e,t,n)}(),m=(0,w.useViewportMatch)("small","<"),p=o&&!s&&!m&&!i&&n!==ze,h=n===Le&&o;return(0,a.createElement)(us.Slot,null,(([t])=>t?(0,a.createElement)("div",{className:"edit-site-visual-editor is-focus-mode"},t):(0,a.createElement)("div",{className:an("edit-site-visual-editor",{"is-focus-mode":o||!!t,"is-view-mode":s})},(0,a.createElement)(rs,{enableResizing:p,height:c.height&&!h?c.height:"100%"},(0,a.createElement)(Ts,{enableResizing:p,settings:d,onClick:e},p&&l)))))}function Bs({clientId:e,onClose:t}){const{getBlocks:n}=(0,u.useSelect)(_.store),{replaceBlocks:r}=(0,u.useDispatch)(_.store);return(0,u.useSelect)((t=>t(_.store).canRemoveBlock(e)),[e])?(0,a.createElement)(E.MenuItem,{onClick:()=>{r(e,n(e)),t()}},(0,S.__)("Detach")):null}const Ds=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),Ls=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));var zs=function(){return zs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},zs.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function Hs(e){return e.toLowerCase()}var Gs=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Us=/[^A-Z0-9]+/gi;function js(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?Gs:n,s=t.stripRegexp,i=void 0===s?Us:s,a=t.transform,o=void 0===a?Hs:a,l=t.delimiter,c=void 0===l?" ":l,u=Ws(Ws(e,r,"$1\0$2"),i,"\0"),d=0,m=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(m-1);)m--;return u.slice(d,m).split("\0").map(o).join(c)}function Ws(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function qs(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),js(e,zs({delimiter:"."},t))}(e,zs({delimiter:"-"},t))}const Zs=()=>(0,u.useSelect)((e=>e(C.store).getEntityRecords("postType",He,{per_page:-1})),[]),Ks=(e,t)=>{const n=e.toLowerCase(),r=t.map((e=>e.title.rendered.toLowerCase()));if(!r.includes(n))return e;let s=2;for(;r.includes(`${n} ${s}`);)s++;return`${e} ${s}`},Ys=e=>qs(e).replace(/[^\w-]+/g,"")||"wp-custom-part";function Xs({modalTitle:e=(0,S.__)("Create template part"),...t}){return(0,a.createElement)(E.Modal,{title:e,onRequestClose:t.closeModal,overlayClassName:"edit-site-create-template-part-modal"},(0,a.createElement)(Js,{...t}))}function Js({defaultArea:e=Ue,blocks:t=[],confirmLabel:n=(0,S.__)("Create"),closeModal:r,onCreate:s,onError:i,defaultTitle:o=""}){const{createErrorNotice:c}=(0,u.useDispatch)(x.store),{saveEntityRecord:d}=(0,u.useDispatch)(C.store),m=Zs(),[p,g]=(0,h.useState)(o),[v,y]=(0,h.useState)(e),[b,_]=(0,h.useState)(!1),k=(0,w.useInstanceId)(Xs),P=(0,u.useSelect)((e=>e(f.store).__experimentalGetDefaultTemplatePartAreas()),[]);return(0,a.createElement)("form",{onSubmit:async e=>{e.preventDefault(),await async function(){if(p&&!b)try{_(!0);const e=Ks(p,m),n=Ys(e),r=await d("postType",He,{slug:n,title:e,content:(0,l.serialize)(t),area:v},{throwOnError:!0});await s(r)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,S.__)("An error occurred while creating the template part.");c(t,{type:"snackbar"}),i?.()}finally{_(!1)}}()}},(0,a.createElement)(E.__experimentalVStack,{spacing:"4"},(0,a.createElement)(E.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,S.__)("Name"),value:p,onChange:g,required:!0}),(0,a.createElement)(E.BaseControl,{label:(0,S.__)("Area"),id:`edit-site-create-template-part-modal__area-selection-${k}`,className:"edit-site-create-template-part-modal__area-base-control"},(0,a.createElement)(E.__experimentalRadioGroup,{label:(0,S.__)("Area"),className:"edit-site-create-template-part-modal__area-radio-group",id:`edit-site-create-template-part-modal__area-selection-${k}`,onChange:y,checked:v},P.map((({icon:e,label:t,area:n,description:r})=>(0,a.createElement)(E.__experimentalRadio,{key:t,value:n,className:"edit-site-create-template-part-modal__area-radio"},(0,a.createElement)(E.Flex,{align:"start",justify:"start"},(0,a.createElement)(E.FlexItem,null,(0,a.createElement)(E.Icon,{icon:e})),(0,a.createElement)(E.FlexBlock,{className:"edit-site-create-template-part-modal__option-label"},t,(0,a.createElement)("div",null,r)),(0,a.createElement)(E.FlexItem,{className:"edit-site-create-template-part-modal__checkbox"},v===n&&(0,a.createElement)(E.Icon,{icon:Ls})))))))),(0,a.createElement)(E.__experimentalHStack,{justify:"right"},(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{r()}},(0,S.__)("Cancel")),(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!p||b,isBusy:b},n))))}function Qs({clientIds:e,blocks:t}){const[n,r]=(0,h.useState)(!1),{replaceBlocks:s}=(0,u.useDispatch)(_.store),{createSuccessNotice:i}=(0,u.useDispatch)(x.store),{canCreate:o}=(0,u.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(tn).getSettings();return{canCreate:!t}}),[]);if(!o)return null;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.MenuItem,{icon:Ds,onClick:()=>{r(!0)},"aria-expanded":n,"aria-haspopup":"dialog"},(0,S.__)("Create template part")),n&&(0,a.createElement)(Xs,{closeModal:()=>{r(!1)},blocks:t,onCreate:async t=>{s(e,(0,l.createBlock)("core/template-part",{slug:t.slug,theme:t.theme})),i((0,S.__)("Template part created."),{type:"snackbar"})}}))}function $s(){return(0,a.createElement)(_.BlockSettingsMenuControls,null,(({selectedClientIds:e,onClose:t})=>(0,a.createElement)(ei,{clientIds:e,onClose:t})))}function ei({clientIds:e,onClose:t}){const{isContentOnly:n,blocks:r}=(0,u.useSelect)((t=>{const{getBlocksByClientId:n,getBlockEditingMode:r}=t(_.store);return{blocks:n(e),isContentOnly:1===e.length&&"contentOnly"===r(e[0])}}),[e]);return n?null:1===r.length&&"core/template-part"===r[0]?.name?(0,a.createElement)(Bs,{clientId:e[0],onClose:t}):(0,a.createElement)(Qs,{clientIds:e,blocks:r})}const{Fill:ti,Slot:ni}=(0,E.createSlotFill)("PluginTemplateSettingPanel"),ri=({children:e})=>{m()("wp.editSite.PluginTemplateSettingPanel",{since:"6.6",version:"6.8",alternative:"wp.editor.PluginDocumentSettingPanel"});return(0,u.useSelect)((e=>"wp_template"===e(f.store).getCurrentPostType()),[])?(0,a.createElement)(ti,null,e):null};ri.Slot=ni;const si=ri,ii=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})),ai=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),oi=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),li=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));function ci({className:e,...t}){return(0,a.createElement)(E.Icon,{className:an(e,"edit-site-global-styles-icon-with-current-color"),...t})}function ui({icon:e,children:t,...n}){return(0,a.createElement)(E.__experimentalItem,{...n},e&&(0,a.createElement)(E.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(ci,{icon:e,size:24}),(0,a.createElement)(E.FlexItem,null,t)),!e&&t)}function di(e){return(0,a.createElement)(E.__experimentalNavigatorButton,{as:ui,...e})}const mi=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"})),pi=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})),hi=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),{useHasDimensionsPanel:fi,useHasTypographyPanel:gi,useHasColorPanel:vi,useGlobalSetting:yi,useSettingsForBlockElement:bi,useHasBackgroundPanel:wi}=ie(_.privateApis);const _i=function(){const[e]=yi(""),t=bi(e),n=gi(t),r=vi(t),s=fi(t),i=wi(t);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalItemGroup,null,n&&(0,a.createElement)(di,{icon:mi,path:"/typography","aria-label":(0,S.__)("Typography styles")},(0,S.__)("Typography")),r&&(0,a.createElement)(di,{icon:pi,path:"/colors","aria-label":(0,S.__)("Colors styles")},(0,S.__)("Colors")),s&&(0,a.createElement)(di,{icon:cr,path:"/layout","aria-label":(0,S.__)("Layout styles")},(0,S.__)("Layout")),i&&(0,a.createElement)(di,{icon:hi,path:"/background","aria-label":(0,S.__)("Background image styles")},(0,S.__)("Background image"))))};function Ei(e){const t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,n=e.trim(),r=e=>(e=e.trim()).match(t)?`"${e=e.replace(/^["']|["']$/g,"")}"`:e;return n.includes(",")?n.split(",").map(r).filter((e=>""!==e)).join(", "):r(n)}function Si(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=t.split(",").find((e=>""!==e.trim())).trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function xi(e){const t={fontFamily:Ei(e.fontFamily)};if(!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){const s=e.fontFace.filter((e=>e?.fontStyle&&"normal"===e.fontStyle.toLowerCase()));if(s.length>0){t.fontStyle="normal";const e=function(e){const t=[];return e.forEach((e=>{const n=String(e.fontWeight).split(" ");if(2===n.length){const e=parseInt(n[0]),r=parseInt(n[1]);for(let n=e;n<=r;n+=100)t.push(n)}else 1===n.length&&t.push(parseInt(n[0]))})),t}(s),i=(n=400,0===(r=e).length?null:(r.sort(((e,t)=>Math.abs(n-e)-Math.abs(n-t))),r[0]));t.fontWeight=String(i)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}var n,r;return t}const{GlobalStylesContext:Ci}=ie(_.privateApis),{mergeBaseAndUserConfigs:ki}=ie(f.privateApis);function Pi({fontSize:e,variation:t}){const{base:n}=(0,h.useContext)(Ci);let r=n;t&&(r=ki(n,t));const[s,i]=he(r),o=s?xi(s):{},l=i?xi(i):{};return e&&(o.fontSize=e,l.fontSize=e),(0,a.createElement)(E.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center"}},(0,a.createElement)("span",{style:l},(0,S._x)("A","Uppercase letter A")),(0,a.createElement)("span",{style:o},(0,S._x)("a","Lowercase letter A")))}function Ii({normalizedColorSwatchSize:e,ratio:t}){const{highlightedColors:n}=be(),r=e*t;return n.map((({slug:e,color:t},n)=>(0,a.createElement)(E.__unstableMotion.div,{key:`${e}-${n}`,style:{height:r,width:r,background:t,borderRadius:r/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===n?.2:.1}})))}const{useGlobalStyle:Ti,useGlobalStylesOutput:Oi}=ie(_.privateApis),Ai=248,Mi=152,Ni={leading:!0,trailing:!0};function Fi({children:e,label:t,isFocused:n,withHoverView:r}){const[s="white"]=Ti("color.background"),[i]=Ti("color.gradient"),[o]=Oi(),l=(0,w.useReducedMotion)(),[c,u]=(0,h.useState)(!1),[d,{width:m}]=(0,w.useResizeObserver)(),[p,f]=(0,h.useState)(m),[g,v]=(0,h.useState)(),y=(0,w.useThrottle)(f,250,Ni);(0,h.useLayoutEffect)((()=>{m&&y(m)}),[m,y]),(0,h.useLayoutEffect)((()=>{const e=p?p/Ai:1,t=e-(g||0);!(Math.abs(t)>.1)&&g||v(e)}),[p,g]);const b=g||(m?m/Ai:1),S=(0,h.useMemo)((()=>o?[...o,{css:"html{overflow:hidden}body{min-width: 0;padding: 0;border: none;cursor: pointer;}",isGlobalStyles:!0}]:o),[o]),x=!!m;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{style:{position:"relative"}},d),x&&(0,a.createElement)(_.__unstableIframe,{className:"edit-site-global-styles-preview__iframe",style:{height:Mi*b},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),tabIndex:-1},(0,a.createElement)(_.__unstableEditorStyles,{styles:S}),(0,a.createElement)(E.__unstableMotion.div,{style:{height:Mi*b,width:"100%",background:null!=i?i:s,cursor:r?"pointer":void 0},initial:"start",animate:(c||n)&&!l&&t?"hover":"start"},[].concat(e).map(((e,t)=>e({ratio:b,key:t}))))))}const{useGlobalStyle:Vi}=ie(_.privateApis),Ri={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Bi={hover:{opacity:1},start:{opacity:.5}},Di={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}},Li=({label:e,isFocused:t,withHoverView:n,variation:r})=>{const[s]=Vi("typography.fontWeight"),[i="serif"]=Vi("typography.fontFamily"),[o=i]=Vi("elements.h1.typography.fontFamily"),[l=s]=Vi("elements.h1.typography.fontWeight"),[c="black"]=Vi("color.text"),[u=c]=Vi("elements.h1.color.text"),{paletteColors:d}=be();return(0,a.createElement)(Fi,{label:e,isFocused:t,withHoverView:n},(({ratio:e,key:t})=>(0,a.createElement)(E.__unstableMotion.div,{key:t,variants:Ri,style:{height:"100%",overflow:"hidden"}},(0,a.createElement)(E.__experimentalHStack,{spacing:10*e,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,a.createElement)(Pi,{fontSize:65*e,variation:r}),(0,a.createElement)(E.__experimentalVStack,{spacing:4*e},(0,a.createElement)(Ii,{normalizedColorSwatchSize:32,ratio:e}))))),(({key:e})=>(0,a.createElement)(E.__unstableMotion.div,{key:e,variants:n&&Bi,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1}},(0,a.createElement)(E.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"}},d.slice(0,4).map((({color:e},t)=>(0,a.createElement)("div",{key:t,style:{height:"100%",background:e,flexGrow:1}})))))),(({ratio:t,key:n})=>(0,a.createElement)(E.__unstableMotion.div,{key:n,variants:Di,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0}},(0,a.createElement)(E.__experimentalVStack,{spacing:3*t,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*t,boxSizing:"border-box"}},e&&(0,a.createElement)("div",{style:{fontSize:40*t,fontFamily:o,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"}},e)))))},{useGlobalStyle:zi}=ie(_.privateApis);const Hi=function(){const[e]=zi("css"),{hasVariations:t,canEditCSS:n}=(0,u.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n,__experimentalGetCurrentThemeGlobalStylesVariations:r}=e(C.store),s=n(),i=s?t("root","globalStyles",s):void 0;return{hasVariations:!!r()?.length,canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]);return(0,a.createElement)(E.Card,{size:"small",className:"edit-site-global-styles-screen-root"},(0,a.createElement)(E.CardBody,null,(0,a.createElement)(E.__experimentalVStack,{spacing:4},(0,a.createElement)(E.Card,null,(0,a.createElement)(E.CardMedia,null,(0,a.createElement)(Li,null))),t&&(0,a.createElement)(E.__experimentalItemGroup,null,(0,a.createElement)(di,{path:"/variations","aria-label":(0,S.__)("Browse styles")},(0,a.createElement)(E.__experimentalHStack,{justify:"space-between"},(0,a.createElement)(E.FlexItem,null,(0,S.__)("Browse styles")),(0,a.createElement)(ci,{icon:(0,S.isRTL)()?oi:li})))),(0,a.createElement)(_i,null))),(0,a.createElement)(E.CardDivider,null),(0,a.createElement)(E.CardBody,null,(0,a.createElement)(E.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,S.__)("Customize the appearance of specific blocks for the whole site.")),(0,a.createElement)(E.__experimentalItemGroup,null,(0,a.createElement)(di,{path:"/blocks","aria-label":(0,S.__)("Blocks styles")},(0,a.createElement)(E.__experimentalHStack,{justify:"space-between"},(0,a.createElement)(E.FlexItem,null,(0,S.__)("Blocks")),(0,a.createElement)(ci,{icon:(0,S.isRTL)()?oi:li}))))),n&&!!e&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.CardDivider,null),(0,a.createElement)(E.CardBody,null,(0,a.createElement)(E.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,S.__)("Add your own CSS to customize the appearance and layout of your site.")),(0,a.createElement)(E.__experimentalItemGroup,null,(0,a.createElement)(di,{path:"/css","aria-label":(0,S.__)("Additional CSS")},(0,a.createElement)(E.__experimentalHStack,{justify:"space-between"},(0,a.createElement)(E.FlexItem,null,(0,S.__)("Additional CSS")),(0,a.createElement)(ci,{icon:(0,S.isRTL)()?oi:li})))))))};function Gi(e){const t=function(e){return e?.filter((e=>"block"===e.source))}((0,u.useSelect)((t=>{const{getBlockStyles:n}=t(l.store);return n(e)}),[e]));return t}function Ui({name:e}){const t=Gi(e);return(0,a.createElement)(E.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},t.map(((t,n)=>t?.isDefault?null:(0,a.createElement)(di,{key:n,path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(t.name),"aria-label":t.label},t.label))))}const ji=function({title:e,description:t,onBack:n}){return(0,a.createElement)(E.__experimentalVStack,{spacing:0},(0,a.createElement)(E.__experimentalView,null,(0,a.createElement)(E.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,a.createElement)(E.__experimentalHStack,{spacing:2},(0,a.createElement)(E.__experimentalNavigatorToParentButton,{style:{minWidth:24,padding:0},icon:(0,S.isRTL)()?li:oi,size:"small",label:(0,S.__)("Back"),onClick:n}),(0,a.createElement)(E.__experimentalSpacer,null,(0,a.createElement)(E.__experimentalHeading,{className:"edit-site-global-styles-header",level:2,size:13},e))))),t&&(0,a.createElement)("p",{className:"edit-site-global-styles-header__description"},t))},{useHasDimensionsPanel:Wi,useHasTypographyPanel:qi,useHasBorderPanel:Zi,useGlobalSetting:Ki,useSettingsForBlockElement:Yi,useHasColorPanel:Xi}=ie(_.privateApis);function Ji(e){const[t]=Ki("",e),n=Yi(t,e),r=qi(n),s=Xi(n),i=Zi(n),a=Wi(n),o=i||a,l=!!Gi(e)?.length;return r||s||o||l}function Qi({block:e}){if(!Ji(e.name))return null;const t=(0,S.sprintf)((0,S.__)("%s block styles"),e.title);return(0,a.createElement)(di,{path:"/blocks/"+encodeURIComponent(e.name),"aria-label":t},(0,a.createElement)(E.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(_.BlockIcon,{icon:e.icon}),(0,a.createElement)(E.FlexItem,null,e.title)))}const $i=(0,h.memo)((function({filterValue:e}){const t=function(){const e=(0,u.useSelect)((e=>e(l.store).getBlockTypes()),[]),{core:t,noncore:n}=e.reduce(((e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e}),{core:[],noncore:[]});return[...t,...n]}(),n=(0,w.useDebounce)(Es.speak,500),{isMatchingSearchTerm:r}=(0,u.useSelect)(l.store),s=e?t.filter((t=>r(t,e))):t,i=(0,h.useRef)();return(0,h.useEffect)((()=>{if(!e)return;const t=i.current.childElementCount,r=(0,S.sprintf)((0,S._n)("%d result found.","%d results found.",t),t);n(r,t)}),[e,n]),(0,a.createElement)("div",{ref:i,className:"edit-site-block-types-item-list"},s.map((e=>(0,a.createElement)(Qi,{block:e,key:"menu-itemblock-"+e.name}))))}));const ea=function(){const[e,t]=(0,h.useState)(""),n=(0,h.useDeferredValue)(e);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:(0,S.__)("Blocks"),description:(0,S.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,a.createElement)(E.SearchControl,{__nextHasNoMarginBottom:!0,className:"edit-site-block-types-search",onChange:t,value:e,label:(0,S.__)("Search for blocks"),placeholder:(0,S.__)("Search")}),(0,a.createElement)($i,{filterValue:n}))},ta=({name:e,variation:t=""})=>{var n;const r=(0,l.getBlockType)(e)?.example,s=(0,h.useMemo)((()=>{if(!r)return null;let n=r;return t&&(n={...n,attributes:{...n.attributes,className:me(t)}}),(0,l.getBlockFromExample)(e,n)}),[e,r,t]),i=null!==(n=r?.viewportWidth)&&void 0!==n?n:null;return r?(0,a.createElement)(E.__experimentalSpacer,{marginX:4,marginBottom:4},(0,a.createElement)("div",{className:"edit-site-global-styles__block-preview-panel",style:{maxHeight:150,boxSizing:"initial"}},(0,a.createElement)(_.BlockPreview,{blocks:s,viewportWidth:i,minHeight:150,additionalStyles:[{css:"\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tmin-height:150px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;align-items:center;justify-content:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t"}]}))):null};const na=function({children:e,level:t}){return(0,a.createElement)(E.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:null!=t?t:2},e)};function ra(e){if(!e)return e;const t=e.color||e.width;return!e.style&&t?{...e,style:"solid"}:!e.style||t?e:void 0}const{useHasDimensionsPanel:sa,useHasTypographyPanel:ia,useHasBorderPanel:aa,useGlobalSetting:oa,useSettingsForBlockElement:la,useHasColorPanel:ca,useHasFiltersPanel:ua,useHasImageSettingsPanel:da,useGlobalStyle:ma,BorderPanel:pa,ColorPanel:ha,TypographyPanel:fa,DimensionsPanel:ga,FiltersPanel:va,ImageSettingsPanel:ya,AdvancedPanel:ba}=ie(_.privateApis);const wa=function({name:e,variation:t}){let n=[];t&&(n=["variations",t].concat(n));const r=n.join("."),[s]=ma(r,e,"user",{shouldDecodeEncode:!1}),[i,o]=ma(r,e,"all",{shouldDecodeEncode:!1}),[c]=oa("",e,"user"),[d,m]=oa("",e),p=la(d,e),f=(0,l.getBlockType)(e);p?.spacing?.blockGap&&f?.supports?.spacing?.blockGap&&(!0===f?.supports?.spacing?.__experimentalSkipSerialization||f?.supports?.spacing?.__experimentalSkipSerialization?.some?.((e=>"blockGap"===e)))&&(p.spacing.blockGap=!1),p?.dimensions?.aspectRatio&&"core/group"===e&&(p.dimensions.aspectRatio=!1);const g=Gi(e),v=ia(p),y=ca(p),b=aa(p),w=sa(p),_=ua(p),x=da(e,c,p),k=!!g?.length&&!t,{canEditCSS:P}=(0,u.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(C.store),r=n(),s=r?t("root","globalStyles",r):void 0;return{canEditCSS:!!s?._links?.["wp:action-edit-css"]}}),[]),I=t?g.find((e=>e.name===t)):null,T=(0,h.useMemo)((()=>({...i,layout:p.layout})),[i,p.layout]),O=(0,h.useMemo)((()=>({...s,layout:c.layout})),[s,c.layout]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:t?I.label:f.title}),(0,a.createElement)(ta,{name:e,variation:t}),k&&(0,a.createElement)("div",{className:"edit-site-global-styles-screen-variations"},(0,a.createElement)(E.__experimentalVStack,{spacing:3},(0,a.createElement)(na,null,(0,S.__)("Style Variations")),(0,a.createElement)(Ui,{name:e}))),y&&(0,a.createElement)(ha,{inheritedValue:i,value:s,onChange:o,settings:p}),v&&(0,a.createElement)(fa,{inheritedValue:i,value:s,onChange:o,settings:p}),w&&(0,a.createElement)(ga,{inheritedValue:T,value:O,onChange:e=>{const t={...e};delete t.layout,o(t),e.layout!==c.layout&&m({...c,layout:e.layout})},settings:p,includeLayoutControls:!0}),b&&(0,a.createElement)(pa,{inheritedValue:i,value:s,onChange:e=>{if(!e?.border)return void o(e);const{radius:t,...n}=e.border,r=function(e){return e?(0,E.__experimentalHasSplitBorders)(e)?{top:ra(e.top),right:ra(e.right),bottom:ra(e.bottom),left:ra(e.left)}:ra(e):e}(n),s=(0,E.__experimentalHasSplitBorders)(r)?{color:null,style:null,width:null,...r}:{top:r,right:r,bottom:r,left:r};o({...e,border:{...s,radius:t}})},settings:p}),_&&(0,a.createElement)(va,{inheritedValue:T,value:O,onChange:o,settings:p,includeLayoutControls:!0}),x&&(0,a.createElement)(ya,{onChange:e=>{m(void 0===e?{...d,lightbox:void 0}:{...d,lightbox:{...d.lightbox,...e}})},value:c,inheritedValue:p}),P&&(0,a.createElement)(E.PanelBody,{title:(0,S.__)("Advanced"),initialOpen:!1},(0,a.createElement)("p",null,(0,S.sprintf)((0,S.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),f?.title)),(0,a.createElement)(ba,{value:s,onChange:o,inheritedValue:i})))},{useGlobalStyle:_a}=ie(_.privateApis);function Ea({parentMenu:e,element:t,label:n}){var r;const s="text"!==t&&t?`elements.${t}.`:"",i="link"===t?{textDecoration:"underline"}:{},[o]=_a(s+"typography.fontFamily"),[l]=_a(s+"typography.fontStyle"),[c]=_a(s+"typography.fontWeight"),[u]=_a(s+"typography.letterSpacing"),[d]=_a(s+"color.background"),[m]=_a("color.background"),[p]=_a(s+"color.gradient"),[h]=_a(s+"color.text"),f=(0,S.sprintf)((0,S.__)("Typography %s styles"),n);return(0,a.createElement)(di,{path:e+"/typography/"+t,"aria-label":f},(0,a.createElement)(E.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(E.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:null!=o?o:"serif",background:null!==(r=null!=p?p:d)&&void 0!==r?r:m,color:h,fontStyle:l,fontWeight:c,letterSpacing:u,...i}},(0,S.__)("Aa")),(0,a.createElement)(E.FlexItem,null,n)))}const Sa=function(){return(0,a.createElement)(E.__experimentalVStack,{spacing:3},(0,a.createElement)(na,{level:3},(0,S.__)("Elements")),(0,a.createElement)(E.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,a.createElement)(Ea,{parentMenu:"",element:"text",label:(0,S.__)("Text")}),(0,a.createElement)(Ea,{parentMenu:"",element:"link",label:(0,S.__)("Links")}),(0,a.createElement)(Ea,{parentMenu:"",element:"heading",label:(0,S.__)("Headings")}),(0,a.createElement)(Ea,{parentMenu:"",element:"caption",label:(0,S.__)("Captions")}),(0,a.createElement)(Ea,{parentMenu:"",element:"button",label:(0,S.__)("Buttons")})))},{mergeBaseAndUserConfigs:xa}=ie(f.privateApis),{GlobalStylesContext:Ca,areGlobalStyleConfigsEqual:ka}=ie(_.privateApis);function Pa({variation:e,children:t,isPill:n}){const[r,s]=(0,h.useState)(!1),{base:i,user:o,setUserConfig:l}=(0,h.useContext)(Ca),c=(0,h.useMemo)((()=>{var t,n;return{user:{settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:null!==(n=e.styles)&&void 0!==n?n:{}},base:i,merged:xa(i,e),setUserConfig:()=>{}}}),[e,i]),u=()=>{l((()=>({settings:e.settings,styles:e.styles})))},d=(0,h.useMemo)((()=>ka(o,e)),[o,e]);let m=e?.title;return e?.description&&(m=(0,S.sprintf)((0,S.__)("%1$s (%2$s)"),e?.title,e?.description)),(0,a.createElement)(Ca.Provider,{value:c},(0,a.createElement)("div",{className:an("edit-site-global-styles-variations_item",{"is-active":d}),role:"button",onClick:u,onKeyDown:e=>{e.keyCode===wn.ENTER&&(e.preventDefault(),u())},tabIndex:"0","aria-label":m,"aria-current":d,onFocus:()=>s(!0),onBlur:()=>s(!1)},(0,a.createElement)("div",{className:an("edit-site-global-styles-variations_item-preview",{"is-pill":n})},t(r))))}function Ia({title:e,gap:t=2}){const n=_e();return n?.length?(0,a.createElement)(E.__experimentalVStack,{spacing:3},e&&(0,a.createElement)(na,{level:3},e),(0,a.createElement)(E.__experimentalGrid,{columns:3,gap:t,className:"edit-site-global-styles-style-variations-container"},n&&n.length&&n.map(((e,t)=>(0,a.createElement)(Pa,{key:t,variation:e},(t=>(0,a.createElement)(Fi,{label:e?.title,isFocused:t},(({ratio:t,key:n})=>(0,a.createElement)(E.__experimentalVStack,{key:n,spacing:10*t,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,a.createElement)(Pi,{variation:e,fontSize:85*t})))))))))):null}const Ta=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,a.createElement)(vn.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})),Oa="/wp/v2/font-families",Aa="/wp/v2/font-collections";async function Ma(e){const t={path:Oa,method:"POST",body:e},n=await zn()(t);return{id:n.id,...n.font_family_settings,fontFace:[]}}async function Na(e,t){const n={path:`${Oa}/${e}/font-faces`,method:"POST",body:t},r=await zn()(n);return{id:r.id,...r.font_face_settings}}async function Fa(e){const t={path:`${Oa}?slug=${e}&_embed=true`,method:"GET"},n=await zn()(t);if(!n||0===n.length)return null;const r=n[0];return{id:r.id,...r.font_family_settings,fontFace:r?._embedded?.font_faces.map((e=>e.font_face_settings))||[]}}async function Va(e){const t={path:`${Oa}/${e}?force=true`,method:"DELETE"};return await zn()(t)}const Ra=["otf","ttf","woff","woff2"],Ba={100:(0,S._x)("Thin","font weight"),200:(0,S._x)("Extra-light","font weight"),300:(0,S._x)("Light","font weight"),400:(0,S._x)("Normal","font weight"),500:(0,S._x)("Medium","font weight"),600:(0,S._x)("Semi-bold","font weight"),700:(0,S._x)("Bold","font weight"),800:(0,S._x)("Extra-bold","font weight"),900:(0,S._x)("Black","font weight")},Da={normal:(0,S._x)("Normal","font style"),italic:(0,S._x)("Italic","font style")},{File:La}=window;function za(e,t={}){return e.name||!e.fontFamily&&!e.slug||(e.name=e.fontFamily||e.slug),{...e,...t}}function Ha(e){return`${Ba[e.fontWeight]||e.fontWeight} ${"normal"===e.fontStyle?"":Da[e.fontStyle]||e.fontStyle}`}function Ga(e=[],t=[]){const n=new Map;for(const t of e)n.set(`${t.fontWeight}${t.fontStyle}`,t);for(const e of t)n.set(`${e.fontWeight}${e.fontStyle}`,e);return Array.from(n.values())}function Ua(e=[],t=[]){const n=new Map;for(const t of e)n.set(t.slug,{...t});for(const e of t)if(n.has(e.slug)){const{fontFace:t,...r}=e,s=Ga(n.get(e.slug).fontFace,t);n.set(e.slug,{...r,fontFace:s})}else n.set(e.slug,{...e});return Array.from(n.values())}async function ja(e,t,n="all"){let r;if("string"==typeof t)r=`url(${t})`;else{if(!(t instanceof La))return;r=await t.arrayBuffer()}const s=new window.FontFace(Si(e.fontFamily),r,{style:e.fontStyle,weight:e.fontWeight}),i=await s.load();if("document"!==n&&"all"!==n||document.fonts.add(i),"iframe"===n||"all"===n){document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts.add(i)}}function Wa(e,t="all"){const n=t=>{t.forEach((n=>{n.family===Si(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&t.delete(n)}))};if("document"!==t&&"all"!==t||n(document.fonts),"iframe"===t||"all"===t){n(document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts)}}function qa(e){if(!e)return;let t;var n;return t=Array.isArray(e)?e[0]:e,t.startsWith("file:.")?void 0:(("string"!=typeof(n=t)||n===decodeURIComponent(n))&&(t=encodeURI(t)),t)}function Za(e){const t=new FormData,{kebabCase:n}=ie(E.privateApis),{fontFace:r,category:s,...i}=e,a={...i,slug:n(e.slug)};return t.append("font_family_settings",JSON.stringify(a)),t}function Ka(e){if(e?.fontFace){const t=e.fontFace.map(((e,t)=>{const n={...e},r=new FormData;if(n.file){const e=Array.isArray(n.file)?n.file:[n.file],s=[];e.forEach(((e,n)=>{const i=`file-${t}-${n}`;r.append(i,e,e.name),s.push(i)})),n.src=1===s.length?s[0]:s,delete n.file,r.append("font_face_settings",JSON.stringify(n))}else r.append("font_face_settings",JSON.stringify(n));return r}));return t}}async function Ya(e,t){const n=[];for(const r of t)try{const t=await Na(e,r);n.push({status:"fulfilled",value:t})}catch(e){n.push({status:"rejected",reason:e})}const r={errors:[],successes:[]};return n.forEach(((e,n)=>{if("fulfilled"===e.status){const s=e.value;s.id?r.successes.push(s):r.errors.push({data:t[n],message:`Error: ${s.message}`})}else r.errors.push({data:t[n],message:e.reason.message})})),r}function Xa(e,t){return-1!==t.findIndex((t=>t.fontWeight===e.fontWeight&&t.fontStyle===e.fontStyle))}function Ja(e,t,n){const r=t=>t.slug===e.slug,s=n.find(r);return t?(s=>{const i=e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle;if(!s)return[...n,{...e,fontFace:[t]}];let a=s.fontFace||[];return a=a.find(i)?a.filter((e=>!i(e))):[...a,t],0===a.length?n.filter((e=>!r(e))):n.map((e=>r(e)?{...e,fontFace:a}:e))})(s):(t=>t?n.filter((e=>!r(e))):[...n,e])(s)}const{useGlobalSetting:Qa}=ie(_.privateApis),$a=(0,h.createContext)({});const eo=function({children:e}){const{saveEntityRecord:t}=(0,u.useDispatch)(C.store),{globalStylesId:n}=(0,u.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(C.store);return{globalStylesId:t()}})),r=(0,C.useEntityRecord)("root","globalStyles",n),s=!!r?.edits?.settings?.typography?.fontFamilies,[i,o]=(0,h.useState)(!1),[l,c]=(0,h.useState)(0),[d,m]=(0,h.useState)(null),p=()=>{c(Date.now())},{records:f=[],isResolving:g,hasResolved:v}=(0,C.useEntityRecords)("postType","wp_font_family",{refreshKey:l,_embed:!0}),y=(f||[]).map((e=>({id:e.id,...e.font_family_settings,fontFace:e?._embedded?.font_faces.map((e=>e.font_face_settings))||[]})))||[],[b,w]=Qa("typography.fontFamilies"),[_]=Qa("typography.fontFamilies",void 0,"base"),E=async e=>{const n=r.record;Ee(n,["settings","typography","fontFamilies"],e),await t("root","globalStyles",n)},[x,k]=(0,h.useState)(!1),[P,I]=(0,h.useState)(null),T=b?.theme?b.theme.map((e=>za(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],O=new Set(T.map((e=>e.slug))),A=_?.theme?T.concat(_.theme.filter((e=>!O.has(e.slug))).map((e=>za(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name)))):[],M=b?.custom?b.custom.map((e=>za(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],N=y?y.map((e=>za(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[];(0,h.useEffect)((()=>{x||I(null)}),[x]);const[F]=(0,h.useState)(new Set),V=e=>e.reduce(((e,t)=>{const n=t?.fontFace&&t.fontFace?.length>0?t?.fontFace.map((e=>`${e.fontStyle+e.fontWeight}`)):["normal400"];return e[t.slug]=n,e}),{}),R=e=>V("theme"===e?T:M),B=(e,t,n,r)=>t||n?!!R(r)[e]?.includes(t+n):!!R(r)[e],D=e=>{var t;const n=(null!==(t=b?.[e.source])&&void 0!==t?t:[]).filter((t=>t.slug!==e.slug)),r={...b,[e.source]:n};return w(r),e.fontFace&&e.fontFace.forEach((e=>{Wa(e,"all")})),r},L=e=>{const t=z(e),n={...b,custom:Ua(b?.custom,t)};return w(n),H(t),n},z=e=>e.map((({id:e,fontFace:t,...n})=>({...n,...t&&t.length>0?{fontFace:t.map((({id:e,...t})=>t))}:{}}))),H=e=>{e.forEach((e=>{e.fontFace&&e.fontFace.forEach((e=>{ja(e,qa(e.src),"all")}))}))},[G,U]=(0,h.useState)([]),j=async()=>{const e=await async function(){const e={path:`${Aa}?_fields=slug,name,description`,method:"GET"};return await zn()(e)}();U(e)};return(0,h.useEffect)((()=>{j()}),[]),(0,a.createElement)($a.Provider,{value:{libraryFontSelected:P,handleSetLibraryFontSelected:e=>{if(m(null),!e)return void I(null);const t=("theme"===e.source?T:N).find((t=>t.slug===e.slug));I({...t||e,source:e.source})},fontFamilies:b,themeFonts:T,baseThemeFonts:A,customFonts:M,baseCustomFonts:N,isFontActivated:B,getFontFacesActivated:(e,t)=>R(t)[e]||[],loadFontFaceAsset:async e=>{if(!e.src)return;const t=qa(e.src);t&&!F.has(t)&&(ja(e,t,"document"),F.add(t))},installFonts:async function(e){o(!0);try{const t=[];let n=[];for(const r of e){let e=!1,s=await Fa(r.slug);s||(e=!0,s=await Ma(Za(r)));const i=s.fontFace&&r.fontFace?s.fontFace.filter((e=>Xa(e,r.fontFace))):[];s.fontFace&&r.fontFace&&(r.fontFace=r.fontFace.filter((e=>!Xa(e,s.fontFace))));let a=[],o=[];if(r?.fontFace?.length>0){const e=await Ya(s.id,Ka(r));a=e?.successes,o=e?.errors}(a?.length>0||i?.length>0)&&(s.fontFace=[...a],t.push(s)),s&&!r?.fontFace?.length&&t.push(s),e&&r?.fontFace?.length>0&&0===a?.length&&await Va(s.id),n=n.concat(o)}if(n=n.reduce(((e,t)=>e.includes(t.message)?e:[...e,t.message]),[]),t.length>0){const e=L(t);await E(e),p()}if(n.length>0){const e=new Error((0,S.__)("There was an error installing fonts."));throw e.installationErrors=n,e}}finally{o(!1)}},uninstallFontFamily:async function(e){try{const t=await Va(e.id);if(t.deleted){const t=D(e);await E(t)}return p(),t}catch(e){throw console.error("There was an error uninstalling the font family:",e),e}},toggleActivateFont:(e,t)=>{var n;const r=Ja(e,t,null!==(n=b?.[e.source])&&void 0!==n?n:[]);w({...b,[e.source]:r});B(e.slug,t?.fontStyle,t?.fontWeight,e.source)?ja(t,qa(t?.src),"all"):Wa(t,"all")},getAvailableFontsOutline:V,modalTabOpen:x,toggleModal:e=>{k(e||null)},refreshLibrary:p,notice:d,setNotice:m,saveFontFamilies:E,fontFamiliesHasChanges:s,isResolvingLibrary:g,hasResolvedLibrary:v,isInstalling:i,collections:G,getFontCollection:async e=>{try{if(!!G.find((t=>t.slug===e))?.font_families)return;const t=await async function(e){const t={path:`${Aa}/${e}`,method:"GET"};return await zn()(t)}(e),n=G.map((n=>n.slug===e?{...n,...t}:n));U(n)}catch(e){throw console.error(e),e}}}},e)};const to=function({font:e,text:t}){const n=(0,h.useRef)(null),r=function(e){return e.fontStyle||e.fontWeight?e:e.fontFace&&e.fontFace.length?e.fontFace.find((e=>"normal"===e.fontStyle&&"400"===e.fontWeight))||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily,fake:!0}}(e),s=xi(e);t=t||e.name;const i=e.preview,[o,l]=(0,h.useState)(!1),[c,u]=(0,h.useState)(!1),{loadFontFaceAsset:d}=(0,h.useContext)($a),m=null!=i?i:function(e){return e.preview?e.preview:e.src?Array.isArray(e.src)?e.src[0]:e.src:void 0}(r),p=m&&m.match(/\.(png|jpg|jpeg|gif|svg)$/i);var f;const g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...s,...{fontFamily:Ei((f=r).fontFamily),fontStyle:f.fontStyle||"normal",fontWeight:f.fontWeight||"400"}};return(0,h.useEffect)((()=>{const e=new window.IntersectionObserver((([e])=>{l(e.isIntersecting)}),{});return e.observe(n.current),()=>e.disconnect()}),[n]),(0,h.useEffect)((()=>{(async()=>{o&&(!p&&r.src&&await d(r),u(!0))})()}),[r,o,d,p]),(0,a.createElement)("div",{ref:n},p?(0,a.createElement)("img",{src:m,loading:"lazy",alt:t,className:"font-library-modal__font-variant_demo-image"}):(0,a.createElement)(E.__experimentalText,{style:g,className:"font-library-modal__font-variant_demo-text"},t))};const no=function({font:e,onClick:t,variantsText:n,navigatorPath:r}){const s=e.fontFace?.length||1,i={cursor:t?"pointer":"default"},o=(0,E.__experimentalUseNavigator)();return(0,a.createElement)(E.Button,{onClick:()=>{t(),r&&o.goTo(r)},style:i,className:"font-library-modal__font-card"},(0,a.createElement)(E.Flex,{justify:"space-between",wrap:!1},(0,a.createElement)(to,{font:e}),(0,a.createElement)(E.Flex,{justify:"flex-end"},(0,a.createElement)(E.FlexItem,null,(0,a.createElement)(E.__experimentalText,{className:"font-library-modal__font-card__count"},n||(0,S.sprintf)((0,S._n)("%d variant","%d variants",s),s))),(0,a.createElement)(E.FlexItem,null,(0,a.createElement)(E.Icon,{icon:li})))))};const ro=function({face:e,font:t}){const{isFontActivated:n,toggleActivateFont:r}=(0,h.useContext)($a),s=t?.fontFace?.length>0?n(t.slug,e.fontStyle,e.fontWeight,t.source):n(t.slug,null,null,t.source),i=()=>{t?.fontFace?.length>0?r(t,e):r(t)},o=t.name+" "+Ha(e),{kebabCase:l}=ie(E.privateApis),c=l(`${t.slug}-${Ha(e)}`);return(0,a.createElement)("div",{className:"font-library-modal__font-card"},(0,a.createElement)(E.Flex,{justify:"flex-start",align:"center",gap:"1rem"},(0,a.createElement)(E.CheckboxControl,{checked:s,onChange:i,__nextHasNoMarginBottom:!0,id:c}),(0,a.createElement)("label",{htmlFor:c},(0,a.createElement)(to,{font:e,text:o,onClick:i}))))};function so(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function io(e){return e.sort(((e,t)=>"normal"===e.fontStyle&&"normal"!==t.fontStyle?-1:"normal"===t.fontStyle&&"normal"!==e.fontStyle?1:e.fontStyle===t.fontStyle?so(e.fontWeight)-so(t.fontWeight):e.fontStyle.localeCompare(t.fontStyle)))}const{ProgressBar:ao}=ie(E.privateApis);function oo({font:e,isOpen:t,setIsOpen:n,setNotice:r,uninstallFontFamily:s,handleSetLibraryFontSelected:i}){const o=(0,E.__experimentalUseNavigator)();return(0,a.createElement)(E.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,S.__)("Cancel"),confirmButtonText:(0,S.__)("Delete"),onCancel:()=>{n(!1)},onConfirm:async()=>{r(null),n(!1);try{await s(e),o.goBack(),i(null),r({type:"success",message:(0,S.__)("Font family uninstalled successfully.")})}catch(e){r({type:"error",message:(0,S.__)("There was an error uninstalling the font family. ")+e.message})}}},e&&(0,S.sprintf)((0,S.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name))}const lo=function(){const{baseCustomFonts:e,libraryFontSelected:t,baseThemeFonts:n,handleSetLibraryFontSelected:r,refreshLibrary:s,uninstallFontFamily:i,isResolvingLibrary:o,isInstalling:l,saveFontFamilies:c,getFontFacesActivated:d,fontFamiliesHasChanges:m,notice:p,setNotice:f,fontFamilies:g}=(0,h.useContext)($a),[v,y]=(0,h.useState)(!1),b="custom"===t?.source&&t?.id,w=(0,u.useSelect)((e=>{const{canUser:t}=e(C.store);return b&&t("delete","font-families",b)}),[b]),_=!!t&&"theme"!==t?.source&&w,x=e=>{const t=e?.fontFace?.length>0?e.fontFace.length:1,n=d(e.slug,e.source).length;return(0,S.sprintf)((0,S.__)("%1$s/%2$s variants active"),n,t)};return(0,h.useEffect)((()=>{r(t),s()}),[]),(0,a.createElement)("div",{className:"font-library-modal__tabpanel-layout"},o&&(0,a.createElement)("div",{className:"font-library-modal__loading"},(0,a.createElement)(ao,null)),!o&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalNavigatorProvider,{initialPath:t?"/fontFamily":"/"},(0,a.createElement)(E.__experimentalNavigatorScreen,{path:"/"},(0,a.createElement)(E.__experimentalVStack,{spacing:"8"},p&&(0,a.createElement)(E.Notice,{status:p.type,onRemove:()=>f(null)},p.message),e.length>0&&(0,a.createElement)(E.__experimentalVStack,null,(0,a.createElement)("h2",{className:"font-library-modal__fonts-title"},(0,S.__)("Installed Fonts")),(0,a.createElement)("ul",{role:"list",className:"font-library-modal__fonts-list"},e.map((e=>(0,a.createElement)("li",{key:e.slug,className:"font-library-modal__fonts-list-item"},(0,a.createElement)(no,{font:e,navigatorPath:"/fontFamily",variantsText:x(e),onClick:()=>{r(e)}})))))),n.length>0&&(0,a.createElement)(E.__experimentalVStack,null,(0,a.createElement)("h2",{className:"font-library-modal__fonts-title"},(0,S.__)("Theme Fonts")),(0,a.createElement)("ul",{role:"list",className:"font-library-modal__fonts-list"},n.map((e=>(0,a.createElement)("li",{key:e.slug,className:"font-library-modal__fonts-list-item"},(0,a.createElement)(no,{font:e,navigatorPath:"/fontFamily",variantsText:x(e),onClick:()=>{r(e)}})))))))),(0,a.createElement)(E.__experimentalNavigatorScreen,{path:"/fontFamily"},(0,a.createElement)(oo,{font:t,isOpen:v,setIsOpen:y,setNotice:f,uninstallFontFamily:i,handleSetLibraryFontSelected:r}),(0,a.createElement)(E.Flex,{justify:"flex-start"},(0,a.createElement)(E.__experimentalNavigatorToParentButton,{icon:oi,size:"small",onClick:()=>{r(null)},label:(0,S.__)("Back")}),(0,a.createElement)(E.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header"},t?.name)),p&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalSpacer,{margin:1}),(0,a.createElement)(E.Notice,{status:p.type,onRemove:()=>f(null)},p.message),(0,a.createElement)(E.__experimentalSpacer,{margin:1})),(0,a.createElement)(E.__experimentalSpacer,{margin:4}),(0,a.createElement)(E.__experimentalText,null,(0,S.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")),(0,a.createElement)(E.__experimentalSpacer,{margin:4}),(0,a.createElement)(E.__experimentalVStack,{spacing:0},(0,a.createElement)(E.__experimentalSpacer,{margin:8}),(e=>e?e.fontFace&&e.fontFace.length?io(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[])(t).map(((e,n)=>(0,a.createElement)(ro,{font:t,face:e,key:`face${n}`})))))),(0,a.createElement)(E.__experimentalHStack,{justify:"flex-end",className:"font-library-modal__tabpanel-layout__footer"},l&&(0,a.createElement)(ao,null),_&&(0,a.createElement)(E.Button,{isDestructive:!0,variant:"tertiary",onClick:()=>{y(!0)}},(0,S.__)("Delete")),(0,a.createElement)(E.Button,{variant:"primary",onClick:()=>{c(g)},disabled:!m,__experimentalIsFocusable:!0},(0,S.__)("Update")))))};function co(e,t,n){return t?!!n[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!n[e]}const uo=function(){return(0,a.createElement)("div",{className:"font-library__google-fonts-confirm"},(0,a.createElement)(E.Card,null,(0,a.createElement)(E.CardBody,null,(0,a.createElement)(E.__experimentalHeading,{level:2},(0,S.__)("Connect to Google Fonts")),(0,a.createElement)(E.__experimentalSpacer,{margin:6}),(0,a.createElement)(E.__experimentalText,{as:"p"},(0,S.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")),(0,a.createElement)(E.__experimentalSpacer,{margin:3}),(0,a.createElement)(E.__experimentalText,{as:"p"},(0,S.__)("You can alternatively upload files directly on the Upload tab.")),(0,a.createElement)(E.__experimentalSpacer,{margin:6}),(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))}},(0,S.__)("Allow access to Google Fonts")))))};const mo=function({face:e,font:t,handleToggleVariant:n,selected:r}){const s=()=>{t?.fontFace?n(t,e):n(t)},i=t.name+" "+Ha(e),{kebabCase:o}=ie(E.privateApis),l=o(`${t.slug}-${Ha(e)}`);return(0,a.createElement)("div",{className:"font-library-modal__font-card"},(0,a.createElement)(E.Flex,{justify:"flex-start",align:"center",gap:"1rem"},(0,a.createElement)(E.CheckboxControl,{checked:r,onChange:s,__nextHasNoMarginBottom:!0,id:l}),(0,a.createElement)("label",{htmlFor:l},(0,a.createElement)(to,{font:e,text:i,onClick:s}))))},{ProgressBar:po}=ie(E.privateApis),ho={slug:"all",name:(0,S._x)("All","font categories")},fo="wp-font-library-google-fonts-permission";const go=function({slug:e}){var t;const n="google-fonts"===e,r=()=>"true"===window.localStorage.getItem(fo),[s,i]=(0,h.useState)(null),[o,l]=(0,h.useState)([]),[c,u]=(0,h.useState)(1),[d,m]=(0,h.useState)({}),[p,f]=(0,h.useState)(n&&!r()),{collections:g,getFontCollection:v,installFonts:y,isInstalling:b,notice:_,setNotice:x}=(0,h.useContext)($a),C=g.find((t=>t.slug===e));(0,h.useEffect)((()=>{const e=()=>{f(n&&!r())};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[e,n]);const k=()=>{window.localStorage.setItem(fo,"false"),window.dispatchEvent(new Event("storage"))};(0,h.useEffect)((()=>{(async()=>{try{await v(e),L()}catch(e){_||x({type:"error",message:e?.message})}})()}),[e,v,x,_]),(0,h.useEffect)((()=>{i(null),x(null)}),[e,x]),(0,h.useEffect)((()=>{l([])}),[s]);const P=(0,h.useMemo)((()=>{var e;return null!==(e=C?.font_families)&&void 0!==e?e:[]}),[C]),I=null!==(t=C?.categories)&&void 0!==t?t:[],T=[ho,...I],O=(0,h.useMemo)((()=>function(e,t){const{category:n,search:r}=t;let s=e||[];return n&&"all"!==n&&(s=s.filter((e=>-1!==e.categories.indexOf(n)))),r&&(s=s.filter((e=>e.font_family_settings.name.toLowerCase().includes(r.toLowerCase())))),s}(P,d)),[P,d]),A=!C?.font_families&&!_,M=Math.max(window.innerHeight,500),N=Math.floor((M-417)/61),F=Math.ceil(O.length/N),V=(c-1)*N,R=c*N,B=O.slice(V,R),D=(0,w.debounce)((e=>{m({...d,search:e}),u(1)}),300),L=()=>{m({}),u(1)},z=(e,t)=>{const n=Ja(e,t,o);l(n)},H=function(e){return e.reduce(((e,t)=>({...e,[t.slug]:(t?.fontFace||[]).reduce(((e,t)=>({...e,[`${t.fontStyle}-${t.fontWeight}`]:!0})),{})})),{})}(o);return p?(0,a.createElement)(uo,null):(0,a.createElement)("div",{className:"font-library-modal__tabpanel-layout"},A&&(0,a.createElement)("div",{className:"font-library-modal__loading"},(0,a.createElement)(po,null)),!A&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalNavigatorProvider,{initialPath:"/",className:"font-library-modal__tabpanel-layout"},(0,a.createElement)(E.__experimentalNavigatorScreen,{path:"/"},(0,a.createElement)(E.__experimentalHStack,{justify:"space-between"},(0,a.createElement)(E.__experimentalVStack,null,(0,a.createElement)(E.__experimentalHeading,{level:2,size:13},C.name),(0,a.createElement)(E.__experimentalText,null,C.description)),(0,a.createElement)((()=>"google-fonts"!==e||p||s?null:(0,a.createElement)(E.DropdownMenu,{icon:ai,label:(0,S.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,S.__)("Revoke access to Google Fonts"),onClick:k}]})),null)),(0,a.createElement)(E.__experimentalSpacer,{margin:4}),(0,a.createElement)(E.Flex,null,(0,a.createElement)(E.FlexItem,null,(0,a.createElement)(E.SearchControl,{className:"font-library-modal__search",value:d.search,placeholder:(0,S.__)("Font name…"),label:(0,S.__)("Search"),onChange:D,__nextHasNoMarginBottom:!0,hideLabelFromVision:!1})),(0,a.createElement)(E.FlexItem,null,(0,a.createElement)(E.SelectControl,{label:(0,S.__)("Category"),value:d.category,onChange:e=>{m({...d,category:e}),u(1)}},T&&T.map((e=>(0,a.createElement)("option",{value:e.slug,key:e.slug},e.name)))))),(0,a.createElement)(E.__experimentalSpacer,{margin:4}),!!C?.font_families?.length&&!O.length&&(0,a.createElement)(E.__experimentalText,null,(0,S.__)("No fonts found. Try with a different search term")),(0,a.createElement)("div",{className:"font-library-modal__fonts-grid__main"},(0,a.createElement)("ul",{role:"list",className:"font-library-modal__fonts-list"},B.map((e=>(0,a.createElement)("li",{key:e.font_family_settings.slug,className:"font-library-modal__fonts-list-item"},(0,a.createElement)(no,{font:e.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{i(e.font_family_settings)}})))))," ")),(0,a.createElement)(E.__experimentalNavigatorScreen,{path:"/fontFamily"},(0,a.createElement)(E.Flex,{justify:"flex-start"},(0,a.createElement)(E.__experimentalNavigatorToParentButton,{icon:oi,size:"small",onClick:()=>{i(null),x(null)},label:(0,S.__)("Back")}),(0,a.createElement)(E.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header"},s?.name)),_&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalSpacer,{margin:1}),(0,a.createElement)(E.Notice,{status:_.type,onRemove:()=>x(null)},_.message),(0,a.createElement)(E.__experimentalSpacer,{margin:1})),(0,a.createElement)(E.__experimentalSpacer,{margin:4}),(0,a.createElement)(E.__experimentalText,null,(0,S.__)("Select font variants to install.")),(0,a.createElement)(E.__experimentalSpacer,{margin:4}),(0,a.createElement)(E.__experimentalVStack,{spacing:0},(0,a.createElement)(E.__experimentalSpacer,{margin:8}),(G=s,G?G.fontFace&&G.fontFace.length?io(G.fontFace):[{fontFamily:G.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[]).map(((e,t)=>(0,a.createElement)(mo,{font:s,face:e,key:`face${t}`,handleToggleVariant:z,selected:co(s.slug,s.fontFace?e:null,H)})))),(0,a.createElement)(E.__experimentalSpacer,{margin:16}))),s&&(0,a.createElement)(E.Flex,{justify:"flex-end",className:"font-library-modal__tabpanel-layout__footer"},(0,a.createElement)(E.Button,{variant:"primary",onClick:async()=>{x(null);const e=o[0];try{e?.fontFace&&await Promise.all(e.fontFace.map((async e=>{e.src&&(e.file=await async function(e){e=Array.isArray(e)?e:[e];const t=await Promise.all(e.map((async e=>fetch(new Request(e)).then((t=>{if(!t.ok)throw new Error(`Error downloading font face asset from ${e}. Server responded with status: ${t.status}`);return t.blob()})).then((t=>{const n=e.split("/").pop();return new La([t],n,{type:t.type})})))));return 1===t.length?t[0]:t}(e.src))})))}catch(e){return void x({type:"error",message:(0,S.__)("Error installing the fonts, could not be downloaded.")})}try{await y([e]),x({type:"success",message:(0,S.__)("Fonts were installed successfully.")})}catch(e){x({type:"error",message:e.message})}l([])},isBusy:b,disabled:0===o.length||b,__experimentalIsFocusable:!0},(0,S.__)("Install"))),!s&&(0,a.createElement)(E.Flex,{justify:"center",className:"font-library-modal__tabpanel-layout__footer"},(0,a.createElement)(E.Button,{label:(0,S.__)("First page"),size:"compact",onClick:()=>u(1),disabled:1===c,__experimentalIsFocusable:!0},(0,a.createElement)("span",null,"«")),(0,a.createElement)(E.Button,{label:(0,S.__)("Previous page"),size:"compact",onClick:()=>u(c-1),disabled:1===c,__experimentalIsFocusable:!0},(0,a.createElement)("span",null,"‹")),(0,a.createElement)(E.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:2},(0,h.createInterpolateElement)((0,S.sprintf)((0,S._x)("Page <CurrentPageControl /> of %s","paging"),F),{CurrentPageControl:(0,a.createElement)(E.SelectControl,{"aria-label":(0,S.__)("Current page"),value:c,options:[...Array(F)].map(((e,t)=>({label:t+1,value:t+1}))),onChange:e=>u(parseInt(e)),size:"compact",__nextHasNoMarginBottom:!0})})),(0,a.createElement)(E.Button,{label:(0,S.__)("Next page"),size:"compact",onClick:()=>u(c+1),disabled:c===F,__experimentalIsFocusable:!0},(0,a.createElement)("span",null,"›")),(0,a.createElement)(E.Button,{label:(0,S.__)("Last page"),size:"compact",onClick:()=>u(F),disabled:c===F,__experimentalIsFocusable:!0},(0,a.createElement)("span",null,"»")))));var G};var vo=s(8572),yo=s.n(vo),bo=s(4660),wo=s.n(bo);globalThis.fetch;class _o{constructor(e,t={},n){this.type=e,this.detail=t,this.msg=n,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}}class Eo{constructor(){this.listeners={}}addEventListener(e,t,n){let r=this.listeners[e]||[];n?r.unshift(t):r.push(t),this.listeners[e]=r}removeEventListener(e,t){let n=this.listeners[e]||[],r=n.findIndex((e=>e===t));r>-1&&(n.splice(r,1),this.listeners[e]=n)}dispatch(e){let t=this.listeners[e.type];if(t)for(let n=0,r=t.length;n<r&&e.__mayPropagate;n++)t[n](e)}}const So=new Date("1904-01-01T00:00:00+0000").getTime();class xo{constructor(e,t,n){this.name=(n||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach((e=>{let t=e.replace(/get(Big)?/,"").toLowerCase(),n=parseInt(e.replace(/[^\d]/g,""))/8;Object.defineProperty(this,t,{get:()=>this.getValue(e,n)})}))}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let n=this.start+this.offset;this.offset+=t;try{return this.data[e](n)}catch(n){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),n}}flags(e){if(8===e||16===e||32===e||64===e)return this[`uint${e}`].toString(2).padStart(e,0).split("").map((e=>"1"===e));console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){const e=this.uint32;return t=[e>>24&255,e>>16&255,e>>8&255,255&e],Array.from(t).map((e=>String.fromCharCode(e))).join("");var t}get fixed(){return this.int16+Math.round(1e3*this.uint16/65356)/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let t=this.uint8;if(e=128*e+(127&t),t<128)break}return e}get longdatetime(){return new Date(So+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){const e=p.uint16;return[0,1,-2,-1][e>>14]+(16383&e)/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,n=8,r=!1){if(0===(e=e||this.length))return[];t&&(this.currentPosition=t);const s=`${r?"":"u"}int${n}`,i=[];for(;e--;)i.push(this[s]);return i}}class Co{constructor(e){const t={enumerable:!1,get:()=>e};Object.defineProperty(this,"parser",t);const n=e.currentPosition,r={enumerable:!1,get:()=>n};Object.defineProperty(this,"start",r)}load(e){Object.keys(e).forEach((t=>{let n=Object.getOwnPropertyDescriptor(e,t);n.get?this[t]=n.get.bind(this):void 0!==n.value&&(this[t]=n.value)})),this.parser.length&&this.parser.verifyLength()}}class ko extends Co{constructor(e,t,n){const{parser:r,start:s}=super(new xo(e,t,n)),i={enumerable:!1,get:()=>r};Object.defineProperty(this,"p",i);const a={enumerable:!1,get:()=>s};Object.defineProperty(this,"tableStart",a)}}function Po(e,t,n){let r;Object.defineProperty(e,t,{get:()=>r||(r=n(),r),enumerable:!0})}class Io extends ko{constructor(e,t,n){const{p:r}=super({offset:0,length:12},t,"sfnt");this.version=r.uint32,this.numTables=r.uint16,this.searchRange=r.uint16,this.entrySelector=r.uint16,this.rangeShift=r.uint16,r.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new To(r))),this.tables={},this.directory.forEach((e=>{Po(this.tables,e.tag.trim(),(()=>n(this.tables,{tag:e.tag,offset:e.offset,length:e.length},t)))}))}}class To{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}}const Oo=wo().inflate||void 0;let Ao;class Mo extends ko{constructor(e,t,n){const{p:r}=super({offset:0,length:44},t,"woff");this.signature=r.tag,this.flavor=r.uint32,this.length=r.uint32,this.numTables=r.uint16,r.uint16,this.totalSfntSize=r.uint32,this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.metaOffset=r.uint32,this.metaLength=r.uint32,this.metaOrigLength=r.uint32,this.privOffset=r.uint32,this.privLength=r.uint32,r.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new No(r))),Fo(this,t,n)}}class No{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}}function Fo(e,t,n){e.tables={},e.directory.forEach((r=>{Po(e.tables,r.tag.trim(),(()=>{let s=0,i=t;if(r.compLength!==r.origLength){const e=t.buffer.slice(r.offset,r.offset+r.compLength);let n;if(Oo)n=Oo(new Uint8Array(e));else{if(!Ao){const e="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(e),new Error(e)}n=Ao(new Uint8Array(e))}i=new DataView(n.buffer)}else s=r.offset;return n(e.tables,{tag:r.tag,offset:s,length:r.origLength},i)}))}))}const Vo=yo();let Ro;class Bo extends ko{constructor(e,t,n){const{p:r}=super({offset:0,length:48},t,"woff2");this.signature=r.tag,this.flavor=r.uint32,this.length=r.uint32,this.numTables=r.uint16,r.uint16,this.totalSfntSize=r.uint32,this.totalCompressedSize=r.uint32,this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.metaOffset=r.uint32,this.metaLength=r.uint32,this.metaOrigLength=r.uint32,this.privOffset=r.uint32,this.privLength=r.uint32,r.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new Do(r)));let s,i=r.currentPosition;this.directory[0].offset=0,this.directory.forEach(((e,t)=>{let n=this.directory[t+1];n&&(n.offset=e.offset+(void 0!==e.transformLength?e.transformLength:e.origLength))}));let a=t.buffer.slice(i);if(Vo)s=Vo(new Uint8Array(a));else{if(!Ro){const t="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(t),new Error(t)}s=new Uint8Array(Ro(a))}!function(e,t,n){e.tables={},e.directory.forEach((r=>{Po(e.tables,r.tag.trim(),(()=>{const s=r.offset,i=s+(r.transformLength?r.transformLength:r.origLength),a=new DataView(t.slice(s,i).buffer);try{return n(e.tables,{tag:r.tag,offset:0,length:r.origLength},a)}catch(e){console.error(e)}}))}))}(this,s,n)}}class Do{constructor(e){this.flags=e.uint8;const t=this.tagNumber=63&this.flags;this.tag=63===t?e.tag:["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][63&t];let n=0!==(this.transformVersion=(192&this.flags)>>6);"glyf"!==this.tag&&"loca"!==this.tag||(n=3!==this.transformVersion),this.origLength=e.uint128,n&&(this.transformLength=e.uint128)}}const Lo={};let zo=!1;function Ho(e,t,n){let r=t.tag.replace(/[^\w\d]/g,""),s=Lo[r];return s?new s(t,n,e):(console.warn(`lib-font has no definition for ${r}. The table was skipped.`),{})}function Go(){let e=0;function t(n,r){if(!zo)return e>10?r(new Error("loading took too long")):(e++,setTimeout((()=>t(n)),250));n(Ho)}return new Promise(((e,n)=>t(e)))}async function Uo(e,t,n={}){if(!globalThis.document)return;let r=function(e,t){let n=e.lastIndexOf("."),r=(e.substring(n+1)||"").toLowerCase(),s={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[r];if(s)return s;let i={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[r];if(i||(i=`${e} is not a known webfont format.`),t)throw new Error(i);console.warn(`Could not load font: ${i}`)}(t,n.errorOnStyle);if(!r)return;let s=document.createElement("style");s.className="injected-by-Font-js";let i=[];return n.styleRules&&(i=Object.entries(n.styleRules).map((([e,t])=>`${e}: ${t};`))),s.textContent=`\n@font-face {\n font-family: "${e}";\n ${i.join("\n\t")}\n src: url("${t}") format("${r}");\n}`,globalThis.document.head.appendChild(s),s}Promise.all([Promise.resolve().then((function(){return ml})),Promise.resolve().then((function(){return pl})),Promise.resolve().then((function(){return hl})),Promise.resolve().then((function(){return gl})),Promise.resolve().then((function(){return vl})),Promise.resolve().then((function(){return wl})),Promise.resolve().then((function(){return _l})),Promise.resolve().then((function(){return Sl})),Promise.resolve().then((function(){return Fl})),Promise.resolve().then((function(){return ql})),Promise.resolve().then((function(){return Uc})),Promise.resolve().then((function(){return jc})),Promise.resolve().then((function(){return Zc})),Promise.resolve().then((function(){return Xc})),Promise.resolve().then((function(){return Jc})),Promise.resolve().then((function(){return Qc})),Promise.resolve().then((function(){return eu})),Promise.resolve().then((function(){return tu})),Promise.resolve().then((function(){return nu})),Promise.resolve().then((function(){return ru})),Promise.resolve().then((function(){return su})),Promise.resolve().then((function(){return iu})),Promise.resolve().then((function(){return ou})),Promise.resolve().then((function(){return mu})),Promise.resolve().then((function(){return hu})),Promise.resolve().then((function(){return fu})),Promise.resolve().then((function(){return gu})),Promise.resolve().then((function(){return vu})),Promise.resolve().then((function(){return yu})),Promise.resolve().then((function(){return _u})),Promise.resolve().then((function(){return ku})),Promise.resolve().then((function(){return Tu})),Promise.resolve().then((function(){return Au})),Promise.resolve().then((function(){return Fu})),Promise.resolve().then((function(){return Vu})),Promise.resolve().then((function(){return Ru})),Promise.resolve().then((function(){return Du})),Promise.resolve().then((function(){return Lu})),Promise.resolve().then((function(){return Uu})),Promise.resolve().then((function(){return ju})),Promise.resolve().then((function(){return qu}))]).then((e=>{e.forEach((e=>{let t=Object.keys(e)[0];Lo[t]=e[t]})),zo=!0}));const jo=[0,1,0,0],Wo=[79,84,84,79],qo=[119,79,70,70],Zo=[119,79,70,50];function Ko(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}class Yo extends Eo{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>{globalThis.document&&!this.options.skipStyleSheet&&await Uo(this.name,e,this.options),this.loadFont(e)})()}async loadFont(e,t){fetch(e).then((e=>function(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}(e)&&e.arrayBuffer())).then((n=>this.fromDataBuffer(n,t||e))).catch((n=>{const r=new _o("error",n,`Failed to load font at ${t||e}`);this.dispatch(r),this.onerror&&this.onerror(r)}))}async fromDataBuffer(e,t){this.fontData=new DataView(e);let n=function(e){const t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];return Ko(t,jo)||Ko(t,Wo)?"SFNT":Ko(t,qo)?"WOFF":Ko(t,Zo)?"WOFF2":void 0}(this.fontData);if(!n)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(n);const r=new _o("load",{font:this});this.dispatch(r),this.onload&&this.onload(r)}async parseBasicData(e){return Go().then((t=>("SFNT"===e&&(this.opentype=new Io(this,this.fontData,t)),"WOFF"===e&&(this.opentype=new Mo(this,this.fontData,t)),"WOFF2"===e&&(this.opentype=new Bo(this,this.fontData,t)),this.opentype)))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return 0!==this.getGlyphId(e)}supportsVariation(e){return!1!==this.opentype.tables.cmap.supportsVariation(e)}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let n=document.createElement("div");n.textContent=e,n.style.fontFamily=this.name,n.style.fontSize=`${t}px`,n.style.color="transparent",n.style.background="transparent",n.style.top="0",n.style.left="0",n.style.position="absolute",document.body.appendChild(n);let r=n.getBoundingClientRect();document.body.removeChild(n);const s=this.opentype.tables["OS/2"];return r.fontSize=t,r.ascender=s.sTypoAscender,r.descender=s.sTypoDescender,r}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);const e=new _o("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);const e=new _o("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}}globalThis.Font=Yo;class Xo extends Co{constructor(e,t,n){super(e),this.plaformID=t,this.encodingID=n}}class Jo extends Xo{constructor(e,t,n){super(e,t,n),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map((t=>e.uint8))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}}class Qo extends Xo{constructor(e,t,n){super(e,t,n),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map((t=>e.uint16));const r=Math.max(...this.subHeaderKeys),s=e.currentPosition;Po(this,"subHeaders",(()=>(e.currentPosition=s,[...new Array(r)].map((t=>new $o(e))))));const i=s+8*r;Po(this,"glyphIndexArray",(()=>(e.currentPosition=i,[...new Array(r)].map((t=>e.uint16)))))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));const t=e&&255,n=e&&65280,r=this.subHeaders[n],s=this.subHeaders[r],i=s.firstCode,a=i+s.entryCount;return i<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map((e=>({firstCode:e.firstCode,lastCode:e.lastCode}))):this.subHeaders.map((e=>({start:e.firstCode,end:e.lastCode})))}}class $o{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}}class el extends Xo{constructor(e,t,n){super(e,t,n),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;const r=e.currentPosition;Po(this,"endCode",(()=>e.readBytes(this.segCount,r,16)));const s=r+2+this.segCountX2;Po(this,"startCode",(()=>e.readBytes(this.segCount,s,16)));const i=s+this.segCountX2;Po(this,"idDelta",(()=>e.readBytes(this.segCount,i,16,!0)));const a=i+this.segCountX2;Po(this,"idRangeOffset",(()=>e.readBytes(this.segCount,a,16)));const o=a+this.segCountX2,l=this.length-(o-this.tableStart);Po(this,"glyphIdArray",(()=>e.readBytes(l,o,16))),Po(this,"segments",(()=>this.buildSegments(a,o,e)))}buildSegments(e,t,n){return[...new Array(this.segCount)].map(((t,r)=>{let s=this.startCode[r],i=this.endCode[r],a=this.idDelta[r],o=this.idRangeOffset[r],l=e+2*r,c=[];if(0===o)for(let e=s+a,t=i+a;e<=t;e++)c.push(e);else for(let e=0,t=i-s;e<=t;e++)n.currentPosition=l+o+2*e,c.push(n.uint16);return{startCode:s,endCode:i,idDelta:a,idRangeOffset:o,glyphIDs:c}}))}reverse(e){let t=this.segments.find((t=>t.glyphIDs.includes(e)));if(!t)return{};const n=t.startCode+t.glyphIDs.indexOf(e);return{code:n,unicode:String.fromCodePoint(n)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343)return 0;if(65534==(65534&e)||65535==(65535&e))return 0;let t=this.segments.find((t=>t.startCode<=e&&e<=t.endCode));return t?t.glyphIDs[e-t.startCode]:0}supports(e){return 0!==this.getGlyphId(e)}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map((e=>({start:e.startCode,end:e.endCode})))}}class tl extends Xo{constructor(e,t,n){super(e,t,n),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1;Po(this,"glyphIdArray",(()=>[...new Array(this.entryCount)].map((t=>e.uint16))))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};const t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}}class nl extends Xo{constructor(e,t,n){super(e,t,n),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map((t=>e.uint8)),this.numGroups=e.uint32;Po(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new rl(e)))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),-1!==this.groups.findIndex((t=>t.startcharCode<=e&&e<=t.endcharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startcharCode,end:e.endcharCode})))}}class rl{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}}class sl extends Xo{constructor(e,t,n){super(e,t,n),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars;Po(this,"glyphs",(()=>[...new Array(this.numChars)].map((t=>e.uint16))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),!(e<this.startCharCode)&&(!(e>this.startCharCode+this.numChars)&&e-this.startCharCode)}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}}class il extends Xo{constructor(e,t,n){super(e,t,n),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;Po(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new al(e)))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||65534==(65534&e)||65535==(65535&e)?0:-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){for(let t of this.groups){let n=t.startGlyphID;if(n>e)continue;if(n===e)return t.startCharCode;if(n+(t.endCharCode-t.startCharCode)<e)continue;const r=t.startCharCode+(e-n);return{code:r,unicode:String.fromCodePoint(r)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class al{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}}class ol extends Xo{constructor(e,t,n){super(e,t,n),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;Po(this,"groups",[...new Array(this.numGroups)].map((t=>new ll(e))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class ll{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}}class cl extends Xo{constructor(e,t,n){super(e,t,n),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,Po(this,"varSelectors",(()=>[...new Array(this.numVarSelectorRecords)].map((t=>new ul(e)))))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find((t=>t.varSelector===e));return t||!1}getSupportedVariations(){return this.varSelectors.map((e=>e.varSelector))}}class ul{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}}class dl{constructor(e,t){const n=this.platformID=e.uint16,r=this.encodingID=e.uint16,s=this.offset=e.Offset32;Po(this,"table",(()=>(e.currentPosition=t+s,function(e,t,n){const r=e.uint16;return 0===r?new Jo(e,t,n):2===r?new Qo(e,t,n):4===r?new el(e,t,n):6===r?new tl(e,t,n):8===r?new nl(e,t,n):10===r?new sl(e,t,n):12===r?new il(e,t,n):13===r?new ol(e,t,n):14===r?new cl(e,t,n):{}}(e,n,r))))}}var ml=Object.freeze({__proto__:null,cmap:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numTables=n.uint16,this.encodingRecords=[...new Array(this.numTables)].map((e=>new dl(n,this.tableStart)))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map((e=>({platformID:e.platformID,encodingId:e.encodingID})))}getSupportedCharCodes(e,t){const n=this.encodingRecords.findIndex((n=>n.platformID===e&&n.encodingID===t));if(-1===n)return!1;return this.getSubTable(n).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let n=this.getSubTable(t).reverse(e);if(n)return n}}getGlyphId(e){let t=0;return this.encodingRecords.some(((n,r)=>{let s=this.getSubTable(r);return!!s.getGlyphId&&(t=s.getGlyphId(e),0!==t)})),t}supports(e){return this.encodingRecords.some(((t,n)=>{const r=this.getSubTable(n);return r.supports&&!1!==r.supports(e)}))}supportsVariation(e){return this.encodingRecords.some(((t,n)=>{const r=this.getSubTable(n);return r.supportsVariation&&!1!==r.supportsVariation(e)}))}}});var pl=Object.freeze({__proto__:null,head:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.load({majorVersion:n.uint16,minorVersion:n.uint16,fontRevision:n.fixed,checkSumAdjustment:n.uint32,magicNumber:n.uint32,flags:n.flags(16),unitsPerEm:n.uint16,created:n.longdatetime,modified:n.longdatetime,xMin:n.int16,yMin:n.int16,xMax:n.int16,yMax:n.int16,macStyle:n.flags(16),lowestRecPPEM:n.uint16,fontDirectionHint:n.uint16,indexToLocFormat:n.uint16,glyphDataFormat:n.uint16})}}});var hl=Object.freeze({__proto__:null,hhea:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.ascender=n.fword,this.descender=n.fword,this.lineGap=n.fword,this.advanceWidthMax=n.ufword,this.minLeftSideBearing=n.fword,this.minRightSideBearing=n.fword,this.xMaxExtent=n.fword,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,n.int16,n.int16,n.int16,n.int16,this.metricDataFormat=n.int16,this.numberOfHMetrics=n.uint16,n.verifyLength()}}});class fl{constructor(e,t){this.advanceWidth=e,this.lsb=t}}var gl=Object.freeze({__proto__:null,hmtx:class extends ko{constructor(e,t,n){const{p:r}=super(e,t),s=n.hhea.numberOfHMetrics,i=n.maxp.numGlyphs,a=r.currentPosition;if(Po(this,"hMetrics",(()=>(r.currentPosition=a,[...new Array(s)].map((e=>new fl(r.uint16,r.int16)))))),s<i){const e=a+4*s;Po(this,"leftSideBearings",(()=>(r.currentPosition=e,[...new Array(i-s)].map((e=>r.int16)))))}}}});var vl=Object.freeze({__proto__:null,maxp:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.legacyFixed,this.numGlyphs=n.uint16,1===this.version&&(this.maxPoints=n.uint16,this.maxContours=n.uint16,this.maxCompositePoints=n.uint16,this.maxCompositeContours=n.uint16,this.maxZones=n.uint16,this.maxTwilightPoints=n.uint16,this.maxStorage=n.uint16,this.maxFunctionDefs=n.uint16,this.maxInstructionDefs=n.uint16,this.maxStackElements=n.uint16,this.maxSizeOfInstructions=n.uint16,this.maxComponentElements=n.uint16,this.maxComponentDepth=n.uint16),n.verifyLength()}}});class yl{constructor(e,t){this.length=e,this.offset=t}}class bl{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,Po(this,"string",(()=>(e.currentPosition=t.stringStart+this.offset,function(e,t){const{platformID:n,length:r}=t;if(0===r)return"";if(0===n||3===n){const t=[];for(let n=0,s=r/2;n<s;n++)t[n]=String.fromCharCode(e.uint16);return t.join("")}const s=e.readBytes(r),i=[];return s.forEach((function(e,t){i[t]=String.fromCharCode(e)})),i.join("")}(e,this))))}}var wl=Object.freeze({__proto__:null,name:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.format=n.uint16,this.count=n.uint16,this.stringOffset=n.Offset16,this.nameRecords=[...new Array(this.count)].map((e=>new bl(n,this))),1===this.format&&(this.langTagCount=n.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map((e=>new yl(n.uint16,n.Offset16)))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find((t=>t.nameID===e));if(t)return t.string}}});var _l=Object.freeze({__proto__:null,OS2:class extends ko{constructor(e,t){const{p:n}=super(e,t);return this.version=n.uint16,this.xAvgCharWidth=n.int16,this.usWeightClass=n.uint16,this.usWidthClass=n.uint16,this.fsType=n.uint16,this.ySubscriptXSize=n.int16,this.ySubscriptYSize=n.int16,this.ySubscriptXOffset=n.int16,this.ySubscriptYOffset=n.int16,this.ySuperscriptXSize=n.int16,this.ySuperscriptYSize=n.int16,this.ySuperscriptXOffset=n.int16,this.ySuperscriptYOffset=n.int16,this.yStrikeoutSize=n.int16,this.yStrikeoutPosition=n.int16,this.sFamilyClass=n.int16,this.panose=[...new Array(10)].map((e=>n.uint8)),this.ulUnicodeRange1=n.flags(32),this.ulUnicodeRange2=n.flags(32),this.ulUnicodeRange3=n.flags(32),this.ulUnicodeRange4=n.flags(32),this.achVendID=n.tag,this.fsSelection=n.uint16,this.usFirstCharIndex=n.uint16,this.usLastCharIndex=n.uint16,this.sTypoAscender=n.int16,this.sTypoDescender=n.int16,this.sTypoLineGap=n.int16,this.usWinAscent=n.uint16,this.usWinDescent=n.uint16,0===this.version?n.verifyLength():(this.ulCodePageRange1=n.flags(32),this.ulCodePageRange2=n.flags(32),1===this.version?n.verifyLength():(this.sxHeight=n.int16,this.sCapHeight=n.int16,this.usDefaultChar=n.uint16,this.usBreakChar=n.uint16,this.usMaxContext=n.uint16,this.version<=4?n.verifyLength():(this.usLowerOpticalPointSize=n.uint16,this.usUpperOpticalPointSize=n.uint16,5===this.version?n.verifyLength():void 0)))}}});const El=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];var Sl=Object.freeze({__proto__:null,post:class extends ko{constructor(e,t){const{p:n}=super(e,t);if(this.version=n.legacyFixed,this.italicAngle=n.fixed,this.underlinePosition=n.fword,this.underlineThickness=n.fword,this.isFixedPitch=n.uint32,this.minMemType42=n.uint32,this.maxMemType42=n.uint32,this.minMemType1=n.uint32,this.maxMemType1=n.uint32,1===this.version||3===this.version)return n.verifyLength();if(this.numGlyphs=n.uint16,2===this.version){this.glyphNameIndex=[...new Array(this.numGlyphs)].map((e=>n.uint16)),this.namesOffset=n.currentPosition,this.glyphNameOffsets=[1];for(let e=0;e<this.numGlyphs;e++){if(this.glyphNameIndex[e]<El.length){this.glyphNameOffsets.push(this.glyphNameOffsets[e]);continue}let t=n.int8;n.skip(t),this.glyphNameOffsets.push(this.glyphNameOffsets[e]+t+1)}}2.5===this.version&&(this.offset=[...new Array(this.numGlyphs)].map((e=>n.int8)))}getGlyphName(e){if(2!==this.version)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return El[t];let n=this.glyphNameOffsets[e],r=this.glyphNameOffsets[e+1]-n-1;if(0===r)return".notdef.";this.parser.currentPosition=this.namesOffset+n;return this.parser.readBytes(r,this.namesOffset+n,8,!0).map((e=>String.fromCharCode(e))).join("")}}});class xl extends ko{constructor(e,t){const{p:n}=super(e,t,"AxisTable");this.baseTagListOffset=n.Offset16,this.baseScriptListOffset=n.Offset16,Po(this,"baseTagList",(()=>new Cl({offset:e.offset+this.baseTagListOffset},t))),Po(this,"baseScriptList",(()=>new kl({offset:e.offset+this.baseScriptListOffset},t)))}}class Cl extends ko{constructor(e,t){const{p:n}=super(e,t,"BaseTagListTable");this.baseTagCount=n.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map((e=>n.tag))}}class kl extends ko{constructor(e,t){const{p:n}=super(e,t,"BaseScriptListTable");this.baseScriptCount=n.uint16;const r=n.currentPosition;Po(this,"baseScriptRecords",(()=>(n.currentPosition=r,[...new Array(this.baseScriptCount)].map((e=>new Pl(this.start,n))))))}}class Pl{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,Po(this,"baseScriptTable",(()=>(t.currentPosition=e+this.baseScriptOffset,new Il(t))))}}class Il{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map((t=>new Tl(this.start,e))),Po(this,"baseValues",(()=>(e.currentPosition=this.start+this.baseValuesOffset,new Ol(e)))),Po(this,"defaultMinMax",(()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new Al(e))))}}class Tl{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,Po(this,"minMax",(()=>(t.currentPosition=e+this.minMaxOffset,new Al(t))))}}class Ol{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map((t=>e.Offset16))}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new Nl(this.parser)}}class Al{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;const t=e.currentPosition;Po(this,"featMinMaxRecords",(()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map((t=>new Ml(e))))))}}class Ml{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}}class Nl{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,2===this.baseCoordFormat&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),3===this.baseCoordFormat&&(this.deviceTable=e.Offset16)}}var Fl=Object.freeze({__proto__:null,BASE:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.horizAxisOffset=n.Offset16,this.vertAxisOffset=n.Offset16,Po(this,"horizAxis",(()=>new xl({offset:e.offset+this.horizAxisOffset},t))),Po(this,"vertAxis",(()=>new xl({offset:e.offset+this.vertAxisOffset},t))),1===this.majorVersion&&1===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,Po(this,"itemVarStore",(()=>new xl({offset:e.offset+this.itemVarStoreOffset},t))))}}});class Vl{constructor(e){this.classFormat=e.uint16,1===this.classFormat&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.classFormat&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map((t=>new Rl(e))))}}class Rl{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}}class Bl extends Co{constructor(e){super(e),this.coverageFormat=e.uint16,1===this.coverageFormat&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.coverageFormat&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map((t=>new Dl(e))))}}class Dl{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}}class Ll{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map((e=>t.Offset32))}}class zl extends Co{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16))}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new Hl(this.parser)}}class Hl{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map((t=>e.uint16))}}class Gl extends Co{constructor(e){super(e),this.coverageOffset=e.Offset16,Po(this,"coverage",(()=>(e.currentPosition=this.start+this.coverageOffset,new Bl(e)))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map((t=>e.Offset16))}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new Ul(this.parser)}}class Ul extends Co{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map((t=>e.Offset16))}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new jl(this.parser)}}class jl{constructor(e){this.caretValueFormat=e.uint16,1===this.caretValueFormat&&(this.coordinate=e.int16),2===this.caretValueFormat&&(this.caretValuePointIndex=e.uint16),3===this.caretValueFormat&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}}class Wl extends Co{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map((t=>e.Offset32))}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new Bl(this.parser)}}var ql=Object.freeze({__proto__:null,GDEF:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.glyphClassDefOffset=n.Offset16,Po(this,"glyphClassDefs",(()=>{if(0!==this.glyphClassDefOffset)return n.currentPosition=this.tableStart+this.glyphClassDefOffset,new Vl(n)})),this.attachListOffset=n.Offset16,Po(this,"attachList",(()=>{if(0!==this.attachListOffset)return n.currentPosition=this.tableStart+this.attachListOffset,new zl(n)})),this.ligCaretListOffset=n.Offset16,Po(this,"ligCaretList",(()=>{if(0!==this.ligCaretListOffset)return n.currentPosition=this.tableStart+this.ligCaretListOffset,new Gl(n)})),this.markAttachClassDefOffset=n.Offset16,Po(this,"markAttachClassDef",(()=>{if(0!==this.markAttachClassDefOffset)return n.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Vl(n)})),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=n.Offset16,Po(this,"markGlyphSetsDef",(()=>{if(0!==this.markGlyphSetsDefOffset)return n.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new Wl(n)}))),3===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,Po(this,"itemVarStore",(()=>{if(0!==this.itemVarStoreOffset)return n.currentPosition=this.tableStart+this.itemVarStoreOffset,new Ll(n)})))}}});class Zl extends Co{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map((t=>new Kl(e)))}}class Kl{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}}class Yl extends Co{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map((t=>new Xl(e)))}}class Xl{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}}class Jl{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map((t=>e.uint16))}}class Ql extends Co{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map((t=>new $l(e)))}}class $l{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}}class ec extends Co{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map((t=>e.uint16))}getFeatureParams(){if(this.featureParams>0){const e=this.parser;e.currentPosition=this.start+this.featureParams;const t=this.featureTag;if("size"===t)return new nc(e);if(t.startsWith("cc"))return new tc(e);if(t.startsWith("ss"))return new rc(e)}}}class tc{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map((t=>e.uint24))}}class nc{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}}class rc{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}}function sc(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}class ic extends Co{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new Bl(e)}}class ac{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class oc extends ic{constructor(e){super(e),this.deltaGlyphID=e.int16}}class lc extends ic{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map((t=>e.Offset16))}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new cc(t)}}class cc{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class uc extends ic{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map((t=>e.Offset16))}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new dc(t)}}class dc{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class mc extends ic{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map((t=>e.Offset16))}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new pc(t)}}class pc extends Co{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map((t=>e.Offset16))}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new hc(t)}}class hc{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map((t=>e.uint16))}}class fc extends ic{constructor(e){super(e),1===this.substFormat&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(sc(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new ac(e))))}getSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new gc(t)}getSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new yc(t)}getCoverageTable(e){if(3!==this.substFormat&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new Bl(t)}}class gc extends Co{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new vc(t)}}class vc{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map((t=>e.uint16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new ac(e)))}}class yc extends Co{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new bc(t)}}class bc extends vc{constructor(e){super(e)}}class wc extends ic{constructor(e){super(e),1===this.substFormat&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(sc(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Cc(e))))}getChainSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new _c(t)}getChainSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new Sc(t)}getCoverageFromOffset(e){if(3!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new Bl(t)}}class _c extends Co{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new Ec(t)}}class Ec{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map((t=>new ac(e)))}}class Sc extends Co{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new xc(t)}}class xc{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Cc(e)))}}class Cc extends Co{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class kc extends Co{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}}class Pc extends ic{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}var Ic={buildSubtable:function(e,t){const n=new[void 0,oc,lc,uc,mc,fc,wc,kc,Pc][e](t);return n.type=e,n}};class Tc extends Co{constructor(e){super(e)}}class Oc extends Tc{constructor(e){super(e),console.log("lookup type 1")}}class Ac extends Tc{constructor(e){super(e),console.log("lookup type 2")}}class Mc extends Tc{constructor(e){super(e),console.log("lookup type 3")}}class Nc extends Tc{constructor(e){super(e),console.log("lookup type 4")}}class Fc extends Tc{constructor(e){super(e),console.log("lookup type 5")}}class Vc extends Tc{constructor(e){super(e),console.log("lookup type 6")}}class Rc extends Tc{constructor(e){super(e),console.log("lookup type 7")}}class Bc extends Tc{constructor(e){super(e),console.log("lookup type 8")}}class Dc extends Tc{constructor(e){super(e),console.log("lookup type 9")}}var Lc={buildSubtable:function(e,t){const n=new[void 0,Oc,Ac,Mc,Nc,Fc,Vc,Rc,Bc,Dc][e](t);return n.type=e,n}};class zc extends Co{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map((t=>e.Offset16))}}class Hc extends Co{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map((t=>e.Offset16)),this.markFilteringSet=e.uint16}get rightToLeft(){return!0&this.lookupFlag}get ignoreBaseGlyphs(){return!0&this.lookupFlag}get ignoreLigatures(){return!0&this.lookupFlag}get ignoreMarks(){return!0&this.lookupFlag}get useMarkFilteringSet(){return!0&this.lookupFlag}get markAttachmentType(){return!0&this.lookupFlag}getSubTable(e){const t="GSUB"===this.ctType?Ic:Lc;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}}class Gc extends ko{constructor(e,t,n){const{p:r,tableStart:s}=super(e,t,n);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.scriptListOffset=r.Offset16,this.featureListOffset=r.Offset16,this.lookupListOffset=r.Offset16,1===this.majorVersion&&1===this.minorVersion&&(this.featureVariationsOffset=r.Offset32);const i=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Po(this,"scriptList",(()=>i?Zl.EMPTY:(r.currentPosition=s+this.scriptListOffset,new Zl(r)))),Po(this,"featureList",(()=>i?Ql.EMPTY:(r.currentPosition=s+this.featureListOffset,new Ql(r)))),Po(this,"lookupList",(()=>i?zc.EMPTY:(r.currentPosition=s+this.lookupListOffset,new zc(r)))),this.featureVariationsOffset&&Po(this,"featureVariations",(()=>i?FeatureVariations.EMPTY:(r.currentPosition=s+this.featureVariationsOffset,new FeatureVariations(r))))}getSupportedScripts(){return this.scriptList.scriptRecords.map((e=>e.scriptTag))}getScriptTable(e){let t=this.scriptList.scriptRecords.find((t=>t.scriptTag===e));this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let n=new Yl(this.parser);return n.scriptTag=e,n}ensureScriptTable(e){return"string"==typeof e?this.getScriptTable(e):e}getSupportedLangSys(e){const t=0!==(e=this.ensureScriptTable(e)).defaultLangSys,n=e.langSysRecords.map((e=>e.langSysTag));return t&&n.unshift("dflt"),n}getDefaultLangSysTable(e){let t=(e=this.ensureScriptTable(e)).defaultLangSys;if(0!==t){this.parser.currentPosition=e.start+t;let n=new Jl(this.parser);return n.langSysTag="",n.defaultForScript=e.scriptTag,n}}getLangSysTable(e,t="dflt"){if("dflt"===t)return this.getDefaultLangSysTable(e);let n=(e=this.ensureScriptTable(e)).langSysRecords.find((e=>e.langSysTag===t));this.parser.currentPosition=e.start+n.langSysOffset;let r=new Jl(this.parser);return r.langSysTag=t,r}getFeatures(e){return e.featureIndices.map((e=>this.getFeature(e)))}getFeature(e){let t;if(t=parseInt(e)==e?this.featureList.featureRecords[e]:this.featureList.featureRecords.find((t=>t.featureTag===e)),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let n=new ec(this.parser);return n.featureTag=t.featureTag,n}getLookups(e){return e.lookupListIndices.map((e=>this.getLookup(e)))}getLookup(e,t){let n=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+n,new Hc(this.parser,t)}}var Uc=Object.freeze({__proto__:null,GSUB:class extends Gc{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}}});var jc=Object.freeze({__proto__:null,GPOS:class extends Gc{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}}});class Wc extends Co{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map((t=>new qc(e)))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let n=this.start+t.svgDocOffset;return this.parser.currentPosition=n,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex((t=>t.startGlyphID<=e&&e<=t.endGlyphID));return-1===t?"":this.getDocument(t)}}class qc{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}}var Zc=Object.freeze({__proto__:null,SVG:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.offsetToSVGDocumentList=n.Offset32,n.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new Wc(n)}}});class Kc{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}}class Yc{constructor(e,t,n){let r=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map((t=>e.fixed)),e.currentPosition-r<n&&(this.postScriptNameID=e.uint16)}}var Xc=Object.freeze({__proto__:null,fvar:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.axesArrayOffset=n.Offset16,n.uint16,this.axisCount=n.uint16,this.axisSize=n.uint16,this.instanceCount=n.uint16,this.instanceSize=n.uint16;const r=this.tableStart+this.axesArrayOffset;Po(this,"axes",(()=>(n.currentPosition=r,[...new Array(this.axisCount)].map((e=>new Kc(n))))));const s=r+this.axisCount*this.axisSize;Po(this,"instances",(()=>{let e=[];for(let t=0;t<this.instanceCount;t++)n.currentPosition=s+t*this.instanceSize,e.push(new Yc(n,this.axisCount,this.instanceSize));return e}))}getSupportedAxes(){return this.axes.map((e=>e.tag))}getAxis(e){return this.axes.find((t=>t.tag===e))}}});var Jc=Object.freeze({__proto__:null,cvt:class extends ko{constructor(e,t){const{p:n}=super(e,t),r=e.length/2;Po(this,"items",(()=>[...new Array(r)].map((e=>n.fword))))}}});var Qc=Object.freeze({__proto__:null,fpgm:class extends ko{constructor(e,t){const{p:n}=super(e,t);Po(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});class $c{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}}var eu=Object.freeze({__proto__:null,gasp:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRanges=n.uint16;Po(this,"gaspRanges",(()=>[...new Array(this.numRanges)].map((e=>new $c(n)))))}}});var tu=Object.freeze({__proto__:null,glyf:class extends ko{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}}});var nu=Object.freeze({__proto__:null,loca:class extends ko{constructor(e,t,n){const{p:r}=super(e,t),s=n.maxp.numGlyphs+1;0===n.head.indexToLocFormat?(this.x2=!0,Po(this,"offsets",(()=>[...new Array(s)].map((e=>r.Offset16))))):Po(this,"offsets",(()=>[...new Array(s)].map((e=>r.Offset32))))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1;return{offset:t,length:(this.offsets[e+1]*this.x2?2:1)-t}}}});var ru=Object.freeze({__proto__:null,prep:class extends ko{constructor(e,t){const{p:n}=super(e,t);Po(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});var su=Object.freeze({__proto__:null,CFF:class extends ko{constructor(e,t){const{p:n}=super(e,t);Po(this,"data",(()=>n.readBytes()))}}});var iu=Object.freeze({__proto__:null,CFF2:class extends ko{constructor(e,t){const{p:n}=super(e,t);Po(this,"data",(()=>n.readBytes()))}}});class au{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}}var ou=Object.freeze({__proto__:null,VORG:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.defaultVertOriginY=n.int16,this.numVertOriginYMetrics=n.uint16,Po(this,"vertORiginYMetrics",(()=>[...new Array(this.numVertOriginYMetrics)].map((e=>new au(n)))))}}});class lu{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new uu(e),this.vert=new uu(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}}class cu{constructor(e){this.hori=new uu(e),this.vert=new uu(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}}class uu{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}}class du extends ko{constructor(e,t,n){const{p:r}=super(e,t,n);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,Po(this,"bitMapSizes",(()=>[...new Array(this.numSizes)].map((e=>new lu(r)))))}}var mu=Object.freeze({__proto__:null,EBLC:du});class pu extends ko{constructor(e,t,n){const{p:r}=super(e,t,n);this.majorVersion=r.uint16,this.minorVersion=r.uint16}}var hu=Object.freeze({__proto__:null,EBDT:pu});var fu=Object.freeze({__proto__:null,EBSC:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.numSizes=n.uint32,Po(this,"bitmapScales",(()=>[...new Array(this.numSizes)].map((e=>new cu(n)))))}}});var gu=Object.freeze({__proto__:null,CBLC:class extends du{constructor(e,t){super(e,t,"CBLC")}}});var vu=Object.freeze({__proto__:null,CBDT:class extends pu{constructor(e,t){super(e,t,"CBDT")}}});var yu=Object.freeze({__proto__:null,sbix:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.flags=n.flags(16),this.numStrikes=n.uint32,Po(this,"strikeOffsets",(()=>[...new Array(this.numStrikes)].map((e=>n.Offset32))))}}});class bu{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}}class wu{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}}var _u=Object.freeze({__proto__:null,COLR:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numBaseGlyphRecords=n.uint16,this.baseGlyphRecordsOffset=n.Offset32,this.layerRecordsOffset=n.Offset32,this.numLayerRecords=n.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let n=new bu(this.parser),r=n.gID,s=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=s;let i=new bu(this.parser),a=i.gID;if(r===e)return n;if(a===e)return i;for(;t!==s;){let n=t+(s-t)/12;this.parser.currentPosition=n;let r=new bu(this.parser),i=r.gID;if(i===e)return r;i>e?s=n:i<e&&(t=n)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map((e=>new wu(p)))}}});class Eu{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}}class Su{constructor(e,t){this.paletteTypes=[...new Array(t)].map((t=>e.uint32))}}class xu{constructor(e,t){this.paletteLabels=[...new Array(t)].map((t=>e.uint16))}}class Cu{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map((t=>e.uint16))}}var ku=Object.freeze({__proto__:null,CPAL:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numPaletteEntries=n.uint16;const r=this.numPalettes=n.uint16;this.numColorRecords=n.uint16,this.offsetFirstColorRecord=n.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map((e=>n.uint16)),Po(this,"colorRecords",(()=>(n.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map((e=>new Eu(n)))))),1===this.version&&(this.offsetPaletteTypeArray=n.Offset32,this.offsetPaletteLabelArray=n.Offset32,this.offsetPaletteEntryLabelArray=n.Offset32,Po(this,"paletteTypeArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new Su(n,r)))),Po(this,"paletteLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new xu(n,r)))),Po(this,"paletteEntryLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new Cu(n,r)))))}}});class Pu{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}}class Iu{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}}var Tu=Object.freeze({__proto__:null,DSIG:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.numSignatures=n.uint16,this.flags=n.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map((e=>new Pu(n)))}getData(e){const t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new Iu(this.parser)}}});class Ou{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}}var Au=Object.freeze({__proto__:null,hdmx:class extends ko{constructor(e,t,n){const{p:r}=super(e,t),s=n.hmtx.numGlyphs;this.version=r.uint16,this.numRecords=r.int16,this.sizeDeviceRecord=r.int32,this.records=[...new Array(numRecords)].map((e=>new Ou(r,s)))}}});class Mu{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,0===this.format&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,Po(this,"pairs",(()=>[...new Array(this.nPairs)].map((t=>new Nu(e)))))),2===this.format&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}}class Nu{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}}var Fu=Object.freeze({__proto__:null,kern:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.nTables=n.uint16,Po(this,"tables",(()=>{let e=this.tableStart+4;const t=[];for(let r=0;r<this.nTables;r++){n.currentPosition=e;let r=new Mu(n);t.push(r),e+=r}return t}))}}});var Vu=Object.freeze({__proto__:null,LTSH:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numGlyphs=n.uint16,this.yPels=n.readBytes(this.numGlyphs)}}});var Ru=Object.freeze({__proto__:null,MERG:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.mergeClassCount=n.uint16,this.mergeDataOffset=n.Offset16,this.classDefCount=n.uint16,this.offsetToClassDefOffsets=n.Offset16,Po(this,"mergeEntryMatrix",(()=>[...new Array(this.mergeClassCount)].map((e=>n.readBytes(this.mergeClassCount))))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class Bu{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}}var Du=Object.freeze({__proto__:null,meta:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.flags=n.uint32,n.uint32,this.dataMapsCount=n.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map((e=>new Bu(this.tableStart,n)))}}});var Lu=Object.freeze({__proto__:null,PCLT:class extends ko{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class zu{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}}class Hu{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map((t=>new Gu(e)))}}class Gu{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}}var Uu=Object.freeze({__proto__:null,VDMX:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRecs=n.uint16,this.numRatios=n.uint16,this.ratRanges=[...new Array(this.numRatios)].map((e=>new zu(n))),this.offsets=[...new Array(this.numRatios)].map((e=>n.Offset16)),this.VDMXGroups=[...new Array(this.numRecs)].map((e=>new Hu(n)))}}});var ju=Object.freeze({__proto__:null,vhea:class extends ko{constructor(e,t){const{p:n}=super(e,t);this.version=n.fixed,this.ascent=this.vertTypoAscender=n.int16,this.descent=this.vertTypoDescender=n.int16,this.lineGap=this.vertTypoLineGap=n.int16,this.advanceHeightMax=n.int16,this.minTopSideBearing=n.int16,this.minBottomSideBearing=n.int16,this.yMaxExtent=n.int16,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.metricDataFormat=n.int16,this.numOfLongVerMetrics=n.uint16,n.verifyLength()}}});class Wu{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}}var qu=Object.freeze({__proto__:null,vmtx:class extends ko{constructor(e,t,n){super(e,t);const r=n.vhea.numOfLongVerMetrics,s=n.maxp.numGlyphs,i=p.currentPosition;if(lazy(this,"vMetrics",(()=>(p.currentPosition=i,[...new Array(r)].map((e=>new Wu(p.uint16,p.int16)))))),r<s){const e=i+4*r;lazy(this,"topSideBearings",(()=>(p.currentPosition=e,[...new Array(s-r)].map((e=>p.int16)))))}}}});const{kebabCase:Zu}=ie(E.privateApis);const{ProgressBar:Ku}=ie(E.privateApis);const Yu=function(){const{installFonts:e,notice:t,setNotice:n}=(0,h.useContext)($a),[r,s]=(0,h.useState)(!1),i=async e=>{n(null),s(!0);const t=new Set,r=[...e];let i=!1;const a=r.map((async e=>{const n=await async function(e){const t=new Yo("Uploaded Font");try{const n=await l(e);return await t.fromDataBuffer(n,"font"),!0}catch(e){return!1}}(e);if(!n)return i=!0,null;if(t.has(e.name))return null;const r=e.name.split(".").pop().toLowerCase();return Ra.includes(r)?(t.add(e.name),e):null})),c=(await Promise.all(a)).filter((e=>null!==e));if(c.length>0)o(c);else{const e=i?(0,S.__)("Sorry, you are not allowed to upload this file type."):(0,S.__)("No fonts found to install.");n({type:"error",message:e}),s(!1)}},o=async e=>{const t=await Promise.all(e.map((async e=>{const t=await c(e);return await ja(t,t.file,"all"),t})));u(t)};async function l(e){return new Promise(((t,n)=>{const r=new window.FileReader;r.readAsArrayBuffer(e),r.onload=()=>t(r.result),r.onerror=n}))}const c=async e=>{const t=await l(e),n=new Yo("Uploaded Font");n.fromDataBuffer(t,e.name);const r=(await new Promise((e=>n.onload=e))).detail.font,{name:s}=r.opentype.tables,i=s.get(16)||s.get(1),a=s.get(2).toLowerCase().includes("italic"),o=r.opentype.tables["OS/2"].usWeightClass||"normal",c=!!r.opentype.tables.fvar&&r.opentype.tables.fvar.axes.find((({tag:e})=>"wght"===e));return{file:e,fontFamily:i,fontStyle:a?"italic":"normal",fontWeight:(c?`${c.minValue} ${c.maxValue}`:null)||o}},u=async t=>{const r=function(e){const t=e.reduce(((e,t)=>(e[t.fontFamily]||(e[t.fontFamily]={name:t.fontFamily,fontFamily:t.fontFamily,slug:Zu(t.fontFamily.toLowerCase()),fontFace:[]}),e[t.fontFamily].fontFace.push(t),e)),{});return Object.values(t)}(t);try{await e(r),n({type:"success",message:(0,S.__)("Fonts were installed successfully.")})}catch(e){n({type:"error",message:e.message,errors:e?.installationErrors})}s(!1)};return(0,a.createElement)("div",{className:"font-library-modal__tabpanel-layout"},(0,a.createElement)(E.DropZone,{onFilesDrop:e=>{i(e)}}),(0,a.createElement)(E.__experimentalVStack,{className:"font-library-modal__local-fonts"},t&&(0,a.createElement)(E.Notice,{status:t.type,__unstableHTML:!0,onRemove:()=>n(null)},t.message,t.errors&&(0,a.createElement)("ul",null,t.errors.map(((e,t)=>(0,a.createElement)("li",{key:t},e))))),r&&(0,a.createElement)(E.FlexItem,null,(0,a.createElement)("div",{className:"font-library-modal__upload-area"},(0,a.createElement)(Ku,null))),!r&&(0,a.createElement)(E.FormFileUpload,{accept:Ra.map((e=>`.${e}`)).join(","),multiple:!0,onChange:e=>{i(e.target.files)},render:({openFileDialog:e})=>(0,a.createElement)(E.Button,{className:"font-library-modal__upload-area",onClick:e},(0,S.__)("Upload font"))}),(0,a.createElement)(E.__experimentalSpacer,{margin:2}),(0,a.createElement)(E.__experimentalText,{className:"font-library-modal__upload-area__text"},(0,S.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2."))))},{Tabs:Xu}=ie(E.privateApis),Ju={id:"installed-fonts",title:(0,S._x)("Library","Font library")},Qu={id:"upload-fonts",title:(0,S.__)("Upload")};const $u=function({onRequestClose:e,defaultTabId:t="installed-fonts"}){const{collections:n,setNotice:r}=(0,h.useContext)($a),s=(0,u.useSelect)((e=>{const{canUser:t}=e(C.store);return t("create","font-families")}),[]),i=[Ju];return s&&(i.push(Qu),i.push(...(e=>e.map((({slug:t,name:n})=>({id:t,title:1===e.length&&"google-fonts"===t?(0,S.__)("Install Fonts"):n}))))(n||[]))),(0,a.createElement)(E.Modal,{title:(0,S.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal"},(0,a.createElement)("div",{className:"font-library-modal__tabs"},(0,a.createElement)(Xu,{defaultTabId:t,onSelect:()=>{r(null)}},(0,a.createElement)(Xu.TabList,null,i.map((({id:e,title:t})=>(0,a.createElement)(Xu.Tab,{key:e,tabId:e},t)))),i.map((({id:e})=>{let t;switch(e){case"upload-fonts":t=(0,a.createElement)(Yu,null);break;case"installed-fonts":t=(0,a.createElement)(lo,null);break;default:t=(0,a.createElement)(go,{slug:e})}return(0,a.createElement)(Xu.TabPanel,{key:e,tabId:e,focusable:!1},t)})))))};const ed=function({font:e}){const{handleSetLibraryFontSelected:t,toggleModal:n}=(0,h.useContext)($a),r=e?.fontFace?.length||1,s=xi(e);return(0,a.createElement)(E.__experimentalItem,{onClick:()=>{t(e),n("installed-fonts")}},(0,a.createElement)(E.__experimentalHStack,{justify:"space-between"},(0,a.createElement)(E.FlexItem,{style:s},e.name),(0,a.createElement)(E.FlexItem,{className:"edit-site-global-styles-screen-typography__font-variants-count"},(0,S.sprintf)((0,S._n)("%d variant","%d variants",r),r))))};function td(){const{modalTabOpen:e,toggleModal:t,themeFonts:n,customFonts:r}=(0,h.useContext)($a),s=0<r.length||0<n.length;return(0,a.createElement)(a.Fragment,null,!!e&&(0,a.createElement)($u,{onRequestClose:()=>t(),defaultTabId:e}),(0,a.createElement)(E.__experimentalVStack,{spacing:2},(0,a.createElement)(E.__experimentalHStack,{justify:"space-between"},(0,a.createElement)(na,{level:3},(0,S.__)("Fonts")),(0,a.createElement)(E.__experimentalHStack,{justify:"flex-end"},(0,a.createElement)(E.Tooltip,{text:(0,S.__)("Manage fonts")},(0,a.createElement)(E.Button,{onClick:()=>t("installed-fonts"),"aria-label":(0,S.__)("Manage fonts"),icon:Ta,size:"small"})))),s?(0,a.createElement)(E.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},r.map((e=>(0,a.createElement)(ed,{key:e.slug,font:e}))),n.map((e=>(0,a.createElement)(ed,{key:e.slug,font:e})))):(0,a.createElement)(a.Fragment,null,(0,S.__)("No fonts installed."),(0,a.createElement)(E.Button,{className:"edit-site-global-styles-font-families__add-fonts",variant:"secondary",onClick:()=>t("upload-fonts")},(0,S.__)("Add fonts")))))}const nd=({...e})=>(0,a.createElement)(eo,null,(0,a.createElement)(td,{...e}));const rd=function(){const e=(0,u.useSelect)((e=>e(f.store).getEditorSettings().fontLibraryEnabled),[]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:(0,S.__)("Typography"),description:(0,S.__)("Typography styles and the application of those styles on site elements.")}),(0,a.createElement)("div",{className:"edit-site-global-styles-screen"},(0,a.createElement)(E.__experimentalVStack,{spacing:7},(0,a.createElement)(Ia,{title:(0,S.__)("Presets")}),!window.__experimentalDisableFontLibrary&&e&&(0,a.createElement)(nd,null),(0,a.createElement)(Sa,null))))},{useGlobalStyle:sd,useGlobalSetting:id,useSettingsForBlockElement:ad,TypographyPanel:od}=ie(_.privateApis);function ld({element:e,headingLevel:t}){let n=[];"heading"===e?n=n.concat(["elements",t]):e&&"text"!==e&&(n=n.concat(["elements",e]));const r=n.join("."),[s]=sd(r,void 0,"user",{shouldDecodeEncode:!1}),[i,o]=sd(r,void 0,"all",{shouldDecodeEncode:!1}),[l]=id(""),c=ad(l,void 0,"heading"===e?t:e);return(0,a.createElement)(od,{inheritedValue:i,value:s,onChange:o,settings:c})}const{useGlobalStyle:cd}=ie(_.privateApis);function ud({name:e,element:t,headingLevel:n}){var r;let s="";"heading"===t?s=`elements.${n}.`:t&&"text"!==t&&(s=`elements.${t}.`);const[i]=cd(s+"typography.fontFamily",e),[o]=cd(s+"color.gradient",e),[l]=cd(s+"color.background",e),[c]=cd("color.background"),[u]=cd(s+"color.text",e),[d]=cd(s+"typography.fontSize",e),[m]=cd(s+"typography.fontStyle",e),[p]=cd(s+"typography.fontWeight",e),[h]=cd(s+"typography.letterSpacing",e),f="link"===t?{textDecoration:"underline"}:{};return(0,a.createElement)("div",{className:"edit-site-typography-preview",style:{fontFamily:null!=i?i:"serif",background:null!==(r=null!=o?o:l)&&void 0!==r?r:c,color:u,fontSize:d,fontStyle:m,fontWeight:p,letterSpacing:h,...f}},"Aa")}const dd={text:{description:(0,S.__)("Manage the fonts used on the site."),title:(0,S.__)("Text")},link:{description:(0,S.__)("Manage the fonts and typography used on the links."),title:(0,S.__)("Links")},heading:{description:(0,S.__)("Manage the fonts and typography used on headings."),title:(0,S.__)("Headings")},caption:{description:(0,S.__)("Manage the fonts and typography used on captions."),title:(0,S.__)("Captions")},button:{description:(0,S.__)("Manage the fonts and typography used on buttons."),title:(0,S.__)("Buttons")}};const md=function({element:e}){const[t,n]=(0,h.useState)("heading");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:dd[e].title,description:dd[e].description}),(0,a.createElement)(E.__experimentalSpacer,{marginX:4},(0,a.createElement)(ud,{element:e,headingLevel:t})),"heading"===e&&(0,a.createElement)(E.__experimentalSpacer,{marginX:4,marginBottom:"1em"},(0,a.createElement)(E.__experimentalToggleGroupControl,{label:(0,S.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:n,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0},(0,a.createElement)(E.__experimentalToggleGroupControlOption,{value:"heading",label:(0,S._x)("All","heading levels")}),(0,a.createElement)(E.__experimentalToggleGroupControlOption,{value:"h1",label:(0,S.__)("H1")}),(0,a.createElement)(E.__experimentalToggleGroupControlOption,{value:"h2",label:(0,S.__)("H2")}),(0,a.createElement)(E.__experimentalToggleGroupControlOption,{value:"h3",label:(0,S.__)("H3")}),(0,a.createElement)(E.__experimentalToggleGroupControlOption,{value:"h4",label:(0,S.__)("H4")}),(0,a.createElement)(E.__experimentalToggleGroupControlOption,{value:"h5",label:(0,S.__)("H5")}),(0,a.createElement)(E.__experimentalToggleGroupControlOption,{value:"h6",label:(0,S.__)("H6")}))),(0,a.createElement)(ld,{element:e,headingLevel:t}))},pd=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG"},(0,a.createElement)(vn.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"}));const hd=function({className:e,...t}){return(0,a.createElement)(E.Flex,{className:an("edit-site-global-styles__color-indicator-wrapper",e),...t})},{useGlobalSetting:fd}=ie(_.privateApis),gd=[];const vd=function({name:e}){const[t]=fd("color.palette.custom"),[n]=fd("color.palette.theme"),[r]=fd("color.palette.default"),[s]=fd("color.defaultPalette",e),[i]=function(e){const[t,n]=ge("color.palette.theme",e);return window.__experimentalEnableColorRandomizer?[function(){const e=Math.floor(225*Math.random()),r=t.map((t=>{const{color:n}=t,r=Q(n).rotate(e).toHex();return{...t,color:r}}));n(r)}]:[]}(),o=(0,h.useMemo)((()=>[...t||gd,...n||gd,...r&&s?r:gd]),[t,n,r,s]),l=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette",c=o.length>0?(0,S.sprintf)((0,S._n)("%d color","%d colors",o.length),o.length):(0,S.__)("Add custom colors");return(0,a.createElement)(E.__experimentalVStack,{spacing:3},(0,a.createElement)(na,{level:3},(0,S.__)("Palette")),(0,a.createElement)(E.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,a.createElement)(di,{path:l,"aria-label":(0,S.__)("Color palettes")},(0,a.createElement)(E.__experimentalHStack,{direction:0===o.length?"row-reverse":"row"},(0,a.createElement)(E.__experimentalZStack,{isLayered:!1,offset:-8},o.slice(0,5).map((({color:e},t)=>(0,a.createElement)(hd,{key:`${e}-${t}`},(0,a.createElement)(E.ColorIndicator,{colorValue:e}))))),(0,a.createElement)(E.FlexItem,{className:"edit-site-global-styles-screen-colors__palette-count"},c)))),window.__experimentalEnableColorRandomizer&&n?.length>0&&(0,a.createElement)(E.Button,{variant:"secondary",icon:pd,onClick:i},(0,S.__)("Randomize colors")))},{useGlobalStyle:yd,useGlobalSetting:bd,useSettingsForBlockElement:wd,ColorPanel:_d}=ie(_.privateApis);const Ed=function(){const[e]=yd("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=yd("",void 0,"all",{shouldDecodeEncode:!1}),[r]=bd(""),s=wd(r);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:(0,S.__)("Colors"),description:(0,S.__)("Palette colors and the application of those colors on site elements.")}),(0,a.createElement)("div",{className:"edit-site-global-styles-screen"},(0,a.createElement)(E.__experimentalVStack,{spacing:7},(0,a.createElement)(vd,null),(0,a.createElement)(_d,{inheritedValue:t,value:e,onChange:n,settings:s}))))};function Sd(){const{paletteColors:e}=be();return e.slice(0,5).map((({slug:e,color:t},n)=>(0,a.createElement)("div",{key:`${e}-${n}`,style:{flexGrow:1,height:"100%",background:t}})))}const xd={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Cd=({label:e,isFocused:t,withHoverView:n})=>(0,a.createElement)(Fi,{label:e,isFocused:t,withHoverView:n},(({key:e})=>(0,a.createElement)(E.__unstableMotion.div,{key:e,variants:xd,style:{height:"100%",overflow:"hidden"}},(0,a.createElement)(E.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,a.createElement)(Sd,null)))));function kd({title:e,gap:t=2}){const n=we();return n?.length?(0,a.createElement)(E.__experimentalVStack,{spacing:3},e&&(0,a.createElement)(na,{level:3},e),(0,a.createElement)(E.__experimentalVStack,{spacing:t},n.map(((e,t)=>(0,a.createElement)(Pa,{key:t,variation:e,isPill:!0},(()=>(0,a.createElement)(Cd,null))))))):null}const{useGlobalSetting:Pd}=ie(_.privateApis),Id={placement:"bottom-start",offset:8};function Td({name:e}){const[t,n]=Pd("color.palette.theme",e),[r]=Pd("color.palette.theme",e,"base"),[s,i]=Pd("color.palette.default",e),[o]=Pd("color.palette.default",e,"base"),[l,c]=Pd("color.palette.custom",e),[u]=Pd("color.defaultPalette",e),d=(0,w.useViewportMatch)("small","<")?Id:void 0;return(0,a.createElement)(E.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:8},!!t&&!!t.length&&(0,a.createElement)(E.__experimentalPaletteEdit,{canReset:t!==r,canOnlyChangeValues:!0,colors:t,onChange:n,paletteLabel:(0,S.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:d}),!!s&&!!s.length&&!!u&&(0,a.createElement)(E.__experimentalPaletteEdit,{canReset:s!==o,canOnlyChangeValues:!0,colors:s,onChange:i,paletteLabel:(0,S.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:d}),(0,a.createElement)(E.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,S.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:d}),(0,a.createElement)(kd,{title:(0,S.__)("Presets")}))}const{useGlobalSetting:Od}=ie(_.privateApis),Ad={placement:"bottom-start",offset:8},Md=()=>{};function Nd({name:e}){const[t,n]=Od("color.gradients.theme",e),[r]=Od("color.gradients.theme",e,"base"),[s,i]=Od("color.gradients.default",e),[o]=Od("color.gradients.default",e,"base"),[l,c]=Od("color.gradients.custom",e),[u]=Od("color.defaultGradients",e),[d]=Od("color.duotone.custom")||[],[m]=Od("color.duotone.default")||[],[p]=Od("color.duotone.theme")||[],[h]=Od("color.defaultDuotone"),f=[...d||[],...p||[],...m&&h?m:[]],g=(0,w.useViewportMatch)("small","<")?Ad:void 0;return(0,a.createElement)(E.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:8},!!t&&!!t.length&&(0,a.createElement)(E.__experimentalPaletteEdit,{canReset:t!==r,canOnlyChangeValues:!0,gradients:t,onChange:n,paletteLabel:(0,S.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:g}),!!s&&!!s.length&&!!u&&(0,a.createElement)(E.__experimentalPaletteEdit,{canReset:s!==o,canOnlyChangeValues:!0,gradients:s,onChange:i,paletteLabel:(0,S.__)("Default"),paletteLabelLevel:3,popoverProps:g}),(0,a.createElement)(E.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,S.__)("Custom"),paletteLabelLevel:3,slugPrefix:"custom-",popoverProps:g}),!!f&&!!f.length&&(0,a.createElement)("div",null,(0,a.createElement)(na,{level:3},(0,S.__)("Duotone")),(0,a.createElement)(E.__experimentalSpacer,{margin:3}),(0,a.createElement)(E.DuotonePicker,{duotonePalette:f,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:Md})))}const{Tabs:Fd}=ie(E.privateApis);const Vd=function({name:e}){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:(0,S.__)("Edit palette"),description:(0,S.__)("The combination of colors used across the site and in color pickers.")}),(0,a.createElement)(Fd,null,(0,a.createElement)(Fd.TabList,null,(0,a.createElement)(Fd.Tab,{tabId:"color"},(0,S.__)("Color")),(0,a.createElement)(Fd.Tab,{tabId:"gradient"},(0,S.__)("Gradient"))),(0,a.createElement)(Fd.TabPanel,{tabId:"color",focusable:!1},(0,a.createElement)(Td,{name:e})),(0,a.createElement)(Fd.TabPanel,{tabId:"gradient",focusable:!1},(0,a.createElement)(Nd,{name:e}))))},{useGlobalStyle:Rd,useGlobalSetting:Bd,useSettingsForBlockElement:Dd,DimensionsPanel:Ld}=ie(_.privateApis),zd={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,childLayout:!1};function Hd(){const[e]=Rd("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Rd("",void 0,"all",{shouldDecodeEncode:!1}),[r]=Bd("",void 0,"user"),[s,i]=Bd(""),o=Dd(s),l=(0,h.useMemo)((()=>({...t,layout:o.layout})),[t,o.layout]),c=(0,h.useMemo)((()=>({...e,layout:r.layout})),[e,r.layout]);return(0,a.createElement)(Ld,{inheritedValue:l,value:c,onChange:e=>{const t={...e};if(delete t.layout,n(t),e.layout!==r.layout){const t={...r,layout:e.layout};t.layout?.definitions&&delete t.layout.definitions,i(t)}},settings:o,includeLayoutControls:!0,defaultControls:zd})}const{useHasDimensionsPanel:Gd,useGlobalSetting:Ud,useSettingsForBlockElement:jd}=ie(_.privateApis);const Wd=function(){const[e]=Ud(""),t=jd(e),n=Gd(t);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:(0,S.__)("Layout")}),n&&(0,a.createElement)(Hd,null))};function qd({gap:e=2}){const t=(0,u.useSelect)((e=>e(C.store).__experimentalGetCurrentThemeGlobalStylesVariations()),[]),n=t?.filter((e=>!de(e,"color")&&!de(e,"typography"))),r=(0,h.useMemo)((()=>[{title:(0,S.__)("Default"),settings:{},styles:{}},...(null!=n?n:[]).map((e=>{var t,n;return{...e,settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:null!==(n=e.styles)&&void 0!==n?n:{}}}))]),[n]);return(0,a.createElement)(E.__experimentalGrid,{columns:2,className:"edit-site-global-styles-style-variations-container",gap:e},r.map(((e,t)=>(0,a.createElement)(Pa,{key:t,variation:e},(t=>(0,a.createElement)(Li,{label:e?.title,withHoverView:!0,isFocused:t,variation:e}))))))}const Zd=function(){return(0,_.useZoomOut)(),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:(0,S.__)("Browse styles"),description:(0,S.__)("Choose a variation to change the look of the site.")}),(0,a.createElement)(E.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-style-variations"},(0,a.createElement)(E.CardBody,null,(0,a.createElement)(qd,null))))},{ExperimentalBlockEditorProvider:Kd,useGlobalStyle:Yd,GlobalStylesContext:Xd,useGlobalStylesOutputWithConfig:Jd}=ie(_.privateApis),{mergeBaseAndUserConfigs:Qd}=ie(f.privateApis),{CompositeV2:$d,CompositeItemV2:em,useCompositeStoreV2:tm,Tabs:nm}=ie(E.privateApis);function rm(e){return!e||0===Object.keys(e).length}function sm(){return[{name:"core/heading",title:(0,S.__)("Headings"),category:"text",blocks:[(0,l.createBlock)("core/heading",{content:(0,S.__)("Code Is Poetry"),level:1}),(0,l.createBlock)("core/heading",{content:(0,S.__)("Code Is Poetry"),level:2}),(0,l.createBlock)("core/heading",{content:(0,S.__)("Code Is Poetry"),level:3}),(0,l.createBlock)("core/heading",{content:(0,S.__)("Code Is Poetry"),level:4}),(0,l.createBlock)("core/heading",{content:(0,S.__)("Code Is Poetry"),level:5})]},...(0,l.getBlockTypes)().filter((e=>{const{name:t,example:n,supports:r}=e;return"core/heading"!==t&&!!n&&!1!==r.inserter})).map((e=>({name:e.name,title:e.title,category:e.category,blocks:(0,l.getBlockFromExample)(e.name,e.example)})))]}const im=({category:e,examples:t,isSelected:n,onClick:r,onSelect:s,settings:i,sizes:o,title:l})=>{const[c,u]=(0,h.useState)(!1),d={role:"button",onFocus:()=>u(!0),onBlur:()=>u(!1),onKeyDown:e=>{if(e.defaultPrevented)return;const{keyCode:t}=e;!r||t!==wn.ENTER&&t!==wn.SPACE||(e.preventDefault(),r(e))},onClick:e=>{e.defaultPrevented||r&&(e.preventDefault(),r(e))},readonly:!0},m=r?"body { cursor: pointer; } body * { pointer-events: none; }":"";return(0,a.createElement)(_.__unstableIframe,{className:an("edit-site-style-book__iframe",{"is-focused":c&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?d:{}},(0,a.createElement)(_.__unstableEditorStyles,{styles:i.styles}),(0,a.createElement)("style",null,'.is-root-container { display: flow-root; }\n\t\t\t\t\t\tbody { position: relative; padding: 32px !important; }\n\t.edit-site-style-book__examples {\n\t\tmax-width: 900px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tmargin-bottom: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example {\n\t\tflex-direction: row;\n\t}\n\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\tfont-size: 11px;\n\t\tfont-weight: 500;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\ttext-transform: uppercase;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example-title {\n\t\ttext-align: right;\n\t\twidth: 120px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:first-child {\n\t\tmargin-top: 0;\n\t}\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:last-child {\n\t\tmargin-bottom: 0;\n\t}\n'+m),(0,a.createElement)(am,{className:an("edit-site-style-book__examples",{"is-wide":o.width>600}),examples:t,category:e,label:l?(0,S.sprintf)((0,S.__)("Examples of blocks in the %s category"),l):(0,S.__)("Examples of blocks"),isSelected:n,onSelect:s,key:e}))},am=(0,h.memo)((({className:e,examples:t,category:n,label:r,isSelected:s,onSelect:i})=>{const o=tm({orientation:"vertical"});return(0,a.createElement)($d,{store:o,className:e,"aria-label":r,role:"grid"},t.filter((e=>!n||e.category===n)).map((e=>(0,a.createElement)(om,{key:e.name,id:`example-${e.name}`,title:e.title,blocks:e.blocks,isSelected:s(e.name),onClick:()=>{i?.(e.name)}}))))})),om=({id:e,title:t,blocks:n,isSelected:r,onClick:s})=>{const i=(0,u.useSelect)((e=>e(_.store).getSettings()),[]),o=(0,h.useMemo)((()=>({...i,focusMode:!1,__unstableIsPreviewMode:!0})),[i]),l=(0,h.useMemo)((()=>Array.isArray(n)?n:[n]),[n]);return(0,a.createElement)("div",{role:"row"},(0,a.createElement)("div",{role:"gridcell"},(0,a.createElement)(em,{className:an("edit-site-style-book__example",{"is-selected":r}),id:e,"aria-label":(0,S.sprintf)((0,S.__)("Open %s styles in Styles panel"),t),render:(0,a.createElement)("div",null),role:"button",onClick:s},(0,a.createElement)("span",{className:"edit-site-style-book__example-title"},t),(0,a.createElement)("div",{className:"edit-site-style-book__example-preview","aria-hidden":!0},(0,a.createElement)(E.Disabled,{className:"edit-site-style-book__example-preview__content"},(0,a.createElement)(Kd,{value:l,settings:o},(0,a.createElement)(_.BlockList,{renderAppender:!1})))))))},lm=function({enableResizing:e=!0,isSelected:t,onClick:n,onSelect:r,showCloseButton:s=!0,onClose:i,showTabs:o=!0,userConfig:c={}}){const[d,m]=(0,w.useResizeObserver)(),[p]=Yd("color.text"),[f]=Yd("color.background"),g=(0,h.useMemo)(sm,[]),v=(0,h.useMemo)((()=>(0,l.getCategories)().filter((e=>g.some((t=>t.category===e.slug)))).map((e=>({name:e.slug,title:e.title,icon:e.icon})))),[g]),{base:y}=(0,h.useContext)(Xd),b=(0,h.useMemo)((()=>rm(c)||rm(y)?{}:Qd(y,c)),[y,c]),E=(0,u.useSelect)((e=>e(_.store).getSettings()),[]),x=(0,h.useMemo)((()=>({...E,__unstableIsPreviewMode:!0})),[E]),[C]=Jd(b);return x.styles=rm(C)||rm(c)?x.styles:C,(0,a.createElement)(us,{onClose:i,enableResizing:e,closeButtonLabel:s?(0,S.__)("Close"):null},(0,a.createElement)("div",{className:an("edit-site-style-book",{"is-wide":m.width>600,"is-button":!!n}),style:{color:p,background:f}},d,o?(0,a.createElement)("div",{className:"edit-site-style-book__tabs"},(0,a.createElement)(nm,null,(0,a.createElement)(nm.TabList,null,v.map((e=>(0,a.createElement)(nm.Tab,{tabId:e.name,key:e.name},e.title)))),v.map((e=>(0,a.createElement)(nm.TabPanel,{key:e.name,tabId:e.name,focusable:!1},(0,a.createElement)(im,{category:e.name,examples:g,isSelected:t,onSelect:r,settings:x,sizes:m,title:e.title})))))):(0,a.createElement)(im,{examples:g,isSelected:t,onClick:n,onSelect:r,settings:x,sizes:m})))},{useGlobalStyle:cm,AdvancedPanel:um}=ie(_.privateApis);const dm=function(){const e=(0,S.__)("Add your own CSS to customize the appearance and layout of your site."),[t]=cm("",void 0,"user",{shouldDecodeEncode:!1}),[n,r]=cm("",void 0,"all",{shouldDecodeEncode:!1});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:(0,S.__)("CSS"),description:(0,a.createElement)(a.Fragment,null,e,(0,a.createElement)(E.ExternalLink,{href:"https://wordpress.org/documentation/article/css/",className:"edit-site-global-styles-screen-css-help-link"},(0,S.__)("Learn more about CSS")))}),(0,a.createElement)("div",{className:"edit-site-global-styles-screen-css"},(0,a.createElement)(um,{value:t,onChange:r,inheritedValue:n})))},{ExperimentalBlockEditorProvider:mm,GlobalStylesContext:pm,useGlobalStylesOutputWithConfig:hm}=ie(_.privateApis),{mergeBaseAndUserConfigs:fm}=ie(f.privateApis);function gm(e){return!e||0===Object.keys(e).length}const vm=function({userConfig:e,blocks:t}){const{base:n}=(0,h.useContext)(pm),r=(0,h.useMemo)((()=>gm(e)||gm(n)?{}:fm(n,e)),[n,e]),s=(0,h.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),i=(0,u.useSelect)((e=>e(_.store).getSettings()),[]),o=(0,h.useMemo)((()=>({...i,__unstableIsPreviewMode:!0})),[i]),[l]=hm(r),c=gm(l)||gm(e)?o.styles:l;return(0,a.createElement)(us,{title:(0,S.__)("Revisions"),closeButtonLabel:(0,S.__)("Close revisions"),enableResizing:!0},(0,a.createElement)(_.__unstableIframe,{className:"edit-site-revisions__iframe",name:"revisions",tabIndex:0},(0,a.createElement)(_.__unstableEditorStyles,{styles:c}),(0,a.createElement)("style",null,".is-root-container { display: flow-root; }"),(0,a.createElement)(E.Disabled,{className:"edit-site-revisions__example-preview__content"},(0,a.createElement)(mm,{value:s,settings:o},(0,a.createElement)(_.BlockList,{renderAppender:!1})))))},ym={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},bm={per_page:100,page:1},wm=[],{GlobalStylesContext:_m}=ie(_.privateApis);function Em({query:e}={}){const{user:t}=(0,h.useContext)(_m),n={...bm,...e},{authors:r,currentUser:s,isDirty:i,revisions:a,isLoadingGlobalStylesRevisions:o,revisionsCount:l}=(0,u.useSelect)((e=>{var t;const{__experimentalGetDirtyEntityRecords:r,getCurrentUser:s,getUsers:i,getRevisions:a,__experimentalGetCurrentGlobalStylesId:o,getEntityRecord:l,isResolving:c}=e(C.store),u=r(),d=s(),m=u.length>0,p=o(),h=p?l("root","globalStyles",p):void 0,f=null!==(t=h?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0,g=a("root","globalStyles",p,n)||wm;return{authors:i(ym)||wm,currentUser:d,isDirty:m,revisions:g,isLoadingGlobalStylesRevisions:c("getRevisions",["root","globalStyles",p,n]),revisionsCount:f}}),[e]);return(0,h.useMemo)((()=>{if(!r.length||o)return{revisions:wm,hasUnsavedChanges:i,isLoading:!0,revisionsCount:l};const e=a.map((e=>({...e,author:r.find((t=>t.id===e.author))})));if(a.length){if("unsaved"!==e[0].id&&1===n.page&&(e[0].isLatest=!0),i&&t&&Object.keys(t).length>0&&s&&1===n.page){const n={id:"unsaved",styles:t?.styles,settings:t?.settings,author:{name:s?.name,avatar_urls:s?.avatar_urls},modified:new Date};e.unshift(n)}n.page===Math.ceil(l/n.per_page)&&e.push({id:"parent",styles:{},settings:{}})}return{revisions:e,hasUnsavedChanges:i,isLoading:!1,revisionsCount:l}}),[i,a,s,r,t,o])}const Sm=window.wp.date,{getGlobalStylesChanges:xm}=ie(_.privateApis);function Cm({revision:e,previousRevision:t}){const n=xm(e,t,{maxResults:7});return n.length?(0,a.createElement)("ul",{"data-testid":"global-styles-revision-changes",className:"edit-site-global-styles-screen-revisions__changes"},n.map((e=>(0,a.createElement)("li",{key:e},e)))):null}const km=function({userRevisions:e,selectedRevisionId:t,onChange:n,canApplyRevision:r,onApplyRevision:s}){const{currentThemeName:i,currentUser:o}=(0,u.useSelect)((e=>{const{getCurrentTheme:t,getCurrentUser:n}=e(C.store),r=t();return{currentThemeName:r?.name?.rendered||r?.stylesheet,currentUser:n()}}),[]),l=(0,Sm.getDate)().getTime(),{datetimeAbbreviated:c}=(0,Sm.getSettings)().formats;return(0,a.createElement)("ol",{className:"edit-site-global-styles-screen-revisions__revisions-list","aria-label":(0,S.__)("Global styles revisions list"),role:"group"},e.map(((u,d)=>{const{id:m,author:p,modified:h}=u,f="unsaved"===m,g=f?o:p,v=g?.name||(0,S.__)("User"),y=g?.avatar_urls?.[48],b=t?t===m:0===d,w=!r&&b,_="parent"===m,x=(0,Sm.getDate)(h),C=h&&l-x.getTime()>864e5?(0,Sm.dateI18n)(c,x):(0,Sm.humanTimeDiff)(h),k=function(e,t,n,r){return"parent"===e?(0,S.__)("Reset the styles to the theme defaults"):"unsaved"===e?(0,S.sprintf)((0,S.__)("Unsaved changes by %s"),t):r?(0,S.sprintf)((0,S.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,n):(0,S.sprintf)((0,S.__)("Changes saved by %1$s on %2$s"),t,n)}(m,v,(0,Sm.dateI18n)(c,x),w);return(0,a.createElement)("li",{className:an("edit-site-global-styles-screen-revisions__revision-item",{"is-selected":b,"is-active":w,"is-reset":_}),key:m,"aria-current":b},(0,a.createElement)(E.Button,{className:"edit-site-global-styles-screen-revisions__revision-button",disabled:b,onClick:()=>{n(u)},"aria-label":k},_?(0,a.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},(0,S.__)("Default styles"),(0,a.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},i)):(0,a.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},f?(0,a.createElement)("span",{className:"edit-site-global-styles-screen-revisions__date"},(0,S.__)("(Unsaved)")):(0,a.createElement)("time",{className:"edit-site-global-styles-screen-revisions__date",dateTime:h},C),(0,a.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},(0,a.createElement)("img",{alt:v,src:y}),v),b&&(0,a.createElement)(Cm,{revision:u,previousRevision:d<e.length?e[d+1]:{}}))),b&&(w?(0,a.createElement)("p",{className:"edit-site-global-styles-screen-revisions__applied-text"},(0,S.__)("These styles are already applied to your site.")):(0,a.createElement)(E.Button,{disabled:w,size:"compact",variant:"primary",className:"edit-site-global-styles-screen-revisions__apply-button",onClick:s},_?(0,S.__)("Reset to defaults"):(0,S.__)("Apply"))))})))};function Pm({currentPage:e,numPages:t,changePage:n,totalItems:r,className:s,disabled:i=!1,buttonVariant:o="tertiary",label:l=(0,S.__)("Pagination Navigation")}){return(0,a.createElement)(E.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:an("edit-site-pagination",s)},(0,a.createElement)(E.__experimentalText,{variant:"muted",className:"edit-site-pagination__total"},(0,S.sprintf)((0,S._n)("%s item","%s items",r),r)),(0,a.createElement)(E.__experimentalHStack,{expanded:!1,spacing:1},(0,a.createElement)(E.Button,{variant:o,onClick:()=>n(1),disabled:i||1===e,"aria-label":(0,S.__)("First page")},"«"),(0,a.createElement)(E.Button,{variant:o,onClick:()=>n(e-1),disabled:i||1===e,"aria-label":(0,S.__)("Previous page")},"‹")),(0,a.createElement)(E.__experimentalText,{variant:"muted"},(0,S.sprintf)((0,S._x)("%1$s of %2$s","paging"),e,t)),(0,a.createElement)(E.__experimentalHStack,{expanded:!1,spacing:1},(0,a.createElement)(E.Button,{variant:o,onClick:()=>n(e+1),disabled:i||e===t,"aria-label":(0,S.__)("Next page")},"›"),(0,a.createElement)(E.Button,{variant:o,onClick:()=>n(t),disabled:i||e===t,"aria-label":(0,S.__)("Last page")},"»")))}const{GlobalStylesContext:Im,areGlobalStyleConfigsEqual:Tm}=ie(_.privateApis);const Om=function(){const{goTo:e}=(0,E.__experimentalUseNavigator)(),{user:t,setUserConfig:n}=(0,h.useContext)(Im),{blocks:r,editorCanvasContainerView:s}=(0,u.useSelect)((e=>({editorCanvasContainerView:ie(e(tn)).getEditorCanvasContainerView(),blocks:e(_.store).getBlocks()})),[]),[i,o]=(0,h.useState)(1),[l,c]=(0,h.useState)([]),{revisions:d,isLoading:m,hasUnsavedChanges:p,revisionsCount:f}=Em({query:{per_page:10,page:i}}),g=Math.ceil(f/10),[v,y]=(0,h.useState)(t),[b,w]=(0,h.useState)(!1),{setEditorCanvasContainerView:x}=ie((0,u.useDispatch)(tn)),C=Tm(v,t),k=()=>{e("/");x("global-styles-revisions:style-book"===s?"style-book":void 0)},P=e=>{n((()=>({styles:e?.styles,settings:e?.settings}))),w(!1),k()};(0,h.useEffect)((()=>{s&&s.startsWith("global-styles-revisions")||e("/")}),[s]),(0,h.useEffect)((()=>{!m&&d.length&&c(d)}),[d,m]);const I=d[0],T=v?.id,O=!!I?.id&&!C&&!T;(0,h.useEffect)((()=>{O&&y({styles:I?.styles||{},settings:I?.settings||{},id:I?.id})}),[O,I]);const A=!!T&&"unsaved"!==T&&!C,M=!!l.length;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:f&&(0,S.sprintf)((0,S.__)("Revisions (%s)"),f),description:(0,S.__)('Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you\'re ready, use the Save button to save your changes.'),onBack:k}),!M&&(0,a.createElement)(E.Spinner,{className:"edit-site-global-styles-screen-revisions__loading"}),M&&("global-styles-revisions:style-book"===s?(0,a.createElement)(lm,{userConfig:v,isSelected:()=>{},onClose:()=>{x("global-styles-revisions")}}):(0,a.createElement)(vm,{blocks:r,userConfig:v,closeButtonLabel:(0,S.__)("Close revisions")})),(0,a.createElement)(km,{onChange:e=>{y({styles:e?.styles||{},settings:e?.settings||{},id:e?.id})},selectedRevisionId:T,userRevisions:l,canApplyRevision:A,onApplyRevision:()=>p?w(!0):P(v)}),g>1&&(0,a.createElement)("div",{className:"edit-site-global-styles-screen-revisions__footer"},(0,a.createElement)(Pm,{className:"edit-site-global-styles-screen-revisions__pagination",currentPage:i,numPages:g,changePage:o,totalItems:f,disabled:m,label:(0,S.__)("Global Styles pagination navigation")})),b&&(0,a.createElement)(E.__experimentalConfirmDialog,{isOpen:b,confirmButtonText:(0,S.__)("Apply"),onConfirm:()=>P(v),onCancel:()=>w(!1)},(0,S.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")))},Am={backgroundSize:"auto"},{useGlobalStyle:Mm,useGlobalSetting:Nm,BackgroundPanel:Fm}=ie(_.privateApis);function Vm(e){return!!e?.background?.backgroundImage?.id||!!e?.background?.backgroundImage?.url||"string"==typeof e?.background?.backgroundImage}function Rm(){const[e]=Mm("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Mm("",void 0,"all",{shouldDecodeEncode:!1}),[r]=Nm(""),s={backgroundImage:!0,backgroundSize:Vm(e)||Vm(t)};return(0,a.createElement)(Fm,{inheritedValue:t,value:e,onChange:n,settings:r,headerLabel:(0,S.__)("Image"),defaultValues:Am,defaultControls:s})}const{useHasBackgroundPanel:Bm,useGlobalSetting:Dm}=ie(_.privateApis);const Lm=function(){const[e]=Dm(""),t=Bm(e);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ji,{title:(0,S.__)("Background image")}),t&&(0,a.createElement)(Rm,null))},{useGlobalStylesReset:zm}=ie(_.privateApis),{Slot:Hm,Fill:Gm}=(0,E.createSlotFill)("GlobalStylesMenu");function Um(){const[e,t]=zm(),{toggle:n}=(0,u.useDispatch)(g.store),{canEditCSS:r}=(0,u.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(C.store),r=n(),s=r?t("root","globalStyles",r):void 0;return{canEditCSS:!!s?._links?.["wp:action-edit-css"]}}),[]),{setEditorCanvasContainerView:s}=ie((0,u.useDispatch)(tn)),{goTo:i}=(0,E.__experimentalUseNavigator)(),o=()=>{s("global-styles-css"),i("/css")};return(0,a.createElement)(Gm,null,(0,a.createElement)(E.DropdownMenu,{icon:ai,label:(0,S.__)("More"),toggleProps:{size:"compact"}},(({onClose:s})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.MenuGroup,null,r&&(0,a.createElement)(E.MenuItem,{onClick:o},(0,S.__)("Additional CSS")),(0,a.createElement)(E.MenuItem,{onClick:()=>{n("core/edit-site","welcomeGuideStyles"),s()}},(0,S.__)("Welcome Guide"))),(0,a.createElement)(E.MenuGroup,null,(0,a.createElement)(E.MenuItem,{onClick:()=>{t(),s()},disabled:!e},(0,S.__)("Reset styles")))))))}function jm({className:e,...t}){return(0,a.createElement)(E.__experimentalNavigatorScreen,{className:["edit-site-global-styles-sidebar__navigator-screen",e].filter(Boolean).join(" "),...t})}function Wm({parentMenu:e,blockStyles:t,blockName:n}){return t.map(((t,r)=>(0,a.createElement)(jm,{key:r,path:e+"/variations/"+t.name},(0,a.createElement)(wa,{name:n,variation:t.name}))))}function qm({name:e,parentMenu:t=""}){const n=(0,u.useSelect)((t=>{const{getBlockStyles:n}=t(l.store);return n(e)}),[e]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(jm,{path:t+"/colors/palette"},(0,a.createElement)(Vd,{name:e})),!!n?.length&&(0,a.createElement)(Wm,{parentMenu:t,blockStyles:n,blockName:e}))}function Zm(){const e=(0,E.__experimentalUseNavigator)(),{path:t}=e.location;return(0,a.createElement)(lm,{isSelected:e=>t===`/blocks/${encodeURIComponent(e)}`||t.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t=>{e.goTo("/blocks/"+encodeURIComponent(t))}})}function Km(){const e=(0,E.__experimentalUseNavigator)(),{selectedBlockName:t,selectedBlockClientId:n}=(0,u.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n}=e(_.store),r=t();return{selectedBlockName:n(r),selectedBlockClientId:r}}),[]),r=Ji(t);(0,h.useEffect)((()=>{if(!n||!r)return;const s=e.location.path;if("/blocks"!==s&&!s.startsWith("/blocks/"))return;const i="/blocks/"+encodeURIComponent(t);i!==s&&e.goTo(i,{skipFocus:!0})}),[n,t,r])}function Ym(){const{goTo:e,location:t}=(0,E.__experimentalUseNavigator)(),n=(0,u.useSelect)((e=>ie(e(tn)).getEditorCanvasContainerView()),[]),r=t?.path,s="/revisions"===r;(0,h.useEffect)((()=>{switch(n){case"global-styles-revisions":case"global-styles-revisions:style-book":e("/revisions");break;case"global-styles-css":e("/css");break;case"style-book":s&&e("/");break;default:if("/"!==r&&!s)return;e("/")}}),[n,s,e])}const Xm=function(){const e=(0,l.getBlockTypes)(),t=(0,u.useSelect)((e=>ie(e(tn)).getEditorCanvasContainerView()),[]);return(0,a.createElement)(E.__experimentalNavigatorProvider,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/"},(0,a.createElement)(jm,{path:"/"},(0,a.createElement)(Hi,null)),(0,a.createElement)(jm,{path:"/variations"},(0,a.createElement)(Zd,null)),(0,a.createElement)(jm,{path:"/blocks"},(0,a.createElement)(ea,null)),(0,a.createElement)(jm,{path:"/typography"},(0,a.createElement)(rd,null)),(0,a.createElement)(jm,{path:"/typography/text"},(0,a.createElement)(md,{element:"text"})),(0,a.createElement)(jm,{path:"/typography/link"},(0,a.createElement)(md,{element:"link"})),(0,a.createElement)(jm,{path:"/typography/heading"},(0,a.createElement)(md,{element:"heading"})),(0,a.createElement)(jm,{path:"/typography/caption"},(0,a.createElement)(md,{element:"caption"})),(0,a.createElement)(jm,{path:"/typography/button"},(0,a.createElement)(md,{element:"button"})),(0,a.createElement)(jm,{path:"/colors"},(0,a.createElement)(Ed,null)),(0,a.createElement)(jm,{path:"/layout"},(0,a.createElement)(Wd,null)),(0,a.createElement)(jm,{path:"/css"},(0,a.createElement)(dm,null)),(0,a.createElement)(jm,{path:"/revisions"},(0,a.createElement)(Om,null)),(0,a.createElement)(jm,{path:"/background"},(0,a.createElement)(Lm,null)),e.map((e=>(0,a.createElement)(jm,{key:"menu-block-"+e.name,path:"/blocks/"+encodeURIComponent(e.name)},(0,a.createElement)(wa,{name:e.name})))),(0,a.createElement)(qm,null),e.map((e=>(0,a.createElement)(qm,{key:"screens-block-"+e.name,name:e.name,parentMenu:"/blocks/"+encodeURIComponent(e.name)}))),"style-book"===t&&(0,a.createElement)(Zm,null),(0,a.createElement)(Um,null),(0,a.createElement)(Km,null),(0,a.createElement)(Ym,null))},{ComplementaryArea:Jm,ComplementaryAreaMoreMenuItem:Qm}=ie(f.privateApis);function $m({className:e,identifier:t,title:n,icon:r,children:s,closeLabel:i,header:o,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Jm,{className:e,scope:"core",identifier:t,title:n,smallScreenTitle:n,icon:r,closeLabel:i,header:o,headerClassName:l,panelClassName:c,isActiveByDefault:u},s),(0,a.createElement)(Qm,{scope:"core",identifier:t,icon:r},n))}const{interfaceStore:ep}=ie(f.privateApis);function tp(){const{shouldClearCanvasContainerView:e,isStyleBookOpened:t,showListViewByDefault:n,hasRevisions:r,isRevisionsOpened:s,isRevisionsStyleBookOpened:i}=(0,u.useSelect)((e=>{const{getActiveComplementaryArea:t}=e(ep),{getEditorCanvasContainerView:n,getCanvasMode:r}=ie(e(tn)),s=n(),i="visual"===e(f.store).getEditorMode(),a="edit"===r(),o=e(g.store).get("core","showListViewByDefault"),{getEntityRecord:l,__experimentalGetCurrentGlobalStylesId:c}=e(C.store),u=c(),d=u?l("root","globalStyles",u):void 0;return{isStyleBookOpened:"style-book"===s,shouldClearCanvasContainerView:"edit-site/global-styles"!==t("core")||!i||!a,showListViewByDefault:o,hasRevisions:!!d?._links?.["version-history"]?.[0]?.count,isRevisionsStyleBookOpened:"global-styles-revisions:style-book"===s,isRevisionsOpened:"global-styles-revisions"===s}}),[]),{setEditorCanvasContainerView:o}=ie((0,u.useDispatch)(tn));(0,h.useEffect)((()=>{e&&o(void 0)}),[e]);const{setIsListViewOpened:l}=(0,u.useDispatch)(f.store),{goTo:c}=(0,E.__experimentalUseNavigator)();return(0,a.createElement)($m,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,S.__)("Styles"),icon:Kn,closeLabel:(0,S.__)("Close Styles"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,a.createElement)(E.Flex,{className:"edit-site-global-styles-sidebar__header",gap:1},(0,a.createElement)(E.FlexBlock,{style:{minWidth:"min-content"}},(0,a.createElement)("h2",{className:"edit-site-global-styles-sidebar__header-title"},(0,S.__)("Styles"))),(0,a.createElement)(E.FlexItem,null,(0,a.createElement)(E.Button,{icon:ii,label:(0,S.__)("Style Book"),isPressed:t||i,disabled:e,onClick:()=>{s?o("global-styles-revisions:style-book"):i?o("global-styles-revisions"):(l(t&&n),o(t?void 0:"style-book"))},size:"compact"})),(0,a.createElement)(E.FlexItem,null,(0,a.createElement)(E.Button,{label:(0,S.__)("Revisions"),icon:$n,onClick:()=>(l(!1),i?(c("/"),void o("style-book")):s?(c("/"),void o(void 0)):(c("/revisions"),void o(t?"global-styles-revisions:style-book":"global-styles-revisions"))),disabled:!r,isPressed:s||i,size:"compact"})),(0,a.createElement)(Hm,null))},(0,a.createElement)(Xm,null))}const{ExperimentalEditorProvider:np,InserterSidebar:rp,ListViewSidebar:sp,InterfaceSkeleton:ip,ComplementaryArea:ap,interfaceStore:op,SavePublishPanels:lp,Sidebar:cp}=ie(f.privateApis),{useHistory:up}=ie(rn.privateApis),{BlockKeyboardShortcuts:dp}=ie(c.privateApis),mp={body:(0,S.__)("Editor content"),sidebar:(0,S.__)("Editor settings"),actions:(0,S.__)("Editor publish"),footer:(0,S.__)("Editor footer"),header:(0,S.__)("Editor top bar")},pp=.25;function hp({isLoading:e,onClick:t}){const{record:n,getTitle:r,isLoaded:s}=yr(),{type:i}=n,o=(0,w.useViewportMatch)("medium"),l=(0,w.useReducedMotion)(),{context:c,contextPost:d,editorMode:m,canvasMode:p,blockEditorMode:v,isRightSidebarOpen:y,isInserterOpen:b,isListViewOpen:k,isDistractionFree:P,showIconLabels:I,showBlockBreadcrumbs:T,postTypeLabel:O,isEditingPage:A,supportsGlobalStyles:M}=(0,u.useSelect)((e=>{const{get:t}=e(g.store),{getEditedPostContext:n,getCanvasMode:r,isPage:s}=ie(e(tn)),{__unstableGetEditorMode:i}=e(_.store),{getActiveComplementaryArea:a}=e(op),{getEntityRecord:o,getCurrentTheme:l}=e(C.store),{isInserterOpened:c,isListViewOpened:u,getPostTypeLabel:d,getEditorMode:m}=e(f.store),p=n();return{context:p,contextPost:p?.postId?o("postType",p.postType,p.postId):void 0,editorMode:m(),canvasMode:r(),blockEditorMode:i(),isInserterOpen:c(),isListViewOpen:u(),isRightSidebarOpen:a("core"),isDistractionFree:t("core","distractionFree"),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),showIconLabels:t("core","showIconLabels"),postTypeLabel:d(),isEditingPage:s(),supportsGlobalStyles:l()?.is_block_theme}}),[]),N="edit"===p,F="view"===p||"visual"===m,V=!P&&T&&N&&F&&"zoom-out"!==v,R=N&&F&&b,B=N&&F&&k,D=k?(0,S.__)("List View"):(0,S.__)("Block Library"),L=!!c?.postId;let z;var H;s&&(z=(0,S.sprintf)((0,S.__)("%1$s ‹ %2$s"),r(),null!==(H=Je[i])&&void 0!==H?H:Je[ze]));!function(e){const t=Ss(),n=(0,u.useSelect)((e=>e(C.store).getEntityRecord("root","site")?.title),[]),r=(0,h.useRef)(!0);(0,h.useEffect)((()=>{r.current=!1}),[t]),(0,h.useEffect)((()=>{if(!r.current&&e&&n){const t=(0,S.sprintf)((0,S.__)("%1$s ‹ %2$s ‹ Editor — WordPress"),(0,gn.decodeEntities)(e),(0,gn.decodeEntities)(n));document.title=t,(0,Es.speak)(e,"assertive")}}),[e,n,t])}(s&&z);const G=(0,w.useInstanceId)(Ps,"edit-site-editor__loading-progress"),{closeGeneralSidebar:U}=(0,u.useDispatch)(tn),j=Fs(),[W,q]=(0,h.useState)(!1),Z=(0,h.useCallback)((e=>{"function"==typeof W&&W(e),q(!1)}),[W]),{createSuccessNotice:K}=(0,u.useDispatch)(x.store),Y=up(),X=(0,h.useCallback)(((e,t)=>{switch(e){case"move-to-trash":Y.push({path:"/"+t[0].type,postId:void 0,postType:void 0,canvas:"view"});break;case"duplicate-post":{const e=t[0],n="string"==typeof e.title?e.title:e.title?.rendered;K((0,S.sprintf)((0,S.__)('"%s" successfully created.'),n),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,S.__)("Edit"),onClick:()=>{Y.push({path:void 0,postId:e.id,postType:e.type,canvas:"edit"})}}]})}}}),[Y,K]),J=!e&&(L&&!!d&&!!n||!L&&!!n);return(0,a.createElement)(a.Fragment,null,J?null:(0,a.createElement)(Ps,{id:G}),N&&(0,a.createElement)(bs,null),s&&!n&&(0,a.createElement)(E.Notice,{status:"warning",isDismissible:!1},(0,S.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")),J&&(0,a.createElement)(np,{post:L?d:n,__unstableTemplate:L?n:void 0,settings:j,useSubRegistry:!1},(0,a.createElement)(ip,{isDistractionFree:P,enableRegionNavigation:!1,className:an("edit-site-editor__interface-skeleton",{"show-icon-labels":I,"is-entity-save-view-open":!!W}),header:(0,a.createElement)(E.__unstableAnimatePresence,{initial:!1},"edit"===p&&(0,a.createElement)(E.__unstableMotion.div,{initial:{marginTop:-60},animate:{marginTop:0},exit:{marginTop:-60},transition:{type:"tween",duration:l||!o?0:pp,ease:[.6,0,.4,1]}},(0,a.createElement)(ms,{setEntitiesSavedStatesCallback:q}))),actions:(0,a.createElement)(lp,{closeEntitiesSavedStates:Z,isEntitiesSavedStatesOpen:W,setEntitiesSavedStatesCallback:q}),notices:(0,a.createElement)(f.EditorSnackbars,null),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_s,null),N&&(0,a.createElement)(f.EditorNotices,null),F&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)($s,null),!o&&(0,a.createElement)(_.BlockToolbar,{hideDragHandle:!0}),(0,a.createElement)(Rs,{onClick:t}),(0,a.createElement)(Or,null)),"text"===m&&N&&(0,a.createElement)(Ur,null),N&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.EditorKeyboardShortcutsRegister,null),(0,a.createElement)(f.EditorKeyboardShortcuts,null),(0,a.createElement)(dp,null))),secondarySidebar:N&&(R&&(0,a.createElement)(rp,{closeGeneralSidebar:U,isRightSidebarOpen:y})||B&&(0,a.createElement)(sp,null)),sidebar:N&&!P&&(0,a.createElement)(ap.Slot,{scope:"core"}),footer:V&&(0,a.createElement)(_.BlockBreadcrumb,{rootLabelText:O}),labels:{...mp,secondarySidebar:D}}),(0,a.createElement)(cp,{onActionPerformed:X,extraPanels:!A&&(0,a.createElement)(si.Slot,null)}),M&&(0,a.createElement)(tp,null)))}const fp=(0,h.memo)((function({view:e,onChangeView:t,paginationInfo:{totalItems:n=0,totalPages:r}}){var s;if(!n||!r)return null;const i=null!==(s=e.page)&&void 0!==s?s:1;return!!n&&1!==r&&(0,a.createElement)(E.__experimentalHStack,{expanded:!1,spacing:6,justify:"end",className:"dataviews-pagination"},(0,a.createElement)(E.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:2,className:"dataviews-pagination__page-selection"},(0,h.createInterpolateElement)((0,S.sprintf)((0,S._x)("Page <CurrentPageControl /> of %s","paging"),r),{CurrentPageControl:(0,a.createElement)(E.SelectControl,{"aria-label":(0,S.__)("Current page"),value:e.page?.toString(),options:Array.from(Array(r)).map(((e,t)=>{const n=t+1;return{value:n.toString(),label:n.toString()}})),onChange:n=>{t({...e,page:+n})},size:"compact",__nextHasNoMarginBottom:!0})})),(0,a.createElement)(E.__experimentalHStack,{expanded:!1,spacing:1},(0,a.createElement)(E.Button,{onClick:()=>t({...e,page:i-1}),disabled:1===i,__experimentalIsFocusable:!0,label:(0,S.__)("Previous page"),icon:oi,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,a.createElement)(E.Button,{onClick:()=>t({...e,page:i+1}),disabled:i>=r,__experimentalIsFocusable:!0,label:(0,S.__)("Next page"),icon:li,showTooltip:!0,size:"compact",tooltipPosition:"top"})))})),gp=fp,{lock:vp,unlock:yp}=(0,re.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/dataviews"),bp="is",wp="isNot",_p="isAny",Ep="isNone",Sp="isAll",xp="isNotAll",Cp=[bp,wp,_p,Ep,Sp,xp],kp={[bp]:{key:"is-filter",label:(0,S.__)("Is")},[wp]:{key:"is-not-filter",label:(0,S.__)("Is not")},[_p]:{key:"is-any-filter",label:(0,S.__)("Is any")},[Ep]:{key:"is-none-filter",label:(0,S.__)("Is none")},[Sp]:{key:"is-all-filter",label:(0,S.__)("Is all")},[xp]:{key:"is-not-all-filter",label:(0,S.__)("Is not all")}},Pp={asc:{label:(0,S.__)("Sort ascending")},desc:{label:(0,S.__)("Sort descending")}},Ip="table",Tp="grid",Op=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})),Ap=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})),Mp=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),Np=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Fp=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})),Vp=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M4.67 10.664s-2.09 1.11-2.917 1.582l.494.87 1.608-.914.002.002c.343.502.86 1.17 1.563 1.84.348.33.742.663 1.185.976L5.57 16.744l.858.515 1.02-1.701a9.1 9.1 0 0 0 4.051 1.18V19h1v-2.263a9.1 9.1 0 0 0 4.05-1.18l1.021 1.7.858-.514-1.034-1.723c.442-.313.837-.646 1.184-.977.703-.669 1.22-1.337 1.563-1.839l.002-.003 1.61.914.493-.87c-1.75-.994-2.918-1.58-2.918-1.58l-.003.005a8.29 8.29 0 0 1-.422.689 10.097 10.097 0 0 1-1.36 1.598c-1.218 1.16-3.042 2.293-5.544 2.293-2.503 0-4.327-1.132-5.546-2.293a10.099 10.099 0 0 1-1.359-1.599 8.267 8.267 0 0 1-.422-.689l-.003-.005Z"}));function Rp({selection:e,onSelectionChange:t,item:n,data:r,getItemId:s,primaryField:i,disabled:o}){const l=s(n),c=e.includes(l);let u;return u=i?.getValue&&n?(0,S.sprintf)(c?(0,S.__)("Deselect item: %s"):(0,S.__)("Select item: %s"),i.getValue({item:n})):c?(0,S.__)("Select a new item"):(0,S.__)("Deselect item"),(0,a.createElement)(E.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,"aria-label":u,"aria-disabled":o,checked:c,onChange:()=>{o||t(c?r.filter((t=>{const n=s?.(t);return n!==l&&e.includes(n)})):r.filter((t=>{const n=s?.(t);return n===l||e.includes(n)})))}})}const{DropdownMenuV2:Bp,DropdownMenuGroupV2:Dp,DropdownMenuItemV2:Lp,DropdownMenuItemLabelV2:zp,kebabCase:Hp}=yp(E.privateApis);function Gp({action:e,onClick:t}){return(0,a.createElement)(E.Button,{label:e.label,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t})}function Up({action:e,onClick:t}){return(0,a.createElement)(Lp,{onClick:t,hideOnClick:!("RenderModal"in e)},(0,a.createElement)(zp,null,e.label))}function jp({action:e,items:t,closeModal:n}){return(0,a.createElement)(E.Modal,{title:e.modalHeader||e.label,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:null!=n?n:()=>{},overlayClassName:`dataviews-action-modal dataviews-action-modal__${Hp(e.id)}`},(0,a.createElement)(e.RenderModal,{items:t,closeModal:n,onActionStart:e.onActionStart,onActionPerformed:e.onActionPerformed}))}function Wp({action:e,items:t,ActionTrigger:n,isBusy:r}){const[s,i]=(0,h.useState)(!1),o={action:e,onClick:()=>{i(!0)},items:t,isBusy:r};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(n,{...o}),s&&(0,a.createElement)(jp,{action:e,items:t,closeModal:()=>i(!1)}))}function qp({actions:e,item:t}){return(0,a.createElement)(Dp,null,e.map((e=>"RenderModal"in e?(0,a.createElement)(Wp,{key:e.id,action:e,items:[t],ActionTrigger:Up}):(0,a.createElement)(Up,{key:e.id,action:e,onClick:()=>e.callback([t])}))))}function Zp({item:e,actions:t,isCompact:n}){const{primaryActions:r,eligibleActions:s}=(0,h.useMemo)((()=>{const n=t.filter((t=>!t.isEligible||t.isEligible(e)));return{primaryActions:n.filter((e=>e.isPrimary&&!!e.icon)),eligibleActions:n}}),[t,e]);return n?(0,a.createElement)(Kp,{item:e,actions:s}):(0,a.createElement)(E.__experimentalHStack,{spacing:1,justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:"0",width:"auto"}},!!r.length&&r.map((t=>"RenderModal"in t?(0,a.createElement)(Wp,{key:t.id,action:t,items:[e],ActionTrigger:Gp}):(0,a.createElement)(Gp,{key:t.id,action:t,onClick:()=>t.callback([e])}))),(0,a.createElement)(Kp,{item:e,actions:s}))}function Kp({item:e,actions:t}){return(0,a.createElement)(Bp,{trigger:(0,a.createElement)(E.Button,{size:"compact",icon:ai,label:(0,S.__)("Actions"),disabled:!t.length,className:"dataviews-all-actions-button"}),placement:"bottom-end"},(0,a.createElement)(qp,{actions:t,item:e}))}const Yp=e=>{let t=e.filterBy?.operators;return t&&Array.isArray(t)||(t=[_p,Ep]),t.includes("in")&&(t=t.filter((e=>"is"!==e)),t.push("is")),t.includes("notIn")&&(t=t.filter((e=>"notIn"!==e)),t.push("isNot")),t=t.filter((e=>Cp.includes(e))),(t.includes(bp)||t.includes(wp))&&(t=t.filter((e=>[bp,wp].includes(e)))),t},{DropdownMenuV2:Xp,DropdownMenuGroupV2:Jp,DropdownMenuItemV2:Qp,DropdownMenuSeparatorV2:$p}=yp(E.privateApis);function eh(e,t){return(0,h.useMemo)((()=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))),[e,t])}function th({action:e,selectedItems:t,setActionWithModal:n,onMenuOpenChange:r}){const s=(0,h.useMemo)((()=>t.filter((t=>!e.isEligible||e.isEligible(t)))),[e,t]),{RenderModal:i,hideModalHeader:o}=e,l=(0,h.useCallback)((()=>{n(void 0)}),[n]);return(0,a.createElement)(E.Modal,{title:o?void 0:e.label,__experimentalHideHeader:!!o,onRequestClose:l,overlayClassName:"dataviews-action-modal"},(0,a.createElement)(i,{items:s,closeModal:l,onActionPerformed:()=>r(!1)}))}function nh({action:e,selectedItems:t,setActionWithModal:n}){const r=(0,h.useMemo)((()=>t.filter((t=>!e.isEligible||e.isEligible(t)))),[e,t]),s="RenderModal"in e;return(0,a.createElement)(Qp,{key:e.id,disabled:0===r.length,hideOnClick:!s,onClick:async()=>{s?n(e):await e.callback(r)},suffix:r.length>0?r.length:void 0},e.label)}function rh({actions:e,selectedItems:t,setActionWithModal:n}){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Jp,null,e.map((e=>(0,a.createElement)(nh,{key:e.id,action:e,selectedItems:t,setActionWithModal:n})))),(0,a.createElement)($p,null))}function sh({data:e,actions:t,selection:n,onSelectionChange:r,getItemId:s}){const i=(0,h.useMemo)((()=>t.filter((e=>e.supportsBulk))),[t]),[o,l]=(0,h.useState)(!1),[c,u]=(0,h.useState)(),d=(0,h.useMemo)((()=>e.filter((e=>i.some((t=>!t.isEligible||t.isEligible(e)))))),[e,i]),m=d.length,p=n&&n.length===m,f=(0,h.useMemo)((()=>e.filter((e=>n.includes(s(e))))),[n,e,s]),g=(0,h.useMemo)((()=>f.some((e=>!d.includes(e)))),[f,d]);return(0,h.useEffect)((()=>{g&&r(f.filter((e=>d.some((t=>s(e)===s(t))))))}),[g,f,d,s,r]),0===i.length?null:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Xp,{open:o,onOpenChange:l,label:(0,S.__)("Bulk actions"),style:{minWidth:"240px"},trigger:(0,a.createElement)(E.Button,{className:"dataviews-bulk-edit-button",__next40pxDefaultSize:!0,variant:"tertiary",size:"compact"},n.length?(0,S.sprintf)((0,S._n)("Edit %d item","Edit %d items",n.length),n.length):(0,S.__)("Bulk edit"))},(0,a.createElement)(rh,{actions:i,setActionWithModal:u,selectedItems:f}),(0,a.createElement)(Jp,null,(0,a.createElement)(Qp,{disabled:p,hideOnClick:!1,onClick:()=>{r(d)},suffix:m},(0,S.__)("Select all")),(0,a.createElement)(Qp,{disabled:0===n.length,hideOnClick:!1,onClick:()=>{r([])}},(0,S.__)("Deselect")))),c&&(0,a.createElement)(th,{action:c,selectedItems:f,setActionWithModal:u,onMenuOpenChange:l}))}const{DropdownMenuV2:ih,DropdownMenuGroupV2:ah,DropdownMenuItemV2:oh,DropdownMenuRadioItemV2:lh,DropdownMenuItemLabelV2:ch,DropdownMenuSeparatorV2:uh}=yp(E.privateApis);function dh({children:e}){return h.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,a.createElement)(h.Fragment,{key:t},t>0&&(0,a.createElement)(uh,null),e)))}const mh={asc:"↑",desc:"↓"},ph=(0,h.forwardRef)((function({field:e,view:t,onChangeView:n,onHide:r,setOpenedFilter:s},i){const o=!1!==e.enableHiding,l=!1!==e.enableSorting,c=t.sort?.field===e.id,u=Yp(e),d=!(t.filters?.some((t=>e.id===t.field))||!e.elements?.length||!u.length||e.filterBy?.isPrimary);return l||o||d?(0,a.createElement)(ih,{align:"start",trigger:(0,a.createElement)(E.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:i,variant:"tertiary"},e.header,c&&(0,a.createElement)("span",{"aria-hidden":"true"},c&&mh[t.sort.direction])),style:{minWidth:"240px"}},(0,a.createElement)(dh,null,l&&(0,a.createElement)(ah,null,Object.entries(Pp).map((([r,s])=>{const i=c&&t.sort.direction===r,o=`${e.id}-${r}`;return(0,a.createElement)(lh,{key:o,name:"view-table-sorting",value:o,checked:i,onChange:()=>{n({...t,sort:{field:e.id,direction:r}})}},(0,a.createElement)(ch,null,s.label))}))),d&&(0,a.createElement)(ah,null,(0,a.createElement)(oh,{prefix:(0,a.createElement)(E.Icon,{icon:Fp}),onClick:()=>{s(e.id),n({...t,page:1,filters:[...t.filters||[],{field:e.id,value:void 0,operator:u[0]}]})}},(0,a.createElement)(ch,null,(0,S.__)("Add filter")))),o&&(0,a.createElement)(oh,{prefix:(0,a.createElement)(E.Icon,{icon:Vp}),onClick:()=>{r(e),n({...t,hiddenFields:t.hiddenFields.concat(e.id)})}},(0,a.createElement)(ch,null,(0,S.__)("Hide"))))):e.header}));function hh({selection:e,onSelectionChange:t,data:n,actions:r}){const s=(0,h.useMemo)((()=>n.filter((e=>r.some((t=>t.supportsBulk&&t.isEligible(e)))))),[n,r]),i=e.length===s.length;return(0,a.createElement)(E.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:i,indeterminate:!i&&e.length,onChange:()=>{t(i?[]:s)},"aria-label":i?(0,S.__)("Deselect all"):(0,S.__)("Select all")})}function fh({hasBulkActions:e,item:t,actions:n,id:r,visibleFields:s,primaryField:i,selection:o,getItemId:l,onSelectionChange:c,data:u}){const d=eh(n,t),m=o.includes(r),[p,f]=(0,h.useState)(!1),g=(0,h.useRef)(!1);return(0,a.createElement)("tr",{className:an("dataviews-view-table__row",{"is-selected":d&&m,"is-hovered":p,"has-bulk-actions":d}),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onTouchStart:()=>{g.current=!0},onClick:()=>{g.current||"Range"===document.getSelection().type||c(m?u.filter((e=>{const t=l?.(e);return t!==r&&o.includes(t)})):u.filter((e=>{const t=l?.(e);return t===r||o.includes(t)})))}},e&&(0,a.createElement)("td",{className:"dataviews-view-table__checkbox-column",style:{width:"1%"}},(0,a.createElement)("div",{className:"dataviews-view-table__cell-content-wrapper"},(0,a.createElement)(Rp,{id:r,item:t,selection:o,onSelectionChange:c,getItemId:l,data:u,primaryField:i,disabled:!d}))),s.map((e=>(0,a.createElement)("td",{key:e.id,style:{width:e.width||void 0,minWidth:e.minWidth||void 0,maxWidth:e.maxWidth||void 0}},(0,a.createElement)("div",{className:an("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__primary-field":i?.id===e.id})},e.render({item:t}))))),!!n?.length&&(0,a.createElement)("td",{className:"dataviews-view-table__actions-column",onClick:e=>e.stopPropagation()},(0,a.createElement)(Zp,{item:t,actions:n})))}const gh=function({actions:e,data:t,fields:n,getItemId:r,isLoading:s=!1,onChangeView:i,onSelectionChange:o,selection:l,setOpenedFilter:c,view:u}){const d=(0,h.useRef)(new Map),m=(0,h.useRef)(),[p,f]=(0,h.useState)(),g=function(e,t){return(0,h.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))))),[e,t])}(e,t);(0,h.useEffect)((()=>{m.current&&(m.current.focus(),m.current=void 0)}));const v=(0,h.useId)();if(p)return m.current=p,void f();const y=e=>{const t=d.current.get(e.id),n=d.current.get(t.fallback);f(n?.node)},b=n.filter((e=>!u.hiddenFields.includes(e.id)&&![u.layout.mediaField].includes(e.id))),w=!!t?.length,_={asc:"ascending",desc:"descending"},x=n.find((e=>e.id===u.layout.primaryField));return(0,a.createElement)(h.Fragment,null,(0,a.createElement)("table",{className:"dataviews-view-table","aria-busy":s,"aria-describedby":v},(0,a.createElement)("thead",null,(0,a.createElement)("tr",{className:"dataviews-view-table__row"},g&&(0,a.createElement)("th",{className:"dataviews-view-table__checkbox-column",style:{width:"1%"},"data-field-id":"selection",scope:"col"},(0,a.createElement)(hh,{selection:l,onSelectionChange:o,data:t,actions:e})),b.map(((e,t)=>(0,a.createElement)("th",{key:e.id,style:{width:e.width||void 0,minWidth:e.minWidth||void 0,maxWidth:e.maxWidth||void 0},"data-field-id":e.id,"aria-sort":u.sort?.field===e.id&&_[u.sort.direction],scope:"col"},(0,a.createElement)(ph,{ref:n=>{n?d.current.set(e.id,{node:n,fallback:b[t>0?t-1:1]?.id}):d.current.delete(e.id)},field:e,view:u,onChangeView:i,onHide:y,setOpenedFilter:c})))),!!e?.length&&(0,a.createElement)("th",{"data-field-id":"actions",className:"dataviews-view-table__actions-column"},(0,a.createElement)("span",{className:"dataviews-view-table-header"},(0,S.__)("Actions"))))),(0,a.createElement)("tbody",null,w&&t.map(((n,s)=>(0,a.createElement)(fh,{key:r(n),item:n,hasBulkActions:g,actions:e,id:r(n)||s,visibleFields:b,primaryField:x,selection:l,getItemId:r,onSelectionChange:o,data:t}))))),(0,a.createElement)("div",{className:an({"dataviews-loading":s,"dataviews-no-results":!w&&!s}),id:v},!w&&(0,a.createElement)("p",null,s?(0,a.createElement)(E.Spinner,null):(0,S.__)("No results"))))};function vh({selection:e,data:t,onSelectionChange:n,getItemId:r,item:s,actions:i,mediaField:o,primaryField:l,visibleFields:c,badgeFields:u,columnFields:d}){const m=eh(i,s),p=r(s),h=e.includes(p);return(0,a.createElement)(E.__experimentalVStack,{spacing:0,key:p,className:an("dataviews-view-grid__card",{"is-selected":m&&h}),onClickCapture:s=>{if(s.ctrlKey||s.metaKey){if(s.stopPropagation(),s.preventDefault(),!m)return;n(h?t.filter((t=>{const n=r?.(t);return n!==p&&e.includes(n)})):t.filter((t=>{const n=r?.(t);return n===p||e.includes(n)})))}}},(0,a.createElement)("div",{className:"dataviews-view-grid__media"},o?.render({item:s})),(0,a.createElement)(E.__experimentalHStack,{justify:"space-between",className:"dataviews-view-grid__title-actions"},(0,a.createElement)(Rp,{item:s,selection:e,onSelectionChange:n,getItemId:r,data:t,primaryField:l,disabled:!m}),(0,a.createElement)(E.__experimentalHStack,{className:"dataviews-view-grid__primary-field"},l?.render({item:s})),(0,a.createElement)(Zp,{item:s,actions:i,isCompact:!0})),!!u?.length&&(0,a.createElement)(E.__experimentalHStack,{className:"dataviews-view-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start"},u.map((e=>{const t=e.render({item:s});return t?(0,a.createElement)(E.FlexItem,{key:e.id,className:"dataviews-view-grid__field-value"},t):null}))),!!c?.length&&(0,a.createElement)(E.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:3},c.map((e=>{const t=e.render({item:s});return t?(0,a.createElement)(E.Flex,{className:an("dataviews-view-grid__field",d?.includes(e.id)?"is-column":"is-row"),key:e.id,gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:d?.includes(e.id)?"column":"row"},(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.FlexItem,{className:"dataviews-view-grid__field-name"},e.header),(0,a.createElement)(E.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"}},t))):null}))))}const{useCompositeStoreV2:yh,CompositeV2:bh,CompositeItemV2:wh,CompositeRowV2:_h,DropdownMenuV2:Eh}=yp(E.privateApis);function Sh({actions:e,id:t,isSelected:n,item:r,mediaField:s,onSelect:i,primaryField:o,store:l,visibleFields:c}){const u=(0,h.useRef)(null),d=`${t}-label`,m=`${t}-description`,[p,f]=(0,h.useState)(!1);(0,h.useEffect)((()=>{n&&u.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}),[n]);const{primaryAction:g,eligibleActions:v}=(0,h.useMemo)((()=>{const t=e.filter((e=>!e.isEligible||e.isEligible(r))),n=t.filter((e=>e.isPrimary&&!!e.icon));return{primaryAction:n?.[0],eligibleActions:t}}),[e,r]),[y,b]=(0,h.useState)(!1);return(0,a.createElement)(_h,{ref:u,render:(0,a.createElement)("li",null),role:"row",className:an({"is-selected":n,"is-hovered":p}),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)}},(0,a.createElement)(E.__experimentalHStack,{className:"dataviews-view-list__item-wrapper",alignment:"top"},(0,a.createElement)("div",{role:"gridcell"},(0,a.createElement)(wh,{store:l,render:(0,a.createElement)("div",null),role:"button",id:t,"aria-pressed":n,"aria-labelledby":d,"aria-describedby":m,className:"dataviews-view-list__item",onClick:()=>i(r)},(0,a.createElement)(E.__experimentalHStack,{spacing:3,justify:"start",alignment:"flex-start"},(0,a.createElement)("div",{className:"dataviews-view-list__media-wrapper"},s?.render({item:r})||(0,a.createElement)("div",{className:"dataviews-view-list__media-placeholder"})),(0,a.createElement)(E.__experimentalVStack,{spacing:1},(0,a.createElement)("span",{className:"dataviews-view-list__primary-field",id:d},o?.render({item:r})),(0,a.createElement)("div",{className:"dataviews-view-list__fields",id:m},c.map((e=>(0,a.createElement)("div",{key:e.id,className:"dataviews-view-list__field"},(0,a.createElement)(E.VisuallyHidden,{as:"span",className:"dataviews-view-list__field-label"},e.header),(0,a.createElement)("span",{className:"dataviews-view-list__field-value"},e.render({item:r})))))))))),e?.length>0&&(0,a.createElement)(E.__experimentalHStack,{spacing:1,justify:"flex-end",className:"dataviews-view-list__item-actions",style:{flexShrink:"0",width:"auto"}},g&&"RenderModal"in g&&(0,a.createElement)("div",{role:"gridcell"},(0,a.createElement)(wh,{store:l,render:(0,a.createElement)(E.Button,{label:g.label,icon:g.icon,isDestructive:g.isDestructive,size:"compact",onClick:()=>b(!0)})},y&&(0,a.createElement)(jp,{action:g,items:[r],closeModal:()=>b(!1)}))),g&&!("RenderModal"in g)&&(0,a.createElement)("div",{role:"gridcell",key:g.id},(0,a.createElement)(wh,{store:l,render:(0,a.createElement)(E.Button,{label:g.label,icon:g.icon,isDestructive:g.isDestructive,size:"compact",onClick:()=>g.callback([r])})})),(0,a.createElement)("div",{role:"gridcell"},(0,a.createElement)(Eh,{trigger:(0,a.createElement)(wh,{store:l,render:(0,a.createElement)(E.Button,{size:"compact",icon:ai,label:(0,S.__)("Actions"),disabled:!e.length,onKeyDown:e=>{"ArrowDown"===e.key&&(e.preventDefault(),l.move(l.down())),"ArrowUp"===e.key&&(e.preventDefault(),l.move(l.up()))}})}),placement:"bottom-end"},(0,a.createElement)(qp,{actions:v,item:r}))))))}const xh=[{type:Ip,label:(0,S.__)("Table"),component:gh,icon:Op},{type:Tp,label:(0,S.__)("Grid"),component:function({actions:e,data:t,fields:n,getItemId:r,isLoading:s,onSelectionChange:i,selection:o,view:l}){const c=n.find((e=>e.id===l.layout.mediaField)),u=n.find((e=>e.id===l.layout.primaryField)),{visibleFields:d,badgeFields:m}=n.reduce(((e,t)=>{if(l.hiddenFields.includes(t.id)||[l.layout.mediaField,l.layout.primaryField].includes(t.id))return e;return e[l.layout.badgeFields?.includes(t.id)?"badgeFields":"visibleFields"].push(t),e}),{visibleFields:[],badgeFields:[]}),p=!!t?.length;return(0,a.createElement)(a.Fragment,null,p&&(0,a.createElement)(E.__experimentalGrid,{gap:6,columns:2,alignment:"top",className:"dataviews-view-grid","aria-busy":s},t.map((n=>(0,a.createElement)(vh,{key:r(n),selection:o,data:t,onSelectionChange:i,getItemId:r,item:n,actions:e,mediaField:c,primaryField:u,visibleFields:d,badgeFields:m,columnFields:l.layout.columnFields})))),!p&&(0,a.createElement)("div",{className:an({"dataviews-loading":s,"dataviews-no-results":!s})},(0,a.createElement)("p",null,s?(0,a.createElement)(E.Spinner,null):(0,S.__)("No results"))))},icon:Ap},{type:"list",label:(0,S.__)("List"),component:function e(t){const{actions:n,data:r,fields:s,getItemId:i,isLoading:o,onSelectionChange:l,selection:c,view:u}=t,d=(0,w.useInstanceId)(e,"view-list"),m=r?.findLast((e=>c.includes(e.id))),p=s.find((e=>e.id===u.layout.mediaField)),f=s.find((e=>e.id===u.layout.primaryField)),g=s.filter((e=>!u.hiddenFields.includes(e.id)&&![u.layout.primaryField,u.layout.mediaField].includes(e.id))),v=(0,h.useCallback)((e=>l([e])),[l]),y=(0,h.useCallback)((e=>e?`${d}-${i(e)}`:void 0),[d,i]),b=yh({defaultActiveId:y(m)}),_=b.useState((e=>e.items.some((t=>t.id===e.activeId))));(0,h.useEffect)((()=>{_||(b.down()?b.move(b.down()):b.up()&&b.move(b.up()))}),[_]);const x=r?.length;return x?(0,a.createElement)(bh,{id:d,render:(0,a.createElement)("ul",null),className:"dataviews-view-list",role:"grid",store:b},r.map((e=>{const t=y(e);return(0,a.createElement)(Sh,{key:t,id:t,actions:n,item:e,isSelected:e===m,onSelect:v,mediaField:p,primaryField:f,store:b,visibleFields:g})}))):(0,a.createElement)("div",{className:an({"dataviews-loading":o,"dataviews-no-results":!x&&!o})},!x&&(0,a.createElement)("p",null,o?(0,a.createElement)(E.Spinner,null):(0,S.__)("No results")))},icon:(0,S.isRTL)()?Mp:Np}],{DropdownMenuV2:Ch,DropdownMenuGroupV2:kh,DropdownMenuItemV2:Ph,DropdownMenuRadioItemV2:Ih,DropdownMenuCheckboxItemV2:Th,DropdownMenuItemLabelV2:Oh}=yp(E.privateApis);function Ah({view:e,onChangeView:t,supportedLayouts:n}){let r=xh;if(n&&(r=r.filter((e=>n.includes(e.type)))),1===r.length)return null;const s=r.find((t=>e.type===t.type));return(0,a.createElement)(Ch,{trigger:(0,a.createElement)(Ph,{suffix:(0,a.createElement)("span",{"aria-hidden":"true"},s.label)},(0,a.createElement)(Oh,null,(0,S.__)("Layout")))},r.map((n=>(0,a.createElement)(Ih,{key:n.type,value:n.type,name:"view-actions-available-view",checked:n.type===e.type,hideOnClick:!0,onChange:n=>{t({...e,type:n.target.value})}},(0,a.createElement)(Oh,null,n.label)))))}const Mh=[10,20,50,100];function Nh({view:e,onChangeView:t}){return(0,a.createElement)(Ch,{trigger:(0,a.createElement)(Ph,{suffix:(0,a.createElement)("span",{"aria-hidden":"true"},e.perPage)},(0,a.createElement)(Oh,null,(0,S.__)("Items per page")))},Mh.map((n=>(0,a.createElement)(Ih,{key:n,value:n,name:"view-actions-page-size",checked:e.perPage===n,onChange:()=>{t({...e,perPage:n,page:1})}},(0,a.createElement)(Oh,null,n)))))}function Fh({view:e,onChangeView:t,fields:n}){const r=n.filter((t=>!1!==t.enableHiding&&t.id!==e.layout.mediaField));return r?.length?(0,a.createElement)(Ch,{trigger:(0,a.createElement)(Ph,null,(0,a.createElement)(Oh,null,(0,S.__)("Fields")))},r?.map((n=>(0,a.createElement)(Th,{key:n.id,value:n.id,checked:!e.hiddenFields?.includes(n.id),onChange:()=>{t({...e,hiddenFields:e.hiddenFields?.includes(n.id)?e.hiddenFields.filter((e=>e!==n.id)):[...e.hiddenFields||[],n.id]})}},(0,a.createElement)(Oh,null,n.header))))):null}function Vh({fields:e,view:t,onChangeView:n}){const r=e.filter((e=>!1!==e.enableSorting));if(!r?.length)return null;const s=e.find((e=>e.id===t.sort?.field));return(0,a.createElement)(Ch,{trigger:(0,a.createElement)(Ph,{suffix:(0,a.createElement)("span",{"aria-hidden":"true"},s?.header)},(0,a.createElement)(Oh,null,(0,S.__)("Sort by")))},r?.map((e=>{const r=t.sort?.direction;return(0,a.createElement)(Ch,{key:e.id,trigger:(0,a.createElement)(Ph,null,(0,a.createElement)(Oh,null,e.header)),style:{minWidth:"220px"}},Object.entries(Pp).map((([i,o])=>{const l=void 0!==s&&r===i&&e.id===s.id,c=`${e.id}-${i}`;return(0,a.createElement)(Ih,{key:c,name:"view-actions-sorting",value:c,checked:l,onChange:()=>{n({...t,sort:{field:e.id,direction:i}})}},(0,a.createElement)(Oh,null,o.label))})))})))}const Rh=(0,h.memo)((function({fields:e,view:t,onChangeView:n,supportedLayouts:r}){return(0,a.createElement)(Ch,{trigger:(0,a.createElement)(E.Button,{size:"compact",icon:Ta,label:(0,S.__)("View options")})},(0,a.createElement)(kh,null,(0,a.createElement)(Ah,{view:t,onChangeView:n,supportedLayouts:r}),(0,a.createElement)(Vh,{fields:e,view:t,onChangeView:n}),(0,a.createElement)(Fh,{fields:e,view:t,onChangeView:n}),(0,a.createElement)(Nh,{view:t,onChangeView:n})))}));var Bh={id:null};function Dh(e,t){return t&&e.item(t)||null}var Lh=Symbol("FOCUS_SILENTLY");function zh(e,t,n){if(!t)return!1;if(t===n)return!1;const r=e.item(t.id);return!!r&&(!n||r.element!==n)}var Hh=Object.defineProperty,Gh=Object.defineProperties,Uh=Object.getOwnPropertyDescriptors,jh=Object.getOwnPropertySymbols,Wh=Object.prototype.hasOwnProperty,qh=Object.prototype.propertyIsEnumerable,Zh=(e,t,n)=>t in e?Hh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kh=(e,t)=>{for(var n in t||(t={}))Wh.call(t,n)&&Zh(e,n,t[n]);if(jh)for(var n of jh(t))qh.call(t,n)&&Zh(e,n,t[n]);return e},Yh=(e,t)=>Gh(e,Uh(t)),Xh=(e,t)=>{var n={};for(var r in e)Wh.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&jh)for(var r of jh(e))t.indexOf(r)<0&&qh.call(e,r)&&(n[r]=e[r]);return n},Jh=Object.defineProperty,Qh=Object.defineProperties,$h=Object.getOwnPropertyDescriptors,ef=Object.getOwnPropertySymbols,tf=Object.prototype.hasOwnProperty,nf=Object.prototype.propertyIsEnumerable,rf=(e,t,n)=>t in e?Jh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sf=(e,t)=>{for(var n in t||(t={}))tf.call(t,n)&&rf(e,n,t[n]);if(ef)for(var n of ef(t))nf.call(t,n)&&rf(e,n,t[n]);return e},af=(e,t)=>Qh(e,$h(t)),of=(e,t)=>{var n={};for(var r in e)tf.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ef)for(var r of ef(e))t.indexOf(r)<0&&nf.call(e,r)&&(n[r]=e[r]);return n};function lf(...e){}function cf(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function uf(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}function df(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function mf(e){return e}function pf(e,t){if(!e){if("string"!=typeof t)throw new Error("Invariant failed");throw new Error(t)}}function hf(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function ff(...e){for(const t of e)if(void 0!==t)return t}function gf(e){return function(e){return!!e&&!!(0,a.isValidElement)(e)&&"ref"in e}(e)?e.ref:null}var vf,yf="undefined"!=typeof window&&!!(null==(vf=window.document)?void 0:vf.createElement);function bf(e){return e?e.ownerDocument||e:document}function wf(e,t=!1){const{activeElement:n}=bf(e);if(!(null==n?void 0:n.nodeName))return null;if("IFRAME"===n.tagName&&n.contentDocument)return wf(n.contentDocument.body,t);if(t){const e=n.getAttribute("aria-activedescendant");if(e){const t=bf(n).getElementById(e);if(t)return t}}return n}function _f(e,t){return e===t||e.contains(t)}function Ef(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==Sf.indexOf(e.type)}var Sf=["button","color","file","image","reset","submit"];function xf(e,t){return"matches"in e?e.matches(t):"msMatchesSelector"in e?e.msMatchesSelector(t):e.webkitMatchesSelector(t)}function Cf(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName;return t||n||!1}catch(e){return!1}}function kf(e,t){const n=null==e?void 0:e.getAttribute("role");return n&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(n)?n:t}function Pf(e,t){var n;const r=kf(e);if(!r)return t;return null!=(n={menu:"menuitem",listbox:"option",tree:"treeitem",grid:"gridcell"}[r])?n:t}function If(e){if(!e)return null;if(e.clientHeight&&e.scrollHeight>e.clientHeight){const{overflowY:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){const{overflowX:t}=getComputedStyle(e);if("visible"!==t&&"hidden"!==t)return e}return If(e.parentElement)||document.scrollingElement||document.body}function Tf(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function Of(){return yf&&!!navigator.maxTouchPoints}function Af(){return!!yf&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function Mf(){return yf&&Af()&&/apple/i.test(navigator.vendor)}function Nf(e){return Boolean(e.currentTarget&&!_f(e.currentTarget,e.target))}function Ff(e){return e.target===e.currentTarget}function Vf(e,t){const n=new FocusEvent("blur",t),r=e.dispatchEvent(n),s=af(sf({},t),{bubbles:!0});return e.dispatchEvent(new FocusEvent("focusout",s)),r}function Rf(e,t){const n=new MouseEvent("click",t);return e.dispatchEvent(n)}function Bf(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!_f(n,r)}function Df(e,t,n){const r=requestAnimationFrame((()=>{e.removeEventListener(t,s,!0),n()})),s=()=>{cancelAnimationFrame(r),n()};return e.addEventListener(t,s,{once:!0,capture:!0}),r}function Lf(e,t,n,r=window){const s=[];try{r.document.addEventListener(e,t,n);for(const i of Array.from(r.frames))s.push(Lf(e,t,n,i))}catch(e){}return()=>{try{r.document.removeEventListener(e,t,n)}catch(e){}s.forEach((e=>e()))}}var zf=Kh({},o),Hf=zf.useId,Gf=(zf.useDeferredValue,zf.useInsertionEffect),Uf=yf?a.useLayoutEffect:a.useEffect;function jf(e){const t=(0,a.useRef)(e);return Uf((()=>{t.current=e})),t}function Wf(e){const t=(0,a.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return Gf?Gf((()=>{t.current=e})):t.current=e,(0,a.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function qf(...e){return(0,a.useMemo)((()=>{if(e.some(Boolean))return t=>{e.forEach((e=>function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)))}}),e)}function Zf(e){if(Hf){const t=Hf();return e||t}const[t,n]=(0,a.useState)(e);return Uf((()=>{if(e||t)return;const r=Math.random().toString(36).substr(2,6);n(`id-${r}`)}),[e,t]),e||t}function Kf(e,t){const n=e=>{if("string"==typeof e)return e},[r,s]=(0,a.useState)((()=>n(t)));return Uf((()=>{const r=e&&"current"in e?e.current:e;s((null==r?void 0:r.tagName.toLowerCase())||n(t))}),[e,t]),r}function Yf(e,t){const n=(0,a.useRef)(!1);(0,a.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,a.useEffect)((()=>()=>{n.current=!1}),[])}Symbol("setNextState");function Xf(e){return Wf("function"==typeof e?e:()=>e)}function Jf(e,t,n=[]){const r=(0,a.useCallback)((n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n))),[...n,e.wrapElement]);return Yh(Kh({},e),{wrapElement:r})}var Qf=!1,$f=0,eg=0;function tg(e){(function(e){const t=e.movementX||e.screenX-$f,n=e.movementY||e.screenY-eg;return $f=e.screenX,eg=e.screenY,t||n||!1})(e)&&(Qf=!0)}function ng(){Qf=!1}var rg=s(4922);function sg(e){return a.forwardRef(((t,n)=>e(Kh({ref:n},t))))}function ig(e){const t=sg(e);return a.memo(t)}function ag(e,t){const n=t,{as:r,wrapElement:s,render:i}=n,o=Xh(n,["as","wrapElement","render"]);let l;const c=qf(t.ref,gf(i));if(r&&"string"!=typeof r)l=(0,rg.jsx)(r,Yh(Kh({},o),{render:i}));else if(a.isValidElement(i)){const e=Yh(Kh({},i.props),{ref:c});l=a.cloneElement(i,function(e,t){const n=Kh({},e);for(const r in t){if(!cf(t,r))continue;if("className"===r){const r="className";n[r]=e[r]?`${e[r]} ${t[r]}`:t[r];continue}if("style"===r){const r="style";n[r]=e[r]?Kh(Kh({},e[r]),t[r]):t[r];continue}const s=t[r];if("function"==typeof s&&r.startsWith("on")){const t=e[r];if("function"==typeof t){n[r]=(...e)=>{s(...e),t(...e)};continue}}n[r]=s}return n}(o,e))}else if(i)l=i(o);else if("function"==typeof t.children){0;const e=o,{children:n}=e,r=Xh(e,["children"]);l=t.children(r)}else l=r?(0,rg.jsx)(r,Kh({},o)):(0,rg.jsx)(e,Kh({},o));return s?s(l):l}function og(e){return(t={})=>{const n=e(t),r={};for(const e in n)cf(n,e)&&void 0!==n[e]&&(r[e]=n[e]);return r}}function lg(e=[],t=[]){const n=a.createContext(void 0),r=a.createContext(void 0),s=()=>a.useContext(n),i=t=>e.reduceRight(((e,n)=>(0,rg.jsx)(n,Yh(Kh({},t),{children:e}))),(0,rg.jsx)(n.Provider,Kh({},t)));return{context:n,scopedContext:r,useContext:s,useScopedContext:(e=!1)=>{const t=a.useContext(r),n=s();return e?t:t||n},useProviderContext:()=>{const e=a.useContext(r),t=s();if(!e||e!==t)return t},ContextProvider:i,ScopedContextProvider:e=>(0,rg.jsx)(i,Yh(Kh({},e),{children:t.reduceRight(((t,n)=>(0,rg.jsx)(n,Yh(Kh({},e),{children:t}))),(0,rg.jsx)(r.Provider,Kh({},e)))}))}}var cg=lg(),ug=cg.useContext,dg=(cg.useScopedContext,cg.useProviderContext,lg([cg.ContextProvider],[cg.ScopedContextProvider])),mg=dg.useContext,pg=(dg.useScopedContext,dg.useProviderContext),hg=dg.ContextProvider,fg=dg.ScopedContextProvider,gg=(0,a.createContext)(void 0),vg=(0,a.createContext)(void 0),yg="";function bg(){yg=""}function wg(e,t){var n;const r=(null==(n=e.element)?void 0:n.textContent)||e.children;return!!r&&df(r).trim().toLowerCase().startsWith(t.toLowerCase())}function _g(e,t,n){if(!n)return e;const r=e.find((e=>e.id===n));return r&&wg(r,t)?yg!==t&&wg(r,yg)?e:(yg=t,function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[Bh]:[],...e.slice(0,r)]}(e.filter((e=>wg(e,yg))),n).filter((e=>e.id!==n))):e}var Eg=og((e=>{var t=e,{store:n,typeahead:r=!0}=t,s=Xh(t,["store","typeahead"]);const i=mg();pf(n=n||i,!1);const o=s.onKeyDownCapture,l=(0,a.useRef)(0),c=Wf((e=>{if(null==o||o(e),e.defaultPrevented)return;if(!r)return;if(!n)return;const{items:t,activeId:s}=n.getState();if(!function(e){const t=e.target;return(!t||!Cf(t))&&(!(" "!==e.key||!yg.length)||1===e.key.length&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&/^[\p{Letter}\p{Number}]$/u.test(e.key))}(e))return bg();let i=function(e){return e.filter((e=>!e.disabled))}(t);if(!function(e,t){if(Ff(e))return!0;const n=e.target;return!!n&&t.some((e=>e.element===n))}(e,i))return bg();e.preventDefault(),window.clearTimeout(l.current),l.current=window.setTimeout((()=>{yg=""}),500);const a=e.key.toLowerCase();yg+=a,i=_g(i,a,s);const c=i.find((e=>wg(e,yg)));c?n.move(c.id):bg()}));return s=Yh(Kh({},s),{onKeyDownCapture:c})})),Sg=sg((e=>ag("div",Eg(e))));var xg="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function Cg(e){return!!xf(e,xg)&&(!!function(e){const t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)&&!function(e,t){if("closest"in e)return e.closest(t);do{if(xf(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}(e,"[inert]"))}function kg(e){const t=wf(e);if(!t)return!1;if(t===e)return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function Pg(e){const t=wf(e);if(!t)return!1;if(_f(e,t))return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&("id"in e&&(n===e.id||!!e.querySelector(`#${CSS.escape(n)}`)))}function Ig(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var Tg=Symbol("composite-hover");var Og=og((e=>{var t=e,{store:n,focusOnHover:r=!0,blurOnHoverEnd:s=!!r}=t,i=Xh(t,["store","focusOnHover","blurOnHoverEnd"]);const o=mg();pf(n=n||o,!1);const l=((0,a.useEffect)((()=>{Lf("mousemove",tg,!0),Lf("mousedown",ng,!0),Lf("mouseup",ng,!0),Lf("keydown",ng,!0),Lf("scroll",ng,!0)}),[]),Wf((()=>Qf))),c=i.onMouseMove,u=Xf(r),d=Wf((e=>{if(null==c||c(e),!e.defaultPrevented&&l()&&u(e)){if(!Pg(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!kg(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),m=i.onMouseLeave,p=Xf(s),h=Wf((e=>{var t;null==m||m(e),e.defaultPrevented||l()&&(function(e){const t=Ig(e);return!!t&&_f(e.currentTarget,t)}(e)||function(e){let t=Ig(e);if(!t)return!1;do{if(cf(t,Tg)&&t[Tg])return!0;t=t.parentElement}while(t);return!1}(e)||u(e)&&p(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),f=(0,a.useCallback)((e=>{e&&(e[Tg]=!0)}),[]);return i=Yh(Kh({},i),{ref:qf(f,i.ref),onMouseMove:d,onMouseLeave:h})})),Ag=ig((e=>ag("div",Og(e))));function Mg(e,t){const n=e.__unstableInternals;return pf(n,"Invalid store"),n[t]}function Ng(e,...t){let n=e,r=n,s=Symbol(),i=lf;const a=new Set,o=new Set,l=new Set,c=new Set,u=new Set,d=new WeakMap,m=new WeakMap,p=(e,t,n=c)=>(n.add(t),m.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),m.delete(t),n.delete(t)}),h=(e,i,a=!1)=>{if(!cf(n,e))return;const l=function(e,t){if(function(e){return"function"==typeof e}(e))return e(function(e){return"function"==typeof e}(t)?t():t);return e}(i,n[e]);if(l===n[e])return;a||t.forEach((t=>{var n;null==(n=null==t?void 0:t.setState)||n.call(t,e,l)}));const p=n;n=af(sf({},n),{[e]:l});const h=Symbol();s=h,o.add(e);const f=(t,r,s)=>{var i;const a=m.get(t);a&&!a.some((t=>s?s.has(t):t===e))||(null==(i=d.get(t))||i(),d.set(t,t(n,r)))};c.forEach((e=>{f(e,p)})),queueMicrotask((()=>{if(s!==h)return;const e=n;u.forEach((e=>{f(e,r,o)})),r=e,o.clear()}))},f={getState:()=>n,setState:h,__unstableInternals:{setup:e=>(l.add(e),()=>l.delete(e)),init:()=>{const e=a.size,r=Symbol();a.add(r);const s=()=>{a.delete(r),a.size||i()};if(e)return s;const o=(c=n,Object.keys(c)).map((e=>uf(...t.map((t=>{var n;const r=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);if(r&&cf(r,e))return Bg(t,[e],(t=>{h(e,t[e],!0)}))})))));var c;const u=[];l.forEach((e=>u.push(e())));const d=t.map(Vg);return i=uf(...o,...u,...d),s},subscribe:(e,t)=>p(e,t),sync:(e,t)=>(d.set(t,t(n,n)),p(e,t)),batch:(e,t)=>(d.set(t,t(n,r)),p(e,t,u)),pick:e=>Ng(function(e,t){const n={};for(const r of t)cf(e,r)&&(n[r]=e[r]);return n}(n,e),f),omit:e=>Ng(function(e,t){const n=sf({},e);for(const e of t)cf(n,e)&&delete n[e];return n}(n,e),f)}};return f}function Fg(e,...t){if(e)return Mg(e,"setup")(...t)}function Vg(e,...t){if(e)return Mg(e,"init")(...t)}function Rg(e,...t){if(e)return Mg(e,"subscribe")(...t)}function Bg(e,...t){if(e)return Mg(e,"sync")(...t)}function Dg(e,...t){if(e)return Mg(e,"batch")(...t)}function Lg(e,...t){if(e)return Mg(e,"omit")(...t)}function zg(...e){const t=e.reduce(((e,t)=>{var n;const r=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);return r?sf(sf({},e),r):e}),{});return Ng(t,...e)}var Hg=s(422),{useSyncExternalStore:Gg}=Hg,Ug=()=>()=>{};function jg(e,t=mf){const n=a.useCallback((t=>e?Rg(e,null,t):Ug()),[e]),r=()=>{const n="string"==typeof t?t:null,r="function"==typeof t?t:null,s=null==e?void 0:e.getState();return r?r(s):s&&n&&cf(s,n)?s[n]:void 0};return Gg(n,r,r)}function Wg(e,t,n,r){const s=cf(t,n)?t[n]:void 0,i=r?t[r]:void 0,a=jf({value:s,setValue:i});Uf((()=>Bg(e,[n],((e,t)=>{const{value:r,setValue:s}=a.current;s&&e[n]!==t[n]&&e[n]!==r&&s(e[n])}))),[e,n]),Uf((()=>{if(void 0!==s)return e.setState(n,s),Dg(e,[n],(()=>{void 0!==s&&e.setState(n,s)}))}))}function qg(e,t,n){return Yf(t,[n.store]),Wg(e,n,"items","setItems"),e}function Zg(e,t,n){return Wg(e=qg(e,t,n),n,"activeId","setActiveId"),Wg(e,n,"includesBaseElement"),Wg(e,n,"virtualFocus"),Wg(e,n,"orientation"),Wg(e,n,"rtl"),Wg(e,n,"focusLoop"),Wg(e,n,"focusWrap"),Wg(e,n,"focusShift"),e}function Kg(e,t,n){return Yf(t,[n.store,n.disclosure]),Wg(e,n,"open","setOpen"),Wg(e,n,"mounted","setMounted"),Wg(e,n,"animated"),e}function Yg(e,t,n){return Kg(e,t,n)}function Xg(e,t,n){return Yf(t,[n.popover]),Wg(e=Yg(e,t,n),n,"placement"),e}function Jg(e={}){return function(e={}){const t=zg(e.store,Lg(e.disclosure,["contentElement","disclosureElement"])),n=null==t?void 0:t.getState(),r=ff(e.open,null==n?void 0:n.open,e.defaultOpen,!1),s=ff(e.animated,null==n?void 0:n.animated,!1),i=Ng({open:r,animated:s,animating:!!s&&r,mounted:r,contentElement:ff(null==n?void 0:n.contentElement,null),disclosureElement:ff(null==n?void 0:n.disclosureElement,null)},t);return Fg(i,(()=>Bg(i,["animated","animating"],(e=>{e.animated||i.setState("animating",!1)})))),Fg(i,(()=>Rg(i,["open"],(()=>{i.getState().animated&&i.setState("animating",!0)})))),Fg(i,(()=>Bg(i,["open","animating"],(e=>{i.setState("mounted",e.open||e.animating)})))),af(sf({},i),{setOpen:e=>i.setState("open",e),show:()=>i.setState("open",!0),hide:()=>i.setState("open",!1),toggle:()=>i.setState("open",(e=>!e)),stopAnimation:()=>i.setState("animating",!1),setContentElement:e=>i.setState("contentElement",e),setDisclosureElement:e=>i.setState("disclosureElement",e)})}(e)}function Qg(e){const t=e.map(((e,t)=>[t,e]));let n=!1;return t.sort((([e,t],[r,s])=>{const i=t.element,a=s.element;return i===a?0:i&&a?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(i,a)?(e>r&&(n=!0),-1):(e<r&&(n=!0),1):0})),n?t.map((([e,t])=>t)):e}function $g(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=ff(e.items,null==n?void 0:n.items,e.defaultItems,[]),s=new Map(r.map((e=>[e.id,e]))),i={items:r,renderedItems:ff(null==n?void 0:n.renderedItems,[])},a=function(e){return null==e?void 0:e.__unstablePrivateStore}(e.store),o=Ng({items:r,renderedItems:i.renderedItems},a),l=Ng(i,e.store),c=e=>{const t=Qg(e);o.setState("renderedItems",t),l.setState("renderedItems",t)};Fg(l,(()=>Vg(o))),Fg(o,(()=>Dg(o,["items"],(e=>{l.setState("items",e.items)})))),Fg(o,(()=>Dg(o,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=l.getState();e.renderedItems!==t&&c(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const r=function(e){var t;const n=e.find((e=>!!e.element)),r=[...e].reverse().find((e=>!!e.element));let s=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;s&&(null==r?void 0:r.element);){if(r&&s.contains(r.element))return s;s=s.parentElement}return bf(s).body}(e.renderedItems),s=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>c(e.renderedItems))))}),{root:r});for(const t of e.renderedItems)t.element&&s.observe(t.element);return()=>{cancelAnimationFrame(n),s.disconnect()}}))));const u=(e,t,n=!1)=>{let r;t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),i=t.slice();if(-1!==n){r=t[n];const a=sf(sf({},r),e);i[n]=a,s.set(e.id,a)}else i.push(e),s.set(e.id,e);return i}));return()=>{t((t=>{if(!r)return n&&s.delete(e.id),t.filter((({id:t})=>t!==e.id));const i=t.findIndex((({id:t})=>t===e.id));if(-1===i)return t;const a=t.slice();return a[i]=r,s.set(e.id,r),a}))}},d=e=>u(e,(e=>o.setState("items",e)),!0);return af(sf({},l),{registerItem:d,renderItem:e=>uf(d(e),u(e,(e=>o.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=s.get(e);if(!t){const{items:n}=l.getState();t=n.find((t=>t.id===e)),t&&s.set(e,t)}return t||null},__unstablePrivateStore:o})}function ev(e){const t=[];for(const n of e)t.push(...n);return t}function tv(e){return e.slice().reverse()}var nv={id:null};function rv(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function sv(e,t){return e.filter((e=>e.rowId===t))}function iv(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function av(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function ov(e,t,n){const r=av(e);for(const s of e)for(let e=0;e<r;e+=1){const r=s[e];if(!r||n&&r.disabled){const r=0===e&&n?rv(s):s[e-1];s[e]=r&&t!==r.id&&n?r:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==r?void 0:r.rowId}}}return e}function lv(e){const t=iv(e),n=av(t),r=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&r.push(af(sf({},t),{rowId:t.rowId?`${e}`:void 0}))}return r}function cv(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),r=$g(e),s=ff(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),i=Ng(af(sf({},r.getState()),{activeId:s,baseElement:ff(null==n?void 0:n.baseElement,null),includesBaseElement:ff(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===s),moves:ff(null==n?void 0:n.moves,0),orientation:ff(e.orientation,null==n?void 0:n.orientation,"both"),rtl:ff(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:ff(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:ff(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:ff(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:ff(e.focusShift,null==n?void 0:n.focusShift,!1)}),r,e.store);Fg(i,(()=>Bg(i,["renderedItems","activeId"],(e=>{i.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=rv(e.renderedItems))?void 0:n.id}))}))));const a=(e,t,n,r)=>{var s,a;const{activeId:o,rtl:l,focusLoop:c,focusWrap:u,includesBaseElement:d}=i.getState(),m=l&&"vertical"!==t?tv(e):e;if(null==o)return null==(s=rv(m))?void 0:s.id;const p=m.find((e=>e.id===o));if(!p)return null==(a=rv(m))?void 0:a.id;const h=!!p.rowId,f=m.indexOf(p),g=m.slice(f+1),v=sv(g,p.rowId);if(void 0!==r){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(v,o),t=e.slice(r)[0]||e[e.length-1];return null==t?void 0:t.id}const y=function(e){return"vertical"===e?"horizontal":"horizontal"===e?"vertical":void 0}(h?t||"horizontal":t),b=c&&c!==y,w=h&&u&&u!==y;if(n=n||!h&&b&&d,b){const e=function(e,t,n=!1){const r=e.findIndex((e=>e.id===t));return[...e.slice(r+1),...n?[nv]:[],...e.slice(0,r)]}(w&&!n?m:sv(m,p.rowId),o,n),t=rv(e,o);return null==t?void 0:t.id}if(w){const e=rv(n?v:g,o);return n?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const _=rv(v,o);return!_&&n?null:null==_?void 0:_.id};return af(sf(sf({},r),i),{setBaseElement:e=>i.setState("baseElement",e),setActiveId:e=>i.setState("activeId",e),move:e=>{void 0!==e&&(i.setState("activeId",e),i.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=rv(i.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=rv(tv(i.getState().renderedItems)))?void 0:e.id},next:e=>{const{renderedItems:t,orientation:n}=i.getState();return a(t,n,!1,e)},previous:e=>{var t;const{renderedItems:n,orientation:r,includesBaseElement:s}=i.getState(),o=!!!(null==(t=rv(n))?void 0:t.rowId)&&s;return a(tv(n),r,o,e)},down:e=>{const{activeId:t,renderedItems:n,focusShift:r,focusLoop:s,includesBaseElement:o}=i.getState(),l=r&&!e,c=lv(ev(ov(iv(n),t,l)));return a(c,"vertical",s&&"horizontal"!==s&&o,e)},up:e=>{const{activeId:t,renderedItems:n,focusShift:r,includesBaseElement:s}=i.getState(),o=r&&!e,l=lv(tv(ev(ov(iv(n),t,o))));return a(l,"vertical",s,e)}})}var uv=Mf()&&Of();function dv(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),r=ff(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId,null),s=cv(af(sf({},e),{activeId:r,includesBaseElement:ff(e.includesBaseElement,null==n?void 0:n.includesBaseElement,!0),orientation:ff(e.orientation,null==n?void 0:n.orientation,"vertical"),focusLoop:ff(e.focusLoop,null==n?void 0:n.focusLoop,!0),focusWrap:ff(e.focusWrap,null==n?void 0:n.focusWrap,!0),virtualFocus:ff(e.virtualFocus,null==n?void 0:n.virtualFocus,!uv)})),i=function(e={}){var t=e,{popover:n}=t,r=of(t,["popover"]);const s=zg(r.store,Lg(n,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),i=null==s?void 0:s.getState(),a=Jg(af(sf({},r),{store:s})),o=ff(r.placement,null==i?void 0:i.placement,"bottom"),l=Ng(af(sf({},a.getState()),{placement:o,currentPlacement:o,anchorElement:ff(null==i?void 0:i.anchorElement,null),popoverElement:ff(null==i?void 0:i.popoverElement,null),arrowElement:ff(null==i?void 0:i.arrowElement,null),rendered:Symbol("rendered")}),a,s);return af(sf(sf({},a),l),{setAnchorElement:e=>l.setState("anchorElement",e),setPopoverElement:e=>l.setState("popoverElement",e),setArrowElement:e=>l.setState("arrowElement",e),render:()=>l.setState("rendered",Symbol("rendered"))})}(af(sf({},e),{placement:ff(e.placement,null==n?void 0:n.placement,"bottom-start")})),a=ff(e.value,null==n?void 0:n.value,e.defaultValue,""),o=ff(e.selectedValue,null==n?void 0:n.selectedValue,e.defaultSelectedValue,""),l=Array.isArray(o),c=Ng(af(sf(sf({},s.getState()),i.getState()),{value:a,selectedValue:o,resetValueOnSelect:ff(e.resetValueOnSelect,null==n?void 0:n.resetValueOnSelect,l),resetValueOnHide:ff(e.resetValueOnHide,null==n?void 0:n.resetValueOnHide,l),activeValue:null==n?void 0:n.activeValue}),s,i,e.store);return Fg(c,(()=>Bg(c,["resetValueOnHide","mounted"],(e=>{e.resetValueOnHide&&(e.mounted||c.setState("value",a))})))),Fg(c,(()=>Bg(c,["resetValueOnSelect","selectedValue"],(e=>{e.resetValueOnSelect&&c.setState("value",a)})))),Fg(c,(()=>Dg(c,["mounted"],(e=>{e.mounted||(c.setState("activeId",r),c.setState("moves",0))})))),Fg(c,(()=>Bg(c,["moves","activeId"],((e,t)=>{e.moves===t.moves&&c.setState("activeValue",void 0)})))),Fg(c,(()=>Dg(c,["moves","renderedItems"],((e,t)=>{if(e.moves===t.moves)return;const{activeId:n}=c.getState(),r=s.item(n);c.setState("activeValue",null==r?void 0:r.value)})))),af(sf(sf(sf({},i),s),c),{setValue:e=>c.setState("value",e),setSelectedValue:e=>c.setState("selectedValue",e)})}function mv(e={}){const[t,n]=function(e,t){const[n,r]=a.useState((()=>e(t)));Uf((()=>Vg(n)),[n]);const s=a.useCallback((e=>jg(n,e)),[n]);return[a.useMemo((()=>Yh(Kh({},n),{useState:s})),[n,s]),Wf((()=>{r((n=>e(Kh(Kh({},t),n.getState()))))}))]}(dv,e);return function(e,t,n){return Wg(e=Zg(e=Xg(e,t,n),t,n),n,"value","setValue"),Wg(e,n,"selectedValue","setSelectedValue"),Wg(e,n,"resetValueOnHide"),Wg(e,n,"resetValueOnSelect"),e}(t,n,e)}var pv=lg(),hv=(pv.useContext,pv.useScopedContext,pv.useProviderContext),fv=lg([pv.ContextProvider],[pv.ScopedContextProvider]),gv=(fv.useContext,fv.useScopedContext,fv.useProviderContext,fv.ContextProvider),vv=fv.ScopedContextProvider,yv=((0,a.createContext)(void 0),(0,a.createContext)(void 0),lg([gv],[vv])),bv=(yv.useContext,yv.useScopedContext,yv.useProviderContext),wv=yv.ContextProvider,_v=yv.ScopedContextProvider,Ev=lg([wv,hg],[_v,fg]),Sv=(Ev.useContext,Ev.useScopedContext),xv=Ev.useProviderContext,Cv=Ev.ContextProvider,kv=Ev.ScopedContextProvider,Pv=(0,a.createContext)(void 0),Iv=(0,a.createContext)(!1);function Tv(e={}){const t=mv(e);return(0,rg.jsx)(Cv,{value:t,children:e.children})}var Ov=og((e=>{var t=e,{store:n}=t,r=Xh(t,["store"]);const s=xv();pf(n=n||s,!1);const i=n.useState((e=>{var t;return null==(t=e.baseElement)?void 0:t.id}));return r=Kh({htmlFor:i},r)})),Av=ig((e=>ag("label",Ov(e))));var Mv=og((e=>{var t=e,{store:n}=t,r=Xh(t,["store"]);const s=bv();return n=n||s,r=Yh(Kh({},r),{ref:qf(null==n?void 0:n.setAnchorElement,r.ref)})}));sg((e=>ag("div",Mv(e))));var Nv=(0,a.createContext)(!0),Fv=Mf(),Vv=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"];function Rv(e){return!("input"!==e.tagName.toLowerCase()||!e.type)&&("radio"===e.type||"checkbox"===e.type)}function Bv(e,t,n,r,s){return e?t?n&&!r?-1:void 0:n?s:s||0:s}function Dv(e,t){return Wf((n=>{null==e||e(n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}))}var Lv=!0;function zv(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(Lv=!1))}function Hv(e){e.metaKey||e.ctrlKey||e.altKey||(Lv=!0)}var Gv=og((e=>{var t=e,{focusable:n=!0,accessibleWhenDisabled:r,autoFocus:s,onFocusVisible:i}=t,o=Xh(t,["focusable","accessibleWhenDisabled","autoFocus","onFocusVisible"]);const l=(0,a.useRef)(null);(0,a.useEffect)((()=>{n&&(Lf("mousedown",zv,!0),Lf("keydown",Hv,!0))}),[n]),Fv&&(0,a.useEffect)((()=>{if(!n)return;const e=l.current;if(!e)return;if(!Rv(e))return;const t=function(e){return"labels"in e?e.labels:null}(e);if(!t)return;const r=()=>queueMicrotask((()=>e.focus()));return t.forEach((e=>e.addEventListener("mouseup",r))),()=>{t.forEach((e=>e.removeEventListener("mouseup",r)))}}),[n]);const c=n&&hf(o),u=!!c&&!r,[d,m]=(0,a.useState)(!1);(0,a.useEffect)((()=>{n&&u&&d&&m(!1)}),[n,u,d]),(0,a.useEffect)((()=>{if(!n)return;if(!d)return;const e=l.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver((()=>{Cg(e)||m(!1)}));return t.observe(e),()=>t.disconnect()}),[n,d]);const p=Dv(o.onKeyPressCapture,c),h=Dv(o.onMouseDownCapture,c),f=Dv(o.onClickCapture,c),g=o.onMouseDown,v=Wf((e=>{if(null==g||g(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget;if(!Fv)return;if(Nf(e))return;if(!Ef(t)&&!Rv(t))return;let r=!1;const s=()=>{r=!0};t.addEventListener("focusin",s,{capture:!0,once:!0}),Df(t,"mouseup",(()=>{t.removeEventListener("focusin",s,!0),r||function(e){!Pg(e)&&Cg(e)&&e.focus()}(t)}))})),y=(e,t)=>{if(t&&(e.currentTarget=t),!n)return;const r=e.currentTarget;r&&kg(r)&&(null==i||i(e),e.defaultPrevented||m(!0))},b=o.onKeyDownCapture,w=Wf((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!n)return;if(d)return;if(e.metaKey)return;if(e.altKey)return;if(e.ctrlKey)return;if(!Ff(e))return;const t=e.currentTarget;queueMicrotask((()=>y(e,t)))})),_=o.onFocusCapture,E=Wf((e=>{if(null==_||_(e),e.defaultPrevented)return;if(!n)return;if(!Ff(e))return void m(!1);const t=e.currentTarget,r=()=>y(e,t);Lv||function(e){const{tagName:t,readOnly:n,type:r}=e;return"TEXTAREA"===t&&!n||"SELECT"===t&&!n||("INPUT"!==t||n?!!e.isContentEditable:Vv.includes(r))}(e.target)?queueMicrotask(r):!function(e){return"combobox"===e.getAttribute("role")&&!!e.dataset.name}(e.target)?m(!1):Df(e.target,"focusout",r)})),S=o.onBlur,x=Wf((e=>{null==S||S(e),n&&Bf(e)&&m(!1)})),C=(0,a.useContext)(Nv),k=Wf((e=>{n&&s&&e&&C&&queueMicrotask((()=>{kg(e)||Cg(e)&&e.focus()}))})),P=Kf(l,o.as),I=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(P),T=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(P),O=u?Kh({pointerEvents:"none"},o.style):o.style;return o=Yh(Kh({"data-focus-visible":n&&d?"":void 0,"data-autofocus":!!s||void 0,"aria-disabled":!!c||void 0},o),{ref:qf(l,k,o.ref),style:O,tabIndex:Bv(n,u,I,T,o.tabIndex),disabled:!(!T||!u)||void 0,contentEditable:c?void 0:o.contentEditable,onKeyPressCapture:p,onClickCapture:f,onMouseDownCapture:h,onMouseDown:v,onKeyDownCapture:w,onFocusCapture:E,onBlur:x})}));sg((e=>ag("div",e=Gv(e))));function Uv(e,t,n){return Wf((r=>{var s;if(null==t||t(r),r.defaultPrevented)return;if(r.isPropagationStopped())return;if(!Ff(r))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(r))return;if(function(e){const t=e.target;return!(t&&!Cf(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(r))return;const i=e.getState(),a=null==(s=Dh(e,i.activeId))?void 0:s.element;if(!a)return;const o=r,{view:l}=o,c=Xh(o,["view"]);a!==(null==n?void 0:n.current)&&a.focus(),function(e,t,n){const r=new KeyboardEvent(t,n);return e.dispatchEvent(r)}(a,r.type,c)||r.preventDefault(),r.currentTarget.contains(a)&&r.stopPropagation()}))}var jv=og((e=>{var t=e,{store:n,composite:r=!0,focusOnMove:s=r,moveOnKeyPress:i=!0}=t,o=Xh(t,["store","composite","focusOnMove","moveOnKeyPress"]);const l=pg();pf(n=n||l,!1);const c=(0,a.useRef)(null),u=function(e){const[t,n]=(0,a.useState)(!1),r=(0,a.useCallback)((()=>n(!0)),[]),s=e.useState((t=>Dh(e,t.activeId)));return(0,a.useEffect)((()=>{const e=null==s?void 0:s.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[s,t]),r}(n),d=n.useState("moves");(0,a.useEffect)((()=>{var e;if(!n)return;if(!d)return;if(!r)return;if(!s)return;const{activeId:t}=n.getState(),i=null==(e=Dh(n,t))?void 0:e.element;var a,o;i&&("scrollIntoView"in(a=i)?(a.focus({preventScroll:!0}),a.scrollIntoView(sf({block:"nearest",inline:"nearest"},o))):a.focus())}),[n,d,r,s]),Uf((()=>{if(!n)return;if(!d)return;if(!r)return;const{baseElement:e,activeId:t}=n.getState();if(!(null===t))return;if(!e)return;const s=c.current;c.current=null,s&&Vf(s,{relatedTarget:e}),kg(e)||e.focus()}),[n,d,r]);const m=n.useState("activeId"),p=n.useState("virtualFocus");Uf((()=>{var e;if(!n)return;if(!r)return;if(!p)return;const t=c.current;if(c.current=null,!t)return;const s=(null==(e=Dh(n,m))?void 0:e.element)||wf(t);s!==t&&Vf(t,{relatedTarget:s})}),[n,m,p,r]);const h=Uv(n,o.onKeyDownCapture,c),f=Uv(n,o.onKeyUpCapture,c),g=o.onFocusCapture,v=Wf((e=>{if(null==g||g(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const r=e.relatedTarget,s=function(e){const t=e[Lh];return delete e[Lh],t}(e.currentTarget);Ff(e)&&s&&(e.stopPropagation(),c.current=r)})),y=o.onFocus,b=Wf((e=>{if(null==y||y(e),e.defaultPrevented)return;if(!r)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:s}=n.getState();s?Ff(e)&&!zh(n,t)&&queueMicrotask(u):Ff(e)&&n.setActiveId(null)})),w=o.onBlurCapture,_=Wf((e=>{var t;if(null==w||w(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:r,activeId:s}=n.getState();if(!r)return;const i=null==(t=Dh(n,s))?void 0:t.element,a=e.relatedTarget,o=zh(n,a),l=c.current;if(c.current=null,Ff(e)&&o)a===i?l&&l!==a&&Vf(l,e):i?Vf(i,e):l&&Vf(l,e),e.stopPropagation();else{!zh(n,e.target)&&i&&Vf(i,e)}})),E=o.onKeyDown,S=Xf(i),x=Wf((e=>{var t;if(null==E||E(e),e.defaultPrevented)return;if(!n)return;if(!Ff(e))return;const{orientation:r,items:s,renderedItems:i,activeId:a}=n.getState(),o=Dh(n,a);if(null==(t=null==o?void 0:o.element)?void 0:t.isConnected)return;const l="horizontal"!==r,c="vertical"!==r,u=function(e){return e.some((e=>!!e.rowId))}(i);if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&Cf(e.currentTarget))return;const d={ArrowUp:(u||l)&&(()=>{if(u){const e=s&&function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(ev(tv(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(s);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(u||c)&&n.first,ArrowDown:(u||l)&&n.first,ArrowLeft:(u||c)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},m=d[e.key];if(m){const t=m();if(void 0!==t){if(!S(e))return;e.preventDefault(),n.move(t)}}}));o=Jf(o,(e=>(0,rg.jsx)(hg,{value:n,children:e})),[n]);const C=n.useState((e=>{var t;if(n&&r&&e.virtualFocus)return null==(t=Dh(n,e.activeId))?void 0:t.id}));o=Yh(Kh({"aria-activedescendant":C},o),{ref:qf(r?n.setBaseElement:null,o.ref),onKeyDownCapture:h,onKeyUpCapture:f,onFocusCapture:v,onFocus:b,onBlurCapture:_,onKeyDown:x});const k=n.useState((e=>r&&(e.virtualFocus||null===e.activeId)));return o=Gv(Kh({focusable:k},o))}));sg((e=>ag("div",jv(e))));const Wv=window.ReactDOM;function qv(e,t,n){if(!n)return!1;const r=e.find((e=>!e.disabled&&e.value));return(null==r?void 0:r.value)===t}function Zv(e,t){return!!t&&(null!=e&&(e=df(e),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase())))}var Kv=og((e=>{var t=e,{store:n,focusable:r=!0,autoSelect:s=!1,getAutoSelectId:i,showOnChange:o=!0,setValueOnChange:l=!0,showOnMouseDown:c=!0,setValueOnClick:u=!0,showOnKeyDown:d=!0,moveOnKeyPress:m=!0,autoComplete:p="list"}=t,h=Xh(t,["store","focusable","autoSelect","getAutoSelectId","showOnChange","setValueOnChange","showOnMouseDown","setValueOnClick","showOnKeyDown","moveOnKeyPress","autoComplete"]);const f=xv();pf(n=n||f,!1);const g=(0,a.useRef)(null),[v,y]=(0,a.useReducer)((()=>[]),[]),b=(0,a.useRef)(!1),w=(0,a.useRef)(!1),_=n.useState((e=>!!s&&e.virtualFocus)),E="inline"===p||"both"===p,[S,x]=(0,a.useState)(E);!function(e,t){const n=(0,a.useRef)(!1);Uf((()=>{if(n.current)return e();n.current=!0}),t),Uf((()=>()=>{n.current=!1}),[])}((()=>{E&&x(!0)}),[E]);const C=n.useState("value"),k=n.useState((e=>E&&S?e.activeValue:void 0)),P=n.useState("renderedItems"),I=n.useState("open"),T=n.useState("contentElement"),O=(0,a.useMemo)((()=>{if(!E)return C;if(!S)return C;if(qv(P,k,_)){if(Zv(C,k)){const e=(null==k?void 0:k.slice(C.length))||"";return C+e}return C}return k||C}),[E,S,P,k,_,C]);(0,a.useEffect)((()=>{const e=g.current;if(!e)return;const t=()=>x(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}}),[]),(0,a.useEffect)((()=>{if(!E)return;if(!S)return;if(!k)return;qv(P,k,_)&&Zv(C,k)&&queueMicrotask((()=>{const e=g.current;e&&Tf(e,C.length,k.length)}))}),[v,E,S,k,P,_,C]);const A=(0,a.useRef)(null),M=Wf(i),N=(0,a.useRef)(null);(0,a.useEffect)((()=>{if(!I)return;if(!T)return;const e=If(T);if(!e)return;A.current=e;const t=()=>{b.current=!1},r=()=>{if(!n)return;if(!b.current)return;const{activeId:e}=n.getState();null!==e&&e!==N.current&&(b.current=!1)},s={passive:!0,capture:!0};return e.addEventListener("wheel",t,s),e.addEventListener("scroll",r,s),()=>{e.removeEventListener("wheel",t,!0),e.removeEventListener("scroll",r,!0)}}),[I,T,n]),Uf((()=>{C&&(w.current||(b.current=!0))}),[C]),Uf((()=>{I||(b.current=!1)}),[I]);const F=n.useState("resetValueOnSelect");Yf((()=>{var e;const t=b.current;if(!n)return;if(!(_&&t||F))return;const{baseElement:r,contentElement:s,activeId:i}=n.getState();if(!r||kg(r)){if(null==s?void 0:s.hasAttribute("data-placing")){const e=new MutationObserver(y);return e.observe(s,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(_&&t){const e=M(P),t=void 0!==e?e:n.first();N.current=t,n.move(null!=t?t:null)}else{const t=null==(e=n.item(i))?void 0:e.element;t&&"scrollIntoView"in t&&t.scrollIntoView({block:"nearest",inline:"nearest"})}}}),[n,v,C,_,F,M,P]),(0,a.useEffect)((()=>{if(!E)return;const e=g.current;if(!e)return;const t=[e,T].filter((e=>!!e)),r=e=>{t.every((t=>Bf(e,t)))&&(null==n||n.setValue(O))};return t.forEach((e=>e.addEventListener("focusout",r))),()=>{t.forEach((e=>e.removeEventListener("focusout",r)))}}),[E,T,n,O]);const V=h.onChange,R=Xf(o),B=Xf(l),D=Wf((e=>{if(null==V||V(e),e.defaultPrevented)return;if(!n)return;const{value:t,selectionStart:r,selectionEnd:s}=e.target,i=e.nativeEvent;if(b.current=!0,function(e){return"input"===e.type}(i)&&(i.isComposing&&(b.current=!1,w.current=!0),E)){const e="insertText"===i.inputType||"insertCompositionText"===i.inputType,n=r===t.length;x(e&&n)}if(B(e)){const i=t===n.getState().value;(0,Wv.flushSync)((()=>null==n?void 0:n.setValue(t))),Tf(e.currentTarget,r,s),E&&_&&i&&y()}R(e)&&n.show(),_&&b.current||n.setActiveId(null)})),L=h.onCompositionEnd,z=Wf((e=>{b.current=!0,w.current=!1,null==L||L(e),e.defaultPrevented||_&&y()})),H=h.onMouseDown,G=Xf(u),U=Xf(c),j=Wf((e=>{null==H||H(e),e.defaultPrevented||e.button||e.ctrlKey||n&&(n.setActiveId(null),G(e)&&n.setValue(O),U(e)&&Df(e.currentTarget,"mouseup",n.show))})),W=h.onKeyDown,q=Xf(d),Z=Wf((e=>{if(null==W||W(e),e.repeat||(b.current=!1),e.defaultPrevented)return;if(e.ctrlKey)return;if(e.altKey)return;if(e.shiftKey)return;if(e.metaKey)return;if(!n)return;const{open:t,activeId:r}=n.getState();t||null===r&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||q(e)&&(e.preventDefault(),n.show()))})),K=h.onBlur,Y=Wf((e=>{b.current=!1,null==K||K(e),e.defaultPrevented})),X=Zf(h.id),J=function(e){return"inline"===e||"list"===e||"both"===e||"none"===e}(p)?p:void 0,Q=n.useState((e=>null===e.activeId));return h=Yh(Kh({id:X,role:"combobox","aria-autocomplete":J,"aria-haspopup":kf(T,"listbox"),"aria-expanded":I,"aria-controls":null==T?void 0:T.id,"data-active-item":Q||void 0,value:O},h),{ref:qf(g,h.ref),onChange:D,onCompositionEnd:z,onMouseDown:j,onKeyDown:Z,onBlur:Y}),h=jv(Yh(Kh({store:n,focusable:r},h),{moveOnKeyPress:e=>!function(e,...t){const n="function"==typeof e?e(...t):e;return null!=n&&!n}(m,e)&&(E&&x(!0),!0)})),h=Mv(Kh({store:n},h)),Kh({autoComplete:"off"},h)})),Yv=sg((e=>ag("input",Kv(e))));function Xv(e,t){const n=setTimeout(t,e);return()=>clearTimeout(n)}function Jv(...e){return e.join(", ").split(", ").reduce(((e,t)=>{const n=1e3*parseFloat(t||"0s");return n>e?n:e}),0)}function Qv(e,t,n){return!(n||!1===t||e&&!t)}var $v=og((e=>{var t=e,{store:n,alwaysVisible:r}=t,s=Xh(t,["store","alwaysVisible"]);const i=hv();pf(n=n||i,!1);const o=Zf(s.id),[l,c]=(0,a.useState)(null),u=n.useState("open"),d=n.useState("mounted"),m=n.useState("animated"),p=n.useState("contentElement");Uf((()=>{if(m){if(null==p?void 0:p.isConnected)return function(e){let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}((()=>{c(u?"enter":"leave")}));c(null)}}),[m,p,u]),Uf((()=>{if(!n)return;if(!m)return;if(!p)return;if(!l)return;if("enter"===l&&!u)return;if("leave"===l&&u)return;if("number"==typeof m){return Xv(m,n.stopAnimation)}const{transitionDuration:e,animationDuration:t,transitionDelay:r,animationDelay:s}=getComputedStyle(p),i=Jv(r,s)+Jv(e,t);return i?Xv(i,n.stopAnimation):void 0}),[n,m,p,u,l]);const h=Qv(d,(s=Jf(s,(e=>(0,rg.jsx)(vv,{value:n,children:e})),[n])).hidden,r),f=h?Yh(Kh({},s.style),{display:"none"}):s.style;return s=Yh(Kh({id:o,"data-enter":"enter"===l?"":void 0,"data-leave":"leave"===l?"":void 0,hidden:h},s),{ref:qf(o?n.setContentElement:null,s.ref),style:f})})),ey=sg((e=>ag("div",$v(e))));sg((e=>{var t=e,{unmountOnHide:n}=t,r=Xh(t,["unmountOnHide"]);const s=hv();return!1===jg(r.store||s,(e=>!n||(null==e?void 0:e.mounted)))?null:(0,rg.jsx)(ey,Kh({},r))}));var ty=og((e=>{var t=e,{store:n,focusable:r=!0,alwaysVisible:s}=t,i=Xh(t,["store","focusable","alwaysVisible"]);const o=xv();pf(n=n||o,!1);const l=(0,a.useRef)(null),c=Zf(i.id),u=i.onKeyDown,d=Wf((e=>{null==u||u(e),e.defaultPrevented||"Escape"===e.key&&(null==n||n.move(null))})),m=(0,a.useRef)(!1),p=i.onFocusVisible,h=Wf((e=>{if(null==p||p(e),e.defaultPrevented)return;if("focus"!==e.type)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const{relatedTarget:r,currentTarget:s}=e;r&&s.contains(r)||(m.current=!0,n.setState("virtualFocus",!1))})),f=i.onBlur,g=Wf((e=>{null==f||f(e),e.defaultPrevented||m.current&&Bf(e)&&(m.current=!1,null==n||n.setState("virtualFocus",!0))}));i=Jf(i,(e=>(0,rg.jsx)(kv,{value:n,children:e})),[n]);const v=Qv(n.useState("mounted"),i.hidden,s),y=v?Yh(Kh({},i.style),{display:"none"}):i.style,b=n.useState((e=>Array.isArray(e.selectedValue))),w=function(e,t,n){const[r,s]=(0,a.useState)(n);return Uf((()=>{const n=e&&"current"in e?e.current:e,r=null==n?void 0:n.getAttribute(t);null!=r&&s(r)}),[e,t]),r}(l,"role",i.role);return i=Yh(Kh({id:c,hidden:v,role:"listbox",tabIndex:r?-1:void 0,"aria-multiselectable":("listbox"===w||"tree"===w||"grid"===w)&&b||void 0},i),{ref:qf(c?n.setContentElement:null,l,i.ref),style:y,onKeyDown:d,onFocusVisible:h,onBlur:g}),i=Gv(Kh({focusable:r},i))})),ny=sg((e=>ag("div",ty(e))));function ry(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?Ef(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(Ef(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}var sy=Symbol("command"),iy=og((e=>{var t=e,{clickOnEnter:n=!0,clickOnSpace:r=!0}=t,s=Xh(t,["clickOnEnter","clickOnSpace"]);const i=(0,a.useRef)(null),o=Kf(i,s.as),l=s.type,[c,u]=(0,a.useState)((()=>!!o&&Ef({tagName:o,type:l})));(0,a.useEffect)((()=>{i.current&&u(Ef(i.current))}),[]);const[d,m]=(0,a.useState)(!1),p=(0,a.useRef)(!1),h=hf(s),[f,g]=function(e,t,n){const r=e.onLoadedMetadataCapture,s=(0,a.useMemo)((()=>Object.assign((()=>{}),Yh(Kh({},r),{[t]:n}))),[r,t,n]);return[null==r?void 0:r[t],{onLoadedMetadataCapture:s}]}(s,sy,!0),v=s.onKeyDown,y=Wf((e=>{null==v||v(e);const t=e.currentTarget;if(e.defaultPrevented)return;if(f)return;if(h)return;if(!Ff(e))return;if(Cf(t))return;if(t.isContentEditable)return;const s=n&&"Enter"===e.key,i=r&&" "===e.key,a="Enter"===e.key&&!n,o=" "===e.key&&!r;if(a||o)e.preventDefault();else if(s||i){const n=ry(e);if(s){if(!n){e.preventDefault();const n=e,{view:r}=n,s=Xh(n,["view"]),i=()=>Rf(t,s);yf&&/firefox\//i.test(navigator.userAgent)?Df(t,"keyup",i):queueMicrotask(i)}}else i&&(p.current=!0,n||(e.preventDefault(),m(!0)))}})),b=s.onKeyUp,w=Wf((e=>{if(null==b||b(e),e.defaultPrevented)return;if(f)return;if(h)return;if(e.metaKey)return;const t=r&&" "===e.key;if(p.current&&t&&(p.current=!1,!ry(e))){e.preventDefault(),m(!1);const t=e.currentTarget,n=e,{view:r}=n,s=Xh(n,["view"]);queueMicrotask((()=>Rf(t,s)))}}));return s=Yh(Kh(Kh({"data-active":d?"":void 0,type:c?"button":void 0},g),s),{ref:qf(i,s.ref),onKeyDown:y,onKeyUp:w}),s=Gv(s)}));sg((e=>ag("button",e=iy(e))));var ay=og((e=>{var t=e,{store:n,shouldRegisterItem:r=!0,getItem:s=mf,element:i}=t,o=Xh(t,["store","shouldRegisterItem","getItem","element"]);const l=ug();n=n||l;const c=Zf(o.id),u=(0,a.useRef)(i);return(0,a.useEffect)((()=>{const e=u.current;if(!c)return;if(!e)return;if(!r)return;const t=s({id:c,element:e});return null==n?void 0:n.renderItem(t)}),[c,r,s,n]),o=Yh(Kh({},o),{ref:qf(u,o.ref)})}));sg((e=>ag("div",ay(e))));function oy(e,t=!1){const{top:n}=e.getBoundingClientRect();return t?n+e.clientHeight:n}function ly(e,t,n,r=!1){var s;if(!t)return;if(!n)return;const{renderedItems:i}=t.getState(),a=If(e);if(!a)return;const o=function(e,t=!1){const n=e.clientHeight,{top:r}=e.getBoundingClientRect(),s=1.5*Math.max(.875*n,n-40),i=t?n-s+r:s+r;return"HTML"===e.tagName?i+e.scrollTop:i}(a,r);let l,c;for(let e=0;e<i.length;e+=1){const i=l;if(l=n(e),!l)break;if(l===i)continue;const a=null==(s=Dh(t,l))?void 0:s.element;if(!a)continue;const u=oy(a,r)-o,d=Math.abs(u);if(r&&u<=0||!r&&u>=0){void 0!==c&&c<d&&(l=i);break}c=d}return l}var cy=og((e=>{var t=e,{store:n,rowId:r,preventScrollOnKeyDown:s=!1,moveOnKeyPress:i=!0,tabbable:o=!1,getItem:l,"aria-setsize":c,"aria-posinset":u}=t,d=Xh(t,["store","rowId","preventScrollOnKeyDown","moveOnKeyPress","tabbable","getItem","aria-setsize","aria-posinset"]);const m=mg();n=n||m;const p=Zf(d.id),h=(0,a.useRef)(null),f=(0,a.useContext)(vg),g=jg(n,(e=>r||(e&&(null==f?void 0:f.baseElement)&&f.baseElement===e.baseElement?f.id:void 0))),v=hf(d)&&!d.accessibleWhenDisabled,y=(0,a.useCallback)((e=>{const t=Yh(Kh({},e),{id:p||e.id,rowId:g,disabled:!!v});return l?l(t):t}),[p,g,v,l]),b=d.onFocus,w=(0,a.useRef)(!1),_=Wf((e=>{if(null==b||b(e),e.defaultPrevented)return;if(Nf(e))return;if(!p)return;if(!n)return;const{activeId:t,virtualFocus:r,baseElement:s}=n.getState();if(function(e,t){return!Ff(e)&&zh(t,e.target)}(e,n))return;if(t!==p&&n.setActiveId(p),!r)return;if(!Ff(e))return;if((i=e.currentTarget).isContentEditable||Cf(i)||"INPUT"===i.tagName&&!Ef(i))return;var i;if(!(null==s?void 0:s.isConnected))return;w.current=!0;e.relatedTarget===s||zh(n,e.relatedTarget)?function(e){e[Lh]=!0,e.focus({preventScroll:!0})}(s):s.focus()})),E=d.onBlurCapture,S=Wf((e=>{if(null==E||E(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState();(null==t?void 0:t.virtualFocus)&&w.current&&(w.current=!1,e.preventDefault(),e.stopPropagation())})),x=d.onKeyDown,C=Xf(s),k=Xf(i),P=Wf((e=>{if(null==x||x(e),e.defaultPrevented)return;if(!Ff(e))return;if(!n)return;const{currentTarget:t}=e,r=n.getState(),s=n.item(p),i=!!(null==s?void 0:s.rowId),a="horizontal"!==r.orientation,o="vertical"!==r.orientation,l=()=>!!i||(!!o||(!r.baseElement||!Cf(r.baseElement))),c={ArrowUp:(i||a)&&n.up,ArrowRight:(i||o)&&n.next,ArrowDown:(i||a)&&n.down,ArrowLeft:(i||o)&&n.previous,Home:()=>{if(l())return!i||e.ctrlKey?null==n?void 0:n.first():null==n?void 0:n.previous(-1)},End:()=>{if(l())return!i||e.ctrlKey?null==n?void 0:n.last():null==n?void 0:n.next(-1)},PageUp:()=>ly(t,n,null==n?void 0:n.up,!0),PageDown:()=>ly(t,n,null==n?void 0:n.down)}[e.key];if(c){const t=c();if(C(e)||void 0!==t){if(!k(e))return;e.preventDefault(),n.move(t)}}})),I=jg(n,(e=>(null==e?void 0:e.baseElement)||void 0)),T=(0,a.useMemo)((()=>({id:p,baseElement:I})),[p,I]);d=Jf(d,(e=>(0,rg.jsx)(gg.Provider,{value:T,children:e})),[T]);const O=jg(n,(e=>!!e&&e.activeId===p)),A=jg(n,"virtualFocus"),M=function(e,t){const n=t.role,[r,s]=(0,a.useState)(n);return Uf((()=>{const t=e.current;t&&s(t.getAttribute("role")||n)}),[n]),r}(h,d);let N;O&&(!function(e){return"option"===e||"treeitem"===e}(M)?A&&function(e){return"option"===e||"tab"===e||"treeitem"===e||"gridcell"===e||"row"===e||"columnheader"===e||"rowheader"===e}(M)&&(N=!0):N=!0);const F=jg(n,(e=>null!=c?c:e&&(null==f?void 0:f.ariaSetSize)&&f.baseElement===e.baseElement?f.ariaSetSize:void 0)),V=jg(n,(e=>{if(null!=u)return u;if(!e)return;if(!(null==f?void 0:f.ariaPosInSet))return;if(f.baseElement!==e.baseElement)return;const t=e.renderedItems.filter((e=>e.rowId===g));return f.ariaPosInSet+t.findIndex((e=>e.id===p))})),R=jg(n,(e=>!(null==e?void 0:e.renderedItems.length)||!e.virtualFocus&&(!!o||e.activeId===p)));return d=Yh(Kh({id:p,"aria-selected":N,"data-active-item":O?"":void 0},d),{ref:qf(h,d.ref),tabIndex:R?d.tabIndex:-1,onFocus:_,onBlurCapture:S,onKeyDown:P}),d=iy(d),d=ay(Yh(Kh({store:n},d),{getItem:y,shouldRegisterItem:!!p&&d.shouldRegisterItem})),Yh(Kh({},d),{"aria-setsize":F,"aria-posinset":V})}));ig((e=>ag("button",cy(e))));var uy=og((e=>{var t=e,{store:n,value:r,hideOnClick:s,selectValueOnClick:i=!0,setValueOnClick:o,focusOnHover:l=!1,moveOnKeyPress:c=!0,getItem:u}=t,d=Xh(t,["store","value","hideOnClick","selectValueOnClick","setValueOnClick","focusOnHover","moveOnKeyPress","getItem"]);const m=Sv();pf(n=n||m,!1);const p=(0,a.useCallback)((e=>{const t=Yh(Kh({},e),{value:r});return u?u(t):t}),[r,u]),h=n.useState((e=>Array.isArray(e.selectedValue)));o=null!=o?o:!h,s=null!=s?s:null!=r&&!h;const f=d.onClick,g=Xf(o),v=Xf(i),y=Xf(s),b=Wf((e=>{null==f||f(e),e.defaultPrevented||function(e){const t=e.currentTarget;if(!t)return!1;const n=t.tagName.toLowerCase();return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)}(e)||function(e){const t=e.currentTarget;if(!t)return!1;const n=Af();if(n&&!e.metaKey)return!1;if(!n&&!e.ctrlKey)return!1;const r=t.tagName.toLowerCase();return"a"===r||"button"===r&&"submit"===t.type||"input"===r&&"submit"===t.type}(e)||(null!=r&&(v(e)&&(null==n||n.setSelectedValue((e=>Array.isArray(e)?e.includes(r)?e.filter((e=>e!==r)):[...e,r]:r))),g(e)&&(null==n||n.setValue(r))),y(e)&&(null==n||n.move(null),null==n||n.hide()))})),w=d.onKeyDown,_=Wf((e=>{if(null==w||w(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState().baseElement;if(!t)return;if(kg(t))return;(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask((()=>t.focus())),Cf(t)&&(null==n||n.setValue(t.value)))})),E=n.useState((e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.selectedValue,r)));h&&null!=E&&(d=Kh({"aria-selected":E},d)),d=Jf(d,(e=>(0,rg.jsx)(Pv.Provider,{value:r,children:(0,rg.jsx)(Iv.Provider,{value:null!=E&&E,children:e})})),[r,E]);const S=n.useState("contentElement");d=Yh(Kh({role:Pf(S),children:r},d),{onClick:b,onKeyDown:_});const x=Xf(c);return d=cy(Yh(Kh({store:n},d),{getItem:p,moveOnKeyPress:e=>{if(!x(e))return!1;const t=new Event("combobox-item-move"),r=null==n?void 0:n.getState().baseElement;return null==r||r.dispatchEvent(t),!0}})),d=Og(Kh({store:n,focusOnHover:l},d))})),dy=ig((e=>ag("div",uy(e))));function my(e){return df(e).toLowerCase()}var py=og((e=>{var t=e,{store:n,value:r}=t,s=Xh(t,["store","value"]);const i=Sv();n=n||i;const o=(0,a.useContext)(Pv),l=null!=r?r:o;pf(n,!1);const c=n.useState((e=>l&&e.value?e.value:void 0)),u=(0,a.useMemo)((()=>l&&c?function(e,t){t=my(t);let n=my(e).indexOf(t);const r=[];for(;-1!==n;)0!==n&&r.push((0,rg.jsx)("span",{"data-autocomplete-value":"",children:e.substr(0,n)},r.length)),r.push((0,rg.jsx)("span",{"data-user-value":"",children:e.substr(n,t.length)},r.length)),n=my(e=e.substr(n+t.length)).indexOf(t);return e&&r.push((0,rg.jsx)("span",{"data-autocomplete-value":"",children:e},r.length)),r}(l,c):l),[l,c]);return s=Kh({children:u},s)})),hy=sg((e=>ag("span",py(e))));var fy=s(9681),gy=s.n(fy);const{CompositeV2:vy,CompositeItemV2:yy,useCompositeStoreV2:by}=yp(E.privateApis),wy=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Circle,{cx:12,cy:12,r:3}));function _y(e=""){return gy()(e.trim().toLowerCase())}const Ey=[],Sy=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:Ey,xy=(e,t,n)=>e.singleSelection?n:Array.isArray(t?.value)?t.value.includes(n)?t.value.filter((e=>e!==n)):[...t.value,n]:[n];function Cy({view:e,filter:t,onChangeView:n}){const r=by({virtualFocus:!0,focusLoop:!0,defaultActiveId:1===t.operators?.length?void 0:null}),s=e.filters.find((e=>e.field===t.field)),i=Sy(t,s);return(0,a.createElement)(vy,{store:r,role:"listbox",className:"dataviews-search-widget-listbox","aria-label":(0,S.sprintf)((0,S.__)("List of: %1$s"),t.name),onFocusVisible:()=>{r.getState().activeId||r.move(r.first())},render:(0,a.createElement)(Sg,{store:r})},t.elements.map((o=>(0,a.createElement)(Ag,{store:r,key:o.value,render:(0,a.createElement)(yy,{render:(0,a.createElement)("div",{"aria-label":o.label,role:"option",className:"dataviews-search-widget-listitem"}),onClick:()=>{const r=s?[...e.filters.map((e=>e.field===t.field?{...e,operator:s.operator||t.operators[0],value:xy(t,s,o.value)}:e))]:[...e.filters,{field:t.field,operator:t.operators[0],value:xy(t,s,o.value)}];n({...e,page:1,filters:r})}})},(0,a.createElement)("span",{className:"dataviews-search-widget-listitem-check"},t.singleSelection&&i===o.value&&(0,a.createElement)(E.Icon,{icon:wy}),!t.singleSelection&&i.includes(o.value)&&(0,a.createElement)(E.Icon,{icon:Ls})),(0,a.createElement)("span",null,o.label,!!o.description&&(0,a.createElement)("span",{className:"dataviews-search-widget-listitem-description"},o.description))))))}function ky({view:e,filter:t,onChangeView:n}){const[r,s]=(0,h.useState)(""),i=(0,h.useDeferredValue)(r),o=e.filters.find((e=>e.field===t.field)),l=Sy(t,o),c=(0,h.useMemo)((()=>{const e=_y(i);return t.elements.filter((t=>_y(t.label).includes(e)))}),[t.elements,i]);return(0,a.createElement)(Tv,{resetValueOnSelect:!1,selectedValue:l,setSelectedValue:r=>{const s=o?[...e.filters.map((e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:r}:e))]:[...e.filters,{field:t.field,operator:t.operators[0],value:r}];n({...e,page:1,filters:s})},setValue:s},(0,a.createElement)("div",{className:"dataviews-search-widget-filter-combobox__wrapper"},(0,a.createElement)(Av,{render:(0,a.createElement)(E.VisuallyHidden,null)},(0,S.__)("Search items")),(0,a.createElement)(Yv,{autoSelect:"always",placeholder:(0,S.__)("Search"),className:"dataviews-search-widget-filter-combobox__input"}),(0,a.createElement)("div",{className:"dataviews-search-widget-filter-combobox__icon"},(0,a.createElement)(E.Icon,{icon:bn}))),(0,a.createElement)(ny,{className:"dataviews-search-widget-filter-combobox-list",alwaysVisible:!0},c.map((e=>(0,a.createElement)(dy,{key:e.value,value:e.value,className:"dataviews-search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0},(0,a.createElement)("span",{className:"dataviews-search-widget-listitem-check"},t.singleSelection&&l===e.value&&(0,a.createElement)(E.Icon,{icon:wy}),!t.singleSelection&&l.includes(e.value)&&(0,a.createElement)(E.Icon,{icon:Ls})),(0,a.createElement)("span",null,(0,a.createElement)(hy,{className:"dataviews-search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,a.createElement)("span",{className:"dataviews-search-widget-listitem-description"},e.description))))),!c.length&&(0,a.createElement)("p",null,(0,S.__)("No results found"))))}function Py(e){const t=e.filter.elements.length>10?ky:Cy;return(0,a.createElement)(t,{...e})}const Iy="Enter",Ty=" ",Oy=({activeElements:e,filterInView:t,filter:n})=>{if(void 0===e||0===e.length)return n.name;const r={Name:(0,a.createElement)("span",{className:"dataviews-filter-summary__filter-text-name"}),Value:(0,a.createElement)("span",{className:"dataviews-filter-summary__filter-text-value"})};return t?.operator===_p?(0,h.createInterpolateElement)((0,S.sprintf)((0,S.__)("<Name>%1$s is any: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),r):t?.operator===Ep?(0,h.createInterpolateElement)((0,S.sprintf)((0,S.__)("<Name>%1$s is none: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),r):t?.operator===Sp?(0,h.createInterpolateElement)((0,S.sprintf)((0,S.__)("<Name>%1$s is all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),r):t?.operator===xp?(0,h.createInterpolateElement)((0,S.sprintf)((0,S.__)("<Name>%1$s is not all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),r):t?.operator===bp?(0,h.createInterpolateElement)((0,S.sprintf)((0,S.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),n.name,e[0].label),r):t?.operator===wp?(0,h.createInterpolateElement)((0,S.sprintf)((0,S.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),n.name,e[0].label),r):(0,S.sprintf)((0,S.__)("Unknown status for %1$s"),n.name)};function Ay({filter:e,view:t,onChangeView:n}){const r=e.operators?.map((e=>({value:e,label:kp[e]?.label}))),s=t.filters.find((t=>t.field===e.field)),i=s?.operator||e.operators[0];return r.length>1&&(0,a.createElement)(E.__experimentalHStack,{spacing:2,justify:"flex-start",className:"dataviews-filter-summary__operators-container"},(0,a.createElement)(E.FlexItem,{className:"dataviews-filter-summary__operators-filter-name"},e.name),(0,a.createElement)(E.SelectControl,{label:(0,S.__)("Conditions"),value:i,options:r,onChange:r=>{const i=s?[...t.filters.map((t=>t.field===e.field?{...t,operator:r}:t))]:[...t.filters,{field:e.field,operator:r}];n({...t,page:1,filters:i})},size:"small",__nextHasNoMarginBottom:!0,hideLabelFromVision:!0}))}function My({addFilterRef:e,openedFilter:t,...n}){const r=(0,h.useRef)(),{filter:s,view:i,onChangeView:o}=n,l=i.filters.find((e=>e.field===s.field)),c=s.elements.filter((e=>s.singleSelection?e.value===l?.value:l?.value?.includes(e.value))),u=s.isPrimary,d=void 0!==l?.value,m=!u||d;return(0,a.createElement)(E.Dropdown,{defaultOpen:t===s.field,contentClassName:"dataviews-filter-summary__popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{r.current?.focus()},renderToggle:({isOpen:t,onToggle:n})=>(0,a.createElement)("div",{className:"dataviews-filter-summary__chip-container"},(0,a.createElement)(E.Tooltip,{text:(0,S.sprintf)((0,S.__)("Filter by: %1$s"),s.name.toLowerCase()),placement:"top"},(0,a.createElement)("div",{className:an("dataviews-filter-summary__chip",{"has-reset":m,"has-values":d}),role:"button",tabIndex:0,onClick:n,onKeyDown:e=>{[Iy,Ty].includes(e.key)&&(n(),e.preventDefault())},"aria-pressed":t,"aria-expanded":t,ref:r},(0,a.createElement)(Oy,{activeElements:c,filterInView:l,filter:s}))),m&&(0,a.createElement)(E.Tooltip,{text:u?(0,S.__)("Reset"):(0,S.__)("Remove"),placement:"top"},(0,a.createElement)("button",{className:an("dataviews-filter-summary__chip-remove",{"has-values":d}),onClick:()=>{o({...i,page:1,filters:i.filters.filter((e=>e.field!==s.field))}),u?r.current?.focus():e.current?.focus()}},(0,a.createElement)(E.Icon,{icon:$r})))),renderContent:()=>(0,a.createElement)(E.__experimentalVStack,{spacing:0,justify:"flex-start"},(0,a.createElement)(Ay,{...n}),(0,a.createElement)(Py,{...n}))})}const{DropdownMenuV2:Ny,DropdownMenuItemV2:Fy,DropdownMenuItemLabelV2:Vy}=yp(E.privateApis);const Ry=(0,h.forwardRef)((function({filters:e,view:t,onChangeView:n,setOpenedFilter:r},s){if(!e.length||e.every((({isPrimary:e})=>e)))return null;const i=e.filter((e=>!e.isVisible));return(0,a.createElement)(Ny,{trigger:(0,a.createElement)(E.Button,{__experimentalIsFocusable:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:s},(0,S.__)("Add filter"))},i.map((e=>(0,a.createElement)(Fy,{key:e.field,onClick:()=>{r(e.field),n({...t,page:1,filters:[...t.filters||[],{field:e.field,value:void 0,operator:e.operators[0]}]})}},(0,a.createElement)(Vy,null,e.name)))))}));function By({filters:e,view:t,onChangeView:n}){const r=!t.search&&!t.filters?.some((t=>{return void 0!==t.value||(n=t.field,!e.some((e=>e.field===n&&e.isPrimary)));var n}));return(0,a.createElement)(E.Button,{disabled:r,__experimentalIsFocusable:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{n({...t,page:1,search:"",filters:[]})}},(0,S.__)("Reset"))}const Dy=(0,h.memo)((function({fields:e,view:t,onChangeView:n,openedFilter:r,setOpenedFilter:s}){const i=(0,h.useRef)(),o=[];e.forEach((e=>{if(!e.elements?.length)return;const n=Yp(e);if(0===n.length)return;const r=!!e.filterBy?.isPrimary;o.push({field:e.id,name:e.header,elements:e.elements,singleSelection:n.some((e=>[bp,wp].includes(e))),operators:n,isVisible:r||t.filters.some((t=>t.field===e.id&&Cp.includes(t.operator))),isPrimary:r})})),o.sort(((e,t)=>e.isPrimary&&!t.isPrimary?-1:!e.isPrimary&&t.isPrimary?1:e.name.localeCompare(t.name)));const l=(0,a.createElement)(Ry,{key:"add-filter",filters:o,view:t,onChangeView:n,ref:i,setOpenedFilter:s}),c=[...o.map((e=>e.isVisible?(0,a.createElement)(My,{key:e.field,filter:e,view:t,onChangeView:n,addFilterRef:i,openedFilter:r}):null)),l];return c.length>1&&c.push((0,a.createElement)(By,{key:"reset-filters",filters:o,view:t,onChangeView:n})),(0,a.createElement)(E.__experimentalHStack,{justify:"flex-start",style:{width:"fit-content"},wrap:!0},c)})),Ly=Dy,zy=(0,h.memo)((function({label:e,view:t,onChangeView:n}){const[r,s,i]=(0,w.useDebouncedInput)(t.search);(0,h.useEffect)((()=>{s(t.search)}),[t]);const o=(0,h.useRef)(n);(0,h.useEffect)((()=>{o.current=n}),[n]),(0,h.useEffect)((()=>{o.current({...t,page:1,search:i})}),[i]);const l=e||(0,S.__)("Search");return(0,a.createElement)(E.SearchControl,{__nextHasNoMarginBottom:!0,onChange:s,value:r,label:l,placeholder:l,size:"compact"})})),Hy=zy;function Gy(e){return e.map((e=>{const t=e.getValue||(({item:t})=>t[e.id]);return{...e,header:e.header||e.id,getValue:t,render:e.render||t}}))}const Uy={init:{bottom:-48},open:{bottom:24,transition:{bottom:{type:"tween",duration:.2,ease:[0,0,.2,1]}}},exit:{opacity:0,bottom:24,transition:{opacity:{type:"tween",duration:.2,ease:[0,0,.2,1]}}}};function jy({action:e,onClick:t,isBusy:n}){return(0,a.createElement)(E.ToolbarButton,{disabled:n,label:e.label,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t,isBusy:n,__experimentalIsFocusable:!0,tooltipPosition:"top"})}const Wy=[];function qy({action:e,selectedItems:t,actionInProgress:n,setActionInProgress:r}){const s=(0,h.useMemo)((()=>t.filter((t=>e.isEligible(t)))),[e,t]);return e.RenderModal?(0,a.createElement)(Wp,{key:e.id,action:e,items:s,ActionTrigger:jy,onActionStart:()=>{r(e.id)},onActionPerformed:()=>{r(null)}}):(0,a.createElement)(jy,{key:e.id,action:e,items:t,onClick:()=>{r(e.id),e.callback(t,(()=>{r(e.id)}))},isBusy:n===e.id})}function Zy(e,t,n,r,s,i){return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.ToolbarGroup,null,(0,a.createElement)("div",{className:"dataviews-bulk-actions__selection-count"},1===e.length?(0,S.__)("1 item selected"):(0,S.sprintf)((0,S._n)("%s item selected","%s items selected",e.length),e.length))),(0,a.createElement)(E.ToolbarGroup,null,t.map((e=>(0,a.createElement)(qy,{key:e.id,action:e,selectedItems:n,actionInProgress:r,setActionInProgress:s})))),(0,a.createElement)(E.ToolbarGroup,null,(0,a.createElement)(E.ToolbarButton,{icon:$r,showTooltip:!0,tooltipPosition:"top",label:(0,S.__)("Cancel"),disabled:!!r,onClick:()=>{i(Wy)}})))}function Ky({selection:e,actionsToShow:t,selectedItems:n,setSelection:r}){const[s,i]=(0,h.useState)(null),a=(0,h.useRef)(null);return s?(a.current||(a.current=Zy(e,t,n,s,i,r)),a.current):(a.current&&(a.current=null),Zy(e,t,n,s,i,r))}function Yy({data:e,selection:t,actions:n=Wy,setSelection:r,getItemId:s}){const i=(0,w.useReducedMotion)(),o=(0,h.useMemo)((()=>e.filter((e=>t.includes(s(e))))),[t,e,s]),l=(0,h.useMemo)((()=>n.filter((e=>e.supportsBulk&&e.icon&&o.some((t=>e.isEligible(t)))))),[n,o]);return t&&0===t.length||0===l.length?null:(0,a.createElement)(E.__unstableAnimatePresence,null,(0,a.createElement)(E.__unstableMotion.div,{layout:!i,initial:"init",animate:"open",exit:"exit",variants:i?void 0:Uy,className:"dataviews-bulk-actions"},(0,a.createElement)(E.Toolbar,{label:(0,S.__)("Bulk actions")},(0,a.createElement)("div",{className:"dataviews-bulk-actions-toolbar-wrapper"},(0,a.createElement)(Ky,{selection:t,actionsToShow:l,selectedItems:o,setSelection:r})))))}const Xy=e=>e.id,Jy=()=>{};function Qy({view:e,onChangeView:t,fields:n,search:r=!0,searchLabel:s,actions:i=[],data:o,getItemId:l=Xy,isLoading:c=!1,paginationInfo:u,supportedLayouts:d,onSelectionChange:m=Jy}){const[p,f]=(0,h.useState)([]),[g,v]=(0,h.useState)(null);(0,h.useEffect)((()=>{if(p.length>0&&p.some((e=>!o.some((t=>l(t)===e))))){const e=p.filter((e=>o.some((t=>l(t)===e))));f(e),m(o.filter((t=>e.includes(l(t)))))}}),[p,o,l,m]);const y=(0,h.useCallback)((e=>{f(e.map((e=>l(e)))),m(e)}),[f,l,m]),b=xh.find((t=>t.type===e.type)).component,w=(0,h.useMemo)((()=>Gy(n)),[n]),_=function(e,t){return(0,h.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&e.isEligible(t)))))),[e,t])}(i,o);return(0,a.createElement)("div",{className:"dataviews-wrapper"},(0,a.createElement)(E.__experimentalHStack,{alignment:"top",justify:"start",className:"dataviews-filters__view-actions"},(0,a.createElement)(E.__experimentalHStack,{justify:"start",className:"dataviews-filters__container",wrap:!0},r&&(0,a.createElement)(Hy,{label:s,view:e,onChangeView:t}),(0,a.createElement)(Ly,{fields:w,view:e,onChangeView:t,openedFilter:g,setOpenedFilter:v})),[Ip,Tp].includes(e.type)&&_&&(0,a.createElement)(sh,{actions:i,data:o,onSelectionChange:y,selection:p,getItemId:l}),(0,a.createElement)(Rh,{fields:w,view:e,onChangeView:t,supportedLayouts:d})),(0,a.createElement)(b,{actions:i,data:o,fields:w,getItemId:l,isLoading:c,onChangeView:t,onSelectionChange:y,selection:p,setOpenedFilter:v,view:e}),(0,a.createElement)(gp,{view:e,onChangeView:t,paginationInfo:u}),[Ip,Tp].includes(e.type)&&_&&(0,a.createElement)(Yy,{data:o,actions:i,selection:p,setSelection:f,getItemId:l}))}function $y({title:e,subTitle:t,actions:n}){return(0,a.createElement)(E.__experimentalHStack,{as:"header",alignment:"left",className:"edit-site-page-header"},(0,a.createElement)(E.FlexBlock,{className:"edit-site-page-header__page-title"},(0,a.createElement)(E.__experimentalHeading,{as:"h2",level:3,weight:500,className:"edit-site-page-header__title"},e),t&&(0,a.createElement)(E.__experimentalText,{as:"p",className:"edit-site-page-header__sub-title"},t)),(0,a.createElement)(E.FlexItem,{className:"edit-site-page-header__actions"},n))}const{NavigableRegion:eb}=ie(f.privateApis);function tb({title:e,subTitle:t,actions:n,children:r,className:s,hideTitleFromUI:i=!1}){const o=an("edit-site-page",s);return(0,a.createElement)(eb,{className:o,ariaLabel:e},(0,a.createElement)("div",{className:"edit-site-page-content"},!i&&e&&(0,a.createElement)($y,{title:e,subTitle:t,actions:n}),r),(0,a.createElement)(f.EditorSnackbars,null))}const nb=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,a.createElement)(vn.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,a.createElement)(vn.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})),rb=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8 2H6a2 2 0 0 0-2 2v2.4h1.5V4a.5.5 0 0 1 .5-.5h2V2ZM4 13.6V16a2 2 0 0 0 2 2h2v-1.5H6a.5.5 0 0 1-.5-.5v-2.4H4Zm0-1.2h1.5V7.6H4v4.8ZM9 2v1.5h4V2H9Zm5 0v1.5h2a.5.5 0 0 1 .5.5v2.4H18V4a2 2 0 0 0-2-2h-2Zm4 5.6h-1.5v4.8H18V7.6Zm0 6h-1.5V16a.5.5 0 0 1-.5.5h-2V18h2a2 2 0 0 0 2-2v-2.4ZM13 18v-1.5H9V18h4ZM7 7.25h8v-1.5H7v1.5Zm0 3.25h6V9H7v1.5ZM21.75 19V6h-1.5v13c0 .69-.56 1.25-1.25 1.25H8v1.5h11A2.75 2.75 0 0 0 21.75 19Z"})),sb={[$e]:{primaryField:"title"},[Qe]:{mediaField:"featured-image",primaryField:"title"},[et]:{primaryField:"title",mediaField:"featured-image"}},ib={type:et,search:"",filters:[],page:1,perPage:20,sort:{field:"date",direction:"desc"},hiddenFields:["date","featured-image"],layout:{...sb[et]}},ab={page:[{title:(0,S.__)("All pages"),slug:"all",icon:nb,view:ib},{title:(0,S.__)("Drafts"),slug:"drafts",icon:rb,view:{...ib,filters:[{field:"status",operator:nt,value:"draft"}]}},{title:(0,S.__)("Trash"),slug:"trash",icon:dr,view:{...ib,filters:[{field:"status",operator:nt,value:"trash"}]}}]};function ob({onSave:e,onClose:t}){const[n,r]=(0,h.useState)(!1),[s,i]=(0,h.useState)(""),{saveEntityRecord:o}=(0,u.useDispatch)(C.store),{createErrorNotice:l,createSuccessNotice:c}=(0,u.useDispatch)(x.store);return(0,a.createElement)(E.Modal,{title:(0,S.__)("Draft a new page"),onRequestClose:t},(0,a.createElement)("form",{onSubmit:async function(t){if(t.preventDefault(),!n){r(!0);try{const t=await o("postType","page",{status:"draft",title:s,slug:s||(0,S.__)("No title")},{throwOnError:!0});e(t),c((0,S.sprintf)((0,S.__)('"%s" successfully created.'),t.title?.rendered||s),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,S.__)("An error occurred while creating the page.");l(t,{type:"snackbar"})}finally{r(!1)}}}},(0,a.createElement)(E.__experimentalVStack,{spacing:3},(0,a.createElement)(E.TextControl,{__next40pxDefaultSize:!0,label:(0,S.__)("Page title"),onChange:i,placeholder:(0,S.__)("No title"),value:s}),(0,a.createElement)(E.__experimentalHStack,{spacing:2,justify:"end"},(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t},(0,S.__)("Cancel")),(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:n,"aria-disabled":n},(0,S.__)("Create draft"))))))}const lb=function({id:e,size:t=["large","medium","thumbnail"],...n}){const{record:r}=(0,C.useEntityRecord)("root","media",e),s=t.find((e=>!!r?.media_details?.sizes[e])),i=r?.media_details?.sizes[s]?.source_url||r?.source_url;return i?(0,a.createElement)("img",{...n,src:i,alt:r.alt_text}):null},{useHistory:cb}=ie(rn.privateApis),ub=()=>{const e=cb();return(0,h.useMemo)((()=>({id:"edit-post",label:(0,S.__)("Edit"),isPrimary:!0,icon:gr,isEligible:({status:e})=>"trash"!==e,callback(t){const n=t[0];e.push({postId:n.id,postType:n.type,canvas:"edit"})}})),[e])},{usePostActions:db}=ie(f.privateApis),{useLocation:mb,useHistory:pb}=ie(rn.privateApis),hb=[];const fb=[{value:"draft",label:(0,S.__)("Draft")},{value:"future",label:(0,S.__)("Scheduled")},{value:"pending",label:(0,S.__)("Pending Review")},{value:"private",label:(0,S.__)("Private")},{value:"publish",label:(0,S.__)("Published")},{value:"trash",label:(0,S.__)("Trash")}],gb="draft,future,pending,private,publish";function vb({item:e,viewType:t}){const n="trash"===e.status,{onClick:r}=Mr({postId:e.id,postType:e.type,canvas:"edit"}),s=!!e.featured_media,i=t===Qe?["large","full","medium","thumbnail"]:["thumbnail","medium","large","full"],o=s?(0,a.createElement)(lb,{className:"edit-site-page-pages__featured-image",id:e.featured_media,size:i}):null,l=t!==et&&!n;return(0,a.createElement)("div",{className:`edit-site-page-pages__featured-image-wrapper is-layout-${t}`},l?(0,a.createElement)("button",{className:"page-pages-preview-field__button",type:"button",onClick:r,"aria-label":e.title?.rendered||(0,S.__)("(no title)")},o):o)}function yb(){const e="page",[t,n]=function(e){const{params:t}=mb(),{activeView:n="all",isCustom:r="false",layout:s}=t,i=pb(),a=(0,h.useMemo)((()=>{const t="false"===r&&ab[e].find((({slug:e})=>e===n))?.view;return"false"===r&&s?{...t,type:s,layout:{...sb[s]||{}}}:t}),[r,n,s,e]),[o,l]=(0,h.useState)(a);(0,h.useEffect)((()=>{a&&l(a)}),[a]);const c=(0,u.useSelect)((e=>{if("true"!==r)return;const{getEditedEntityRecord:t}=e(C.store);return t("postType","wp_dataviews",Number(n))}),[n,r]),{editEntityRecord:d}=(0,u.useDispatch)(C.store),m=(0,h.useMemo)((()=>{const e=c?.content&&JSON.parse(c?.content);return e?{...e,layout:{...sb[e?.type]||{}}}:e}),[c?.content]),p=(0,h.useCallback)((e=>{d("postType","wp_dataviews",c?.id,{content:JSON.stringify(e)})}),[d,c?.id]),f=(0,h.useCallback)((e=>{e.type!==o?.type&&i.push({...t,layout:e.type}),l(e)}),[t,o?.type,i]);return"false"===r?[o,f]:"true"===r&&m?[m,p]:[ab[e][0].view,f]}(e),r=pb(),{params:s}=mb(),{isCustom:i="false"}=s,o=(0,h.useCallback)((e=>{"false"===i&&t?.type===et&&r.push({...s,postId:1===e.length?e[0].id:void 0})}),[r,s,t?.type,i]),l=(0,h.useMemo)((()=>{const e={};return t.filters.forEach((t=>{"status"===t.field&&t.operator===nt&&(e.status=t.value),"author"===t.field&&t.operator===nt?e.author=t.value:"author"===t.field&&t.operator===rt&&(e.author_exclude=t.value)})),e.status&&""!==e.status||(e.status=gb),{per_page:t.perPage,page:t.page,_embed:"author",order:t.sort?.direction,orderby:t.sort?.field,search:t.search,...e}}),[t]),{records:c,isResolving:d,totalItems:m,totalPages:p}=(0,C.useEntityRecords)("postType",e,l),{records:f,isResolving:g}=(0,C.useEntityRecords)("root","user",{per_page:-1}),v=(0,h.useMemo)((()=>({totalItems:m,totalPages:p})),[m,p]),y=(0,h.useMemo)((()=>[{id:"featured-image",header:(0,S.__)("Featured Image"),getValue:({item:e})=>e.featured_media,render:({item:e})=>(0,a.createElement)(vb,{item:e,viewType:t.type}),enableSorting:!1,width:"1%"},{header:(0,S.__)("Title"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>[$e,Qe].includes(t.type)&&"trash"!==e.status?(0,a.createElement)(Nr,{params:{postId:e.id,postType:e.type,canvas:"edit"}},(0,gn.decodeEntities)(e.title?.rendered)||(0,S.__)("(no title)")):(0,gn.decodeEntities)(e.title?.rendered)||(0,S.__)("(no title)"),maxWidth:300,enableHiding:!1},{header:(0,S.__)("Author"),id:"author",getValue:({item:e})=>e._embedded?.author[0]?.name,elements:f?.map((({id:e,name:t})=>({value:e,label:t})))||[]},{header:(0,S.__)("Status"),id:"status",getValue:({item:e})=>{var t;return null!==(t=fb.find((({value:t})=>t===e.status))?.label)&&void 0!==t?t:e.status},elements:fb,enableSorting:!1,filterBy:{operators:[nt]}},{header:(0,S.__)("Date"),id:"date",render:({item:e})=>{const t=(0,Sm.dateI18n)((0,Sm.getSettings)().formats.datetimeAbbreviated,(0,Sm.getDate)(e.date));return(0,a.createElement)("time",null,t)}}]),[f,t.type]),b=db("page"),w=ub(),_=(0,h.useMemo)((()=>[w,...b]),[b,w]),x=(0,h.useCallback)((e=>{e.type!==t.type&&(e={...e,layout:{...sb[e.type]}}),n(e)}),[t.type,n]),[k,P]=(0,h.useState)(!1),I=()=>P(!1);return(0,a.createElement)(tb,{title:(0,S.__)("Pages"),actions:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.Button,{variant:"primary",onClick:()=>P(!0)},(0,S.__)("Add new page")),k&&(0,a.createElement)(ob,{onSave:({type:e,id:t})=>{r.push({postId:t,postType:e,canvas:"edit"}),I()},onClose:I}))},(0,a.createElement)(Qy,{paginationInfo:v,fields:y,actions:_,data:c||hb,isLoading:d||g,view:t,onChangeView:x,onSelectionChange:o}))}function bb(e=""){return gy()(e.trim().toLowerCase())}const wb=[];function _b(e,t,n){if(!e)return{data:wb,paginationInfo:{totalItems:0,totalPages:0}};const r=Gy(n);let s=[...e];if(t.search){const e=bb(t.search);s=s.filter((t=>r.filter((e=>e.enableGlobalSearch)).map((e=>bb(e.getValue({item:t})))).some((t=>t.includes(e)))))}if(t.filters.length>0&&t.filters.forEach((e=>{const t=r.find((t=>t.id===e.field));t&&(e.operator===_p&&e?.value?.length>0?s=s.filter((n=>{const r=t.getValue({item:n});return Array.isArray(r)?e.value.some((e=>r.includes(e))):"string"==typeof r&&e.value.includes(r)})):e.operator===Ep&&e?.value?.length>0?s=s.filter((n=>{const r=t.getValue({item:n});return Array.isArray(r)?!e.value.some((e=>r.includes(e))):"string"==typeof r&&!e.value.includes(r)})):e.operator===Sp&&e?.value?.length>0?s=s.filter((n=>e.value.every((e=>t.getValue({item:n})?.includes(e))))):e.operator===xp&&e?.value?.length>0?s=s.filter((n=>e.value.every((e=>!t.getValue({item:n})?.includes(e))))):e.operator===bp?s=s.filter((n=>e.value===t.getValue({item:n}))):e.operator===wp&&(s=s.filter((n=>e.value!==t.getValue({item:n})))))})),t.sort){const e=t.sort.field,n=r.find((t=>t.id===e));n&&s.sort(((e,r)=>{var s,i;const a=null!==(s=n.getValue({item:e}))&&void 0!==s?s:"",o=null!==(i=n.getValue({item:r}))&&void 0!==i?i:"";return"asc"===t.sort?.direction?a.localeCompare(o):o.localeCompare(a)}))}let i=s.length,a=1;if(void 0!==t.page&&void 0!==t.perPage){const e=(t.page-1)*t.perPage;i=s?.length||0,a=Math.ceil(i/t.perPage),s=s?.slice(e,e+t.perPage)}return{data:s,paginationInfo:{totalItems:i,totalPages:a}}}const Eb=(0,h.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,h.cloneElement)(e,{width:t,height:t,...n,ref:r})})),Sb=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})),xb=(0,window.wp.priorityQueue.createQueue)();function Cb({children:e,placeholder:t}){const[n,r]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{const e={};return xb.add(e,(()=>{(0,h.flushSync)((()=>{r(!0)}))})),()=>{xb.cancel(e)}}),[]),n?e:t}"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,n){const r=Number(0xffffffffn&t),s=Number(t>>32n);this.setUint32(e+(n?0:4),r,n),this.setUint32(e+(n?4:0),s,n)}});var kb=e=>new DataView(new ArrayBuffer(e)),Pb=e=>new Uint8Array(e.buffer||e),Ib=e=>(new TextEncoder).encode(String(e)),Tb=e=>Math.min(4294967295,Number(e)),Ob=e=>Math.min(65535,Number(e));function Ab(e,t){if(void 0===t||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(void 0===t)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(void 0===e)return{isFile:0,t};if("string"==typeof e)return{isFile:1,t,i:Ib(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:Pb(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:Mb(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function Mb(e,t=e){return new ReadableStream({async pull(t){let n=0;for(;t.desiredSize>n;){const r=await e.next();if(!r.value){t.close();break}{const e=Nb(r.value);t.enqueue(e),n+=e.byteLength}}},cancel(e){t.throw?.(e)}})}function Nb(e){return"string"==typeof e?Ib(e):e instanceof Uint8Array?e:Pb(e)}function Fb(e,t,n){let[r,s]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[Pb(e),1]:[Ib(e),0]:[void 0,0]}(t);if(e instanceof File)return{o:Rb(r||Ib(e.name)),u:BigInt(e.size),l:s};if(e instanceof Response){const t=e.headers.get("content-disposition"),i=t&&t.match(/;\s*filename\*?=["']?(.*?)["']?$/i),a=i&&i[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),o=a&&decodeURIComponent(a),l=n||+e.headers.get("content-length");return{o:Rb(r||Ib(o)),u:BigInt(l),l:s}}return r=Rb(r,void 0!==e||void 0!==n),"string"==typeof e?{o:r,u:BigInt(Ib(e).length),l:s}:e instanceof Blob?{o:r,u:BigInt(e.size),l:s}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:r,u:BigInt(e.byteLength),l:s}:{o:r,u:Vb(e,n),l:s}}function Vb(e,t){return t>-1?BigInt(t):e?void 0:0n}function Rb(e,t=1){if(!e||e.every((e=>47===e)))throw new Error("The file must have a name.");if(t)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var Bb=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let e=0;e<8;++e)t=t>>>1^(1&t&&3988292384);Bb[e]=t}function Db(e,t=0){t^=-1;for(var n=0,r=e.length;n<r;n++)t=t>>>8^Bb[255&t^e[n]];return(-1^t)>>>0}function Lb(e,t,n=0){const r=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,s=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(n,r,1),t.setUint16(n+2,s,1)}function zb({o:e,l:t},n){return 8*(!t||(n??function(e){try{Hb.decode(e)}catch{return 0}return 1}(e)))}var Hb=new TextDecoder("utf8",{fatal:1});function Gb(e,t=0){const n=kb(30);return n.setUint32(0,1347093252),n.setUint32(4,754976768|t),Lb(e.t,n,10),n.setUint16(26,e.o.length,1),Pb(n)}async function*Ub(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=Db(t,0),e.u=BigInt(t.length);else{e.u=0n;const n=t.getReader();for(;;){const{value:t,done:r}=await n.read();if(r)break;e.m=Db(t,e.m),e.u+=BigInt(t.length),yield t}}}function jb(e,t){const n=kb(16+(t?8:0));return n.setUint32(0,1347094280),n.setUint32(4,e.isFile?e.m:0,1),t?(n.setBigUint64(8,e.u,1),n.setBigUint64(16,e.u,1)):(n.setUint32(8,Tb(e.u),1),n.setUint32(12,Tb(e.u),1)),Pb(n)}function Wb(e,t,n=0,r=0){const s=kb(46);return s.setUint32(0,1347092738),s.setUint32(4,755182848),s.setUint16(8,2048|n),Lb(e.t,s,12),s.setUint32(16,e.isFile?e.m:0,1),s.setUint32(20,Tb(e.u),1),s.setUint32(24,Tb(e.u),1),s.setUint16(28,e.o.length,1),s.setUint16(30,r,1),s.setUint16(40,e.isFile?33204:16893,1),s.setUint32(42,Tb(t),1),Pb(s)}function qb(e,t,n){const r=kb(n);return r.setUint16(0,1,1),r.setUint16(2,n-4,1),16&n&&(r.setBigUint64(4,e.u,1),r.setBigUint64(12,e.u,1)),r.setBigUint64(n-8,t,1),Pb(r)}function Zb(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}function Kb(e,t={}){const n={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof t.length||Number.isInteger(t.length))&&t.length>0&&(n["Content-Length"]=String(t.length)),t.metadata&&(n["Content-Length"]=String((e=>function(e){let t=BigInt(22),n=0n,r=0;for(const s of e){if(!s.o)throw new Error("Every file must have a non-empty name.");if(void 0===s.u)throw new Error(`Missing size for file "${(new TextDecoder).decode(s.o)}".`);const e=s.u>=0xffffffffn,i=n>=0xffffffffn;n+=BigInt(46+s.o.length+(e&&8))+s.u,t+=BigInt(s.o.length+46+(12*i|28*e)),r||(r=e)}return(r||n>=0xffffffffn)&&(t+=BigInt(76)),t+n}(function*(e){for(const t of e)yield Fb(...Zb(t)[0])}(e)))(t.metadata))),new Response(function(e,t={}){const n=function(e){const t=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await t.next();if(e.done)return e;const[n,r]=Zb(e.value);return{done:0,value:Object.assign(Ab(...r),Fb(...n))}},throw:t.throw?.bind(t),[Symbol.asyncIterator](){return this}}}(e);return Mb(async function*(e,t){const n=[];let r=0n,s=0n,i=0;for await(const a of e){const e=zb(a,t.buffersAreUTF8);yield Gb(a,e),yield new Uint8Array(a.o),a.isFile&&(yield*Ub(a));const o=a.u>=0xffffffffn,l=12*(r>=0xffffffffn)|28*o;yield jb(a,o),n.push(Wb(a,r,e,l)),n.push(a.o),l&&n.push(qb(a,r,l)),o&&(r+=8n),s++,r+=BigInt(46+a.o.length)+a.u,i||(i=o)}let a=0n;for(const e of n)yield e,a+=BigInt(e.length);if(i||r>=0xffffffffn){const e=kb(76);e.setUint32(0,1347094022),e.setBigUint64(4,BigInt(44),1),e.setUint32(12,755182848),e.setBigUint64(24,s,1),e.setBigUint64(32,s,1),e.setBigUint64(40,a,1),e.setBigUint64(48,r,1),e.setUint32(56,1347094023),e.setBigUint64(64,r+a,1),e.setUint32(72,1,1),yield Pb(e)}const o=kb(22);o.setUint32(0,1347093766),o.setUint16(8,Ob(s),1),o.setUint16(10,Ob(s),1),o.setUint32(12,Tb(a),1),o.setUint32(16,Tb(r),1),yield Pb(o)}(n,t),n)}(e,t),{headers:n})}const Yb=window.wp.reusableBlocks,{useHistory:Xb,useLocation:Jb}=ie(rn.privateApis),{CreatePatternModalContents:Qb,useDuplicatePatternProps:$b}=ie(De.privateApis);function ew(e){return JSON.stringify({__file:e.type,title:e.title||e.name,content:e.patternPost.content.raw,syncStatus:e.patternPost.wp_pattern_sync_status},null,2)}const tw={id:"export-pattern",label:(0,S.__)("Export as JSON"),supportsBulk:!0,isEligible:e=>e.type===We.user,callback:async e=>{if(1===e.length)return(0,Wr.downloadBlob)(`${qs(e[0].title||e[0].name)}.json`,ew(e[0]),"application/json");const t={},n=e.map((e=>{const n=qs(e.title||e.name);return t[n]=(t[n]||0)+1,{name:n+(t[n]>1?"-"+(t[n]-1):"")+".json",lastModified:new Date,input:ew(e)}}));return(0,Wr.downloadBlob)((0,S.__)("patterns-export")+".zip",await Kb(n).blob(),"application/zip")}},nw=e=>{const t=e.type===He;return e.type===We.user||t&&e.isCustom},rw={id:"delete-pattern",label:(0,S.__)("Delete"),isEligible:e=>{const t=e.type===He&&e.templatePart.has_theme_file;return nw(e)&&!t},hideModalHeader:!0,supportsBulk:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:n})=>{const{__experimentalDeleteReusableBlock:r}=(0,u.useDispatch)(Yb.store),{createErrorNotice:s,createSuccessNotice:i}=(0,u.useDispatch)(x.store),{removeTemplates:o}=ie((0,u.useDispatch)(f.store));let l;return l=1===e.length?(0,S.sprintf)((0,S.__)('Are you sure you want to delete "%s"?'),(0,gn.decodeEntities)(e[0].title||e[0].name)):e.length>1&&e[0].type===He?(0,S.sprintf)((0,S.__)("Are you sure you want to delete %d template parts?"),e.length):(0,S.sprintf)((0,S.__)("Are you sure you want to delete %d patterns?"),e.length),(0,a.createElement)(E.__experimentalVStack,{spacing:"5"},(0,a.createElement)(E.__experimentalText,null,l),(0,a.createElement)(E.__experimentalHStack,{justify:"right"},(0,a.createElement)(E.Button,{variant:"tertiary",onClick:t},(0,S.__)("Cancel")),(0,a.createElement)(E.Button,{variant:"primary",onClick:()=>{e[0].type===He?o(e):(async()=>{const t=await Promise.allSettled(e.map((e=>r(e.id))));if(t.every((({status:e})=>"fulfilled"===e))){let n;n=1===t.length?(0,S.sprintf)((0,S.__)('"%s" deleted.'),e[0].title):(0,S.__)("The patterns were deleted."),i(n,{type:"snackbar",id:"edit-site-page-trashed"})}else{let e;if(1===t.length)e=t[0].reason?.message?t[0].reason.message:(0,S.__)("An error occurred while deleting the pattern.");else{const n=new Set,r=t.filter((({status:e})=>"rejected"===e));for(const e of r)e.reason?.message&&n.add(e.reason.message);e=0===n.size?(0,S.__)("An error occurred while deleting the patterns."):1===n.size?(0,S.sprintf)((0,S.__)("An error occurred while deleting the patterns: %s"),[...n][0]):(0,S.sprintf)((0,S.__)("Some errors occurred while deleting the patterns: %s"),[...n].join(",")),s(e,{type:"snackbar"})}}})(),n&&n(),t()}},(0,S.__)("Delete"))))}},sw={id:"reset-action",label:(0,S.__)("Reset"),isEligible:e=>{const t=e.type===He&&e.templatePart.has_theme_file;return nw(e)&&t},hideModalHeader:!0,RenderModal:({items:e,closeModal:t})=>{const[n]=e,{removeTemplate:r}=(0,u.useDispatch)(tn);return(0,a.createElement)(E.__experimentalVStack,{spacing:"5"},(0,a.createElement)(E.__experimentalText,null,(0,S.__)("Reset to default and clear all customizations?")),(0,a.createElement)(E.__experimentalHStack,{justify:"right"},(0,a.createElement)(E.Button,{variant:"tertiary",onClick:t},(0,S.__)("Cancel")),(0,a.createElement)(E.Button,{variant:"primary",onClick:()=>r(n)},(0,S.__)("Reset"))))}},iw={id:"duplicate-pattern",label:(0,S._x)("Duplicate","action label"),isEligible:e=>e.type!==He,modalHeader:(0,S._x)("Duplicate pattern","action label"),RenderModal:({items:e,closeModal:t})=>{const[n]=e,{params:{categoryId:r=qe}}=Jb(),s=n.type===We.theme,i=Xb();const o=$b({pattern:s?n:n.patternPost,onSuccess:function({pattern:e}){i.push({categoryType:We.theme,categoryId:r,postType:We.user,postId:e.id}),t()}});return(0,a.createElement)(Qb,{onClose:t,confirmLabel:(0,S._x)("Duplicate","action label"),...o})}},aw={id:"duplicate-template-part",label:(0,S._x)("Duplicate","action label"),isEligible:e=>e.type===He,modalHeader:(0,S._x)("Duplicate template part","action label"),RenderModal:({items:e,closeModal:t})=>{const[n]=e,{createSuccessNotice:r}=(0,u.useDispatch)(x.store),{params:{categoryId:s=qe}}=Jb(),i=Xb();return(0,a.createElement)(Js,{blocks:n.blocks,defaultArea:n.templatePart.area,defaultTitle:(0,S.sprintf)((0,S.__)("%s (Copy)"),n.title),onCreate:function(e){r((0,S.sprintf)((0,S.__)('"%s" duplicated.'),n.title),{type:"snackbar",id:"edit-site-patterns-success"}),i.push({postType:He,postId:e?.id,categoryType:He,categoryId:s}),t()},onError:t,confirmLabel:(0,S._x)("Duplicate","action label")})}},ow=(e,t,n)=>t===n.findIndex((t=>e.name===t.name));function lw(){var e;const t=(0,u.useSelect)((e=>{const{getSettings:t}=ie(e(tn));return t()}),[]),n=null!==(e=t.__experimentalAdditionalBlockPatterns)&&void 0!==e?e:t.__experimentalBlockPatterns,r=(0,u.useSelect)((e=>e(C.store).getBlockPatterns()),[]),s=(0,h.useMemo)((()=>[...n||[],...r||[]].filter(ow)),[n,r]);return(0,h.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:e,...n}=t;return{...n,__experimentalBlockPatterns:s,__unstableIsPreviewMode:!0}}),[t,s])}const{extractWords:cw,getNormalizedSearchTerms:uw,normalizeString:dw}=ie(_.privateApis),mw=e=>e.name||"",pw=e=>e.title,hw=e=>e.description||"",fw=e=>e.keywords||[],gw=()=>!1,vw=(e=[],t="",n={})=>{const r=uw(t),s=n.categoryId!==qe&&!r.length,i={...n,onlyFilterByCategory:s},a=s?0:1,o=e.map((e=>[e,yw(e,t,i)])).filter((([,e])=>e>a));return 0===r.length||o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function yw(e,t,n){const{categoryId:r,getName:s=mw,getTitle:i=pw,getDescription:a=hw,getKeywords:o=fw,hasCategory:l=gw,onlyFilterByCategory:c}=n;let u=r===qe||r===je||r===Ze&&e.type===We.user||l(e,r)?1:0;if(!u||c)return u;const d=s(e),m=i(e),p=a(e),h=o(e),f=dw(t),g=dw(m);if(f===g)u+=30;else if(g.startsWith(f))u+=20;else{const e=[d,m,p,...h].join(" ");0===((e,t)=>e.filter((e=>!uw(t).some((t=>t.includes(e))))))(cw(f),e).length&&(u+=10)}return u}const bw=[],ww=(e,t)=>e&&t?e+"//"+t:null,_w=(0,u.createSelector)(((e,t,n="")=>{var r;const{getEntityRecords:s,isResolving:i}=e(C.store),{__experimentalGetDefaultTemplatePartAreas:a}=e(f.store),o={per_page:-1},c=(null!==(r=s("postType",He,o))&&void 0!==r?r:bw).map((e=>(e=>({blocks:(0,l.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),categories:[e.area],description:e.description||"",isCustom:e.source===Ge.custom,keywords:e.keywords||[],id:ww(e.theme,e.slug),name:ww(e.theme,e.slug),title:(0,gn.decodeEntities)(e.title.rendered),type:e.type,_links:e._links,templatePart:e}))(e))),u=(a()||[]).map((e=>e.area)),d=i("getEntityRecords",["postType",He,o]),m=vw(c,n,{categoryId:t,hasCategory:(e,t)=>t!==Ue?e.templatePart.area===t:e.templatePart.area===t||!u.includes(e.templatePart.area)});return{patterns:m,isResolving:d}}),(e=>[e(C.store).getEntityRecords("postType",He,{per_page:-1}),e(C.store).isResolving("getEntityRecords",["postType",He,{per_page:-1}]),e(f.store).__experimentalGetDefaultTemplatePartAreas()])),Ew=(0,u.createSelector)((e=>{var t;const{getSettings:n}=ie(e(tn)),{isResolving:r}=e(C.store),s=n();return{patterns:[...(null!==(t=s.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:s.__experimentalBlockPatterns)||[],...e(C.store).getBlockPatterns()||[]].filter((e=>!Ke.includes(e.source))).filter(ow).filter((e=>!1!==e.inserter)).map((e=>({...e,keywords:e.keywords||[],type:We.theme,blocks:(0,l.parse)(e.content,{__unstableSkipMigrationLogs:!0})}))),isResolving:r("getBlockPatterns")}}),(e=>[e(C.store).getBlockPatterns(),e(C.store).isResolving("getBlockPatterns"),ie(e(tn)).getSettings()])),Sw=(0,u.createSelector)(((e,t,n,r="")=>{const{patterns:s,isResolving:i}=Ew(e),{patterns:a,isResolving:o}=xw(e);let l=[...s||[],...a||[]];return n&&(l=l.filter((e=>e.type===We.user?e.syncStatus===n:n===Ye.unsynced))),l=vw(l,r,t?{categoryId:t,hasCategory:(e,t)=>e.categories?.includes(t)}:{hasCategory:e=>!e.hasOwnProperty("categories")}),{patterns:l,isResolving:i||o}}),(e=>[Ew(e),xw(e)])),xw=(0,u.createSelector)(((e,t,n="")=>{const{getEntityRecords:r,isResolving:s,getUserPatternCategories:i}=e(C.store),a={per_page:-1},o=r("postType",We.user,a),c=i(),u=new Map;c.forEach((e=>u.set(e.id,e)));let d=o?o.map((e=>((e,t)=>({blocks:(0,l.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),...e.wp_pattern_category.length>0&&{categories:e.wp_pattern_category.map((e=>t&&t.get(e)?t.get(e).slug:e))},termLabels:e.wp_pattern_category.map((e=>t?.get(e)?t.get(e).label:e)),id:e.id,name:e.slug,syncStatus:e.wp_pattern_sync_status||Ye.full,title:e.title.raw,type:e.type,description:e.excerpt.raw,patternPost:e}))(e,u))):bw;const m=s("getEntityRecords",["postType",We.user,a]);return t&&(d=d.filter((e=>e.syncStatus===t))),d=vw(d,n,{hasCategory:()=>!0}),{patterns:d,isResolving:m,categories:c}}),(e=>[e(C.store).getEntityRecords("postType",We.user,{per_page:-1}),e(C.store).isResolving("getEntityRecords",["postType",We.user,{per_page:-1}]),e(C.store).getUserPatternCategories()])),Cw=(e,t,{search:n="",syncStatus:r}={})=>(0,u.useSelect)((s=>e===He?_w(s,t,n):e===We.theme?Sw(s,t,r,n):e===We.user?xw(s,r,n):{patterns:bw,isResolving:!1}),[t,e,n,r]);function kw(){const e=function(){const e=(0,u.useSelect)((e=>{var t;const{getSettings:n}=ie(e(tn)),r=n();return null!==(t=r.__experimentalAdditionalBlockPatternCategories)&&void 0!==t?t:r.__experimentalBlockPatternCategories}));return[...e||[],...(0,u.useSelect)((e=>e(C.store).getBlockPatternCategories()))||[]]}();e.push({name:Ue,label:(0,S.__)("Uncategorized")});const t=function(){const e=(0,u.useSelect)((e=>{var t;const{getSettings:n}=ie(e(tn));return null!==(t=n().__experimentalAdditionalBlockPatterns)&&void 0!==t?t:n().__experimentalBlockPatterns})),t=(0,u.useSelect)((e=>e(C.store).getBlockPatterns()));return(0,h.useMemo)((()=>[...e||[],...t||[]].filter((e=>!Ke.includes(e.source))).filter(ow).filter((e=>!1!==e.inserter))),[e,t])}(),{patterns:n,categories:r}=Cw(We.user),s=(0,h.useMemo)((()=>{const s={},i=[];e.forEach((e=>{s[e.name]||(s[e.name]={...e,count:0})})),r.forEach((e=>{s[e.name]||(s[e.name]={...e,count:0})})),t.forEach((e=>{e.categories?.forEach((e=>{s[e]&&(s[e].count+=1)})),e.categories?.length||(s.uncategorized.count+=1)})),n.forEach((e=>{e.categories?.forEach((e=>{s[e]&&(s[e].count+=1)})),e.categories?.length||(s.uncategorized.count+=1)})),[...e,...r].forEach((e=>{s[e.name].count&&!i.find((t=>t.name===e.name))&&i.push(s[e.name])}));const a=i.sort(((e,t)=>e.label.localeCompare(t.label)));return a.unshift({name:Ze,label:(0,S.__)("My patterns"),count:n.length}),a.unshift({name:qe,label:(0,S.__)("All patterns"),description:(0,S.__)("A list of all patterns from all sources."),count:t.length+n.length}),a}),[e,t,r,n]);return{patternCategories:s,hasPatterns:!!s.length}}const{RenamePatternCategoryModal:Pw}=ie(De.privateApis);function Iw({category:e,onClose:t}){const[n,r]=(0,h.useState)(!1);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.MenuItem,{onClick:()=>r(!0)},(0,S.__)("Rename")),n&&(0,a.createElement)(Tw,{category:e,onClose:()=>{r(!1),t()}}))}function Tw({category:e,onClose:t}){const n={id:e.id,slug:e.slug,name:e.label},r=kw();return(0,a.createElement)(Pw,{category:n,existingCategories:r,onClose:t,overlayClassName:"edit-site-list__rename-modal"})}const{useHistory:Ow}=ie(rn.privateApis);function Aw({category:e,onClose:t}){const[n,r]=(0,h.useState)(!1),s=Ow(),{createSuccessNotice:i,createErrorNotice:o}=(0,u.useDispatch)(x.store),{deleteEntityRecord:l,invalidateResolution:c}=(0,u.useDispatch)(C.store);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.MenuItem,{isDestructive:!0,onClick:()=>r(!0)},(0,S.__)("Delete")),(0,a.createElement)(E.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{await l("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),c("getUserPatternCategories"),c("getEntityRecords",["postType",We.user,{per_page:-1}]),i((0,S.sprintf)((0,S.__)('"%s" deleted.'),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),s.push({path:"/patterns",categoryType:We.theme,categoryId:qe})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,S.__)("An error occurred while deleting the pattern category.");o(t,{type:"snackbar",id:"pattern-category-delete"})}},onCancel:()=>r(!1),confirmButtonText:(0,S.__)("Delete"),className:"edit-site-patterns__delete-modal",title:(0,S.sprintf)((0,S.__)('Delete "%s"?'),(0,gn.decodeEntities)(e.label)),size:"medium",__experimentalHideHeader:!1},(0,S.sprintf)((0,S.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,gn.decodeEntities)(e.label))))}function Mw({categoryId:e,type:t,titleId:n,descriptionId:r}){const{patternCategories:s}=kw(),i=(0,u.useSelect)((e=>e(f.store).__experimentalGetDefaultTemplatePartAreas()),[]);let o,l,c;if(t===He){const t=i.find((t=>t.area===e));o=t?.label||(0,S.__)("All Template Parts"),l=t?.description||(0,S.__)("Includes every template part defined for any area.")}else t===We.theme&&(c=s.find((t=>t.name===e)),o=c?.label,l=c?.description);return o?(0,a.createElement)(E.__experimentalVStack,{className:"edit-site-patterns__section-header"},(0,a.createElement)(E.__experimentalHStack,{justify:"space-between"},(0,a.createElement)(E.__experimentalHeading,{as:"h2",level:4,id:n},o),!!c?.id&&(0,a.createElement)(E.DropdownMenu,{icon:ai,label:(0,S.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",describedBy:(0,S.sprintf)((0,S.__)("Action menu for %s pattern category"),o),size:"compact"}},(({onClose:e})=>(0,a.createElement)(E.MenuGroup,null,(0,a.createElement)(Iw,{category:c,onClose:e}),(0,a.createElement)(Aw,{category:c,onClose:e}))))),l?(0,a.createElement)(E.__experimentalText,{variant:"muted",as:"p",id:r},l):null):null}const Nw=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})),Fw=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),Vw=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}));function Rw(e,t){return(0,u.useSelect)((n=>{const{getEntityRecord:r,getMedia:s,getUser:i,getEditedEntityRecord:a}=n(C.store),o=a("postType",e,t),l=o?.original_source,c=o?.author_text;switch(l){case"theme":return{type:l,icon:cr,text:c,isCustomized:o.source===Ge.custom};case"plugin":return{type:l,icon:Nw,text:c,isCustomized:o.source===Ge.custom};case"site":{const e=r("root","__unstableBase");return{type:l,icon:Fw,imageUrl:e?.site_logo?s(e.site_logo)?.source_url:void 0,text:c,isCustomized:!1}}default:{const e=i(o.author);return{type:"user",icon:Vw,imageUrl:e?.avatar_urls?.[48],text:c,isCustomized:!1}}}}),[e,t])}const{ExperimentalBlockEditorProvider:Bw,useGlobalStyle:Dw}=ie(_.privateApis),{usePostActions:Lw}=ie(f.privateApis),{useLocation:zw}=ie(rn.privateApis),Hw=[],Gw={[$e]:{primaryField:"title"},[Qe]:{mediaField:"preview",primaryField:"title",badgeFields:["sync-status"]}},Uw={type:Qe,search:"",page:1,perPage:20,hiddenFields:[],layout:{...Gw[Qe]},filters:[]},jw=[{value:Ye.full,label:(0,S._x)("Synced","Option that shows all synchronized patterns"),description:(0,S.__)("Patterns that are kept in sync across the site.")},{value:Ye.unsynced,label:(0,S._x)("Not synced","Option that shows all patterns that are not synchronized"),description:(0,S.__)("Patterns that can be changed freely without affecting the site.")}];function Ww({item:e,onClick:t,ariaDescribedBy:n,children:r}){return(0,a.createElement)("button",{className:"page-patterns-preview-field__button",type:"button",onClick:e.type!==We.theme?t:void 0,"aria-label":e.title,"aria-describedby":n,"aria-disabled":e.type===We.theme},r)}function qw({item:e,categoryId:t,viewType:n}){const r=(0,h.useId)(),s=e.type===We.user,i=e.type===He,o=!e.blocks?.length,[l]=Dw("color.background"),{onClick:c}=Mr({postType:e.type,postId:s?e.id:e.name,categoryId:t,categoryType:i?e.type:We.theme,canvas:"edit"});return(0,a.createElement)("div",{className:`page-patterns-preview-field is-viewtype-${n}`,style:{backgroundColor:l}},(0,a.createElement)(Ww,{item:e,onClick:c,ariaDescribedBy:e.description?r:void 0},o&&i&&(0,S.__)("Empty template part"),o&&!i&&(0,S.__)("Empty pattern"),!o&&(0,a.createElement)(Cb,null,(0,a.createElement)(_.BlockPreview,{blocks:e.blocks,viewportWidth:e.viewportWidth}))),e.description&&(0,a.createElement)("div",{hidden:!0,id:r},e.description))}function Zw({item:e,viewType:t}){const[n,r]=(0,h.useState)(!1),{text:s,icon:i,imageUrl:o}=Rw(e.type,e.id),l=t!==et;return(0,a.createElement)(E.__experimentalHStack,{alignment:"left",spacing:1},l&&o&&(0,a.createElement)("div",{className:an("page-templates-author-field__avatar",{"is-loaded":n})},(0,a.createElement)("img",{onLoad:()=>r(!0),alt:"",src:o})),l&&!o&&(0,a.createElement)("div",{className:"page-templates-author-field__icon"},(0,a.createElement)(Eb,{icon:i})),(0,a.createElement)("span",{className:"page-templates-author-field__name"},s))}function Kw({item:e,categoryId:t}){const n=e.type===We.user,r=e.type===He,{onClick:s}=Mr({postType:e.type,postId:n?e.id:e.name,categoryId:t,categoryType:r?e.type:We.theme,canvas:"edit"});return(0,a.createElement)(E.__experimentalHStack,{alignment:"center",justify:"flex-start",spacing:2},(0,a.createElement)(E.Flex,{as:"div",gap:0,justify:"left",className:"edit-site-patterns__pattern-title"},e.type===We.theme?e.title:(0,a.createElement)(E.Button,{variant:"link",onClick:s,tabIndex:"-1"},e.title||e.name)),e.type===We.theme&&(0,a.createElement)(E.Tooltip,{placement:"top",text:(0,S.__)("This pattern cannot be edited.")},(0,a.createElement)(Eb,{className:"edit-site-patterns__pattern-lock-icon",icon:Sb,size:24})))}function Yw(){const{params:{categoryType:e,categoryId:t}}=zw(),n=e||We.theme,r=t||qe,[s,i]=(0,h.useState)(Uw),o=n===We.theme&&"uncategorized"===r,l=(0,w.usePrevious)(r),c=s.filters?.find((({field:e})=>"sync-status"===e))?.value,{patterns:u,isResolving:d}=Cw(n,o?"":r,{search:s.search,syncStatus:c}),{records:m}=(0,C.useEntityRecords)("postType",He,{per_page:-1}),p=(0,h.useMemo)((()=>{if(!m)return Hw;const e=new Set;return m.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[m]),f=(0,h.useMemo)((()=>{const e=[{header:(0,S.__)("Preview"),id:"preview",render:({item:e})=>(0,a.createElement)(qw,{item:e,categoryId:r,viewType:s.type}),enableSorting:!1,enableHiding:!1,width:"1%"},{header:(0,S.__)("Title"),id:"title",render:({item:e})=>(0,a.createElement)(Kw,{item:e,categoryId:r}),enableHiding:!1}];return n===We.theme?e.push({header:(0,S.__)("Sync status"),id:"sync-status",render:({item:e})=>(0,a.createElement)("span",{className:`edit-site-patterns__field-sync-status-${e.syncStatus}`},jw.find((({value:t})=>t===e.syncStatus))?.label||jw.find((({value:e})=>e===Ye.unsynced)).label),elements:jw,filterBy:{operators:[tt],isPrimary:!0},enableSorting:!1}):n===He&&e.push({header:(0,S.__)("Author"),id:"author",getValue:({item:e})=>e.templatePart.author_text,render:({item:e})=>(0,a.createElement)(Zw,{viewType:s.type,item:e}),elements:p,filterBy:{isPrimary:!0},width:"1%"}),e}),[s.type,r,n,p]);(0,h.useEffect)((()=>{l!==r&&i(Uw)}),[r,l]);const{data:g,paginationInfo:v}=(0,h.useMemo)((()=>{const e={...s};return delete e.search,n!==He&&(e.filters=[]),_b(u,e,f)}),[u,s,f,n]),y=Lw(He),b=Lw(We.user),_=ub(),E=(0,h.useMemo)((()=>n===He?[_,...y,aw,sw,rw].filter(Boolean):[_,...b,iw,tw,sw,rw].filter(Boolean)),[_,n,y,b]),x=(0,h.useCallback)((e=>{e.type!==s.type&&(e={...e,layout:{...Gw[e.type]}}),i(e)}),[s.type,i]),k=(0,h.useId)(),P=lw();return(0,a.createElement)(Bw,{settings:P},(0,a.createElement)(tb,{title:(0,S.__)("Patterns content"),className:"edit-site-page-patterns-dataviews",hideTitleFromUI:!0},(0,a.createElement)(Mw,{categoryId:r,type:n,titleId:`${k}-title`,descriptionId:`${k}-description`}),(0,a.createElement)(Qy,{paginationInfo:v,fields:f,actions:E,data:g||Hw,getItemId:e=>e.name,isLoading:d,view:s,onChangeView:x,supportedLayouts:[Qe,$e]})))}const Xw=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),Jw=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})),Qw=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})),$w=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})),e_=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z"})),t_=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),n_=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{fillRule:"evenodd",d:"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",clipRule:"evenodd"})),r_=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})),s_=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})),i_=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,a.createElement)(vn.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),a_=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})),o_={},l_=(e,t)=>{let n=e;return t.split(".").forEach((e=>{n=n?.[e]})),n},c_=(e,t)=>(e||[]).map((e=>({...e,name:(0,gn.decodeEntities)(l_(e,t))}))),u_=()=>(0,u.useSelect)((e=>e(C.store).getEntityRecords("postType",ze,{per_page:-1})),[]),d_=()=>(0,u.useSelect)((e=>e(f.store).__experimentalGetDefaultTemplateTypes()),[]),m_=()=>{const e=(0,u.useSelect)((e=>e(C.store).getPostTypes({per_page:-1})),[]);return(0,h.useMemo)((()=>{const t=["attachment"];return e?.filter((({viewable:e,slug:n})=>e&&!t.includes(n)))}),[e])};function p_(e){const t=(0,h.useMemo)((()=>e?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{})),[e]);return(0,h.useCallback)((({labels:e,slug:n})=>{const r=e.singular_name.toLowerCase();return t[r]>1&&r!==n}),[t])}function h_(){const e=m_(),t=(0,h.useMemo)((()=>e?.filter((e=>e.has_archive))),[e]),n=u_(),r=p_(t);return(0,h.useMemo)((()=>t?.filter((e=>!(n||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{let t;return t=r(e)?(0,S.sprintf)((0,S.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,S.sprintf)((0,S.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,S.sprintf)((0,S.__)("Displays an archive with the latest posts of type: %s."),e.labels.singular_name),title:t,icon:e.icon?.startsWith("dashicons-")?e.icon.slice(10):$w,templatePrefix:"archive"}}))||[]),[t,n,r])}const f_=e=>{const t=m_(),n=u_(),r=d_(),s=p_(t),i=(0,h.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return"page"!==t&&(n=`single-${n}`),e[t]=n,e}),{})),[t]),a=w_("postType",i),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c,icon:u}=n,d=i[l],m=r?.find((({slug:e})=>e===d)),p=o?.includes(d),h=s(n);let f=(0,S.sprintf)((0,S.__)("Single item: %s"),c.singular_name);h&&(f=(0,S.sprintf)((0,S.__)("Single item: %1$s (%2$s)"),c.singular_name,l));const g=m?{...m,templatePrefix:i[l]}:{slug:d,title:f,description:(0,S.sprintf)((0,S.__)("Displays a single item: %s."),c.singular_name),icon:u?.startsWith("dashicons-")?u.slice(10):a_,templatePrefix:i[l]},v=a?.[l]?.hasEntities;return v&&(g.onClick=t=>{e({type:"postType",slug:l,config:{recordNamePath:"title.rendered",queryArgs:({search:e})=>({_fields:"id,title,slug,link",orderBy:e?"relevance":"modified",exclude:a[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${i[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:i[l]}}},labels:c,hasGeneralTemplate:p,template:t})}),p&&!v||t.push(g),t}),[]),c=(0,h.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let r="postTypesMenuItems";return"page"===n&&(r="defaultPostTypesMenuItems"),e[r].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[l]);return c},g_=e=>{const t=(()=>{const e=(0,u.useSelect)((e=>e(C.store).getTaxonomies({per_page:-1})),[]);return(0,h.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))),[e])})(),n=u_(),r=d_(),s=(0,h.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return["category","post_tag"].includes(t)||(n=`taxonomy-${n}`),"post_tag"===t&&(n="tag"),e[t]=n,e}),{})),[t]),i=t?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{}),a=w_("taxonomy",s),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c}=n,u=s[l],d=r?.find((({slug:e})=>e===u)),m=o?.includes(u),p=((e,t)=>{if(["category","post_tag"].includes(t))return!1;const n=e.singular_name.toLowerCase();return i[n]>1&&n!==t})(c,l);let h=c.singular_name;p&&(h=(0,S.sprintf)((0,S.__)("%1$s (%2$s)"),c.singular_name,l));const f=d?{...d,templatePrefix:s[l]}:{slug:u,title:h,description:(0,S.sprintf)((0,S.__)("Displays taxonomy: %s."),c.singular_name),icon:n_,templatePrefix:s[l]},g=a?.[l]?.hasEntities;return g&&(f.onClick=t=>{e({type:"taxonomy",slug:l,config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"count",exclude:a[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${s[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:s[l]}}},labels:c,hasGeneralTemplate:m,template:t})}),m&&!g||t.push(f),t}),[]);return(0,h.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let r="taxonomiesMenuItems";return["category","tag"].includes(n)&&(r="defaultTaxonomiesMenuItems"),e[r].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[l])},v_={user:"author"},y_={user:{who:"authors"}};const b_=(e,t,n={})=>{const r=(e=>{const t=u_();return(0,h.useMemo)((()=>Object.entries(e||{}).reduce(((e,[n,r])=>{const s=(t||[]).reduce(((e,t)=>{const n=`${r}-`;return t.slug.startsWith(n)&&e.push(t.slug.substring(n.length)),e}),[]);return s.length&&(e[n]=s),e}),{})),[e,t])})(t);return(0,u.useSelect)((t=>Object.entries(r||{}).reduce(((r,[s,i])=>{const a=t(C.store).getEntityRecords(e,s,{_fields:"id",context:"view",slug:i,...n[s]});return a?.length&&(r[s]=a),r}),{})),[r])},w_=(e,t,n=o_)=>{const r=b_(e,t,n),s=(0,u.useSelect)((s=>Object.keys(t||{}).reduce(((t,i)=>{const a=r?.[i]?.map((({id:e})=>e))||[];return t[i]=!!s(C.store).getEntityRecords(e,i,{per_page:1,_fields:"id",context:"view",exclude:a,...n[i]})?.length,t}),{})),[t,r,e,n]);return(0,h.useMemo)((()=>Object.keys(t||{}).reduce(((e,t)=>{const n=r?.[t]?.map((({id:e})=>e))||[];return e[t]={hasEntities:s[t],existingEntitiesIds:n},e}),{})),[t,r,s])},{CompositeV2:__,CompositeItemV2:E_,useCompositeStoreV2:S_}=ie(E.privateApis),x_=[];function C_({suggestion:e,search:t,onSelect:n,entityForSuggestions:r}){const s="edit-site-custom-template-modal__suggestions_list__list-item";return(0,a.createElement)(E_,{render:(0,a.createElement)(E.Button,{role:"option",className:s,onClick:()=>n(r.config.getSpecificTemplate(e))})},(0,a.createElement)(E.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${s}__title`},(0,a.createElement)(E.TextHighlight,{text:(0,gn.decodeEntities)(e.name),highlight:t})),e.link&&(0,a.createElement)(E.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${s}__info`},e.link))}function k_({entityForSuggestions:e,onSelect:t}){const n=S_({orientation:"vertical"}),[r,s,i]=(0,w.useDebouncedInput)(),o=function(e,t){const{config:n}=e,r=(0,h.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...n.queryArgs(t)})),[t,n]),{records:s,hasResolved:i}=(0,C.useEntityRecords)(e.type,e.slug,r),[a,o]=(0,h.useState)(x_);return(0,h.useEffect)((()=>{if(!i)return;let e=x_;s?.length&&(e=s,n.recordNamePath&&(e=c_(e,n.recordNamePath))),o(e)}),[s,i]),a}(e,i),{labels:l}=e,[c,u]=(0,h.useState)(!1);return!c&&o?.length>9&&u(!0),(0,a.createElement)(a.Fragment,null,c&&(0,a.createElement)(E.SearchControl,{__nextHasNoMarginBottom:!0,onChange:s,value:r,label:l.search_items,placeholder:l.search_items}),!!o?.length&&(0,a.createElement)(__,{store:n,role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,S.__)("Suggestions list")},o.map((n=>(0,a.createElement)(C_,{key:n.slug,suggestion:n,search:i,onSelect:t,entityForSuggestions:e})))),i&&!o?.length&&(0,a.createElement)(E.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results"},l.not_found))}const P_=function({onSelect:e,entityForSuggestions:t}){const[n,r]=(0,h.useState)(t.hasGeneralTemplate);return(0,a.createElement)(E.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left"},!n&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalText,{as:"p"},(0,S.__)("Select whether to create a single template for all items or a specific one.")),(0,a.createElement)(E.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial"},(0,a.createElement)(E.FlexItem,{isBlock:!0,as:E.Button,onClick:()=>{const{slug:n,title:r,description:s,templatePrefix:i}=t.template;e({slug:n,title:r,description:s,templatePrefix:i})}},(0,a.createElement)(E.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.all_items),(0,a.createElement)(E.__experimentalText,{as:"span",lineHeight:1.53846153846},(0,S.__)("For all items"))),(0,a.createElement)(E.FlexItem,{isBlock:!0,as:E.Button,onClick:()=>{r(!0)}},(0,a.createElement)(E.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.singular_name),(0,a.createElement)(E.__experimentalText,{as:"span",lineHeight:1.53846153846},(0,S.__)("For a specific item"))))),n&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalText,{as:"p"},(0,S.__)("This template will be used only for the specific item chosen.")),(0,a.createElement)(k_,{entityForSuggestions:t,onSelect:e})))};const I_=function({onClose:e,createTemplate:t}){const[n,r]=(0,h.useState)(""),s=(0,S.__)("Custom Template"),[i,o]=(0,h.useState)(!1);return(0,a.createElement)("form",{onSubmit:async function(e){if(e.preventDefault(),!i){o(!0);try{await t({slug:"wp-custom-template-"+qs(n||s),title:n||s},!1)}finally{o(!1)}}}},(0,a.createElement)(E.__experimentalVStack,{spacing:6},(0,a.createElement)(E.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,S.__)("Name"),value:n,onChange:r,placeholder:s,disabled:i,help:(0,S.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,a.createElement)(E.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right"},(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{e()}},(0,S.__)("Cancel")),(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:i,"aria-disabled":i},(0,S.__)("Create")))))},{useHistory:T_}=ie(rn.privateApis),O_=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],A_={"front-page":Xw,home:Jw,single:Qw,page:ur,archive:$w,search:bn,404:e_,index:t_,category:Ap,author:Vw,taxonomy:n_,date:r_,tag:s_,attachment:i_};function M_({title:e,direction:t,className:n,description:r,icon:s,onClick:i,children:o}){return(0,a.createElement)(E.Button,{className:n,onClick:i,label:r,showTooltip:!!r},(0,a.createElement)(E.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t},(0,a.createElement)("div",{className:"edit-site-add-new-template__template-icon"},(0,a.createElement)(E.Icon,{icon:s})),(0,a.createElement)(E.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0},(0,a.createElement)(E.__experimentalText,{weight:500,lineHeight:1.53846153846},e),o)))}const N_={templatesList:1,customTemplate:2,customGenericTemplate:3};function F_({onClose:e}){const[t,n]=(0,h.useState)(N_.templatesList),[r,s]=(0,h.useState)({}),[i,o]=(0,h.useState)(!1),l=function(e,t){const n=u_(),r=d_(),s=(n||[]).map((({slug:e})=>e)),i=(r||[]).filter((e=>O_.includes(e.slug)&&!s.includes(e.slug))),a=n=>{t?.(),e(n)},o=[...i],{defaultTaxonomiesMenuItems:l,taxonomiesMenuItems:c}=g_(a),{defaultPostTypesMenuItems:u,postTypesMenuItems:d}=f_(a),m=function(e){const t=u_(),n=d_(),r=w_("root",v_,y_);let s=n?.find((({slug:e})=>"author"===e));s||(s={description:(0,S.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const i=!!t?.find((({slug:e})=>"author"===e));if(r.user?.hasEntities&&(s={...s,templatePrefix:"author"},s.onClick=t=>{e({type:"root",slug:"user",config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"registered_date",exclude:r.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:e=>{const t=`author-${e.slug}`;return{title:t,slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,S.__)("Author"),search_items:(0,S.__)("Search Authors"),not_found:(0,S.__)("No authors found."),all_items:(0,S.__)("All Authors")},hasGeneralTemplate:i,template:t})}),!i||r.user?.hasEntities)return s}(a);[...l,...u,m].forEach((e=>{if(!e)return;const t=o.findIndex((t=>t.slug===e.slug));t>-1?o[t]=e:o.push(e)})),o?.sort(((e,t)=>O_.indexOf(e.slug)-O_.indexOf(t.slug)));const p=[...o,...h_(),...d,...c];return p}(s,(()=>n(N_.customTemplate))),c=T_(),{saveEntityRecord:d}=(0,u.useDispatch)(C.store),{createErrorNotice:m,createSuccessNotice:p}=(0,u.useDispatch)(x.store),{homeUrl:f}=(0,u.useSelect)((e=>{const{getUnstableBase:t}=e(C.store);return{homeUrl:t()?.home}}),[]),g={"front-page":f,date:(0,S.sprintf)((0,S.__)("E.g. %s"),f+"/"+(new Date).getFullYear())};async function v(e,t=!0){if(!i){o(!0);try{const{title:n,description:r,slug:s}=e,i=await d("postType",ze,{description:r,slug:s.toString(),status:"publish",title:n,is_wp_suggestion:t},{throwOnError:!0});c.push({postId:i.id,postType:ze,canvas:"edit"}),p((0,S.sprintf)((0,S.__)('"%s" successfully created.'),(0,gn.decodeEntities)(i.title?.rendered||n)),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,S.__)("An error occurred while creating the template.");m(t,{type:"snackbar"})}finally{o(!1)}}}const y=()=>{e(),n(N_.templatesList)};let b=(0,S.__)("Add template");return t===N_.customTemplate?b=(0,S.sprintf)((0,S.__)("Add template: %s"),r.labels.singular_name):t===N_.customGenericTemplate&&(b=(0,S.__)("Create custom template")),(0,a.createElement)(E.Modal,{title:b,className:an("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":t===N_.templatesList,"edit-site-custom-template-modal":t===N_.customTemplate}),onRequestClose:y,overlayClassName:t===N_.customGenericTemplate?"edit-site-custom-generic-template__modal":void 0},t===N_.templatesList&&(0,a.createElement)(E.__experimentalGrid,{columns:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents"},(0,a.createElement)(E.Flex,{className:"edit-site-add-new-template__template-list__prompt"},(0,S.__)("Select what the new template should apply to:")),l.map((e=>{const{title:t,slug:n,onClick:r}=e;return(0,a.createElement)(M_,{key:n,title:t,direction:"column",className:"edit-site-add-new-template__template-button",description:g[n],icon:A_[n]||cr,onClick:()=>r?r(e):v(e)})})),(0,a.createElement)(M_,{title:(0,S.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:gr,onClick:()=>n(N_.customGenericTemplate)},(0,a.createElement)(E.__experimentalText,{lineHeight:1.53846153846},(0,S.__)("A custom template can be manually applied to any post or page.")))),t===N_.customTemplate&&(0,a.createElement)(P_,{onSelect:v,entityForSuggestions:r}),t===N_.customGenericTemplate&&(0,a.createElement)(I_,{onClose:y,createTemplate:v}))}const V_=(0,h.memo)((function(){const[e,t]=(0,h.useState)(!1),{postType:n}=(0,u.useSelect)((e=>{const{getPostType:t}=e(C.store);return{postType:t(ze)}}),[]);return n?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.Button,{variant:"primary",onClick:()=>t(!0),label:n.labels.add_new_item},n.labels.add_new_item),e&&(0,a.createElement)(F_,{onClose:()=>t(!1)})):null})),{usePostActions:R_}=ie(f.privateApis),{ExperimentalBlockEditorProvider:B_,useGlobalStyle:D_}=ie(_.privateApis),{useHistory:L_,useLocation:z_}=ie(rn.privateApis),H_=[],G_={[$e]:{primaryField:"title"},[Qe]:{mediaField:"preview",primaryField:"title",columnFields:["description"]},[et]:{primaryField:"title",mediaField:"preview"}},U_={type:Qe,search:"",page:1,perPage:20,sort:{field:"title",direction:"asc"},hiddenFields:["preview"],layout:G_[Qe],filters:[]};function j_({item:e,viewType:t}){if(t===et)return(0,gn.decodeEntities)(e.title?.rendered)||(0,S.__)("(no title)");const n={params:{postId:e.id,postType:e.type,canvas:"edit"}};return(0,a.createElement)(Nr,{...n},(0,gn.decodeEntities)(e.title?.rendered)||(0,S.__)("(no title)"))}function W_({item:e,viewType:t}){const[n,r]=(0,h.useState)(!1),{text:s,icon:i,imageUrl:o}=Rw(e.type,e.id),l=t!==et;return(0,a.createElement)(E.__experimentalHStack,{alignment:"left",spacing:1},l&&o&&(0,a.createElement)("div",{className:an("page-templates-author-field__avatar",{"is-loaded":n})},(0,a.createElement)("img",{onLoad:()=>r(!0),alt:"",src:o})),l&&!o&&(0,a.createElement)("div",{className:"page-templates-author-field__icon"},(0,a.createElement)(E.Icon,{icon:i})),(0,a.createElement)("span",{className:"page-templates-author-field__name"},s))}function q_({item:e,viewType:t}){const n=lw(),[r="white"]=D_("color.background"),s=(0,h.useMemo)((()=>(0,l.parse)(e.content.raw)),[e.content.raw]),{onClick:i}=Mr({postId:e.id,postType:e.type,canvas:"edit"}),o=!s?.length;return(0,a.createElement)(B_,{settings:n},(0,a.createElement)("div",{className:`page-templates-preview-field is-viewtype-${t}`,style:{backgroundColor:r}},t===et&&!o&&(0,a.createElement)(Cb,null,(0,a.createElement)(_.BlockPreview,{blocks:s})),t!==et&&(0,a.createElement)("button",{className:"page-templates-preview-field__button",type:"button",onClick:i,"aria-label":e.title?.rendered||e.title},o&&(0,S.__)("Empty template"),!o&&(0,a.createElement)(Cb,null,(0,a.createElement)(_.BlockPreview,{blocks:s})))))}function Z_(){const{params:e}=z_(),{activeView:t="all",layout:n}=e,r=(0,h.useMemo)((()=>{const e=null!=n?n:U_.type;return{...U_,type:e,layout:G_[e],filters:"all"!==t?[{field:"author",operator:"isAny",value:[t]}]:[]}}),[n,t]),[s,i]=(0,h.useState)(r);(0,h.useEffect)((()=>{i((e=>({...e,filters:"all"!==t?[{field:"author",operator:nt,value:[t]}]:[]})))}),[t]);const{records:o,isResolving:l}=(0,C.useEntityRecords)("postType",ze,{per_page:-1}),c=L_(),u=(0,h.useCallback)((t=>{s?.type===et&&c.push({...e,postId:1===t.length?t[0].id:void 0})}),[c,e,s?.type]),d=(0,h.useMemo)((()=>{if(!o)return H_;const e=new Set;return o.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[o]),m=(0,h.useMemo)((()=>[{header:(0,S.__)("Preview"),id:"preview",render:({item:e})=>(0,a.createElement)(q_,{item:e,viewType:s.type}),minWidth:120,maxWidth:120,enableSorting:!1},{header:(0,S.__)("Template"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>(0,a.createElement)(j_,{item:e,viewType:s.type}),maxWidth:400,enableHiding:!1,enableGlobalSearch:!0},{header:(0,S.__)("Description"),id:"description",render:({item:e})=>e.description?(0,a.createElement)("span",{className:"page-templates-description"},(0,gn.decodeEntities)(e.description)):s.type===$e&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalText,{variant:"muted","aria-hidden":"true"},"—"),(0,a.createElement)(E.VisuallyHidden,null,(0,S.__)("No description."))),maxWidth:400,minWidth:320,enableSorting:!1,enableGlobalSearch:!0},{header:(0,S.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:({item:e})=>(0,a.createElement)(W_,{viewType:s.type,item:e}),elements:d,width:"1%"}]),[d,s.type]),{data:p,paginationInfo:f}=(0,h.useMemo)((()=>_b(o,s,m)),[o,s,m]),g=R_(ze),v=ub(),y=(0,h.useMemo)((()=>[v,...g]),[g,v]),b=(0,h.useCallback)((t=>{t.type!==s.type&&(t={...t,layout:{...G_[t.type]}},c.push({...e,layout:t.type})),i(t)}),[s.type,i,c,e]);return(0,a.createElement)(tb,{className:"edit-site-page-templates",title:(0,S.__)("Templates"),actions:(0,a.createElement)(V_,null)},(0,a.createElement)(Qy,{paginationInfo:f,fields:m,actions:y,data:p,isLoading:l,view:s,onChangeView:b,onSelectionChange:u}))}function K_(e){return(0,a.createElement)(E.Button,{...e,className:an("edit-site-sidebar-button",e.className)})}const Y_=window.wp.dom,X_=(0,h.createContext)((()=>{}));function J_(){let e={direction:null,focusSelector:null};return{get:()=>e,navigate(t,n=null){e={direction:t,focusSelector:"forward"===t&&n?n:e.focusSelector}}}}function Q_({children:e}){const t=(0,h.useContext)(X_),n=(0,h.useRef)(),[r,s]=(0,h.useState)(null);(0,h.useLayoutEffect)((()=>{const{direction:e,focusSelector:r}=t.get();!function(e,t,n){let r;if("back"===t&&n&&(r=e.querySelector(n)),null!==t&&!r){const[t]=Y_.focus.tabbable.find(e);r=null!=t?t:e}r?.focus()}(n.current,e,r),s(e)}),[t]);const i=an("edit-site-sidebar__screen-wrapper",{"slide-from-left":"back"===r,"slide-from-right":"forward"===r});return(0,a.createElement)("div",{ref:n,className:i},e)}function $_({routeKey:e,children:t}){const[n]=(0,h.useState)(J_);return(0,a.createElement)(X_.Provider,{value:n},(0,a.createElement)("div",{className:"edit-site-sidebar__content"},(0,a.createElement)(Q_,{key:e},t)))}const{useHistory:eE,useLocation:tE}=ie(rn.privateApis);function nE({isRoot:e,title:t,actions:n,meta:r,content:s,footer:i,description:o,backPath:l}){const{dashboardLink:c,dashboardLinkText:d,previewingThemeName:m}=(0,u.useSelect)((e=>{const{getSettings:t}=ie(e(tn)),n=Rn();return{dashboardLink:t().__experimentalDashboardLink,dashboardLinkText:t().__experimentalDashboardLinkText,previewingThemeName:n?e(C.store).getTheme(n)?.name?.rendered:void 0}}),[]),p=tE(),f=eE(),{navigate:g}=(0,h.useContext)(X_),v=null!=l?l:p.state?.backPath,y=(0,S.isRTL)()?li:oi;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalVStack,{className:an("edit-site-sidebar-navigation-screen__main",{"has-footer":!!i}),spacing:0,justify:"flex-start"},(0,a.createElement)(E.__experimentalHStack,{spacing:4,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon"},!e&&(0,a.createElement)(K_,{onClick:()=>{f.push(v),g("back")},icon:y,label:(0,S.__)("Back"),showTooltip:!1}),e&&(0,a.createElement)(K_,{icon:y,label:d||(0,S.__)("Go to the Dashboard"),href:c||"index.php"}),(0,a.createElement)(E.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20},Vn()?(0,S.sprintf)("Previewing %1$s: %2$s",m,t):t),n&&(0,a.createElement)("div",{className:"edit-site-sidebar-navigation-screen__actions"},n)),r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"edit-site-sidebar-navigation-screen__meta"},r)),(0,a.createElement)("div",{className:"edit-site-sidebar-navigation-screen__content"},o&&(0,a.createElement)("p",{className:"edit-site-sidebar-navigation-screen__description"},o),s)),i&&(0,a.createElement)("footer",{className:"edit-site-sidebar-navigation-screen__footer"},i))}const rE=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),sE=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})),{useHistory:iE}=ie(rn.privateApis);function aE({className:e,icon:t,withChevron:n=!1,suffix:r,path:s,onClick:i,children:o,...l}){const c=iE(),{navigate:u}=(0,h.useContext)(X_);return(0,a.createElement)(E.__experimentalItem,{className:an("edit-site-sidebar-navigation-item",{"with-suffix":!n&&r},e),onClick:function(e){i?(i(e),u("forward")):s&&(e.preventDefault(),c.push({path:s}),u("forward",`[id="${s}"]`))},id:s,...l},(0,a.createElement)(E.__experimentalHStack,{justify:"flex-start"},t&&(0,a.createElement)(Eb,{style:{fill:"currentcolor"},icon:t,size:24}),(0,a.createElement)(E.FlexBlock,null,o),n&&(0,a.createElement)(Eb,{icon:(0,S.isRTL)()?rE:sE,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!n&&r))}function oE({children:e}){return(0,a.createElement)(E.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__label"},e)}function lE({label:e,children:t,className:n,...r}){return(0,a.createElement)(E.__experimentalHStack,{key:e,spacing:5,alignment:"left",className:an("edit-site-sidebar-navigation-details-screen-panel__row",n),...r},t)}function cE({children:e}){return(0,a.createElement)(E.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__value"},e)}function uE({title:e,children:t,spacing:n}){return(0,a.createElement)(E.__experimentalVStack,{className:"edit-site-sidebar-navigation-details-screen-panel",spacing:n},e&&(0,a.createElement)(E.__experimentalHeading,{className:"edit-site-sidebar-navigation-details-screen-panel__heading",level:2},e),t)}function dE({record:e,...t}){var n,r;const s={},i=null!==(n=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==n?n:null,o=null!==(r=e?._links?.["version-history"]?.[0]?.count)&&void 0!==r?r:0;return i&&o>1&&(s.href=(0,_n.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),s.as="a"),(0,a.createElement)(E.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-details-footer"},(0,a.createElement)(aE,{"aria-label":(0,S.__)("Revisions"),...s,...t},(0,a.createElement)(lE,{justify:"space-between"},(0,a.createElement)(oE,null,(0,S.__)("Last modified")),(0,a.createElement)(cE,null,(0,h.createInterpolateElement)((0,S.sprintf)((0,S.__)("<time>%s</time>"),(0,Sm.humanTimeDiff)(e.modified)),{time:(0,a.createElement)("time",{dateTime:e.modified})})),(0,a.createElement)(E.Icon,{className:"edit-site-sidebar-navigation-screen-details-footer__icon",icon:$n}))))}const mE=()=>{};function pE(e){const{openGeneralSidebar:t}=(0,u.useDispatch)(tn),{setCanvasMode:n}=ie((0,u.useDispatch)(tn));return(0,u.useSelect)((e=>!!e(C.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length),[])?(0,a.createElement)(aE,{...e,path:"/wp_global_styles"}):(0,a.createElement)(aE,{...e,onClick:()=>{n("edit"),t("edit-site/global-styles")}})}function hE(){const{storedSettings:e}=(0,u.useSelect)((e=>{const{getSettings:t}=ie(e(tn));return{storedSettings:t()}}),[]),t=we(),n=_e();return(0,a.createElement)(_.BlockEditorProvider,{settings:e,onChange:mE,onInput:mE},(0,a.createElement)(E.__experimentalVStack,{spacing:10,className:"edit-site-global-styles-variation-container"},(0,a.createElement)(qd,{gap:3}),t?.length&&(0,a.createElement)(kd,{title:(0,S.__)("Colors"),gap:3}),n?.length&&(0,a.createElement)(Ia,{title:(0,S.__)("Typography"),gap:3})))}function fE({backPath:e}){const{revisions:t,isLoading:n}=Em(),{openGeneralSidebar:r}=(0,u.useDispatch)(tn),{setIsListViewOpened:s}=(0,u.useDispatch)(f.store),i=(0,w.useViewportMatch)("medium","<"),{setCanvasMode:o,setEditorCanvasContainerView:l}=ie((0,u.useDispatch)(tn)),{isViewMode:c,isStyleBookOpened:d,revisionsCount:m}=(0,u.useSelect)((e=>{var t;const{getCanvasMode:n,getEditorCanvasContainerView:r}=ie(e(tn)),{getEntityRecord:s,__experimentalGetCurrentGlobalStylesId:i}=e(C.store),a=i(),o=a?s("root","globalStyles",a):void 0;return{isViewMode:"view"===n(),isStyleBookOpened:"style-book"===r(),revisionsCount:null!==(t=o?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}}),[]),{set:p}=(0,u.useDispatch)(g.store),v=(0,h.useCallback)((async()=>Promise.all([p("core","distractionFree",!1),o("edit"),r("edit-site/global-styles")])),[o,r,p]),y=(0,h.useCallback)((async()=>{await v(),l("style-book"),s(!1)}),[v,l,s]),b=(0,h.useCallback)((async()=>{await v(),l("global-styles-revisions")}),[v,l]),_=m>0,E=t?.[0]?.modified,x=_&&!n&&E;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(nE,{title:(0,S.__)("Styles"),description:(0,S.__)("Choose a different style combination for the theme styles."),backPath:e,content:(0,a.createElement)(hE,null),footer:x&&(0,a.createElement)(dE,{record:t?.[0],onClick:b}),actions:(0,a.createElement)(a.Fragment,null,!i&&(0,a.createElement)(K_,{icon:ii,label:(0,S.__)("Style Book"),onClick:()=>l(d?void 0:"style-book"),isPressed:d}),(0,a.createElement)(K_,{icon:gr,label:(0,S.__)("Edit styles"),onClick:async()=>await v()}))}),d&&!i&&c&&(0,a.createElement)(lm,{enableResizing:!1,isSelected:()=>!1,onClick:y,onSelect:y,showCloseButton:!1,showTabs:!1}))}const gE=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"}));function vE(){const{setEditorCanvasContainerView:e}=ie((0,u.useDispatch)(tn));return(0,h.useEffect)((()=>{e(void 0)}),[e]),(0,a.createElement)(nE,{isRoot:!0,title:(0,S.__)("Design"),description:(0,S.__)("Customize the appearance of your website using the block editor."),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalItemGroup,null,(0,a.createElement)(aE,{path:"/navigation",withChevron:!0,icon:gE},(0,S.__)("Navigation")),(0,a.createElement)(pE,{withChevron:!0,icon:Kn},(0,S.__)("Styles")),(0,a.createElement)(aE,{path:"/page",withChevron:!0,icon:ur},(0,S.__)("Pages")),(0,a.createElement)(aE,{path:"/wp_template",withChevron:!0,icon:cr},(0,S.__)("Templates")),(0,a.createElement)(aE,{path:"/patterns",withChevron:!0,icon:vr},(0,S.__)("Patterns"))))})}const yE={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},bE=e=>e?.trim()?.length>0;function wE({menuTitle:e,onClose:t,onSave:n}){const[r,s]=(0,h.useState)(e),i=r!==e&&bE(r);return(0,a.createElement)(E.Modal,{title:(0,S.__)("Rename"),onRequestClose:t},(0,a.createElement)("form",{className:"sidebar-navigation__rename-modal-form"},(0,a.createElement)(E.__experimentalVStack,{spacing:"3"},(0,a.createElement)(E.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:r,placeholder:(0,S.__)("Navigation title"),onChange:s}),(0,a.createElement)(E.__experimentalHStack,{justify:"right"},(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t},(0,S.__)("Cancel")),(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,disabled:!i,variant:"primary",type:"submit",onClick:e=>{e.preventDefault(),i&&(n({title:r}),t())}},(0,S.__)("Save"))))))}function _E({onClose:e,onConfirm:t}){return(0,a.createElement)(E.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{t(),e()},onCancel:e,confirmButtonText:(0,S.__)("Delete")},(0,S.__)("Are you sure you want to delete this Navigation Menu?"))}const{useHistory:EE}=ie(rn.privateApis),SE={position:"bottom right"};function xE(e){const{onDelete:t,onSave:n,onDuplicate:r,menuTitle:s,menuId:i}=e,[o,l]=(0,h.useState)(!1),[c,u]=(0,h.useState)(!1),d=EE(),m=()=>{l(!1),u(!1)};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,S.__)("Actions"),icon:ai,popoverProps:SE},(({onClose:e})=>(0,a.createElement)("div",null,(0,a.createElement)(E.MenuGroup,null,(0,a.createElement)(E.MenuItem,{onClick:()=>{l(!0),e()}},(0,S.__)("Rename")),(0,a.createElement)(E.MenuItem,{onClick:()=>{d.push({postId:i,postType:"wp_navigation",canvas:"edit"})}},(0,S.__)("Edit")),(0,a.createElement)(E.MenuItem,{onClick:()=>{r(),e()}},(0,S.__)("Duplicate")),(0,a.createElement)(E.MenuItem,{isDestructive:!0,onClick:()=>{u(!0),e()}},(0,S.__)("Delete")))))),c&&(0,a.createElement)(_E,{onClose:m,onConfirm:t}),o&&(0,a.createElement)(wE,{onClose:m,menuTitle:s,onSave:n}))}const CE=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),kE=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),PE={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useLocation:IE,useHistory:TE}=ie(rn.privateApis);function OE(e){const{params:t}=IE(),n=TE(),{block:r}=e,{clientId:s}=r,{moveBlocksDown:i,moveBlocksUp:o,removeBlocks:l}=(0,u.useDispatch)(_.store),c=(0,S.sprintf)((0,S.__)("Remove %s"),(0,_.BlockTitle)({clientId:s,maximumLength:25})),d=(0,S.sprintf)((0,S.__)("Go to %s"),(0,_.BlockTitle)({clientId:s,maximumLength:25})),m=(0,u.useSelect)((e=>{const{getBlockRootClientId:t}=e(_.store);return t(s)}),[s]),p=(0,h.useCallback)((e=>{const{attributes:r,name:s}=e;"post-type"===r.kind&&r.id&&r.type&&n&&n.push({postType:r.type,postId:r.id},{backPath:t}),"core/page-list-item"===s&&r.id&&n&&n.push({postType:"page",postId:r.id},{backPath:t})}),[n,t]);return(0,a.createElement)(E.DropdownMenu,{icon:ai,label:(0,S.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:PE,noIcons:!0,...e},(({onClose:e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.MenuGroup,null,(0,a.createElement)(E.MenuItem,{icon:CE,onClick:()=>{o([s],m),e()}},(0,S.__)("Move up")),(0,a.createElement)(E.MenuItem,{icon:kE,onClick:()=>{i([s],m),e()}},(0,S.__)("Move down")),"page"===r.attributes?.type&&r.attributes?.id&&(0,a.createElement)(E.MenuItem,{onClick:()=>{p(r),e()}},d)),(0,a.createElement)(E.MenuGroup,null,(0,a.createElement)(E.MenuItem,{onClick:()=>{l([s],!1),e()}},c)))))}const{PrivateListView:AE}=ie(_.privateApis),ME=["postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function NE({rootClientId:e}){const{listViewRootClientId:t,isLoading:n}=(0,u.useSelect)((t=>{const{areInnerBlocksControlled:n,getBlockName:r,getBlockCount:s,getBlockOrder:i}=t(_.store),{isResolving:a}=t(C.store),o=i(e),l=1===o.length&&"core/page-list"===r(o[0])&&s(o[0])>0,c=a("getEntityRecords",ME);return{listViewRootClientId:l?o[0]:e,isLoading:!n(e)||c}}),[e]),{replaceBlock:r,__unstableMarkNextChangeAsNotPersistent:s}=(0,u.useDispatch)(_.store),i=(0,h.useCallback)((e=>{"core/navigation-link"!==e.name||e.attributes.url||(s(),r(e.clientId,(0,l.createBlock)("core/navigation-link",e.attributes)))}),[s,r]);return(0,a.createElement)(a.Fragment,null,!n&&(0,a.createElement)(AE,{rootClientId:t,onSelect:i,blockSettingsMenu:OE,showAppender:!1}),(0,a.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor"},(0,a.createElement)(_.BlockList,null)))}const FE=()=>{};function VE({navigationMenuId:e}){const{storedSettings:t}=(0,u.useSelect)((e=>{const{getSettings:t}=ie(e(tn));return{storedSettings:t()}}),[]),n=(0,h.useMemo)((()=>e?[(0,l.createBlock)("core/navigation",{ref:e})]:[]),[e]);return e&&n?.length?(0,a.createElement)(_.BlockEditorProvider,{settings:t,value:n,onChange:FE,onInput:FE},(0,a.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content"},(0,a.createElement)(NE,{rootClientId:n[0].clientId}))):null}function RE(e,t,n){return e?.rendered?"publish"===n?(0,gn.decodeEntities)(e?.rendered):(0,S.sprintf)((0,S.__)("%1$s (%2$s)"),(0,gn.decodeEntities)(e?.rendered),n):(0,S.sprintf)((0,S.__)("(no title %s)"),t)}function BE({navigationMenu:e,backPath:t,handleDelete:n,handleDuplicate:r,handleSave:s}){const i=e?.title?.rendered;return(0,a.createElement)(KE,{actions:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(xE,{menuId:e?.id,menuTitle:(0,gn.decodeEntities)(i),onDelete:n,onSave:s,onDuplicate:r})),backPath:t,title:RE(e?.title,e?.id,e?.status),description:(0,S.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site.")},(0,a.createElement)(VE,{navigationMenuId:e?.id}))}const{useLocation:DE}=ie(rn.privateApis),LE="wp_navigation";function zE({backPath:e}){const{params:{postId:t}}=DE(),{record:n,isResolving:r}=(0,C.useEntityRecord)("postType",LE,t),{isSaving:s,isDeleting:i}=(0,u.useSelect)((e=>{const{isSavingEntityRecord:n,isDeletingEntityRecord:r}=e(C.store);return{isSaving:n("postType",LE,t),isDeleting:r("postType",LE,t)}}),[t]),o=r||s||i,l=n?.title?.rendered||n?.slug,{handleSave:c,handleDelete:d,handleDuplicate:m}=WE(),p=()=>d(n),h=e=>c(n,e),f=()=>m(n);return o?(0,a.createElement)(KE,{description:(0,S.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),backPath:e},(0,a.createElement)(E.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):o||n?n?.content?.raw?(0,a.createElement)(BE,{navigationMenu:n,backPath:e,handleDelete:p,handleSave:h,handleDuplicate:f}):(0,a.createElement)(KE,{actions:(0,a.createElement)(xE,{menuId:n?.id,menuTitle:(0,gn.decodeEntities)(l),onDelete:p,onSave:h,onDuplicate:f}),backPath:e,title:RE(n?.title,n?.id,n?.status),description:(0,S.__)("This Navigation Menu is empty.")}):(0,a.createElement)(KE,{description:(0,S.__)("Navigation Menu missing."),backPath:e})}const{useHistory:HE}=ie(rn.privateApis);function GE(){const{deleteEntityRecord:e}=(0,u.useDispatch)(C.store),{createSuccessNotice:t,createErrorNotice:n}=(0,u.useDispatch)(x.store),r=HE();return async s=>{const i=s?.id;try{await e("postType",LE,i,{force:!0},{throwOnError:!0}),t((0,S.__)("Navigation Menu successfully deleted."),{type:"snackbar"}),r.push({path:"/navigation"})}catch(e){n((0,S.sprintf)((0,S.__)("Unable to delete Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function UE(){const{getEditedEntityRecord:e}=(0,u.useSelect)((e=>{const{getEditedEntityRecord:t}=e(C.store);return{getEditedEntityRecord:t}}),[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:n}=(0,u.useDispatch)(C.store),{createSuccessNotice:r,createErrorNotice:s}=(0,u.useDispatch)(x.store);return async(i,a)=>{if(!a)return;const o=i?.id,l=e("postType",Le,o);t("postType",LE,o,a);const c=Object.keys(a);try{await n("postType",LE,o,c,{throwOnError:!0}),r((0,S.__)("Renamed Navigation Menu"),{type:"snackbar"})}catch(e){t("postType",LE,o,l),s((0,S.sprintf)((0,S.__)("Unable to rename Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function jE(){const e=HE(),{saveEntityRecord:t}=(0,u.useDispatch)(C.store),{createSuccessNotice:n,createErrorNotice:r}=(0,u.useDispatch)(x.store);return async s=>{const i=s?.title?.rendered||s?.slug;try{const r=await t("postType",LE,{title:(0,S.sprintf)((0,S.__)("%s (Copy)"),i),content:s?.content?.raw,status:"publish"},{throwOnError:!0});r&&(n((0,S.__)("Duplicated Navigation Menu"),{type:"snackbar"}),e.push({postType:LE,postId:r.id}))}catch(e){r((0,S.sprintf)((0,S.__)("Unable to duplicate Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function WE(){return{handleDelete:GE(),handleSave:UE(),handleDuplicate:jE()}}let qE=!1;function ZE({backPath:e}){const{records:t,isResolving:n,hasResolved:r}=(0,C.useEntityRecords)("postType",Le,yE),s=n&&!r,{getNavigationFallbackId:i}=ie((0,u.useSelect)(C.store)),o=t?.[0];o&&(qE=!0),o||n||!r||qE||i();const{handleSave:l,handleDelete:c,handleDuplicate:d}=WE(),m=!!t?.length;return s?(0,a.createElement)(KE,{backPath:e},(0,a.createElement)(E.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):s||m?1===t?.length?(0,a.createElement)(BE,{navigationMenu:o,backPath:e,handleDelete:()=>c(o),handleDuplicate:()=>d(o),handleSave:e=>l(o,e)}):(0,a.createElement)(KE,{backPath:e},(0,a.createElement)(E.__experimentalItemGroup,null,t?.map((({id:e,title:t,status:n},r)=>(0,a.createElement)(YE,{postId:e,key:e,withChevron:!0,icon:gE},function(e,t,n){return e?"publish"===n?(0,gn.decodeEntities)(e):(0,S.sprintf)((0,S.__)("%1$s (%2$s)"),(0,gn.decodeEntities)(e),n):(0,S.sprintf)((0,S.__)("(no title %s)"),t)}(t?.rendered,r+1,n)))))):(0,a.createElement)(KE,{description:(0,S.__)("No Navigation Menus found."),backPath:e})}function KE({children:e,actions:t,title:n,description:r,backPath:s}){return(0,a.createElement)(nE,{title:n||(0,S.__)("Navigation"),actions:t,description:r||(0,S.__)("Manage your Navigation Menus."),backPath:s,content:e})}const YE=({postId:e,...t})=>{const n=Mr({postId:e,path:"/navigation"});return(0,a.createElement)(aE,{...n,...t})},XE=window.wp.escapeHtml,JE=window.wp.wordcount;function QE({status:e,date:t,short:n}){const r=(0,Sm.humanTimeDiff)(t);let s=e;switch(e){case"publish":s=t?(0,h.createInterpolateElement)((0,S.sprintf)((0,S.__)("Published <time>%s</time>"),r),{time:(0,a.createElement)("time",{dateTime:t})}):(0,S.__)("Published");break;case"future":const e=(0,Sm.dateI18n)(n?"M j":"F j",(0,Sm.getDate)(t));s=t?(0,h.createInterpolateElement)((0,S.sprintf)((0,S.__)("Scheduled: <time>%s</time>"),e),{time:(0,a.createElement)("time",{dateTime:t})}):(0,S.__)("Scheduled");break;case"draft":s=(0,S.__)("Draft");break;case"pending":s=(0,S.__)("Pending");break;case"private":s=(0,S.__)("Private");break;case"protected":s=(0,S.__)("Password protected")}return(0,a.createElement)("div",{className:an("edit-site-sidebar-navigation-screen-page__status",{[`has-status has-${e}-status`]:!!e})},s)}const $E=189;function eS({id:e}){const{record:t}=(0,C.useEntityRecord)("postType","page",e),{parentTitle:n,templateTitle:r,isPostsPage:s}=(0,u.useSelect)((e=>{const{getEditedPostId:n}=ie(e(tn)),r=e(C.store).getEntityRecord("postType",ze,n()),s=r?.title?.rendered,i=t?.parent?e(C.store).getEntityRecord("postType","page",t.parent,{_fields:["title"]})?.title?.rendered:null,{getEntityRecord:a}=e(C.store),o=a("root","site");return{parentTitle:i,templateTitle:s,isPostsPage:t?.id===o?.page_for_posts}}),[t?.parent,t?.id]);return(0,a.createElement)(uE,{spacing:5,title:(0,S.__)("Details")},function(e){if(!e)return[];const t=[{label:(0,S.__)("Status"),value:(0,a.createElement)(QE,{status:e?.password?"protected":e.status,date:e?.date,short:!0})},{label:(0,S.__)("Slug"),value:(0,a.createElement)(E.__experimentalTruncate,{numberOfLines:1},(0,_n.safeDecodeURIComponent)(e.slug||e.generated_slug))}];e?.templateTitle&&t.push({label:(0,S.__)("Template"),value:(0,gn.decodeEntities)(e.templateTitle)}),e?.parentTitle&&t.push({label:(0,S.__)("Parent"),value:(0,gn.decodeEntities)(e.parentTitle||(0,S.__)("(no title)"))});const n=(0,S._x)("words","Word count type. Do not translate!"),r=e?.content?.rendered?(0,JE.count)(e.content.rendered,n):0,s=Math.round(r/$E);return r&&!e?.isPostsPage&&t.push({label:(0,S.__)("Words"),value:r.toLocaleString()||(0,S.__)("Unknown")},{label:(0,S.__)("Time to read"),value:s>1?(0,S.sprintf)((0,S.__)("%s mins"),s.toLocaleString()):(0,S.__)("< 1 min")}),t}({parentTitle:n,templateTitle:r,isPostsPage:s,...t}).map((({label:e,value:t})=>(0,a.createElement)(lE,{key:e},(0,a.createElement)(oE,null,e),(0,a.createElement)(cE,null,t)))))}const{useLocation:tS,useHistory:nS}=ie(rn.privateApis),{PostActions:rS}=ie(f.privateApis);function sS({backPath:e}){const{setCanvasMode:t}=ie((0,u.useDispatch)(tn)),n=nS(),{createSuccessNotice:r}=(0,u.useDispatch)(x.store),{params:{postId:s}}=tS(),{record:i,hasResolved:o}=(0,C.useEntityRecord)("postType","page",s),{featuredMediaAltText:l,featuredMediaSourceUrl:c}=(0,u.useSelect)((e=>{const{getEntityRecord:t}=e(C.store),n=i?.featured_media?t("postType","attachment",i?.featured_media):null;return{featuredMediaSourceUrl:n?.media_details.sizes?.medium?.source_url||n?.source_url,featuredMediaAltText:(0,XE.escapeAttribute)(n?.alt_text||n?.description?.raw||"")}}),[i]);(0,h.useEffect)((()=>{o&&!i&&n.push({path:"/page",postId:void 0,postType:void 0,canvas:"view"})}),[o,i,n]);const d=(0,h.useCallback)(((e,t)=>{switch(e){case"move-to-trash":n.push({path:"/"+t[0].type,postId:void 0,postType:void 0,canvas:"view"});break;case"duplicate-post":{const e=t[0],s="string"==typeof e.title?e.title:e.title?.rendered;r((0,S.sprintf)((0,S.__)('"%s" successfully created.'),s),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,S.__)("Edit"),onClick:()=>{n.push({path:void 0,postId:e.id,postType:e.type,canvas:"edit"})}}]})}}}),[n,r]),m=l?(0,gn.decodeEntities)(l):(0,gn.decodeEntities)(i?.title?.rendered||(0,S.__)("Featured image"));return i?(0,a.createElement)(nE,{backPath:e,title:(0,gn.decodeEntities)(i?.title?.rendered||(0,S.__)("(no title)")),actions:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(rS,{onActionPerformed:d,buttonProps:{size:"default"}}),(0,a.createElement)(K_,{onClick:()=>t("edit"),label:(0,S.__)("Edit"),icon:fr})),meta:(0,a.createElement)(E.ExternalLink,{className:"edit-site-sidebar-navigation-screen__page-link",href:i.link},(0,_n.filterURLForDisplay)((0,_n.safeDecodeURIComponent)(i.link))),content:(0,a.createElement)(a.Fragment,null,!!c&&(0,a.createElement)(E.__experimentalVStack,{className:"edit-site-sidebar-navigation-screen-page__featured-image-wrapper",alignment:"left",spacing:2},(0,a.createElement)("div",{className:"edit-site-sidebar-navigation-screen-page__featured-image has-image"},(0,a.createElement)("img",{alt:m,src:c}))),!!i?.excerpt?.rendered&&(0,a.createElement)(E.__experimentalTruncate,{className:"edit-site-sidebar-navigation-screen-page__excerpt",numberOfLines:3},(0,Y_.__unstableStripHTML)(i.excerpt.rendered)),(0,a.createElement)(eS,{id:s})),footer:i?.modified?(0,a.createElement)(dE,{record:i}):null}):null}const{useLocation:iS}=ie(rn.privateApis);function aS({title:e,slug:t,customViewId:n,type:r,icon:s,isActive:i,isCustom:o,suffix:l}){const{params:{path:c,layout:u}}=iS(),d=s||xh.find((e=>e.type===r)).icon,m=Mr({path:c,layout:u,activeView:o?n:t,isCustom:o?"true":"false"});return(0,a.createElement)(E.__experimentalHStack,{justify:"flex-start",className:an("edit-site-sidebar-dataviews-dataview-item",{"is-selected":i})},(0,a.createElement)(aE,{icon:d,...m,"aria-current":i?"true":void 0},e),l)}const oS=[];function lS({template:e,isActive:t}){const{text:n,icon:r}=Rw(e.type,e.id);return(0,a.createElement)(aS,{key:n,slug:n,title:n,icon:r,isActive:t,isCustom:!1})}function cS({activeView:e,title:t}){const{records:n}=(0,C.useEntityRecords)("postType",ze,{per_page:-1}),r=(0,h.useMemo)((()=>{var e;const t=n?.reduce(((e,t)=>{const n=t.author_text;return n&&!e[n]&&(e[n]=t),e}),{});return null!==(e=t&&Object.values(t))&&void 0!==e?e:oS}),[n]);return(0,a.createElement)(E.__experimentalItemGroup,null,(0,a.createElement)(aS,{slug:"all",title:t,icon:cr,isActive:"all"===e,isCustom:!1}),r.map((t=>(0,a.createElement)(lS,{key:t.author_text,template:t,isActive:e===t.author_text}))))}const{useLocation:uS}=ie(rn.privateApis);function dS({backPath:e}){const{params:{activeView:t="all"}}=uS();return(0,a.createElement)(nE,{title:(0,S.__)("Manage templates"),description:(0,S.__)("Create new templates, or reset any customizations made to the templates supplied by your theme."),backPath:e,content:(0,a.createElement)(cS,{activeView:t,title:(0,S.__)("All templates")})})}function mS({postId:e,area:t,title:n}){const r=(0,u.useSelect)((e=>e(f.store).__experimentalGetDefaultTemplatePartAreas().find((e=>e.area===t))),[t]),s=Mr({postType:He,postId:e});return(0,a.createElement)(aE,{className:"edit-site-sidebar-navigation-screen-template__template-area-button",...s,icon:r?.icon,withChevron:!0},(0,a.createElement)(E.__experimentalTruncate,{limit:20,ellipsizeMode:"tail",numberOfLines:1,className:"edit-site-sidebar-navigation-screen-template__template-area-label-text"},(0,gn.decodeEntities)(n)))}function pS(){const{templatePartAreas:e,currentTemplateParts:t}=(0,u.useSelect)((e=>{const{getSettings:t,getCurrentTemplateTemplateParts:n}=ie(e(tn));return{templatePartAreas:t()?.defaultTemplatePartAreas,currentTemplateParts:n()}}),[]),n=(0,h.useMemo)((()=>{const n=new Set;return t.length&&e?t.filter((e=>{if(!n.has(e.templatePart.id))return n.add(e.templatePart.id),e})).map((({templatePart:t,block:n})=>({...e?.find((({area:e})=>e===t?.area)),...t,clientId:n.clientId}))):[]}),[t,e]);return n.length?(0,a.createElement)(uE,{title:(0,S.__)("Areas"),spacing:3},(0,a.createElement)(E.__experimentalItemGroup,null,n.map((({clientId:e,label:t,area:n,theme:r,slug:s,title:i})=>(0,a.createElement)(lE,{key:e},(0,a.createElement)(mS,{postId:`${r}//${s}`,title:i?.rendered||t,area:n})))))):null}function hS({post:e}){const t=(0,gn.decodeEntities)("string"==typeof e.title?e.title:e.title.rendered),[n,r]=(0,h.useState)(t),[s,i]=(0,h.useState)(!1),{editEntityRecord:o,__experimentalSaveSpecifiedEntityEdits:l}=(0,u.useDispatch)(C.store),{createSuccessNotice:c,createErrorNotice:d}=(0,u.useDispatch)(x.store);if(e.type===ze&&!e.is_custom)return null;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.MenuItem,{onClick:()=>{i(!0),r(t)}},(0,S.__)("Rename")),s&&(0,a.createElement)(E.Modal,{title:(0,S.__)("Rename"),onRequestClose:()=>{i(!1)},overlayClassName:"edit-site-list__rename-modal",focusOnMount:"firstContentElement"},(0,a.createElement)("form",{onSubmit:async function(s){if(s.preventDefault(),n!==t)try{await o("postType",e.type,e.id,{title:n}),r(""),i(!1),await l("postType",e.type,e.id,["title"],{throwOnError:!0}),c((0,S.__)("Name updated."),{id:"template-update",type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,S.__)("An error occurred while updating the name.");d(t,{type:"snackbar"})}}},(0,a.createElement)(E.__experimentalVStack,{spacing:"5"},(0,a.createElement)(E.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,S.__)("Name"),value:n,onChange:r,required:!0}),(0,a.createElement)(E.__experimentalHStack,{justify:"right"},(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{i(!1)}},(0,S.__)("Cancel")),(0,a.createElement)(E.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,S.__)("Save")))))))}function fS({postType:e,postId:t,className:n,toggleProps:r,onRemove:s}){const i=(0,u.useSelect)((n=>n(C.store).getEntityRecord("postType",e,t)),[e,t]),{removeTemplate:o}=(0,u.useDispatch)(tn),l=br(i),c=wr(i);return l||c?(0,a.createElement)(E.DropdownMenu,{icon:ai,label:(0,S.__)("Actions"),className:n,toggleProps:r},(({onClose:e})=>(0,a.createElement)(E.MenuGroup,null,l&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(hS,{post:i,onClose:e}),(0,a.createElement)(vS,{onRemove:()=>{o(i),s?.(),e()},title:i.title.rendered})),c&&(0,a.createElement)(gS,{template:i,onClose:e})))):null}function gS({template:e,onClose:t}){const[n,r]=(0,h.useState)(!1),{revertTemplate:s}=(0,u.useDispatch)(tn),{saveEditedEntityRecord:i}=(0,u.useDispatch)(C.store),{createSuccessNotice:o,createErrorNotice:l}=(0,u.useDispatch)(x.store);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.MenuItem,{onClick:()=>r(!0)},(0,S.__)("Reset")),(0,a.createElement)(E.__experimentalConfirmDialog,{isOpen:n,onConfirm:()=>{!async function(){try{await s(e,{allowUndo:!1}),await i("postType",e.type,e.id),o((0,S.sprintf)((0,S.__)('"%s" reset.'),(0,gn.decodeEntities)(e.title.rendered)),{type:"snackbar",id:"edit-site-template-reverted"})}catch(t){const n=e.type===ze?(0,S.__)("An error occurred while reverting the template."):(0,S.__)("An error occurred while reverting the template part."),r=t.message&&"unknown_error"!==t.code?t.message:n;l(r,{type:"snackbar"})}}(),t()},onCancel:()=>r(!1),confirmButtonText:(0,S.__)("Reset")},(0,S.__)("Reset to default and clear all customizations?")))}function vS({onRemove:e,title:t}){const[n,r]=(0,h.useState)(!1);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.MenuItem,{isDestructive:!0,onClick:()=>r(!0)},(0,S.__)("Delete")),(0,a.createElement)(E.__experimentalConfirmDialog,{isOpen:n,onConfirm:e,onCancel:()=>r(!1),confirmButtonText:(0,S.__)("Delete")},(0,S.sprintf)((0,S.__)('Are you sure you want to delete "%s"?'),(0,gn.decodeEntities)(t))))}const yS={};function bS(){const{editEntityRecord:e}=(0,u.useDispatch)(C.store),{allowCommentsOnNewPosts:t,postsPerPage:n,postsPageTitle:r,postsPageId:s}=(0,u.useSelect)((e=>{const{getEntityRecord:t}=e(C.store),n=t("root","site"),r=n?.page_for_posts?t("postType","page",n?.page_for_posts):yS;return{allowCommentsOnNewPosts:"open"===n?.default_comment_status,postsPageTitle:r?.title?.rendered,postsPageId:r?.id,postsPerPage:n?.posts_per_page}}),[]),[i,o]=(0,h.useState)(""),[l,c]=(0,h.useState)(1),[d,m]=(0,h.useState)("");(0,h.useEffect)((()=>{o(t),m(r),c(n)}),[r,t,n]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(uE,{spacing:6},s&&(0,a.createElement)(lE,null,(0,a.createElement)(E.__experimentalInputControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:(0,S.__)("No Title"),size:"__unstable-large",value:d,onChange:(0,w.debounce)((t=>{m(t),e("postType","page",s,{title:t})}),300),label:(0,S.__)("Blog title"),help:(0,S.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media.")})),(0,a.createElement)(lE,null,(0,a.createElement)(E.__experimentalNumberControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:0,value:l,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:t=>{c(t),e("root","site",void 0,{posts_per_page:t})},label:(0,S.__)("Posts per page"),help:(0,S.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.")}))),(0,a.createElement)(uE,{title:(0,S.__)("Discussion"),spacing:3},(0,a.createElement)(lE,null,(0,a.createElement)(E.CheckboxControl,{className:"edit-site-sidebar-navigation-screen__input-control",label:(0,S.__)("Allow comments on new posts"),help:(0,S.__)("Changes will apply to new posts only. Individual posts may override these settings."),checked:i,onChange:t=>{o(t),e("root","site",void 0,{default_comment_status:t?"open":null})}}))))}const{useHistory:wS,useLocation:_S}=ie(rn.privateApis);function ES({backPath:e}){const t=wS(),{params:{postType:n,postId:r}}=_S(),{setCanvasMode:s}=ie((0,u.useDispatch)(tn)),{title:i,content:o,description:l,footer:c}=function(e,t){const{getDescription:n,getTitle:r,record:s}=yr(e,t),i=(0,u.useSelect)((e=>e(C.store).getCurrentTheme()),[]),o=Rw(e,t),l="theme"===o.type&&s.theme===i?.stylesheet,c=r();let d=n();!d&&o.text&&(d=(0,S.__)("This is a custom template that can be applied manually to any Post or Page."));const m="home"===s?.slug||"index"===s?.slug?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(bS,null),(0,a.createElement)(pS,null)):(0,a.createElement)(pS,null),p=s?.modified?(0,a.createElement)(dE,{record:s}):null;return{title:c,description:(0,a.createElement)(a.Fragment,null,d,o.text&&!l&&(0,a.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description"},(0,a.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author"},(0,a.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author-icon"},o.imageUrl?(0,a.createElement)("img",{src:o.imageUrl,alt:"",width:"24",height:"24"}):(0,a.createElement)(E.Icon,{icon:o.icon})),o.text),o.isCustomized&&(0,a.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-customized"},(0,S._x)("(Customized)","template")))),content:m,footer:p}}(n,r);return(0,a.createElement)(nE,{title:i,backPath:e,actions:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(fS,{postType:n,postId:r,toggleProps:{as:K_},onRemove:()=>{t.push({path:"/"+n})}}),(0,a.createElement)(K_,{onClick:()=>s("edit"),label:(0,S.__)("Edit"),icon:fr})),description:l,content:o,footer:c})}function SS(e,t){var n=e.toLowerCase();return 0===t?function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(n):n}function xS(e){return(0,u.useSelect)((t=>{if(!e)return;const n=t(C.store).getEditedEntityRecord("postType",Le,e);return"trash"===n.status?void 0:n.title}),[e])}function CS({id:e}){const t=xS(e);return e&&void 0!==t?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},t||(0,S.__)("Navigation")),(0,a.createElement)(VE,{navigationMenuId:e})):null}function kS({id:e}){const t=xS(e),n=Mr({postId:e,postType:Le});return e&&void 0!==t?(0,a.createElement)(aE,{withChevron:!0,...n},t||(0,S.__)("(no title)")):null}function PS({menus:e}){return(0,a.createElement)(E.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu-list"},e.map((e=>(0,a.createElement)(kS,{key:e,id:e}))))}function IS({menus:e}){return e.length?1===e.length?(0,a.createElement)(CS,{id:e[0]}):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},(0,S.__)("Navigation")),(0,a.createElement)(PS,{menus:e})):null}function TS(e,t){const{record:n}=yr(e,t);if(e!==He)return;const r=function(e){return e?.blocks?e?.blocks:e?.content&&"function"!=typeof e.content?(0,l.parse)(e.content):[]}(n),s=function(e,t){if(!e||!t?.length)return[];const n=t=>{if(!t)return[];const r=[];for(const s of t)if(s.name===e&&r.push(s),s?.innerBlocks){const e=n(s.innerBlocks);e.length&&r.push(...e)}return r};return n(t)}("core/navigation",r);if(!s.length)return;const i=s?.map((e=>e.attributes.ref)),o=[...new Set(i)].filter((e=>e));return o?.length?(0,a.createElement)(IS,{menus:o}):void 0}function OS(e,t){const{getDescription:n,getTitle:r,record:s}=yr(e,t),i=(0,u.useSelect)((e=>e(f.store).__experimentalGetDefaultTemplatePartAreas()),[]),{currentTheme:o,userPatternCategories:l}=(0,u.useSelect)((e=>{const{getCurrentTheme:t,getUserPatternCategories:n}=e(C.store);return{currentTheme:t(),userPatternCategories:n()}}),[]),c=Rw(e,t),d="theme"===c.type&&s.theme===o?.stylesheet,m=r();let p=n();!p&&c.text&&(p=e===We.user?(0,S.sprintf)((0,S.__)("This is the %s pattern."),r()):(0,S.sprintf)((0,S.__)("This is the %s template part."),r())),!p&&e===We.user&&s?.title&&(p=(0,S.sprintf)((0,S.__)("This is the %s pattern."),s.title));const h=s?.modified?(0,a.createElement)(dE,{record:s}):null,g=[];if((e===We.user||e===He)&&(g.push({label:(0,S.__)("Syncing"),value:s.wp_pattern_sync_status===Ye.unsynced?(0,S._x)("Not synced","Text that indicates that the pattern is not synchronized"):(0,S._x)("Synced","Text that indicates that the pattern is synchronized")}),0===s.wp_pattern_category?.length&&g.push({label:(0,S.__)("Categories"),value:(0,S.__)("Uncategorized")}),s.wp_pattern_category?.length>0)){const e=new Map;l.forEach((t=>e.set(t.id,t)));const t=s.wp_pattern_category.filter((t=>e.get(t))).map((t=>e.get(t).label));g.push({label:(0,S.__)("Categories"),value:t.length>0?t.join(", "):""})}if(e===He){const e=i.find((e=>e.area===s.area));let t=e?.label;t||(t=s.area?(0,S.sprintf)((0,S.__)("%s (removed)"),(v=s.area,void 0===y&&(y={}),js(v,zs({delimiter:" ",transform:SS},y)))):(0,S.__)("None")),g.push({label:(0,S.__)("Area"),value:t})}var v,y;e===He&&c.text&&!d&&g.push({label:(0,S.__)("Added by"),value:(0,a.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-author"},c.text)}),e!==He||!c.text||s.origin!==Ge.plugin&&!0!==s.has_theme_file||g.push({label:(0,S.__)("Customized"),value:(0,a.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-customized"},c.isCustomized?(0,S.__)("Yes"):(0,S.__)("No"))});return{title:m,description:p,content:(0,a.createElement)(a.Fragment,null,TS(e,t),!!g.length&&(0,a.createElement)(uE,{spacing:5,title:(0,S.__)("Details")},g.map((({label:e,value:t})=>(0,a.createElement)(lE,{key:e},(0,a.createElement)(oE,null,e),(0,a.createElement)(cE,null,t)))))),footer:h}}const{useLocation:AS,useHistory:MS}=ie(rn.privateApis);function NS({backPath:e}){const t=MS(),n=AS(),{params:{postType:r,postId:s}}=n,{setCanvasMode:i}=ie((0,u.useDispatch)(tn));fn();const o=OS(r,s);return(0,a.createElement)(nE,{actions:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(fS,{postType:r,postId:s,toggleProps:{as:K_},onRemove:()=>{t.push(e)}}),(0,a.createElement)(K_,{onClick:()=>i("edit"),label:(0,S.__)("Edit"),icon:fr})),backPath:e,...o})}const FS=(0,a.createElement)(vn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(vn.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})),VS=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),RS=(0,a.createElement)(vn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(vn.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),{useHistory:BS,useLocation:DS}=ie(rn.privateApis),{CreatePatternModal:LS,useAddPatternCategory:zS}=ie(De.privateApis);function HS(){const e=BS(),{params:t}=DS(),[n,r]=(0,h.useState)(!1),[s,i]=(0,h.useState)(!1),{createPatternFromFile:o}=ie((0,u.useDispatch)(De.store)),{createSuccessNotice:l,createErrorNotice:c}=(0,u.useDispatch)(x.store),d=(0,h.useRef)(),m=(0,u.useSelect)((e=>e(C.store).getCurrentTheme()?.is_block_theme),[]);function p(){r(!1),i(!1)}const f=[];f.push({icon:vr,onClick:()=>r(!0),title:(0,S.__)("Create pattern")}),m&&f.push({icon:Ds,onClick:()=>i(!0),title:(0,S.__)("Create template part")}),f.push({icon:VS,onClick:()=>{d.current.click()},title:(0,S.__)("Import pattern from JSON")});const{categoryMap:g,findOrCreateTerm:v}=zS();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.DropdownMenu,{controls:f,toggleProps:{as:K_},icon:RS,label:(0,S.__)("Create pattern")}),n&&(0,a.createElement)(LS,{onClose:()=>r(!1),onSuccess:function({pattern:t,categoryId:n}){r(!1),e.push({postId:t.id,postType:We.user,categoryType:We.theme,categoryId:n,canvas:"edit"})},onError:p}),s&&(0,a.createElement)(Xs,{closeModal:()=>i(!1),blocks:[],onCreate:function(t){i(!1),e.push({postId:t.id,postType:He,canvas:"edit"})},onError:p}),(0,a.createElement)("input",{type:"file",accept:".json",hidden:!0,ref:d,onChange:async n=>{const r=n.target.files?.[0];if(r)try{let n;if(t.categoryType!==He){const e=g.values().find((e=>e.name===t.categoryId));e&&(n=e.id||await v(e.label))}const s=await o(r,n?[n]:void 0);n||"my-patterns"===t.categoryId||e.push({path:"/patterns",categoryType:We.theme,categoryId:qe}),l((0,S.sprintf)((0,S.__)('Imported "%s" from JSON.'),s.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(e){c(e.message,{type:"snackbar",id:"import-pattern-error"})}finally{n.target.value=""}}}))}function GS({count:e,icon:t,id:n,isActive:r,label:s,type:i,path:o="/patterns"}){const l=Mr({path:o,categoryType:i,categoryId:n});if(e)return(0,a.createElement)(aE,{...l,icon:t,suffix:(0,a.createElement)("span",null,e),"aria-current":r?"true":void 0},s)}const US=e=>{const t=e||[],n=(0,u.useSelect)((e=>e(f.store).__experimentalGetDefaultTemplatePartAreas()),[]),r={header:{},footer:{},sidebar:{},uncategorized:{}};n.forEach((e=>r[e.area]={...e,templateParts:[]}));return t.reduce(((e,t)=>(e[e[t.area]?t.area:Ue].templateParts.push(t),e)),r)};const{useLocation:jS}=ie(rn.privateApis);function WS({path:e,templatePartAreas:t,patternCategories:n,currentCategory:r,currentType:s}){const[i,...o]=n;return(0,a.createElement)(E.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},(0,a.createElement)(GS,{key:"all",path:e,count:Object.values(t).map((({templateParts:e})=>e?.length||0)).reduce(((e,t)=>e+t),0),icon:(0,f.getTemplatePartIcon)(),label:(0,S.__)("All template parts"),id:je,type:He,isActive:r===je&&s===He}),Object.entries(t).map((([t,{label:n,templateParts:i}])=>(0,a.createElement)(GS,{key:t,path:e,count:i?.length,icon:(0,f.getTemplatePartIcon)(t),label:n,id:t,type:He,isActive:r===t&&s===He}))),(0,a.createElement)("div",{className:"edit-site-sidebar-navigation-screen-patterns__divider"}),i&&(0,a.createElement)(GS,{key:i.name,path:e,count:i.count,label:i.label,icon:FS,id:i.name,type:"pattern",isActive:r===`${i.name}`&&(s===We.theme||s===We.user)}),o.map((t=>(0,a.createElement)(GS,{key:t.name,path:e,count:t.count,label:t.label,icon:FS,id:t.name,type:"pattern",isActive:r===`${t.name}`&&(s===We.theme||s===We.user)}))))}function qS({backPath:e}){const{params:{categoryType:t,categoryId:n,path:r}}=jS(),s=n||qe,i=t||We.theme,{templatePartAreas:o,hasTemplateParts:l,isLoading:c}=function(){const{records:e,isResolving:t}=(0,C.useEntityRecords)("postType",He,{per_page:-1});return{hasTemplateParts:!!e&&!!e.length,isLoading:t,templatePartAreas:US(e)}}(),{patternCategories:d,hasPatterns:m}=kw(),p=(0,u.useSelect)((e=>e(C.store).getCurrentTheme()?.is_block_theme),[]);return(0,a.createElement)(nE,{isRoot:!p,title:(0,S.__)("Patterns"),description:(0,S.__)("Manage what patterns are available when editing the site."),backPath:e,actions:(0,a.createElement)(HS,null),content:(0,a.createElement)(a.Fragment,null,c&&(0,S.__)("Loading items…"),!c&&(0,a.createElement)(a.Fragment,null,!l&&!m&&(0,a.createElement)(E.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},(0,a.createElement)(E.__experimentalItem,null,(0,S.__)("No items found"))),(0,a.createElement)(WS,{path:r,templatePartAreas:o,patternCategories:d,currentCategory:s,currentType:i})))})}const{useHistory:ZS,useLocation:KS}=ie(rn.privateApis);function YS({type:e,setIsAdding:t}){const{params:{path:n}}=KS(),r=ZS(),{saveEntityRecord:s}=(0,u.useDispatch)(C.store),[i,o]=(0,h.useState)(""),[l,c]=(0,h.useState)(!1);return(0,a.createElement)("form",{onSubmit:async a=>{a.preventDefault(),c(!0);const{getEntityRecords:o}=(0,u.resolveSelect)(C.store);let l;const d=await o("taxonomy","wp_dataviews_type",{slug:e});if(d&&d.length>0)l=d[0].id;else{const t=await s("taxonomy","wp_dataviews_type",{name:e});t&&t.id&&(l=t.id)}const m=await s("postType","wp_dataviews",{title:i,status:"publish",wp_dataviews_type:l,content:JSON.stringify(ab[e][0].view)});r.push({path:n,activeView:m.id,isCustom:"true"}),c(!1),t(!1)}},(0,a.createElement)(E.__experimentalVStack,{spacing:"5"},(0,a.createElement)(E.TextControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Name"),value:i,onChange:o,placeholder:(0,S.__)("My view"),className:"patterns-create-modal__name-input"}),(0,a.createElement)(E.__experimentalHStack,{justify:"right"},(0,a.createElement)(E.Button,{variant:"tertiary",onClick:()=>{t(!1)}},(0,S.__)("Cancel")),(0,a.createElement)(E.Button,{variant:"primary",type:"submit","aria-disabled":!i||l,isBusy:l},(0,S.__)("Create")))))}function XS({type:e}){const[t,n]=(0,h.useState)(!1);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(aE,{icon:RS,onClick:()=>{n(!0)},className:"dataviews__siderbar-content-add-new-item"},(0,S.__)("New view")),t&&(0,a.createElement)(E.Modal,{title:(0,S.__)("Add new view"),onRequestClose:()=>{n(!1)}},(0,a.createElement)(YS,{type:e,setIsAdding:n})))}const{useHistory:JS,useLocation:QS}=ie(rn.privateApis),$S=[];function ex({dataviewId:e,currentTitle:t,setIsRenaming:n}){const{editEntityRecord:r}=(0,u.useDispatch)(C.store),[s,i]=(0,h.useState)(t);return(0,a.createElement)("form",{onSubmit:async t=>{t.preventDefault(),await r("postType","wp_dataviews",e,{title:s}),n(!1)}},(0,a.createElement)(E.__experimentalVStack,{spacing:"5"},(0,a.createElement)(E.TextControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Name"),value:s,onChange:i,placeholder:(0,S.__)("My view"),className:"patterns-create-modal__name-input"}),(0,a.createElement)(E.__experimentalHStack,{justify:"right"},(0,a.createElement)(E.Button,{variant:"tertiary",onClick:()=>{n(!1)}},(0,S.__)("Cancel")),(0,a.createElement)(E.Button,{variant:"primary",type:"submit","aria-disabled":!s},(0,S.__)("Rename")))))}function tx({dataviewId:e,isActive:t}){const{params:{path:n}}=QS(),r=JS(),{dataview:s}=(0,u.useSelect)((t=>{const{getEditedEntityRecord:n}=t(C.store);return{dataview:n("postType","wp_dataviews",e)}}),[e]),{deleteEntityRecord:i}=(0,u.useDispatch)(C.store),o=(0,h.useMemo)((()=>JSON.parse(s.content).type),[s.content]),[l,c]=(0,h.useState)(!1);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(aS,{title:s.title,type:o,isActive:t,isCustom:!0,customViewId:e,suffix:(0,a.createElement)(E.DropdownMenu,{icon:ai,label:(0,S.__)("Actions"),className:"edit-site-sidebar-dataviews-dataview-item__dropdown-menu",toggleProps:{style:{color:"inherit"},size:"small"}},(({onClose:e})=>(0,a.createElement)(E.MenuGroup,null,(0,a.createElement)(E.MenuItem,{onClick:()=>{c(!0),e()}},(0,S.__)("Rename")),(0,a.createElement)(E.MenuItem,{onClick:async()=>{await i("postType","wp_dataviews",s.id,{force:!0}),t&&r.replace({path:n}),e()},isDestructive:!0},(0,S.__)("Delete")))))}),l&&(0,a.createElement)(E.Modal,{title:(0,S.__)("Rename view"),onRequestClose:()=>{c(!1)}},(0,a.createElement)(ex,{dataviewId:e,setIsRenaming:c,currentTitle:s.title})))}function nx({type:e,activeView:t,isCustom:n}){const r=function(e){return(0,u.useSelect)((t=>{const{getEntityRecords:n}=t(C.store),r=n("taxonomy","wp_dataviews_type",{slug:e});if(!r||0===r.length)return $S;return n("postType","wp_dataviews",{wp_dataviews_type:r[0].id,orderby:"date",order:"asc"})||$S}))}(e);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"edit-site-sidebar-navigation-screen-dataviews__group-header"},(0,a.createElement)(E.__experimentalHeading,{level:2},(0,S.__)("Custom Views"))),(0,a.createElement)(E.__experimentalItemGroup,null,r.map((e=>(0,a.createElement)(tx,{key:e.id,dataviewId:e.id,isActive:n&&Number(t)===e.id}))),(0,a.createElement)(XS,{type:e})))}const{useLocation:rx}=ie(rn.privateApis),sx={"/page":"page"};function ix(){const{params:{path:e,activeView:t="all",isCustom:n="false"}}=rx();if(!e||!sx[e])return null;const r="true"===n,s=sx[e];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(E.__experimentalItemGroup,null,ab[s].map((e=>(0,a.createElement)(aS,{key:e.slug,slug:e.slug,title:e.title,icon:e.icon,type:e.view.type,isActive:!r&&e.slug===t,isCustom:!1})))),window?.__experimentalCustomViews&&(0,a.createElement)(nx,{activeView:t,type:s,isCustom:!0}))}const{useLocation:ax,useHistory:ox}=ie(rn.privateApis);var lx=xx(),cx=e=>wx(e,lx),ux=xx();cx.write=e=>wx(e,ux);var dx=xx();cx.onStart=e=>wx(e,dx);var mx=xx();cx.onFrame=e=>wx(e,mx);var px=xx();cx.onFinish=e=>wx(e,px);var hx=[];cx.setTimeout=(e,t)=>{let n=cx.now()+t,r=()=>{let e=hx.findIndex((e=>e.cancel==r));~e&&hx.splice(e,1),yx-=~e?1:0},s={time:n,handler:e,cancel:r};return hx.splice(fx(n),0,s),yx+=1,_x(),s};var fx=e=>~(~hx.findIndex((t=>t.time>e))||~hx.length);cx.cancel=e=>{dx.delete(e),mx.delete(e),px.delete(e),lx.delete(e),ux.delete(e)},cx.sync=e=>{bx=!0,cx.batchedUpdates(e),bx=!1},cx.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,cx.onStart(n)}return r.handler=e,r.cancel=()=>{dx.delete(n),t=null},r};var gx=typeof window<"u"?window.requestAnimationFrame:()=>{};cx.use=e=>gx=e,cx.now=typeof performance<"u"?()=>performance.now():Date.now,cx.batchedUpdates=e=>e(),cx.catch=console.error,cx.frameLoop="always",cx.advance=()=>{"demand"!==cx.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Sx()};var vx=-1,yx=0,bx=!1;function wx(e,t){bx?(t.delete(e),e(0)):(t.add(e),_x())}function _x(){vx<0&&(vx=0,"demand"!==cx.frameLoop&&gx(Ex))}function Ex(){~vx&&(gx(Ex),cx.batchedUpdates(Sx))}function Sx(){let e=vx;vx=cx.now();let t=fx(vx);t&&(Cx(hx.splice(0,t),(e=>e.handler())),yx-=t),yx?(dx.flush(),lx.flush(e?Math.min(64,vx-e):16.667),mx.flush(),ux.flush(),px.flush()):vx=-1}function xx(){let e=new Set,t=e;return{add(n){yx+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(yx-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,yx-=t.size,Cx(t,(t=>t(n)&&e.add(t))),yx+=e.size,t=e)}}}function Cx(e,t){e.forEach((e=>{try{t(e)}catch(e){cx.catch(e)}}))}var kx=Object.defineProperty,Px={};function Ix(){}((e,t)=>{for(var n in t)kx(e,n,{get:t[n],enumerable:!0})})(Px,{assign:()=>Gx,colors:()=>Lx,createStringInterpolator:()=>Vx,skipAnimation:()=>zx,to:()=>Rx,willAdvance:()=>Hx});var Tx={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Ox(e,t){if(Tx.arr(e)){if(!Tx.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Ax=(e,t)=>e.forEach(t);function Mx(e,t,n){if(Tx.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Nx=e=>Tx.und(e)?[]:Tx.arr(e)?e:[e];function Fx(e,t){if(e.size){let n=Array.from(e);e.clear(),Ax(n,t)}}var Vx,Rx,Bx=(e,...t)=>Fx(e,(e=>e(...t))),Dx=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Lx=null,zx=!1,Hx=Ix,Gx=e=>{e.to&&(Rx=e.to),e.now&&(cx.now=e.now),void 0!==e.colors&&(Lx=e.colors),null!=e.skipAnimation&&(zx=e.skipAnimation),e.createStringInterpolator&&(Vx=e.createStringInterpolator),e.requestAnimationFrame&&cx.use(e.requestAnimationFrame),e.batchedUpdates&&(cx.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Hx=e.willAdvance),e.frameLoop&&(cx.frameLoop=e.frameLoop)},Ux=new Set,jx=[],Wx=[],qx=0,Zx={get idle(){return!Ux.size&&!jx.length},start(e){qx>e.priority?(Ux.add(e),cx.onStart(Kx)):(Yx(e),cx(Jx))},advance:Jx,sort(e){if(qx)cx.onFrame((()=>Zx.sort(e)));else{let t=jx.indexOf(e);~t&&(jx.splice(t,1),Xx(e))}},clear(){jx=[],Ux.clear()}};function Kx(){Ux.forEach(Yx),Ux.clear(),cx(Jx)}function Yx(e){jx.includes(e)||Xx(e)}function Xx(e){jx.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(jx,(t=>t.priority>e.priority)),0,e)}function Jx(e){let t=Wx;for(let n=0;n<jx.length;n++){let r=jx[n];qx=r.priority,r.idle||(Hx(r),r.advance(e),r.idle||t.push(r))}return qx=0,(Wx=jx).length=0,(jx=t).length>0}var Qx="[-+]?\\d*\\.?\\d+",$x=Qx+"%";function eC(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var tC=new RegExp("rgb"+eC(Qx,Qx,Qx)),nC=new RegExp("rgba"+eC(Qx,Qx,Qx,Qx)),rC=new RegExp("hsl"+eC(Qx,$x,$x)),sC=new RegExp("hsla"+eC(Qx,$x,$x,Qx)),iC=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,aC=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,oC=/^#([0-9a-fA-F]{6})$/,lC=/^#([0-9a-fA-F]{8})$/;function cC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function uC(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r,i=cC(s,r,e+1/3),a=cC(s,r,e),o=cC(s,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*o)<<8}function dC(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function mC(e){return(parseFloat(e)%360+360)%360/360}function pC(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function hC(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function fC(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=oC.exec(e))?parseInt(t[1]+"ff",16)>>>0:Lx&&void 0!==Lx[e]?Lx[e]:(t=tC.exec(e))?(dC(t[1])<<24|dC(t[2])<<16|dC(t[3])<<8|255)>>>0:(t=nC.exec(e))?(dC(t[1])<<24|dC(t[2])<<16|dC(t[3])<<8|pC(t[4]))>>>0:(t=iC.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=lC.exec(e))?parseInt(t[1],16)>>>0:(t=aC.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=rC.exec(e))?(255|uC(mC(t[1]),hC(t[2]),hC(t[3])))>>>0:(t=sC.exec(e))?(uC(mC(t[1]),hC(t[2]),hC(t[3]))|pC(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var gC=(e,t,n)=>{if(Tx.fun(e))return e;if(Tx.arr(e))return gC({range:e,output:t,extrapolate:n});if(Tx.str(e.output[0]))return Vx(e);let r=e,s=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",o=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,s,i,a,o,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===o)return c;"clamp"===o&&(c=n)}return r===s?r:t===n?e<=t?r:s:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),r===-1/0?c=-c:s===1/0?c+=r:c=c*(s-r)+r,c)}(e,i[t],i[t+1],s[t],s[t+1],l,a,o,r.map)}};var vC=1.70158,yC=1.525*vC,bC=vC+1,wC=2*Math.PI/3,_C=2*Math.PI/4.5,EC=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,SC={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>bC*e*e*e-vC*e*e,easeOutBack:e=>1+bC*Math.pow(e-1,3)+vC*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(yC+1)*e-yC)/2:(Math.pow(2*e-2,2)*((yC+1)*(2*e-2)+yC)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*wC),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*wC)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*_C)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*_C)/2+1,easeInBounce:e=>1-EC(1-e),easeOutBounce:EC,easeInOutBounce:e=>e<.5?(1-EC(1-2*e))/2:(1+EC(2*e-1))/2,steps:(e,t="end")=>n=>{let r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},xC=Symbol.for("FluidValue.get"),CC=Symbol.for("FluidValue.observers"),kC=e=>Boolean(e&&e[xC]),PC=e=>e&&e[xC]?e[xC]():e,IC=e=>e[CC]||null;function TC(e,t){let n=e[CC];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var OC=class{[xC];[CC];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");AC(this,e)}},AC=(e,t)=>VC(e,xC,t);function MC(e,t){if(e[xC]){let n=e[CC];n||VC(e,CC,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function NC(e,t){let n=e[CC];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[CC]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var FC,VC=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),RC=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,BC=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,DC=new RegExp(`(${RC.source})(%|[a-z]+)`,"i"),LC=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,zC=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,HC=e=>{let[t,n]=GC(e);if(!t||Dx())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&zC.test(n)?HC(n):n||e},GC=e=>{let t=zC.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},UC=(e,t,n,r,s)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${s})`,jC=e=>{FC||(FC=Lx?new RegExp(`(${Object.keys(Lx).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>PC(e).replace(zC,HC).replace(BC,fC).replace(FC,fC))),n=t.map((e=>e.match(RC).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>gC({...e,output:t})));return e=>{let n=!DC.test(t[0])&&t.find((e=>DC.test(e)))?.replace(RC,""),s=0;return t[0].replace(RC,(()=>`${r[s++](e)}${n||""}`)).replace(LC,UC)}},WC="react-spring: ",qC=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${WC}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},ZC=qC(console.warn);qC(console.warn);function KC(e){return Tx.str(e)&&("#"==e[0]||/\d/.test(e)||!Dx()&&zC.test(e)||e in(Lx||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var YC=Dx()?a.useEffect:a.useLayoutEffect;function XC(){let e=(0,a.useState)()[1],t=(()=>{let e=(0,a.useRef)(!1);return YC((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var JC=[];var QC=Symbol.for("Animated:node"),$C=e=>e&&e[QC],ek=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,QC,t),tk=e=>e&&e[QC]&&e[QC].getPayload(),nk=class{payload;constructor(){ek(this,this)}getPayload(){return this.payload||[]}},rk=class extends nk{constructor(e){super(),this._value=e,Tx.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new rk(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Tx.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,Tx.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},sk=class extends rk{_string=null;_toString;constructor(e){super(0),this._toString=gC({output:[e,e]})}static create(e){return new sk(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Tx.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=gC({output:[this.getValue(),e]})),this._value=0,super.reset()}},ik={dependencies:null},ak=class extends nk{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Mx(this.source,((n,r)=>{(e=>!!e&&e[QC]===e)(n)?t[r]=n.getValue(e):kC(n)?t[r]=PC(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Ax(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Mx(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){ik.dependencies&&kC(e)&&ik.dependencies.add(e);let t=tk(e);t&&Ax(t,(e=>this.add(e)))}},ok=class extends ak{constructor(e){super(e)}static create(e){return new ok(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(lk)),!0)}};function lk(e){return(KC(e)?sk:rk).create(e)}function ck(e){let t=$C(e);return t?t.constructor:Tx.arr(e)?ok:KC(e)?sk:rk}var uk=(e,t)=>{let n=!Tx.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,a.forwardRef)(((r,s)=>{let i=(0,a.useRef)(null),o=n&&(0,a.useCallback)((e=>{i.current=function(e,t){return e&&(Tx.fun(e)?e(t):e.current=t),t}(s,e)}),[s]),[l,c]=function(e,t){let n=new Set;return ik.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ak(e),ik.dependencies=null,[e,n]}(r,t),u=XC(),d=()=>{let e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&u()},m=new dk(d,c),p=(0,a.useRef)();YC((()=>(p.current=m,Ax(c,(e=>MC(e,m))),()=>{p.current&&(Ax(p.current.deps,(e=>NC(e,p.current))),cx.cancel(p.current.update))}))),(0,a.useEffect)(d,[]),(e=>{(0,a.useEffect)(e,JC)})((()=>()=>{let e=p.current;Ax(e.deps,(t=>NC(t,e)))}));let h=t.getComponentProps(l.getValue());return a.createElement(e,{...h,ref:o})}))},dk=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&cx.write(this.update)}};var mk=Symbol.for("AnimatedComponent"),pk=e=>Tx.str(e)?e:e&&Tx.str(e.displayName)?e.displayName:Tx.fun(e)&&e.name||null;function hk(e,...t){return Tx.fun(e)?e(...t):e}var fk=(e,t)=>!0===e||!!(t&&e&&(Tx.fun(e)?e(t):Nx(e).includes(t))),gk=(e,t)=>Tx.obj(e)?t&&e[t]:e,vk=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,yk=e=>e,bk=(e,t=yk)=>{let n=wk;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let r={};for(let s of n){let n=t(e[s],s);Tx.und(n)||(r[s]=n)}return r},wk=["config","onProps","onStart","onChange","onPause","onResume","onRest"],_k={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Ek(e){let t=function(e){let t={},n=0;if(Mx(e,((e,r)=>{_k[r]||(t[r]=e,n++)})),n)return t}(e);if(t){let n={to:t};return Mx(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function Sk(e){return e=PC(e),Tx.arr(e)?e.map(Sk):KC(e)?Px.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function xk(e){return Tx.fun(e)||Tx.arr(e)&&Tx.obj(e[0])}var Ck={tension:170,friction:26,mass:1,damping:1,easing:SC.linear,clamp:!1},kk=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Ck)}};function Pk(e,t){if(Tx.und(t.decay)){let n=!Tx.und(t.tension)||!Tx.und(t.friction);(n||!Tx.und(t.frequency)||!Tx.und(t.damping)||!Tx.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Ik=[],Tk=class{changed=!1;values=Ik;toValues=null;fromValues=Ik;to;from;config=new kk;immediate=!1};function Ok(e,{key:t,props:n,defaultProps:r,state:s,actions:i}){return new Promise(((a,o)=>{let l,c,u=fk(n.cancel??r?.cancel,t);if(u)p();else{Tx.und(n.pause)||(s.paused=fk(n.pause,t));let e=r?.pause;!0!==e&&(e=s.paused||fk(e,t)),l=hk(n.delay||0,t),e?(s.resumeQueue.add(m),i.pause()):(i.resume(),m())}function d(){s.resumeQueue.add(m),s.timeouts.delete(c),c.cancel(),l=c.time-cx.now()}function m(){l>0&&!Px.skipAnimation?(s.delayed=!0,c=cx.setTimeout(p,l),s.pauseQueue.add(d),s.timeouts.add(c)):p()}function p(){s.delayed&&(s.delayed=!1),s.pauseQueue.delete(d),s.timeouts.delete(c),e<=(s.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},a)}catch(e){o(e)}}}))}var Ak=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Fk(e.get()):t.every((e=>e.noop))?Mk(e.get()):Nk(e.get(),t.every((e=>e.finished))),Mk=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Nk=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Fk=e=>({value:e,cancelled:!0,finished:!1});function Vk(e,t,n,r){let{callId:s,parentId:i,onRest:a}=t,{asyncTo:o,promise:l}=n;return i||e!==o||t.reset?n.promise=(async()=>{n.asyncId=s,n.asyncTo=e;let c,u,d,m=bk(t,((e,t)=>"onRest"===t?void 0:e)),p=new Promise(((e,t)=>(c=e,u=t))),h=e=>{let t=s<=(n.cancelId||0)&&Fk(r)||s!==n.asyncId&&Nk(r,!1);if(t)throw e.result=t,u(e),e},f=(e,t)=>{let i=new Bk,a=new Dk;return(async()=>{if(Px.skipAnimation)throw Rk(n),a.result=Nk(r,!1),u(a),a;h(i);let o=Tx.obj(e)?{...e}:{...t,to:e};o.parentId=s,Mx(m,((e,t)=>{Tx.und(o[t])&&(o[t]=e)}));let l=await r.start(o);return h(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};if(Px.skipAnimation)return Rk(n),Nk(r,!1);try{let t;t=Tx.arr(e)?(async e=>{for(let t of e)await f(t)})(e):Promise.resolve(e(f,r.stop.bind(r))),await Promise.all([t.then(c),p]),d=Nk(r.get(),!0,!1)}catch(e){if(e instanceof Bk)d=e.result;else{if(!(e instanceof Dk))throw e;d=e.result}}finally{s==n.asyncId&&(n.asyncId=i,n.asyncTo=i?o:void 0,n.promise=i?l:void 0)}return Tx.fun(a)&&cx.batchedUpdates((()=>{a(d,r,r.item)})),d})():l}function Rk(e,t){Fx(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Bk=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Dk=class extends Error{result;constructor(){super("SkipAnimationSignal")}},Lk=e=>e instanceof Hk,zk=1,Hk=class extends OC{id=zk++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=$C(this);return e&&e.getValue()}to(...e){return Px.to(this,e)}interpolate(...e){return ZC(`${WC}The "interpolate" function is deprecated in v9 (use "to" instead)`),Px.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){TC(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Zx.sort(this),TC(this,{type:"priority",parent:this,priority:e})}},Gk=Symbol.for("SpringPhase"),Uk=e=>(1&e[Gk])>0,jk=e=>(2&e[Gk])>0,Wk=e=>(4&e[Gk])>0,qk=(e,t)=>t?e[Gk]|=3:e[Gk]&=-3,Zk=(e,t)=>t?e[Gk]|=4:e[Gk]&=-5,Kk=class extends Hk{key;animation=new Tk;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!Tx.und(e)||!Tx.und(t)){let n=Tx.obj(e)?{...e}:{...t,from:e};Tx.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(jk(this)||this._state.asyncTo)||Wk(this)}get goal(){return PC(this.animation.to)}get velocity(){let e=$C(this);return e instanceof rk?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Uk(this)}get isAnimating(){return jk(this)}get isPaused(){return Wk(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{config:s,toValues:i}=r,a=tk(r.to);!a&&kC(r.to)&&(i=Nx(PC(r.to))),r.values.forEach(((o,l)=>{if(o.done)return;let c=o.constructor==sk?1:a?a[l].lastPosition:i[l],u=r.immediate,d=c;if(!u){if(d=o.lastPosition,s.tension<=0)return void(o.done=!0);let t,n=o.elapsedTime+=e,i=r.fromValues[l],a=null!=o.v0?o.v0:o.v0=Tx.arr(s.velocity)?s.velocity[l]:s.velocity,m=s.precision||(i==c?.005:Math.min(1,.001*Math.abs(c-i)));if(Tx.und(s.duration))if(s.decay){let e=!0===s.decay?.998:s.decay,r=Math.exp(-(1-e)*n);d=i+a/(1-e)*(1-r),u=Math.abs(o.lastPosition-d)<=m,t=a*r}else{t=null==o.lastVelocity?a:o.lastVelocity;let n,r=s.restVelocity||m/10,l=s.clamp?0:s.bounce,p=!Tx.und(l),h=i==c?o.v0>0:i<c,f=!1,g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(n=Math.abs(t)>r,n||(u=Math.abs(c-d)<=m,!u));++e){p&&(f=d==c||d>c==h,f&&(t=-t*l,d=c)),t+=(1e-6*-s.tension*(d-c)+.001*-s.friction*t)/s.mass*g,d+=t*g}}else{let r=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,o.durationProgress>0&&(o.elapsedTime=s.duration*o.durationProgress,n=o.elapsedTime+=e)),r=(s.progress||0)+n/this._memoizedDuration,r=r>1?1:r<0?0:r,o.durationProgress=r),d=i+s.easing(r)*(c-i),t=(d-o.lastPosition)/e,u=1==r}o.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?o.done=!0:t=!1,o.setValue(d,s.round)&&(n=!0)}));let o=$C(this),l=o.getValue();if(t){let e=PC(r.to);l===e&&!n||s.decay?n&&s.decay&&this._onChange(l):(o.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return cx.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(jk(this)){let{to:e,config:t}=this.animation;cx.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Tx.und(e)?(n=this.queue||[],this.queue=[]):n=[Tx.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Ak(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),Rk(this._state,e&&this._lastCallId),cx.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:r}=e;n=Tx.obj(n)?n[t]:n,(null==n||xk(n))&&(n=void 0),r=Tx.obj(r)?r[t]:r,null==r&&(r=void 0);let s={to:n,from:r};return Uk(this)||(e.reverse&&([n,r]=[r,n]),r=PC(r),Tx.und(r)?$C(this)||this._set(n):this._set(r)),s}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,bk(e,((e,t)=>/^on/.test(t)?gk(e,n):e))),eP(this,e,"onProps"),tP(this,"onProps",e,this);let s=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let i=this._state;return Ok(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Wk(this)||(Zk(this,!0),Bx(i.pauseQueue),tP(this,"onPause",Nk(this,Yk(this,this.animation.to)),this))},resume:()=>{Wk(this)&&(Zk(this,!1),jk(this)&&this._resume(),Bx(i.resumeQueue),tP(this,"onResume",Nk(this,Yk(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=Xk(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Fk(this));let r=!Tx.und(e.to),s=!Tx.und(e.from);if(r||s){if(!(t.callId>this._lastToId))return n(Fk(this));this._lastToId=t.callId}let{key:i,defaultProps:a,animation:o}=this,{to:l,from:c}=o,{to:u=l,from:d=c}=e;s&&!r&&(!t.default||Tx.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let m=!Ox(d,c);m&&(o.from=d),d=PC(d);let p=!Ox(u,l);p&&this._focus(u);let h=xk(t.to),{config:f}=o,{decay:g,velocity:v}=f;(r||s)&&(f.velocity=0),t.config&&!h&&function(e,t,n){n&&(Pk(n={...n},t),t={...n,...t}),Pk(e,t),Object.assign(e,t);for(let t in Ck)null==e[t]&&(e[t]=Ck[t]);let{mass:r,frequency:s,damping:i}=e;Tx.und(s)||(s<.01&&(s=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/s,2)*r,e.friction=4*Math.PI*i*r/s)}(f,hk(t.config,i),t.config!==a.config?hk(a.config,i):void 0);let y=$C(this);if(!y||Tx.und(u))return n(Nk(this,!0));let b=Tx.und(t.reset)?s&&!t.default:!Tx.und(d)&&fk(t.reset,i),w=b?d:this.get(),_=Sk(u),E=Tx.num(_)||Tx.arr(_)||KC(_),S=!h&&(!E||fk(a.immediate||t.immediate,i));if(p){let e=ck(u);if(e!==y.constructor){if(!S)throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`);y=this._set(_)}}let x=y.constructor,C=kC(u),k=!1;if(!C){let e=b||!Uk(this)&&m;(p||e)&&(k=Ox(Sk(w),_),C=!k),(!Ox(o.immediate,S)&&!S||!Ox(f.decay,g)||!Ox(f.velocity,v))&&(C=!0)}if(k&&jk(this)&&(o.changed&&!b?C=!0:C||this._stop(l)),!h&&((C||kC(l))&&(o.values=y.getPayload(),o.toValues=kC(u)?null:x==sk?[1]:Nx(_)),o.immediate!=S&&(o.immediate=S,!S&&!b&&this._set(l)),C)){let{onRest:e}=o;Ax($k,(e=>eP(this,t,e)));let r=Nk(this,Yk(this,l));Bx(this._pendingCalls,r),this._pendingCalls.add(n),o.changed&&cx.batchedUpdates((()=>{o.changed=!b,e?.(r,this),b?hk(a.onRest,r):o.onStart?.(r,this)}))}b&&this._set(w),h?n(Vk(t.to,t,this._state,this)):C?this._start():jk(this)&&!p?this._pendingCalls.add(n):n(Mk(w))}_focus(e){let t=this.animation;e!==t.to&&(IC(this)&&this._detach(),t.to=e,IC(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;kC(t)&&(MC(t,this),Lk(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;kC(e)&&NC(e,this)}_set(e,t=!0){let n=PC(e);if(!Tx.und(n)){let e=$C(this);if(!e||!Ox(n,e.getValue())){let r=ck(n);e&&e.constructor==r?e.setValue(n):ek(this,r.create(n)),e&&cx.batchedUpdates((()=>{this._onChange(n,t)}))}}return $C(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,tP(this,"onStart",Nk(this,Yk(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),hk(this.animation.onChange,e,this)),hk(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;$C(this).reset(PC(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),jk(this)||(qk(this,!0),Wk(this)||this._resume())}_resume(){Px.skipAnimation?this.finish():Zx.start(this)}_stop(e,t){if(jk(this)){qk(this,!1);let n=this.animation;Ax(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),TC(this,{type:"idle",parent:this});let r=t?Fk(this.get()):Nk(this.get(),Yk(this,e??n.to));Bx(this._pendingCalls,r),n.changed&&(n.changed=!1,tP(this,"onRest",r,this))}}};function Yk(e,t){let n=Sk(t);return Ox(Sk(e.get()),n)}function Xk(e,t=e.loop,n=e.to){let r=hk(t);if(r){let s=!0!==r&&Ek(r),i=(s||e).reverse,a=!s||s.reset;return Jk({...e,loop:t,default:!1,pause:void 0,to:!i||xk(n)?n:void 0,from:a?e.from:void 0,reset:a,...s})}}function Jk(e){let{to:t,from:n}=e=Ek(e),r=new Set;return Tx.obj(t)&&Qk(t,r),Tx.obj(n)&&Qk(n,r),e.keys=r.size?Array.from(r):null,e}function Qk(e,t){Mx(e,((e,n)=>null!=e&&t.add(n)))}var $k=["onStart","onRest","onChange","onPause","onResume"];function eP(e,t,n){e.animation[n]=t[n]!==vk(t,n)?gk(t[n],e.key):void 0}function tP(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var nP=["onStart","onChange","onRest"],rP=1,sP=class{id=rP++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];Tx.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Jk(e)),this}start(e){let{queue:t}=this;return e?t=Nx(e).map(Jk):this.queue=[],this._flush?this._flush(this,t):(cP(this,t),iP(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;Ax(Nx(t),(t=>n[t].stop(!!e)))}else Rk(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Tx.und(e))this.start({pause:!0});else{let t=this.springs;Ax(Nx(e),(e=>t[e].pause()))}return this}resume(e){if(Tx.und(e))this.start({pause:!1});else{let t=this.springs;Ax(Nx(e),(e=>t[e].resume()))}return this}each(e){Mx(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,s=this._changed.size>0;(r&&!this._started||s&&!this._started)&&(this._started=!0,Fx(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let i=!r&&this._started,a=s||i&&n.size?this.get():null;s&&t.size&&Fx(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),i&&(this._started=!1,Fx(n,(([e,t])=>{t.value=a,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}cx.onFrame(this._onFrame)}};function iP(e,t){return Promise.all(t.map((t=>aP(e,t)))).then((t=>Ak(e,t)))}async function aP(e,t,n){let{keys:r,to:s,from:i,loop:a,onRest:o,onResolve:l}=t,c=Tx.obj(t.default)&&t.default;a&&(t.loop=!1),!1===s&&(t.to=null),!1===i&&(t.from=null);let u=Tx.arr(s)||Tx.fun(s)?s:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Ax(nP,(n=>{let r=t[n];if(Tx.fun(r)){let s=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=s.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):s.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,Bx(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===vk(t,"cancel");(u||p&&d.asyncId)&&m.push(Ok(++e._lastAsyncId,{props:t,state:d,actions:{pause:Ix,resume:Ix,start(t,n){p?(Rk(d,e._lastAsyncId),n(Fk(e))):(t.onRest=o,n(Vk(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let h=Ak(e,await Promise.all(m));if(a&&h.finished&&(!n||!h.noop)){let n=Xk(t,a,s);if(n)return cP(e,[n]),aP(e,n,!0)}return l&&cx.batchedUpdates((()=>l(h,e,e.item))),h}function oP(e,t){let n=new Kk;return n.key=e,t&&MC(n,t),n}function lP(e,t,n){t.keys&&Ax(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function cP(e,t){Ax(t,(t=>{lP(e.springs,t,(t=>oP(t,e)))}))}var uP=({children:e,...t})=>{let n=(0,a.useContext)(dP),r=t.pause||!!n.pause,s=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,a.useState)((()=>({inputs:t,result:e()}))),r=(0,a.useRef)(),s=r.current,i=s;return i?Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs))||(i={inputs:t,result:e()}):i=n,(0,a.useEffect)((()=>{r.current=i,s==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:s})),[r,s]);let{Provider:i}=dP;return a.createElement(i,{value:t},e)},dP=function(e,t){return Object.assign(e,a.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(uP,{});uP.Provider=dP.Provider,uP.Consumer=dP.Consumer;var mP=class extends Hk{constructor(e,t){super(),this.source=e,this.calc=gC(...t);let n=this._get(),r=ck(n);ek(this,r.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Ox(t,this.get())||($C(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&hP(this._active)&&fP(this)}_get(){let e=Tx.arr(this.source)?this.source.map(PC):Nx(PC(this.source));return this.calc(...e)}_start(){this.idle&&!hP(this._active)&&(this.idle=!1,Ax(tk(this),(e=>{e.done=!1})),Px.skipAnimation?(cx.batchedUpdates((()=>this.advance())),fP(this)):Zx.start(this))}_attach(){let e=1;Ax(Nx(this.source),(t=>{kC(t)&&MC(t,this),Lk(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Ax(Nx(this.source),(e=>{kC(e)&&NC(e,this)})),this._active.clear(),fP(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Nx(this.source).reduce(((e,t)=>Math.max(e,(Lk(t)?t.priority:0)+1)),0))}};function pP(e){return!1!==e.idle}function hP(e){return!e.size||Array.from(e).every(pP)}function fP(e){e.idle||(e.idle=!0,Ax(tk(e),(e=>{e.done=!0})),TC(e,{type:"idle",parent:e}))}Px.assign({createStringInterpolator:jC,to:(e,t)=>new mP(e,t)});Zx.advance;var gP=/^--/;function vP(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||gP.test(e)||bP.hasOwnProperty(e)&&bP[e]?(""+t).trim():t+"px"}var yP={};var bP={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wP=["Webkit","Ms","Moz","O"];bP=Object.keys(bP).reduce(((e,t)=>(wP.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),bP);var _P=/^(matrix|translate|scale|rotate|skew)/,EP=/^(translate)/,SP=/^(rotate|skew)/,xP=(e,t)=>Tx.num(e)&&0!==e?e+t:e,CP=(e,t)=>Tx.arr(e)?e.every((e=>CP(e,t))):Tx.num(e)?e===t:parseFloat(e)===t,kP=class extends ak{constructor({x:e,y:t,z:n,...r}){let s=[],i=[];(e||t||n)&&(s.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>xP(e,"px"))).join(",")})`,CP(e,0)]))),Mx(r,((e,t)=>{if("transform"===t)s.push([e||""]),i.push((e=>[e,""===e]));else if(_P.test(t)){if(delete r[t],Tx.und(e))return;let n=EP.test(t)?"px":SP.test(t)?"deg":"";s.push(Nx(e)),i.push("rotate3d"===t?([e,t,r,s])=>[`rotate3d(${e},${t},${r},${xP(s,n)})`,CP(s,0)]:e=>[`${t}(${e.map((e=>xP(e,n))).join(",")})`,CP(e,t.startsWith("scale")?1:0)])}})),s.length&&(r.transform=new PP(s,i)),super(r)}},PP=class extends OC{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Ax(this.inputs,((n,r)=>{let s=PC(n[0]),[i,a]=this.transforms[r](Tx.arr(s)?s:n.map(PC));e+=" "+i,t=t&&a})),t?"none":e}observerAdded(e){1==e&&Ax(this.inputs,(e=>Ax(e,(e=>kC(e)&&MC(e,this)))))}observerRemoved(e){0==e&&Ax(this.inputs,(e=>Ax(e,(e=>kC(e)&&NC(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),TC(this,e)}};Px.assign({batchedUpdates:Wv.unstable_batchedUpdates,createStringInterpolator:jC,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var IP=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new ak(e)),getComponentProps:r=(e=>e)}={})=>{let s={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{let t=pk(e)||"Anonymous";return(e=Tx.str(e)?i[e]||(i[e]=uk(e,s)):e[mk]||(e[mk]=uk(e,s))).displayName=`Animated(${t})`,e};return Mx(e,((t,n)=>{Tx.arr(e)&&(n=pk(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:s,scrollTop:i,scrollLeft:a,viewBox:o,...l}=t,c=Object.values(l),u=Object.keys(l).map((t=>n||e.hasAttribute(t)?t:yP[t]||(yP[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==s&&(e.textContent=s);for(let t in r)if(r.hasOwnProperty(t)){let n=vP(t,r[t]);gP.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==a&&(e.scrollLeft=a),void 0!==o&&e.setAttribute("viewBox",o)},createAnimatedStyle:e=>new kP(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n});IP.animated;const TP=function({triggerAnimationOnChange:e}){const t=(0,h.useRef)(),{previous:n,prevRect:r}=(0,h.useMemo)((()=>{return{previous:t.current&&(e=t.current,{top:e.offsetTop,left:e.offsetLeft}),prevRect:t.current&&t.current.getBoundingClientRect()};var e}),[e]);return(0,h.useLayoutEffect)((()=>{if(!n||!t.current)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=new sP({x:0,y:0,width:r.width,height:r.height,config:{duration:400,easing:SC.easeInOutQuint},onChange({value:e}){if(!t.current)return;let{x:n,y:r,width:s,height:i}=e;n=Math.round(n),r=Math.round(r),s=Math.round(s),i=Math.round(i);const a=0===n&&0===r;t.current.style.transformOrigin="center center",t.current.style.transform=a?null:`translate3d(${n}px,${r}px,0)`,t.current.style.width=a?null:`${s}px`,t.current.style.height=a?null:`${i}px`}});t.current.style.transform=void 0;const s=t.current.getBoundingClientRect(),i=Math.round(r.left-s.left),a=Math.round(r.top-s.top),o=s.width,l=s.height;return e.start({x:0,y:0,width:o,height:l,from:{x:i,y:a,width:r.width,height:r.height}}),()=>{e.stop(),e.set({x:0,y:0,width:r.width,height:r.height})}}),[n,r]),t};function OP(){const{isDisabled:e,isSaving:t}=(0,u.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n}=e(C.store),r=t(),s=r.some((e=>n(e.kind,e.name,e.key)));return{isSaving:s,isDisabled:s||!r.length&&!Vn()}}),[]);return(0,a.createElement)(E.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4},(0,a.createElement)(Qr,{className:"edit-site-save-hub__button",variant:e?null:"primary",showTooltip:!1,icon:e&&!t?Ls:null,showReviewMessage:!0,__next40pxDefaultSize:!0}))}const{useCommands:AP}=ie(cn.privateApis),{useCommandContext:MP}=ie(ln.privateApis),{useGlobalStyle:NP}=ie(_.privateApis),{NavigableRegion:FP}=ie(f.privateApis),VP=.3;function RP(){fn(),function(){const e=Fn(),{params:t}=Nn(),n=(0,u.useSelect)((e=>ie(e(tn)).getCanvasMode()),[]),{setCanvasMode:r}=ie((0,u.useDispatch)(tn)),s=(0,h.useRef)(n),{canvas:i}=t,a=(0,h.useRef)(i),o=(0,h.useRef)(t);(0,h.useEffect)((()=>{o.current=t}),[t]),(0,h.useEffect)((()=>{s.current=n,"init"!==n&&("edit"===n&&a.current!==n&&e.push({...o.current,canvas:"edit"}),"view"===n&&void 0!==a.current&&e.push({...o.current,canvas:void 0}))}),[n,e]),(0,h.useEffect)((()=>{a.current=i,"edit"!==i&&"view"!==s.current?r("view"):"edit"===i&&"edit"!==s.current&&r("edit")}),[i,r])}(),AP(),(0,ln.useCommandLoader)({name:"core/edit-site/page-content-focus",hook:Rr,context:"site-editor-edit"}),(0,ln.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:Br}),(0,ln.useCommandLoader)({name:"core/edit-site/patterns",hook:Lr,context:"site-editor-edit"}),(0,ln.useCommandLoader)({name:"core/edit-site/edit-ui",hook:Dr}),function(){const e=(0,u.useSelect)((e=>{const{getUnstableBase:t}=e(C.store);return t()?.home}),[]);(0,ln.useCommand)({name:"core/edit-site/view-site",label:(0,S.__)("View site"),callback:({close:t})=>{t(),window.open(e,"_blank")},icon:yn}),(0,ln.useCommandLoader)({name:"core/edit-site/open-styles",hook:sr}),(0,ln.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:ir}),(0,ln.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:ar}),(0,ln.useCommandLoader)({name:"core/edit-site/open-styles-css",hook:or}),(0,ln.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:lr})}();const e=(0,w.useViewportMatch)("medium","<"),{isDistractionFree:t,hasFixedToolbar:n,hasBlockSelected:r,canvasMode:s,previousShortcut:i,nextShortcut:o,hasBlockBreadcrumbs:l}=(0,u.useSelect)((e=>{const{getAllShortcutKeyCombinations:t}=e(on.store),{getCanvasMode:n}=ie(e(tn));return{canvasMode:n(),previousShortcut:t("core/editor/previous-region"),nextShortcut:t("core/editor/next-region"),hasFixedToolbar:e(g.store).get("core","fixedToolbar"),isDistractionFree:e(g.store).get("core","distractionFree"),hasBlockBreadcrumbs:e(g.store).get("core","showBlockBreadcrumbs"),hasBlockSelected:e(_.store).getBlockSelectionStart()}}),[]),c=(0,E.__unstableUseNavigateRegions)({previous:i,next:o}),d=(0,w.useReducedMotion)(),[m,p]=(0,w.useResizeObserver)(),[f]=(0,w.useResizeObserver)(),v=Hr(),[y,b]=(0,h.useState)(!1),{key:x,areas:k,widths:P}=function(){const e=Hr(),t=ox(),{params:n}=ax(),{postType:r,postId:s,path:i,layout:o,isCustom:l,canvas:c}=n;if((0,h.useEffect)((()=>{"/wp_template_part/all"===i&&t.replace({path:"/patterns"})}),[t,i]),"/page"===i){const n="list"===o||!o;return{key:"pages-list",areas:{sidebar:(0,a.createElement)(nE,{title:(0,S.__)("Manage pages"),backPath:{},content:(0,a.createElement)(ix,null)}),content:(0,a.createElement)(yb,null),preview:n&&(0,a.createElement)(hp,{isLoading:e,onClick:()=>t.push({postType:"page",postId:s,canvas:"edit"})}),mobile:"edit"===c?(0,a.createElement)(hp,{isLoading:e}):(0,a.createElement)(yb,null)},widths:{content:n?380:void 0}}}if(r&&s){let t;return t="wp_template_part"===r||"wp_block"===r?(0,a.createElement)(NS,{backPath:{path:"/patterns",categoryId:n.categoryId,categoryType:n.categoryType}}):"wp_template"===r?(0,a.createElement)(ES,{backPath:{path:"/wp_template"}}):"page"===r?(0,a.createElement)(sS,{backPath:{path:"/page",postId:s}}):(0,a.createElement)(zE,{backPath:{path:"/navigation"}}),{key:"page",areas:{sidebar:t,preview:(0,a.createElement)(hp,{isLoading:e}),mobile:"edit"===c&&(0,a.createElement)(hp,{isLoading:e})}}}if("/wp_template"===i){const t="true"!==l&&"list"===o;return{key:"templates-list",areas:{sidebar:(0,a.createElement)(dS,{backPath:{}}),content:(0,a.createElement)(Z_,null),preview:t&&(0,a.createElement)(hp,{isLoading:e}),mobile:(0,a.createElement)(Z_,null)},widths:{content:t?380:void 0}}}return"/patterns"===i||"/wp_template_part/all"===i?{key:"patterns",areas:{sidebar:(0,a.createElement)(qS,{backPath:{}}),content:(0,a.createElement)(Yw,null),mobile:(0,a.createElement)(Yw,null)}}:"/wp_global_styles"===i?{key:"styles",areas:{sidebar:(0,a.createElement)(fE,{backPath:{}}),preview:(0,a.createElement)(hp,{isLoading:e}),mobile:"edit"===c&&(0,a.createElement)(hp,{isLoading:e})}}:"/navigation"===i?s?{key:"navigation",areas:{sidebar:(0,a.createElement)(zE,{backPath:{path:"/navigation"}}),preview:(0,a.createElement)(hp,{isLoading:e}),mobile:"edit"===c&&(0,a.createElement)(hp,{isLoading:e})}}:{key:"navigation",areas:{sidebar:(0,a.createElement)(ZE,{backPath:{}}),preview:(0,a.createElement)(hp,{isLoading:e}),mobile:"edit"===c&&(0,a.createElement)(hp,{isLoading:e})}}:{key:"default",areas:{sidebar:(0,a.createElement)(vE,null),preview:(0,a.createElement)(hp,{isLoading:e}),mobile:"edit"===c&&(0,a.createElement)(hp,{isLoading:e})}}}(),I=TP({triggerAnimationOnChange:s+"__"+x});let T;T="view"===s?"view":t?"isDistractionFree":s;let O="site-editor";"edit"===s&&(O="site-editor-edit"),r&&(O="block-selection-edit"),MP(O);const[A]=NP("color.background"),[M]=NP("color.gradient");return"init"===s?null:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ln.CommandMenu,null),(0,a.createElement)(qn,null),(0,a.createElement)(Zn,null),f,(0,a.createElement)("div",{...c,ref:c.ref,className:an("edit-site-layout",c.className,{"is-distraction-free":t&&"edit"===s,"is-full-canvas":"edit"===s,"has-fixed-toolbar":n,"is-block-toolbar-visible":r,"has-block-breadcrumbs":l&&!t&&"edit"===s})},(0,a.createElement)(E.__unstableMotion.div,{className:"edit-site-layout__header-container",variants:{isDistractionFree:{opacity:0,transition:{type:"tween",delay:.8,delayChildren:.8}},isDistractionFreeHovering:{opacity:1,transition:{type:"tween",delay:.2,delayChildren:.2}},view:{opacity:1},edit:{opacity:1}},whileHover:t?"isDistractionFreeHovering":void 0,animate:T},(0,a.createElement)(Cn,{isTransparent:y,className:"edit-site-layout__hub"})),(0,a.createElement)("div",{className:"edit-site-layout__content"},(!e||!k.mobile)&&(0,a.createElement)(FP,{ariaLabel:(0,S.__)("Navigation"),className:"edit-site-layout__sidebar-region"},(0,a.createElement)(E.__unstableAnimatePresence,null,"view"===s&&(0,a.createElement)(E.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:d||e?0:VP,ease:"easeOut"},className:"edit-site-layout__sidebar"},(0,a.createElement)($_,{routeKey:x},k.sidebar),(0,a.createElement)(OP,null)))),e&&k.mobile&&(0,a.createElement)("div",{className:"edit-site-layout__mobile"},k.mobile),!e&&k.content&&"edit"!==s&&(0,a.createElement)("div",{className:"edit-site-layout__area",style:{maxWidth:P?.content}},k.content),!e&&k.preview&&(0,a.createElement)("div",{className:"edit-site-layout__canvas-container"},m,!!p.width&&(0,a.createElement)("div",{className:an("edit-site-layout__canvas",{"is-right-aligned":y}),ref:I},(0,a.createElement)(mn,null,(0,a.createElement)(Mn,{isReady:!v,isFullWidth:"edit"===s,defaultSize:{width:p.width-24,height:p.height},isOversized:y,setIsOversized:b,innerContentStyle:{background:null!=M?M:A}},k.preview))))),(0,a.createElement)(Wn,null)))}const{RouterProvider:BP}=ie(rn.privateApis),{GlobalStylesProvider:DP}=ie(f.privateApis);function LP(){const{createErrorNotice:e}=(0,u.useDispatch)(x.store);return(0,a.createElement)(E.SlotFillProvider,null,(0,a.createElement)(DP,null,(0,a.createElement)(f.UnsavedChangesWarning,null),(0,a.createElement)(BP,null,(0,a.createElement)(RP,null),(0,a.createElement)(nn.PluginArea,{onError:function(t){e((0,S.sprintf)((0,S.__)('The "%s" plugin has encountered an error and cannot be rendered.'),t))}}))))}const zP=e=>{m()(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function HP(e){return zP("PluginMoreMenuItem"),(0,a.createElement)(f.PluginMoreMenuItem,{...e})}function GP(e){return zP("PluginSidebar"),(0,a.createElement)(f.PluginSidebar,{...e})}function UP(e){return zP("PluginSidebarMoreMenuItem"),(0,a.createElement)(f.PluginSidebarMoreMenuItem,{...e})}function jP(e,t){const n=document.getElementById(e),r=(0,h.createRoot)(n);(0,u.dispatch)(l.store).reapplyBlockTypeFilters();const s=(0,c.__experimentalGetCoreBlocks)().filter((({name:e})=>"core/freeform"!==e));return(0,c.registerCoreBlocks)(s),(0,u.dispatch)(l.store).setFreeformFallbackBlockName("core/html"),(0,v.registerLegacyWidgetBlock)({inserter:!1}),(0,v.registerWidgetGroupBlock)({inserter:!1}),(0,u.dispatch)(g.store).setDefaults("core/edit-site",{welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,u.dispatch)(g.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,editorMode:"visual",fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1}),(0,u.dispatch)(tn).updateSettings(t),(0,u.dispatch)(f.store).updateEditorSettings({defaultTemplateTypes:t.defaultTemplateTypes,defaultTemplatePartAreas:t.defaultTemplatePartAreas}),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),r.render((0,a.createElement)(LP,null)),r}function WP(){m()("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}})(),(window.wp=window.wp||{}).editSite=i})(); |