WordPress/wp-includes/js/dist/edit-site.min.js
youknowriad 1de40f71be Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress. 
This includes features like:

 - DataViews.
 - Customization tools like box shadow, background size and repeat.
 - UI improvements in the site editor. 
 - Preferences sharing between the post and site editors.
 - Unified panels and editors between post and site editors.
 - Improved template mode in the post editor.
 - Iterations to multiple interactive blocks.
 - Preparing the blocks and UI for pattern overrides.
 - and a lot more.

Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377


git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 21:07:12 +00:00

19 lines
566 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! This file is auto-generated */
!function(){var e={2591:function(e){e.exports=function(){function e(t,n,a){function r(i,o){if(!n[i]){if(!t[i]){if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return r(t[i][1][e]||e)}),c,c.exports,e,t,n,a)}return n[i].exports}for(var s=void 0,i=0;i<a.length;i++)r(a[i]);return r}return e}()({1:[function(e,t,n){"use strict";var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(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 a in n)r(n,a)&&(e[a]=n[a])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,n,a,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+a),r);else for(var s=0;s<a;s++)e[r+s]=t[n+s]},flattenChunks:function(e){var t,n,a,r,s,i;for(a=0,t=0,n=e.length;t<n;t++)a+=e[t].length;for(i=new Uint8Array(a),r=0,t=0,n=e.length;t<n;t++)s=e[t],i.set(s,r),r+=s.length;return i}},i={arraySet:function(e,t,n,a,r){for(var s=0;s<a;s++)e[r+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,s)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,i))},n.setTyped(a)},{}],2:[function(e,t,n){"use strict";var a=e("./common"),r=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var i=new a.Buf8(256),o=0;o<256;o++)i[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&&s||!e.subarray&&r))return String.fromCharCode.apply(null,a.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}i[254]=i[254]=1,n.string2buf=function(e){var t,n,r,s,i,o=e.length,l=0;for(s=0;s<o;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new a.Buf8(l),i=0,s=0;i<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?t[i++]=n:n<2048?(t[i++]=192|n>>>6,t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new a.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,a,r,s,o=t||e.length,c=new Array(2*o);for(a=0,n=0;n<o;)if((r=e[n++])<128)c[a++]=r;else if((s=i[r])>4)c[a++]=65533,n+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&n<o;)r=r<<6|63&e[n++],s--;s>1?c[a++]=65533:r<65536?c[a++]=r:(r-=65536,c[a++]=55296|r>>10&1023,c[a++]=56320|1023&r)}return l(c,a)},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+i[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";function a(e,t,n,a){for(var r=65535&e|0,s=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{s=s+(r=r+t[a++]|0)|0}while(--i);r%=65521,s%=65521}return r|s<<16|0}t.exports=a},{}],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 a(){for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}var r=a();function s(e,t,n,a){var s=r,i=a+n;e^=-1;for(var o=a;o<i;o++)e=e>>>8^s[255&(e^t[o])];return-1^e}t.exports=s},{}],6:[function(e,t,n){"use strict";function a(){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=a},{}],7:[function(e,t,n){"use strict";var a=30,r=12;t.exports=function(e,t){var n,s,i,o,l,c,u,d,m,p,h,f,g,y,v,_,b,E,w,x,S,C,k,T,P;n=e.state,s=e.next_in,T=e.input,i=s+(e.avail_in-5),o=e.next_out,P=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,y=n.lencode,v=n.distcode,_=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{g<15&&(f+=T[s++]<<g,g+=8,f+=T[s++]<<g,g+=8),E=y[f&_];t:for(;;){if(f>>>=w=E>>>24,g-=w,0==(w=E>>>16&255))P[o++]=65535&E;else{if(!(16&w)){if(0==(64&w)){E=y[(65535&E)+(f&(1<<w)-1)];continue t}if(32&w){n.mode=r;break e}e.msg="invalid literal/length code",n.mode=a;break e}x=65535&E,(w&=15)&&(g<w&&(f+=T[s++]<<g,g+=8),x+=f&(1<<w)-1,f>>>=w,g-=w),g<15&&(f+=T[s++]<<g,g+=8,f+=T[s++]<<g,g+=8),E=v[f&b];n:for(;;){if(f>>>=w=E>>>24,g-=w,!(16&(w=E>>>16&255))){if(0==(64&w)){E=v[(65535&E)+(f&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=a;break e}if(S=65535&E,g<(w&=15)&&(f+=T[s++]<<g,(g+=8)<w&&(f+=T[s++]<<g,g+=8)),(S+=f&(1<<w)-1)>u){e.msg="invalid distance too far back",n.mode=a;break e}if(f>>>=w,g-=w,S>(w=o-l)){if((w=S-w)>m&&n.sane){e.msg="invalid distance too far back",n.mode=a;break e}if(C=0,k=h,0===p){if(C+=d-w,w<x){x-=w;do{P[o++]=h[C++]}while(--w);C=o-S,k=P}}else if(p<w){if(C+=d+p-w,(w-=p)<x){x-=w;do{P[o++]=h[C++]}while(--w);if(C=0,p<x){x-=w=p;do{P[o++]=h[C++]}while(--w);C=o-S,k=P}}}else if(C+=p-w,w<x){x-=w;do{P[o++]=h[C++]}while(--w);C=o-S,k=P}for(;x>2;)P[o++]=k[C++],P[o++]=k[C++],P[o++]=k[C++],x-=3;x&&(P[o++]=k[C++],x>1&&(P[o++]=k[C++]))}else{C=o-S;do{P[o++]=P[C++],P[o++]=P[C++],P[o++]=P[C++],x-=3}while(x>2);x&&(P[o++]=P[C++],x>1&&(P[o++]=P[C++]))}break}}break}}while(s<i&&o<c);s-=x=g>>3,f&=(1<<(g-=x<<3))-1,e.next_in=s,e.next_out=o,e.avail_in=s<i?i-s+5:5-(s-i),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 a=e("../utils/common"),r=e("./adler32"),s=e("./crc32"),i=e("./inffast"),o=e("./inftrees"),l=0,c=1,u=2,d=4,m=5,p=6,h=0,f=1,g=2,y=-2,v=-3,_=-4,b=-5,E=8,w=1,x=2,S=3,C=4,k=5,T=6,P=7,M=8,I=9,A=10,N=11,O=12,R=13,F=14,D=15,B=16,V=17,L=18,z=19,G=20,H=21,U=22,W=23,j=24,Z=25,q=26,Y=27,K=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 ae(){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 a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function re(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=w,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new a.Buf32($),t.distcode=t.distdyn=new a.Buf32(ee),t.sane=1,t.back=-1,h):y}function se(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):y}function ie(e,t){var n,a;return e&&e.state?(a=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?y:(null!==a.window&&a.wbits!==t&&(a.window=null),a.wrap=n,a.wbits=t,se(e))):y}function oe(e,t){var n,a;return e?(a=new ae,e.state=a,a.window=null,(n=ie(e,t))!==h&&(e.state=null),n):y}function le(e){return oe(e,te)}var ce,ue,de=!0;function me(e){if(de){var t;for(ce=new a.Buf32(512),ue=new a.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,r){var s,i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new a.Buf8(i.wsize)),r>=i.wsize?(a.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((s=i.wsize-i.wnext)>r&&(s=r),a.arraySet(i.window,t,n-r,s,i.wnext),(r-=s)?(a.arraySet(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=s,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=s))),0}function he(e,t){var n,$,ee,te,ae,re,se,ie,oe,le,ce,ue,de,he,fe,ge,ye,ve,_e,be,Ee,we,xe,Se,Ce=0,ke=new a.Buf8(4),Te=[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 y;(n=e.state).mode===O&&(n.mode=R),ae=e.next_out,ee=e.output,se=e.avail_out,te=e.next_in,$=e.input,re=e.avail_in,ie=n.hold,oe=n.bits,le=re,ce=se,we=h;e:for(;;)switch(n.mode){case w:if(0===n.wrap){n.mode=R;break}for(;oe<16;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if(2&n.wrap&&35615===ie){n.check=0,ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0),ie=0,oe=0,n.mode=x;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&ie)<<8)+(ie>>8))%31){e.msg="incorrect header check",n.mode=J;break}if((15&ie)!==E){e.msg="unknown compression method",n.mode=J;break}if(oe-=4,Ee=8+(15&(ie>>>=4)),0===n.wbits)n.wbits=Ee;else if(Ee>n.wbits){e.msg="invalid window size",n.mode=J;break}n.dmax=1<<Ee,e.adler=n.check=1,n.mode=512&ie?A:O,ie=0,oe=0;break;case x:for(;oe<16;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if(n.flags=ie,(255&n.flags)!==E){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=ie>>8&1),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0)),ie=0,oe=0,n.mode=S;case S:for(;oe<32;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}n.head&&(n.head.time=ie),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,ke[2]=ie>>>16&255,ke[3]=ie>>>24&255,n.check=s(n.check,ke,4,0)),ie=0,oe=0,n.mode=C;case C:for(;oe<16;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}n.head&&(n.head.xflags=255&ie,n.head.os=ie>>8),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0)),ie=0,oe=0,n.mode=k;case k:if(1024&n.flags){for(;oe<16;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}n.length=ie,n.head&&(n.head.extra_len=ie),512&n.flags&&(ke[0]=255&ie,ke[1]=ie>>>8&255,n.check=s(n.check,ke,2,0)),ie=0,oe=0}else n.head&&(n.head.extra=null);n.mode=T;case T:if(1024&n.flags&&((ue=n.length)>re&&(ue=re),ue&&(n.head&&(Ee=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),a.arraySet(n.head.extra,$,te,ue,Ee)),512&n.flags&&(n.check=s(n.check,$,ue,te)),re-=ue,te+=ue,n.length-=ue),n.length))break e;n.length=0,n.mode=P;case P:if(2048&n.flags){if(0===re)break e;ue=0;do{Ee=$[te+ue++],n.head&&Ee&&n.length<65536&&(n.head.name+=String.fromCharCode(Ee))}while(Ee&&ue<re);if(512&n.flags&&(n.check=s(n.check,$,ue,te)),re-=ue,te+=ue,Ee)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=M;case M:if(4096&n.flags){if(0===re)break e;ue=0;do{Ee=$[te+ue++],n.head&&Ee&&n.length<65536&&(n.head.comment+=String.fromCharCode(Ee))}while(Ee&&ue<re);if(512&n.flags&&(n.check=s(n.check,$,ue,te)),re-=ue,te+=ue,Ee)break e}else n.head&&(n.head.comment=null);n.mode=I;case I:if(512&n.flags){for(;oe<16;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if(ie!==(65535&n.check)){e.msg="header crc mismatch",n.mode=J;break}ie=0,oe=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=O;break;case A:for(;oe<32;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}e.adler=n.check=ne(ie),ie=0,oe=0,n.mode=N;case N:if(0===n.havedict)return e.next_out=ae,e.avail_out=se,e.next_in=te,e.avail_in=re,n.hold=ie,n.bits=oe,g;e.adler=n.check=1,n.mode=O;case O:if(t===m||t===p)break e;case R:if(n.last){ie>>>=7&oe,oe-=7&oe,n.mode=Y;break}for(;oe<3;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}switch(n.last=1&ie,oe-=1,3&(ie>>>=1)){case 0:n.mode=F;break;case 1:if(me(n),n.mode=G,t===p){ie>>>=2,oe-=2;break e}break;case 2:n.mode=V;break;case 3:e.msg="invalid block type",n.mode=J}ie>>>=2,oe-=2;break;case F:for(ie>>>=7&oe,oe-=7&oe;oe<32;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if((65535&ie)!=(ie>>>16^65535)){e.msg="invalid stored block lengths",n.mode=J;break}if(n.length=65535&ie,ie=0,oe=0,n.mode=D,t===p)break e;case D:n.mode=B;case B:if(ue=n.length){if(ue>re&&(ue=re),ue>se&&(ue=se),0===ue)break e;a.arraySet(ee,$,te,ue,ae),re-=ue,te+=ue,se-=ue,ae+=ue,n.length-=ue;break}n.mode=O;break;case V:for(;oe<14;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if(n.nlen=257+(31&ie),ie>>>=5,oe-=5,n.ndist=1+(31&ie),ie>>>=5,oe-=5,n.ncode=4+(15&ie),ie>>>=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===re)break e;re--,ie+=$[te++]<<oe,oe+=8}n.lens[Te[n.have++]]=7&ie,ie>>>=3,oe-=3}for(;n.have<19;)n.lens[Te[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,xe={bits:n.lenbits},we=o(l,n.lens,0,19,n.lencode,0,n.work,xe),n.lenbits=xe.bits,we){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[ie&(1<<n.lenbits)-1])>>>16&255,ye=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if(ye<16)ie>>>=fe,oe-=fe,n.lens[n.have++]=ye;else{if(16===ye){for(Se=fe+2;oe<Se;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if(ie>>>=fe,oe-=fe,0===n.have){e.msg="invalid bit length repeat",n.mode=J;break}Ee=n.lens[n.have-1],ue=3+(3&ie),ie>>>=2,oe-=2}else if(17===ye){for(Se=fe+3;oe<Se;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}oe-=fe,Ee=0,ue=3+(7&(ie>>>=fe)),ie>>>=3,oe-=3}else{for(Se=fe+7;oe<Se;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}oe-=fe,Ee=0,ue=11+(127&(ie>>>=fe)),ie>>>=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++]=Ee}}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,xe={bits:n.lenbits},we=o(c,n.lens,0,n.nlen,n.lencode,0,n.work,xe),n.lenbits=xe.bits,we){e.msg="invalid literal/lengths set",n.mode=J;break}if(n.distbits=6,n.distcode=n.distdyn,xe={bits:n.distbits},we=o(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,xe),n.distbits=xe.bits,we){e.msg="invalid distances set",n.mode=J;break}if(n.mode=G,t===p)break e;case G:n.mode=H;case H:if(re>=6&&se>=258){e.next_out=ae,e.avail_out=se,e.next_in=te,e.avail_in=re,n.hold=ie,n.bits=oe,i(e,ce),ae=e.next_out,ee=e.output,se=e.avail_out,te=e.next_in,$=e.input,re=e.avail_in,ie=n.hold,oe=n.bits,n.mode===O&&(n.back=-1);break}for(n.back=0;ge=(Ce=n.lencode[ie&(1<<n.lenbits)-1])>>>16&255,ye=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if(ge&&0==(240&ge)){for(ve=fe,_e=ge,be=ye;ge=(Ce=n.lencode[be+((ie&(1<<ve+_e)-1)>>ve)])>>>16&255,ye=65535&Ce,!(ve+(fe=Ce>>>24)<=oe);){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}ie>>>=ve,oe-=ve,n.back+=ve}if(ie>>>=fe,oe-=fe,n.back+=fe,n.length=ye,0===ge){n.mode=q;break}if(32&ge){n.back=-1,n.mode=O;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(Se=n.extra;oe<Se;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}n.length+=ie&(1<<n.extra)-1,ie>>>=n.extra,oe-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=W;case W:for(;ge=(Ce=n.distcode[ie&(1<<n.distbits)-1])>>>16&255,ye=65535&Ce,!((fe=Ce>>>24)<=oe);){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if(0==(240&ge)){for(ve=fe,_e=ge,be=ye;ge=(Ce=n.distcode[be+((ie&(1<<ve+_e)-1)>>ve)])>>>16&255,ye=65535&Ce,!(ve+(fe=Ce>>>24)<=oe);){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}ie>>>=ve,oe-=ve,n.back+=ve}if(ie>>>=fe,oe-=fe,n.back+=fe,64&ge){e.msg="invalid distance code",n.mode=J;break}n.offset=ye,n.extra=15&ge,n.mode=j;case j:if(n.extra){for(Se=n.extra;oe<Se;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}n.offset+=ie&(1<<n.extra)-1,ie>>>=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=Z;case Z:if(0===se)break e;if(ue=ce-se,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=ae-n.offset,ue=n.length;ue>se&&(ue=se),se-=ue,n.length-=ue;do{ee[ae++]=he[de++]}while(--ue);0===n.length&&(n.mode=H);break;case q:if(0===se)break e;ee[ae++]=n.length,se--,n.mode=H;break;case Y:if(n.wrap){for(;oe<32;){if(0===re)break e;re--,ie|=$[te++]<<oe,oe+=8}if(ce-=se,e.total_out+=ce,n.total+=ce,ce&&(e.adler=n.check=n.flags?s(n.check,ee,ce,ae-ce):r(n.check,ee,ce,ae-ce)),ce=se,(n.flags?ie:ne(ie))!==n.check){e.msg="incorrect data check",n.mode=J;break}ie=0,oe=0}n.mode=K;case K:if(n.wrap&&n.flags){for(;oe<32;){if(0===re)break e;re--,ie+=$[te++]<<oe,oe+=8}if(ie!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=J;break}ie=0,oe=0}n.mode=X;case X:we=f;break e;case J:we=v;break e;case Q:return _;default:return y}return e.next_out=ae,e.avail_out=se,e.next_in=te,e.avail_in=re,n.hold=ie,n.bits=oe,(n.wsize||ce!==e.avail_out&&n.mode<J&&(n.mode<Y||t!==d))&&pe(e,e.output,e.next_out,ce-e.avail_out)?(n.mode=Q,_):(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?s(n.check,ee,ce,e.next_out-ce):r(n.check,ee,ce,e.next_out-ce)),e.data_type=n.bits+(n.last?64:0)+(n.mode===O?128:0)+(n.mode===G||n.mode===D?256:0),(0===le&&0===ce||t===d)&&we===h&&(we=b),we)}function fe(e){if(!e||!e.state)return y;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)?y:(n.head=t,t.done=!1,h):y}function ye(e,t){var n,a=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==N?y:n.mode===N&&r(1,t,a,0)!==n.check?v:pe(e,t,a,a)?(n.mode=Q,_):(n.havedict=1,h):y}n.inflateReset=se,n.inflateReset2=ie,n.inflateResetKeep=re,n.inflateInit=le,n.inflateInit2=oe,n.inflate=he,n.inflateEnd=fe,n.inflateGetHeader=ge,n.inflateSetDictionary=ye,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 a=e("../utils/common"),r=15,s=852,i=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,y,v){var _,b,E,w,x,S,C,k,T,P=v.bits,M=0,I=0,A=0,N=0,O=0,R=0,F=0,D=0,B=0,V=0,L=null,z=0,G=new a.Buf16(r+1),H=new a.Buf16(r+1),U=null,W=0;for(M=0;M<=r;M++)G[M]=0;for(I=0;I<h;I++)G[t[n+I]]++;for(O=P,N=r;N>=1&&0===G[N];N--);if(O>N&&(O=N),0===N)return f[g++]=20971520,f[g++]=20971520,v.bits=1,0;for(A=1;A<N&&0===G[A];A++);for(O<A&&(O=A),D=1,M=1;M<=r;M++)if(D<<=1,(D-=G[M])<0)return-1;if(D>0&&(e===o||1!==N))return-1;for(H[1]=0,M=1;M<r;M++)H[M+1]=H[M]+G[M];for(I=0;I<h;I++)0!==t[n+I]&&(y[H[t[n+I]]++]=I);if(e===o?(L=U=y,S=19):e===l?(L=u,z-=257,U=d,W-=257,S=256):(L=m,U=p,S=-1),V=0,I=0,M=A,x=g,R=O,F=0,E=-1,w=(B=1<<O)-1,e===l&&B>s||e===c&&B>i)return 1;for(;;){C=M-F,y[I]<S?(k=0,T=y[I]):y[I]>S?(k=U[W+y[I]],T=L[z+y[I]]):(k=96,T=0),_=1<<M-F,A=b=1<<R;do{f[x+(V>>F)+(b-=_)]=C<<24|k<<16|T|0}while(0!==b);for(_=1<<M-1;V&_;)_>>=1;if(0!==_?(V&=_-1,V+=_):V=0,I++,0==--G[M]){if(M===N)break;M=t[n+y[I]]}if(M>O&&(V&w)!==E){for(0===F&&(F=O),x+=A,D=1<<(R=M-F);R+F<N&&!((D-=G[R+F])<=0);)R++,D<<=1;if(B+=1<<R,e===l&&B>s||e===c&&B>i)return 1;f[E=V&w]=O<<24|R<<16|x-g|0}}return 0!==V&&(f[x+V]=M-F<<24|64<<16|0),v.bits=O,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 a(){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=a},{}],"/lib/inflate.js":[function(e,t,n){"use strict";var a=e("./zlib/inflate"),r=e("./utils/common"),s=e("./utils/strings"),i=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=r.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=a.inflateInit2(this.strm,t.windowBits);if(n!==i.Z_OK)throw new Error(o[n]);if(this.header=new c,a.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=a.inflateSetDictionary(this.strm,t.dictionary))!==i.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?i.Z_FINISH:i.Z_NO_FLUSH,"string"==typeof e?m.input=s.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 r.Buf8(p),m.next_out=0,m.avail_out=p),(n=a.inflate(m,i.Z_NO_FLUSH))===i.Z_NEED_DICT&&h&&(n=a.inflateSetDictionary(this.strm,h)),n===i.Z_BUF_ERROR&&!0===f&&(n=i.Z_OK,f=!1),n!==i.Z_STREAM_END&&n!==i.Z_OK)return this.onEnd(n),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&n!==i.Z_STREAM_END&&(0!==m.avail_in||o!==i.Z_FINISH&&o!==i.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(m.output,m.next_out),c=m.next_out-l,d=s.buf2string(m.output,l),m.next_out=c,m.avail_out=p-c,c&&r.arraySet(m.output,m.output,l,c,0),this.onData(d)):this.onData(r.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!==i.Z_STREAM_END);return n===i.Z_STREAM_END&&(o=i.Z_FINISH),o===i.Z_FINISH?(n=a.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===i.Z_OK):o!==i.Z_SYNC_FLUSH||(this.onEnd(i.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===i.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.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")},5723:function(e){e.exports=function(){function e(t,n,a){function r(i,o){if(!n[i]){if(!t[i]){if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return r(t[i][1][e]||e)}),c,c.exports,e,t,n,a)}return n[i].exports}for(var s=void 0,i=0;i<a.length;i++)r(a[i]);return r}return e}()({1:[function(e,t,n){var a=4096,r=2*a+32,s=2*a-1,i=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(r),this.input_=e,this.reset()}o.READ_SIZE=a,o.IBUF_MASK=s,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,a);if(t<0)throw new Error("Unexpected end of input");if(t<a){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_[(a<<1)+n]=this.buf_[n];this.buf_ptr_=a}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_&s]<<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_&i[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,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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 a=e("./streams").BrotliInput,r=e("./streams").BrotliOutput,s=e("./bit_reader"),i=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,y=6,v=2,_=8,b=255,E=1080,w=18,x=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),S=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]),T=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 P(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 M(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<<t)}return 0}function I(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function A(e){var t,n,a,r=new I;if(r.input_end=e.readBits(1),r.input_end&&e.readBits(1))return r;if(7===(t=e.readBits(2)+4)){if(r.is_metadata=!0,0!==e.readBits(1))throw new Error("Invalid reserved bit");if(0===(n=e.readBits(2)))return r;for(a=0;a<n;a++){var s=e.readBits(8);if(a+1===n&&n>1&&0===s)throw new Error("Invalid size byte");r.meta_block_length|=s<<8*a}}else for(a=0;a<t;++a){var i=e.readBits(4);if(a+1===t&&t>4&&0===i)throw new Error("Invalid size nibble");r.meta_block_length|=i<<4*a}return++r.meta_block_length,r.input_end||r.is_metadata||(r.is_uncompressed=e.readBits(1)),r}function N(e,t,n){var a;return n.fillBitWindow(),(a=e[t+=n.val_>>>n.bit_pos_&b].bits-_)>0&&(n.bit_pos_+=_,t+=e[t].value,t+=n.val_>>>n.bit_pos_&(1<<a)-1),n.bit_pos_+=e[t].bits,e[t].value}function O(e,t,n,a){for(var r=0,s=m,i=0,c=0,u=32768,d=[],h=0;h<32;h++)d.push(new o(0,0));for(l(d,0,5,e,w);r<t&&u>0;){var f,g=0;if(a.readMoreInput(),a.fillBitWindow(),g+=a.val_>>>a.bit_pos_&31,a.bit_pos_+=d[g].bits,(f=255&d[g].value)<p)i=0,n[r++]=f,0!==f&&(s=f,u-=32768>>f);else{var y,v,_=f-14,b=0;if(f===p&&(b=s),c!==b&&(i=0,c=b),y=i,i>0&&(i-=2,i<<=_),r+(v=(i+=a.readBits(_)+3)-y)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var E=0;E<v;E++)n[r+E]=c;r+=v,0!==c&&(u-=v<<15-c)}}if(0!==u)throw new Error("[ReadHuffmanCodeLengths] space = "+u);for(;r<t;r++)n[r]=0}function R(e,t,n,a){var r,s=0,i=new Uint8Array(e);if(a.readMoreInput(),1===(r=a.readBits(2))){for(var c=e-1,u=0,d=new Int32Array(4),m=a.readBits(2)+1;c;)c>>=1,++u;for(p=0;p<m;++p)d[p]=a.readBits(u)%e,i[d[p]]=2;switch(i[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");i[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");a.readBits(1)?(i[d[2]]=3,i[d[3]]=3):i[d[0]]=2}}else{var p,h=new Uint8Array(w),f=32,g=0,y=[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=r;p<w&&f>0;++p){var v,b=x[p],E=0;a.fillBitWindow(),E+=a.val_>>>a.bit_pos_&15,a.bit_pos_+=y[E].bits,v=y[E].value,h[b]=v,0!==v&&(f-=32>>v,++g)}if(1!==g&&0!==f)throw new Error("[ReadHuffmanCode] invalid num_codes or space");O(h,e,i,a)}if(0===(s=l(t,n,_,i,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return s}function F(e,t,n){var a,r;return a=N(e,t,n),r=u.kBlockLengthPrefixCode[a].nbits,u.kBlockLengthPrefixCode[a].offset+n.readBits(r)}function D(e,t,n){var a;return e<S?(n+=C[e],a=t[n&=3]+k[e]):a=e-S+1,a}function B(e,t){for(var n=e[t],a=t;a;--a)e[a]=e[a-1];e[0]=n}function V(e,t){var n,a=new Uint8Array(256);for(n=0;n<256;++n)a[n]=n;for(n=0;n<t;++n){var r=e[n];e[n]=a[r],r&&B(a,r)}}function L(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*T[e+31>>>5]),this.htrees=new Uint32Array(t)}function z(e,t){var n,a,r={num_htrees:null,context_map:null},s=0;t.readMoreInput();var i=r.num_htrees=M(t)+1,l=r.context_map=new Uint8Array(e);if(i<=1)return r;for(t.readBits(1)&&(s=t.readBits(4)+1),n=[],a=0;a<E;a++)n[a]=new o(0,0);for(R(i+s,n,0,t),a=0;a<e;){var c;if(t.readMoreInput(),0===(c=N(n,0,t)))l[a]=0,++a;else if(c<=s)for(var u=1+(1<<c)+t.readBits(c);--u;){if(a>=e)throw new Error("[DecodeContextMap] i >= context_map_size");l[a]=0,++a}else l[a]=c-s,++a}return t.readBits(1)&&V(l,e),r}function G(e,t,n,a,r,s,i){var o,l=2*n,c=n,u=N(t,n*E,i);(o=0===u?r[l+(1&s[c])]:1===u?r[l+(s[c]-1&1)]+1:u-2)>=e&&(o-=e),a[n]=o,r[l+(1&s[c])]=o,++s[c]}function H(e,t,n,a,r,i){var o,l=r+1,c=n&r,u=i.pos_&s.IBUF_MASK;if(t<8||i.bit_pos_+(t<<3)<i.bit_end_pos_)for(;t-- >0;)i.readMoreInput(),a[c++]=i.readBits(8),c===l&&(e.write(a,l),c=0);else{if(i.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;i.bit_pos_<32;)a[c]=i.val_>>>i.bit_pos_,i.bit_pos_+=8,++c,--t;if(u+(o=i.bit_end_pos_-i.bit_pos_>>3)>s.IBUF_MASK){for(var d=s.IBUF_MASK+1-u,m=0;m<d;m++)a[c+m]=i.buf_[u+m];o-=d,c+=d,t-=d,u=0}for(m=0;m<o;m++)a[c+m]=i.buf_[u+m];if(t-=o,(c+=o)>=l)for(e.write(a,l),c-=l,m=0;m<c;m++)a[m]=a[l+m];for(;c+t>=l;){if(o=l-c,i.input_.read(a,c,o)<o)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(a,l),t-=o,c=0}if(i.input_.read(a,c,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");i.reset()}}function U(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function W(e){var t=new a(e),n=new s(t);return P(n),A(n).meta_block_length}function j(e,t){var n=new a(e);null==t&&(t=W(e));var s=new Uint8Array(t),i=new r(s);return Z(n,i),i.pos<i.buffer.length&&(i.buffer=i.buffer.subarray(0,i.pos)),i.buffer}function Z(e,t){var n,a,r,l,m,p,_,b,w,x=0,C=0,k=0,T=0,I=[16,15,11,4],O=0,B=0,V=0,W=[new L(0,0),new L(0,0),new L(0,0)],j=128+s.READ_SIZE;a=(1<<(k=P(w=new s(e))))-16,l=(r=1<<k)-1,m=new Uint8Array(r+j+i.maxDictionaryWordLength),p=r,_=[],b=[];for(var Z=0;Z<3*E;Z++)_[Z]=new o(0,0),b[Z]=new o(0,0);for(;!C;){var q,Y,K,X,J,Q,$,ee,te,ne=0,ae=[1<<28,1<<28,1<<28],re=[0],se=[1,1,1],ie=[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)W[n].codes=null,W[n].htrees=null;w.readMoreInput();var ye=A(w);if(x+(ne=ye.meta_block_length)>t.buffer.length){var ve=new Uint8Array(x+ne);ve.set(t.buffer),t.buffer=ve}if(C=ye.input_end,q=ye.is_uncompressed,ye.is_metadata)for(U(w);ne>0;--ne)w.readMoreInput(),w.readBits(8);else if(0!==ne)if(q)w.bit_pos_=w.bit_pos_+7&-8,H(t,ne,x,m,l,w),x+=ne;else{for(n=0;n<3;++n)se[n]=M(w)+1,se[n]>=2&&(R(se[n]+2,_,n*E,w),R(g,b,n*E,w),ae[n]=F(b,n*E,w),oe[n]=1);for(w.readMoreInput(),X=(1<<(Y=w.readBits(2)))-1,J=(K=S+(w.readBits(4)<<Y))+(48<<Y),ce=new Uint8Array(se[0]),n=0;n<se[0];++n)w.readMoreInput(),ce[n]=w.readBits(2)<<1;var _e=z(se[0]<<y,w);Q=_e.num_htrees,le=_e.context_map;var be=z(se[2]<<v,w);for($=be.num_htrees,ue=be.context_map,W[0]=new L(h,Q),W[1]=new L(f,se[1]),W[2]=new L(J,$),n=0;n<3;++n)W[n].decode(w);for(de=0,pe=0,ee=ce[re[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1],te=W[1].htrees[0];ne>0;){var Ee,we,xe,Se,Ce,ke,Te,Pe,Me,Ie,Ae,Ne;for(w.readMoreInput(),0===ae[1]&&(G(se[1],_,1,re,ie,oe,w),ae[1]=F(b,E,w),te=W[1].htrees[re[1]]),--ae[1],(we=(Ee=N(W[1].codes,te,w))>>6)>=2?(we-=2,Te=-1):Te=0,xe=u.kInsertRangeLut[we]+(Ee>>3&7),Se=u.kCopyRangeLut[we]+(7&Ee),Ce=u.kInsertLengthPrefixCode[xe].offset+w.readBits(u.kInsertLengthPrefixCode[xe].nbits),ke=u.kCopyLengthPrefixCode[Se].offset+w.readBits(u.kCopyLengthPrefixCode[Se].nbits),B=m[x-1&l],V=m[x-2&l],Me=0;Me<Ce;++Me)w.readMoreInput(),0===ae[0]&&(G(se[0],_,0,re,ie,oe,w),ae[0]=F(b,0,w),de=re[0]<<y,ee=ce[re[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1]),me=le[de+(c.lookup[fe+B]|c.lookup[ge+V])],--ae[0],V=B,B=N(W[0].codes,W[0].htrees[me],w),m[x&l]=B,(x&l)===l&&t.write(m,r),++x;if((ne-=Ce)<=0)break;if(Te<0&&(w.readMoreInput(),0===ae[2]&&(G(se[2],_,2,re,ie,oe,w),ae[2]=F(b,2*E,w),pe=re[2]<<v),--ae[2],he=ue[pe+(255&(ke>4?3:ke-2))],(Te=N(W[2].codes,W[2].htrees[he],w))>=K&&(Ne=(Te-=K)&X,Te=K+((Oe=(2+(1&(Te>>=Y))<<(Ae=1+(Te>>1)))-4)+w.readBits(Ae)<<Y)+Ne)),(Pe=D(Te,I,O))<0)throw new Error("[BrotliDecompress] invalid distance");if(Ie=x&l,Pe>(T=x<a&&T!==a?x:a)){if(!(ke>=i.minDictionaryWordLength&&ke<=i.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+x+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Oe=i.offsetsByLength[ke],Re=Pe-T-1,Fe=i.sizeBitsByLength[ke],De=Re>>Fe;if(Oe+=(Re&(1<<Fe)-1)*ke,!(De<d.kNumTransforms))throw new Error("Invalid backward reference. pos: "+x+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Be=d.transformDictionaryWord(m,Ie,Oe,ke,De);if(x+=Be,ne-=Be,(Ie+=Be)>=p){t.write(m,r);for(var Ve=0;Ve<Ie-p;Ve++)m[Ve]=m[p+Ve]}}else{if(Te>0&&(I[3&O]=Pe,++O),ke>ne)throw new Error("Invalid backward reference. pos: "+x+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);for(Me=0;Me<ke;++Me)m[x&l]=m[x-Pe&l],(x&l)===l&&t.write(m,r),++x,--ne}B=m[x-1&l],V=m[x-2&l]}x&=1073741823}}t.write(m,x&l)}L.prototype.decode=function(e){var t,n=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=n,n+=R(this.alphabet_size,this.codes,n,e)},n.BrotliDecompressedSize=W,n.BrotliDecompressBuffer=j,n.BrotliDecompress=Z,i.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(e,t,n){var a=e("base64-js");n.init=function(){return(0,e("./decode").BrotliDecompressBuffer)(a.toByteArray(e("./dictionary.bin.js")))}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(e,t,n){t.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJ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W9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(e,t,n){var a=e("./dictionary-browser");n.init=function(){n.dictionary=a.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 a(e,t){this.bits=e,this.value=t}n.HuffmanCode=a;var r=15;function s(e,t){for(var n=1<<t-1;e&n;)n>>=1;return(e&n-1)+n}function i(e,t,n,r,s){do{e[t+(r-=n)]=new a(s.bits,s.value)}while(r>0)}function o(e,t,n){for(var a=1<<t-n;t<r&&!((a-=e[t])<=0);)++t,a<<=1;return t-n}n.BrotliBuildHuffmanTable=function(e,t,n,l,c){var u,d,m,p,h,f,g,y,v,_,b=t,E=new Int32Array(r+1),w=new Int32Array(r+1);for(_=new Int32Array(c),d=0;d<c;d++)E[l[d]]++;for(w[1]=0,u=1;u<r;u++)w[u+1]=w[u]+E[u];for(d=0;d<c;d++)0!==l[d]&&(_[w[l[d]]++]=d);if(v=y=1<<(g=n),1===w[r]){for(m=0;m<v;++m)e[t+m]=new a(0,65535&_[0]);return v}for(m=0,d=0,u=1,p=2;u<=n;++u,p<<=1)for(;E[u]>0;--E[u])i(e,t+m,p,y,new a(255&u,65535&_[d++])),m=s(m,u);for(f=v-1,h=-1,u=n+1,p=2;u<=r;++u,p<<=1)for(;E[u]>0;--E[u])(m&f)!==h&&(t+=y,v+=y=1<<(g=o(E,u,n)),e[b+(h=m&f)]=new a(g+n&255,t-b-h&65535)),i(e,t+(m>>n),p,y,new a(u-n&255,65535&_[d++])),m=s(m,u);return v}},{}],8:[function(e,t,n){"use strict";n.byteLength=u,n.toByteArray=m,n.fromByteArray=f;for(var a=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=i.length;o<l;++o)a[o]=i[o],r[i.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],a=t[1];return 3*(n+a)/4-a}function d(e,t,n){return 3*(t+n)/4-n}function m(e){for(var t,n=c(e),a=n[0],i=n[1],o=new s(d(e,a,i)),l=0,u=i>0?a-4:a,m=0;m<u;m+=4)t=r[e.charCodeAt(m)]<<18|r[e.charCodeAt(m+1)]<<12|r[e.charCodeAt(m+2)]<<6|r[e.charCodeAt(m+3)],o[l++]=t>>16&255,o[l++]=t>>8&255,o[l++]=255&t;return 2===i&&(t=r[e.charCodeAt(m)]<<2|r[e.charCodeAt(m+1)]>>4,o[l++]=255&t),1===i&&(t=r[e.charCodeAt(m)]<<10|r[e.charCodeAt(m+1)]<<4|r[e.charCodeAt(m+2)]>>2,o[l++]=t>>8&255,o[l++]=255&t),o}function p(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function h(e,t,n){for(var a,r=[],s=t;s<n;s+=3)a=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),r.push(p(a));return r.join("")}function f(e){for(var t,n=e.length,r=n%3,s=[],i=16383,o=0,l=n-r;o<l;o+=i)s.push(h(e,o,o+i>l?l:o+i));return 1===r?(t=e[n-1],s.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],s.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){function a(e,t){this.offset=e,this.nbits=t}n.kBlockLengthPrefixCode=[new a(1,2),new a(5,2),new a(9,2),new a(13,2),new a(17,3),new a(25,3),new a(33,3),new a(41,3),new a(49,4),new a(65,4),new a(81,4),new a(97,4),new a(113,5),new a(145,5),new a(177,5),new a(209,5),new a(241,6),new a(305,6),new a(369,7),new a(497,8),new a(753,9),new a(1265,10),new a(2289,11),new a(4337,12),new a(8433,13),new a(16625,24)],n.kInsertLengthPrefixCode=[new a(0,0),new a(1,0),new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,1),new a(8,1),new a(10,2),new a(14,2),new a(18,3),new a(26,3),new a(34,4),new a(50,4),new a(66,5),new a(98,5),new a(130,6),new a(194,7),new a(322,8),new a(578,9),new a(1090,10),new a(2114,12),new a(6210,14),new a(22594,24)],n.kCopyLengthPrefixCode=[new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,0),new a(7,0),new a(8,0),new a(9,0),new a(10,1),new a(12,1),new a(14,2),new a(18,2),new a(22,3),new a(30,3),new a(38,4),new a(54,4),new a(70,5),new a(102,5),new a(134,6),new a(198,7),new a(326,8),new a(582,9),new a(1094,10),new a(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 a(e){this.buffer=e,this.pos=0}function r(e){this.buffer=e,this.pos=0}a.prototype.read=function(e,t,n){this.pos+n>this.buffer.length&&(n=this.buffer.length-this.pos);for(var a=0;a<n;a++)e[t+a]=this.buffer[this.pos+a];return this.pos+=n,n},n.BrotliInput=a,r.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=r},{}],11:[function(e,t,n){var a=e("./dictionary"),r=0,s=1,i=2,o=3,l=4,c=5,u=6,d=7,m=8,p=9,h=10,f=11,g=12,y=13,v=14,_=15,b=16,E=17,w=18,x=20;function S(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(var a=0;a<e.length;a++)this.prefix[a]=e.charCodeAt(a);for(a=0;a<n.length;a++)this.suffix[a]=n.charCodeAt(a)}var C=[new S("",r,""),new S("",r," "),new S(" ",r," "),new S("",g,""),new S("",h," "),new S("",r," the "),new S(" ",r,""),new S("s ",r," "),new S("",r," of "),new S("",h,""),new S("",r," and "),new S("",y,""),new S("",s,""),new S(", ",r," "),new S("",r,", "),new S(" ",h," "),new S("",r," in "),new S("",r," to "),new S("e ",r," "),new S("",r,'"'),new S("",r,"."),new S("",r,'">'),new S("",r,"\n"),new S("",o,""),new S("",r,"]"),new S("",r," for "),new S("",v,""),new S("",i,""),new S("",r," a "),new S("",r," that "),new S(" ",h,""),new S("",r,". "),new S(".",r,""),new S(" ",r,", "),new S("",_,""),new S("",r," with "),new S("",r,"'"),new S("",r," from "),new S("",r," by "),new S("",b,""),new S("",E,""),new S(" the ",r,""),new S("",l,""),new S("",r,". The "),new S("",f,""),new S("",r," on "),new S("",r," as "),new S("",r," is "),new S("",d,""),new S("",s,"ing "),new S("",r,"\n\t"),new S("",r,":"),new S(" ",r,". "),new S("",r,"ed "),new S("",x,""),new S("",w,""),new S("",u,""),new S("",r,"("),new S("",h,", "),new S("",m,""),new S("",r," at "),new S("",r,"ly "),new S(" the ",r," of "),new S("",c,""),new S("",p,""),new S(" ",h,", "),new S("",h,'"'),new S(".",r,"("),new S("",f," "),new S("",h,'">'),new S("",r,'="'),new S(" ",r,"."),new S(".com/",r,""),new S(" the ",r," of the "),new S("",h,"'"),new S("",r,". This "),new S("",r,","),new S(".",r," "),new S("",h,"("),new S("",h,"."),new S("",r," not "),new S(" ",r,'="'),new S("",r,"er "),new S(" ",f," "),new S("",r,"al "),new S(" ",f,""),new S("",r,"='"),new S("",f,'"'),new S("",h,". "),new S(" ",r,"("),new S("",r,"ful "),new S(" ",h,". "),new S("",r,"ive "),new S("",r,"less "),new S("",f,"'"),new S("",r,"est "),new S(" ",h,"."),new S("",f,'">'),new S(" ",r,"='"),new S("",h,","),new S("",r,"ize "),new S("",f,"."),new S(" ",r,""),new S(" ",r,","),new S("",h,'="'),new S("",f,'="'),new S("",r,"ous "),new S("",f,", "),new S("",h,"='"),new S(" ",h,","),new S(" ",f,'="'),new S(" ",f,", "),new S("",f,","),new S("",f,"("),new S("",f,". "),new S(" ",f,"."),new S("",f,"='"),new S(" ",f,". "),new S(" ",h,'="'),new S(" ",f,"='"),new S(" ",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,r,s){var i,o=C[s].prefix,l=C[s].suffix,c=C[s].transform,u=c<g?0:c-(g-1),d=0,m=t;u>r&&(u=r);for(var y=0;y<o.length;)e[t++]=o[y++];for(n+=u,r-=u,c<=p&&(r-=c),d=0;d<r;d++)e[t++]=a.dictionary[n+d];if(i=t-r,c===h)k(e,i);else if(c===f)for(;r>0;){var v=k(e,i);i+=v,r-=v}for(var _=0;_<l.length;)e[t++]=l[_++];return t-m}},{"./dictionary":6}],12:[function(e,t,n){t.exports=e("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)},6411:function(e,t){var n,a,r;
/*!
autosize 4.0.4
license: MIT
http://www.jacklmoore.com/autosize
*/a=[e,t],n=function(e,t){"use strict";var n,a,r="function"==typeof Map?new Map:(n=[],a=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return a[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),a.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),a.splice(t,1))}}),s=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){s=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,a=null,i=function(){e.clientWidth!==n&&m()},o=function(t){window.removeEventListener("resize",i,!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]})),r.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",i,!1),e.addEventListener("input",m,!1),e.addEventListener("autosize:update",m,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.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 a=u(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,a.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function m(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),d(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),d(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),a!==r){a=r;var i=s("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function o(e){var t=r.get(e);t&&t.destroy()}function l(e){var t=r.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 i(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===(r="function"==typeof n?n.apply(t,a):n)||(e.exports=r)},4403:function(e,t){var n;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===s){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var o in n)a.call(n,o)&&n[o]&&e.push(o)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},4827:function(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()}))]}},1919:function(e){"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function a(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map((function(e){return a(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function i(e,t){try{return t in e}catch(e){return!1}}function o(e,t,n){var r={};return n.isMergeableObject(e)&&s(e).forEach((function(t){r[t]=a(e[t],n)})),s(t).forEach((function(s){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(i(e,s)&&n.isMergeableObject(t[s])?r[s]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(s,n)(e[s],t[s],n):r[s]=a(t[s],n))})),r}function l(e,n,s){(s=s||{}).arrayMerge=s.arrayMerge||r,s.isMergeableObject=s.isMergeableObject||t,s.cloneUnlessOtherwiseSpecified=a;var i=Array.isArray(n);return i===Array.isArray(e)?i?s.arrayMerge(e,n,s):o(e,n,s):a(n,s)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var c=l;e.exports=c},9894:function(e,t,n){var a=n(4827);e.exports=function(e){var t=a(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=a(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r: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 s=e.nodeName,i=document.createElement(s);i.innerHTML="&nbsp;","TEXTAREA"===s.toUpperCase()&&i.setAttribute("rows","1");var o=a(e,"font-size");i.style.fontSize=o,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},5372:function(e,t,n){"use strict";var a=n(9567);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,s,i){if(i!==a){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:s,resetWarningCache:r};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var a,r=this&&this.__extends||(a=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}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__assign||Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=this&&this.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&(n[a[r]]=e[a[r]])}return n};t.__esModule=!0;var o=n(9196),l=n(2652),c=n(6411),u=n(9894),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 r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,a=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||a?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),a=(t.onChange,t.style),r=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return o.createElement("textarea",s({},l,{onChange:this.onChange,style:u?s({},a,{maxHeight:u}):a,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},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,s({},e,{innerRef:t}))}))},773:function(e,t,n){"use strict";var a=n(5438);t.Z=a.TextareaAutosize},4793:function(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","ủ":"u","ụ":"u","ử":"u","ữ":"u","ự":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","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("|"),a=new RegExp(n,"g"),r=new RegExp(n,"");function s(e){return t[e]}var i=function(e){return e.replace(a,s)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i},9196:function(e){"use strict";e.exports=window.React}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var s=t[a]={exports:{}};return e[a].call(s.exports,s,s.exports,n),s.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};!function(){"use strict";n.r(a),n.d(a,{PluginMoreMenuItem:function(){return mE},PluginSidebar:function(){return uE},PluginSidebarMoreMenuItem:function(){return dE},PluginTemplateSettingPanel:function(){return tv},initializeEditor:function(){return pE},reinitializeEditor:function(){return hE},store:function(){return ta}});var e={};n.r(e),n.d(e,{closeModal:function(){return B},disableComplementaryArea:function(){return I},enableComplementaryArea:function(){return M},openModal:function(){return D},pinItem:function(){return A},setDefaultComplementaryArea:function(){return P},setFeatureDefaults:function(){return F},setFeatureValue:function(){return R},toggleFeature:function(){return O},unpinItem:function(){return N}});var t={};n.r(t),n.d(t,{getActiveComplementaryArea:function(){return V},isComplementaryAreaLoading:function(){return L},isFeatureActive:function(){return G},isItemPinned:function(){return z},isModalActive:function(){return H}});var r={};n.r(r),n.d(r,{removeTemplates:function(){return an},setCanvasMode:function(){return tn},setEditorCanvasContainerView:function(){return nn}});var s={};n.r(s),n.d(s,{__experimentalSetPreviewDeviceType:function(){return sn},addTemplate:function(){return ln},closeGeneralSidebar:function(){return Cn},openGeneralSidebar:function(){return Sn},openNavigationPanelToMenu:function(){return yn},removeTemplate:function(){return cn},revertTemplate:function(){return xn},setEditedEntity:function(){return mn},setEditedPostContext:function(){return hn},setHasPageContentFocus:function(){return Tn},setHomeTemplateId:function(){return pn},setIsInserterOpened:function(){return _n},setIsListViewOpened:function(){return bn},setIsNavigationPanelOpened:function(){return vn},setIsSaveViewOpened:function(){return wn},setNavigationMenu:function(){return dn},setNavigationPanelActiveMenu:function(){return gn},setPage:function(){return fn},setTemplate:function(){return on},setTemplatePart:function(){return un},switchEditorMode:function(){return kn},toggleDistractionFree:function(){return Pn},toggleFeature:function(){return rn},updateSettings:function(){return En}});var i={};n.r(i),n.d(i,{__experimentalGetInsertionPoint:function(){return Hn},__experimentalGetPreviewDeviceType:function(){return Nn},getCanUserCreateMedia:function(){return On},getCurrentTemplateNavigationPanelSubMenu:function(){return qn},getCurrentTemplateTemplateParts:function(){return jn},getEditedPostContext:function(){return Ln},getEditedPostId:function(){return Vn},getEditedPostType:function(){return Bn},getEditorMode:function(){return Zn},getHomeTemplateId:function(){return Dn},getNavigationPanelActiveMenu:function(){return Yn},getPage:function(){return zn},getReusableBlocks:function(){return Rn},getSettings:function(){return Fn},hasPageContentFocus:function(){return Jn},isFeatureActive:function(){return An},isInserterOpened:function(){return Gn},isListViewOpened:function(){return Un},isNavigationOpened:function(){return Kn},isPage:function(){return Xn},isSaveViewOpened:function(){return Wn}});var o={};n.r(o),n.d(o,{getCanvasMode:function(){return Qn},getEditorCanvasContainerView:function(){return $n}});var l=n(9196),c=window.wp.blocks,u=window.wp.blockLibrary,d=window.wp.data,m=window.wp.deprecated,h=n.n(m),f=window.wp.element,g=window.wp.editor,y=n(4403),v=n.n(y),_=window.wp.components,b=window.wp.i18n,E=window.wp.primitives;var w=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));var x=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));var S=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})),C=window.wp.viewport,k=window.wp.preferences;var T=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));const P=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),M=(e,t)=>({registry:n,dispatch:a})=>{if(!t)return;n.select(k.store).get(e,"isComplementaryAreaVisible")||n.dispatch(k.store).set(e,"isComplementaryAreaVisible",!0),a({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},I=e=>({registry:t})=>{t.select(k.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(k.store).set(e,"isComplementaryAreaVisible",!1)},A=(e,t)=>({registry:n})=>{if(!t)return;const a=n.select(k.store).get(e,"pinnedItems");!0!==a?.[t]&&n.dispatch(k.store).set(e,"pinnedItems",{...a,[t]:!0})},N=(e,t)=>({registry:n})=>{if(!t)return;const a=n.select(k.store).get(e,"pinnedItems");n.dispatch(k.store).set(e,"pinnedItems",{...a,[t]:!1})};function O(e,t){return function({registry:n}){h()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),n.dispatch(k.store).toggle(e,t)}}function R(e,t,n){return function({registry:a}){h()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),a.dispatch(k.store).set(e,t,!!n)}}function F(e,t){return function({registry:n}){h()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),n.dispatch(k.store).setDefaults(e,t)}}function D(e){return{type:"OPEN_MODAL",name:e}}function B(){return{type:"CLOSE_MODAL"}}const V=(0,d.createRegistrySelector)((e=>(t,n)=>{const a=e(k.store).get(n,"isComplementaryAreaVisible");if(void 0!==a)return!1===a?null:t?.complementaryAreas?.[n]})),L=(0,d.createRegistrySelector)((e=>(t,n)=>{const a=e(k.store).get(n,"isComplementaryAreaVisible"),r=t?.complementaryAreas?.[n];return a&&void 0===r})),z=(0,d.createRegistrySelector)((e=>(t,n,a)=>{var r;const s=e(k.store).get(n,"pinnedItems");return null===(r=s?.[a])||void 0===r||r})),G=(0,d.createRegistrySelector)((e=>(t,n,a)=>(h()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(k.store).get(n,a))));function H(e,t){return e.activeModal===t}var U=(0,d.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:n,area:a}=t;return e[n]?e:{...e,[n]:a}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:n,area:a}=t;return{...e,[n]:a}}}return e},activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}});const W=(0,d.createReduxStore)("core/interface",{reducer:U,actions:e,selectors:t});(0,d.register)(W);var j=window.wp.plugins,Z=(0,j.withPluginContext)(((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`})));var q=Z((function({as:e=_.Button,scope:t,identifier:n,icon:a,selectedIcon:r,name:s,...i}){const o=e,c=(0,d.useSelect)((e=>e(W).getActiveComplementaryArea(t)===n),[n,t]),{enableComplementaryArea:u,disableComplementaryArea:m}=(0,d.useDispatch)(W);return(0,l.createElement)(o,{icon:r&&c?r:a,"aria-controls":n.replace("/",":"),onClick:()=>{c?m(t):u(t,n)},...i})}));var Y=({smallScreenTitle:e,children:t,className:n,toggleButtonProps:a})=>{const r=(0,l.createElement)(q,{icon:T,...a});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},e&&(0,l.createElement)("span",{className:"interface-complementary-area-header__small-title"},e),r),(0,l.createElement)("div",{className:v()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},t,r))};const K=()=>{};function X({name:e,as:t=_.Button,onClick:n,...a}){return(0,l.createElement)(_.Fill,{name:e},(({onClick:e})=>(0,l.createElement)(t,{onClick:n||e?(...t)=>{(n||K)(...t),(e||K)(...t)}:void 0,...a})))}X.Slot=function({name:e,as:t=_.ButtonGroup,fillProps:n={},bubblesVirtually:a,...r}){return(0,l.createElement)(_.Slot,{name:e,bubblesVirtually:a,fillProps:n},(e=>{if(!f.Children.toArray(e).length)return null;const n=[];f.Children.forEach(e,(({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&n.push(t)}));const a=f.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&n.includes(e.props.__unstableTarget)?null:e));return(0,l.createElement)(t,{...r},a)}))};var J=X;const Q=({__unstableExplicitMenuItem:e,__unstableTarget:t,...n})=>(0,l.createElement)(_.MenuItem,{...n});function $({scope:e,target:t,__unstableExplicitMenuItem:n,...a}){return(0,l.createElement)(q,{as:a=>(0,l.createElement)(J,{__unstableExplicitMenuItem:n,__unstableTarget:`${e}/${t}`,as:Q,name:`${e}/plugin-more-menu`,...a}),role:"menuitemcheckbox",selectedIcon:w,name:t,scope:e,...a})}function ee({scope:e,...t}){return(0,l.createElement)(_.Fill,{name:`PinnedItems/${e}`,...t})}ee.Slot=function({scope:e,className:t,...n}){return(0,l.createElement)(_.Slot,{name:`PinnedItems/${e}`,...n},(e=>e?.length>0&&(0,l.createElement)("div",{className:v()(t,"interface-pinned-items")},e)))};var te=ee;function ne({scope:e,children:t,className:n,id:a}){return(0,l.createElement)(_.Fill,{name:`ComplementaryArea/${e}`},(0,l.createElement)("div",{id:a,className:n},t))}const ae=Z((function({children:e,className:t,closeLabel:n=(0,b.__)("Close plugin"),identifier:a,header:r,headerClassName:s,icon:i,isPinnable:o=!0,panelClassName:c,scope:u,name:m,smallScreenTitle:p,title:h,toggleShortcut:g,isActiveByDefault:y}){const{isLoading:E,isActive:T,isPinned:P,activeArea:M,isSmall:I,isLarge:A,showIconLabels:N}=(0,d.useSelect)((e=>{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:n,isItemPinned:r}=e(W),{get:s}=e(k.store),i=t(u);return{isLoading:n(u),isActive:i===a,isPinned:r(u,a),activeArea:i,isSmall:e(C.store).isViewportMatch("< medium"),isLarge:e(C.store).isViewportMatch("large"),showIconLabels:s("core","showIconLabels")}}),[a,u]);!function(e,t,n,a,r){const s=(0,f.useRef)(!1),i=(0,f.useRef)(!1),{enableComplementaryArea:o,disableComplementaryArea:l}=(0,d.useDispatch)(W);(0,f.useEffect)((()=>{a&&r&&!s.current?(l(e),i.current=!0):i.current&&!r&&s.current?(i.current=!1,o(e,t)):i.current&&n&&n!==t&&(i.current=!1),r!==s.current&&(s.current=r)}),[a,r,e,t,n,l,o])}(u,a,M,T,I);const{enableComplementaryArea:O,disableComplementaryArea:R,pinItem:F,unpinItem:D}=(0,d.useDispatch)(W);return(0,f.useEffect)((()=>{y&&void 0===M&&!I?O(u,a):void 0===M&&I&&R(u,a)}),[M,y,u,a,I,O,R]),(0,l.createElement)(l.Fragment,null,o&&(0,l.createElement)(te,{scope:u},P&&(0,l.createElement)(q,{scope:u,identifier:a,isPressed:T&&(!N||A),"aria-expanded":T,"aria-disabled":E,label:h,icon:N?w:i,showTooltip:!N,variant:N?"tertiary":void 0,size:"compact"})),m&&o&&(0,l.createElement)($,{target:m,scope:u,icon:i},h),T&&(0,l.createElement)(ne,{className:v()("interface-complementary-area",t),scope:u,id:a.replace("/",":")},(0,l.createElement)(Y,{className:s,closeLabel:n,onClose:()=>R(u),smallScreenTitle:p,toggleButtonProps:{label:n,shortcut:g,scope:u,identifier:a}},r||(0,l.createElement)(l.Fragment,null,(0,l.createElement)("strong",null,h),o&&(0,l.createElement)(_.Button,{className:"interface-complementary-area__pin-unpin-item",icon:P?x:S,label:P?(0,b.__)("Unpin from toolbar"):(0,b.__)("Pin to toolbar"),onClick:()=>(P?D:F)(u,a),isPressed:P,"aria-expanded":P}))),(0,l.createElement)(_.Panel,{className:c},e)))}));ae.Slot=function({scope:e,...t}){return(0,l.createElement)(_.Slot,{name:`ComplementaryArea/${e}`,...t})};var re=ae,se=window.wp.compose;function ie({children:e,className:t,ariaLabel:n,as:a="div",...r}){return(0,l.createElement)(a,{className:v()("interface-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...r},e)}const oe={hidden:{opacity:0},hover:{opacity:1,transition:{type:"tween",delay:.2,delayChildren:.2}},distractionFreeInactive:{opacity:1,transition:{delay:0}}};var le=(0,f.forwardRef)((function({isDistractionFree:e,footer:t,header:n,editorNotices:a,sidebar:r,secondarySidebar:s,notices:i,content:o,actions:c,labels:u,className:d,enableRegionNavigation:m=!0,shortcuts:p},h){const g=(0,_.__unstableUseNavigateRegions)(p);!function(e){(0,f.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");const y={...{header:(0,b._x)("Header","header landmark area"),body:(0,b.__)("Content"),secondarySidebar:(0,b.__)("Block Library"),sidebar:(0,b.__)("Settings"),actions:(0,b.__)("Publish"),footer:(0,b.__)("Footer")},...u};return(0,l.createElement)("div",{...m?g:{},ref:(0,se.useMergeRefs)([h,m?g.ref:void 0]),className:v()(d,"interface-interface-skeleton",g.className,!!t&&"has-footer")},(0,l.createElement)("div",{className:"interface-interface-skeleton__editor"},!!n&&(0,l.createElement)(ie,{as:_.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":y.header,initial:e?"hidden":"distractionFreeInactive",whileHover:e?"hover":"distractionFreeInactive",animate:e?"hidden":"distractionFreeInactive",variants:oe,transition:e?{type:"tween",delay:.8}:void 0},n),e&&(0,l.createElement)("div",{className:"interface-interface-skeleton__header"},a),(0,l.createElement)("div",{className:"interface-interface-skeleton__body"},!!s&&(0,l.createElement)(ie,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:y.secondarySidebar},s),!!i&&(0,l.createElement)("div",{className:"interface-interface-skeleton__notices"},i),(0,l.createElement)(ie,{className:"interface-interface-skeleton__content",ariaLabel:y.body},o),!!r&&(0,l.createElement)(ie,{className:"interface-interface-skeleton__sidebar",ariaLabel:y.sidebar},r),!!c&&(0,l.createElement)(ie,{className:"interface-interface-skeleton__actions",ariaLabel:y.actions},c))),!!t&&(0,l.createElement)(ie,{className:"interface-interface-skeleton__footer",ariaLabel:y.footer},t))}));var ce=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));function ue({as:e=_.DropdownMenu,className:t,label:n=(0,b.__)("Options"),popoverProps:a,toggleProps:r,children:s}){return(0,l.createElement)(e,{className:v()("interface-more-menu-dropdown",t),icon:ce,label:n,popoverProps:{placement:"bottom-end",...a,className:v()("interface-more-menu-dropdown__content",a?.className)},toggleProps:{tooltipPosition:"bottom",...r,size:"compact"}},(e=>s(e)))}var de=window.wp.widgets,me=window.wp.hooks,pe=window.wp.mediaUtils;(0,me.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",(()=>pe.MediaUpload));var he=window.wp.blockEditor,fe=window.wp.notices,ge=window.wp.coreData,ye={grad:.9,turn:360,rad:360/(2*Math.PI)},ve=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},_e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},be=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Ee=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},we=function(e){return{r:be(e.r,0,255),g:be(e.g,0,255),b:be(e.b,0,255),a:be(e.a)}},xe=function(e){return{r:_e(e.r),g:_e(e.g),b:_e(e.b),a:_e(e.a,3)}},Se=/^#([0-9a-f]{3,8})$/i,Ce=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ke=function(e){var t=e.r,n=e.g,a=e.b,r=e.a,s=Math.max(t,n,a),i=s-Math.min(t,n,a),o=i?s===t?(n-a)/i:s===n?2+(a-t)/i:4+(t-n)/i:0;return{h:60*(o<0?o+6:o),s:s?i/s*100:0,v:s/255*100,a:r}},Te=function(e){var t=e.h,n=e.s,a=e.v,r=e.a;t=t/360*6,n/=100,a/=100;var s=Math.floor(t),i=a*(1-n),o=a*(1-(t-s)*n),l=a*(1-(1-t+s)*n),c=s%6;return{r:255*[a,o,i,i,l,a][c],g:255*[l,a,a,o,i,i][c],b:255*[i,i,l,a,a,o][c],a:r}},Pe=function(e){return{h:Ee(e.h),s:be(e.s,0,100),l:be(e.l,0,100),a:be(e.a)}},Me=function(e){return{h:_e(e.h),s:_e(e.s),l:_e(e.l),a:_e(e.a,3)}},Ie=function(e){return Te((n=(t=e).s,{h:t.h,s:(n*=((a=t.l)<50?a:100-a)/100)>0?2*n/(a+n)*100:0,v:a+n,a:t.a}));var t,n,a},Ae=function(e){return{h:(t=ke(e)).h,s:(r=(200-(n=t.s))*(a=t.v)/100)>0&&r<200?n*a/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,a,r},Ne=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Oe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Re=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,De={string:[[function(e){var t=Se.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?_e(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?_e(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Re.exec(e)||Fe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:we({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=Ne.exec(e)||Oe.exec(e);if(!t)return null;var n,a,r=Pe({h:(n=t[1],a=t[2],void 0===a&&(a="deg"),Number(n)*(ye[a]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Ie(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,a=e.b,r=e.a,s=void 0===r?1:r;return ve(t)&&ve(n)&&ve(a)?we({r:Number(t),g:Number(n),b:Number(a),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,a=e.l,r=e.a,s=void 0===r?1:r;if(!ve(t)||!ve(n)||!ve(a))return null;var i=Pe({h:Number(t),s:Number(n),l:Number(a),a:Number(s)});return Ie(i)},"hsl"],[function(e){var t=e.h,n=e.s,a=e.v,r=e.a,s=void 0===r?1:r;if(!ve(t)||!ve(n)||!ve(a))return null;var i=function(e){return{h:Ee(e.h),s:be(e.s,0,100),v:be(e.v,0,100),a:be(e.a)}}({h:Number(t),s:Number(n),v:Number(a),a:Number(s)});return Te(i)},"hsv"]]},Be=function(e,t){for(var n=0;n<t.length;n++){var a=t[n][0](e);if(a)return[a,t[n][1]]}return[null,void 0]},Ve=function(e){return"string"==typeof e?Be(e.trim(),De.string):"object"==typeof e&&null!==e?Be(e,De.object):[null,void 0]},Le=function(e,t){var n=Ae(e);return{h:n.h,s:be(n.s+100*t,0,100),l:n.l,a:n.a}},ze=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Ge=function(e,t){var n=Ae(e);return{h:n.h,s:n.s,l:be(n.l+100*t,0,100),a:n.a}},He=function(){function e(e){this.parsed=Ve(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 _e(ze(this.rgba),2)},e.prototype.isDark=function(){return ze(this.rgba)<.5},e.prototype.isLight=function(){return ze(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=xe(this.rgba)).r,n=e.g,a=e.b,s=(r=e.a)<1?Ce(_e(255*r)):"","#"+Ce(t)+Ce(n)+Ce(a)+s;var e,t,n,a,r,s},e.prototype.toRgb=function(){return xe(this.rgba)},e.prototype.toRgbString=function(){return t=(e=xe(this.rgba)).r,n=e.g,a=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+a+", "+r+")":"rgb("+t+", "+n+", "+a+")";var e,t,n,a,r},e.prototype.toHsl=function(){return Me(Ae(this.rgba))},e.prototype.toHslString=function(){return t=(e=Me(Ae(this.rgba))).h,n=e.s,a=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+a+"%, "+r+")":"hsl("+t+", "+n+"%, "+a+"%)";var e,t,n,a,r},e.prototype.toHsv=function(){return e=ke(this.rgba),{h:_e(e.h),s:_e(e.s),v:_e(e.v),a:_e(e.a,3)};var e},e.prototype.invert=function(){return Ue({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),Ue(Le(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Ue(Le(this.rgba,-e))},e.prototype.grayscale=function(){return Ue(Le(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Ue(Ge(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Ue(Ge(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?Ue({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):_e(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ae(this.rgba);return"number"==typeof e?Ue({h:e,s:t.s,l:t.l,a:t.a}):_e(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Ue(e).toHex()},e}(),Ue=function(e){return e instanceof He?e:new He(e)},We=[],je=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Ze=function(e){return.2126*je(e.r)+.7152*je(e.g)+.0722*je(e.b)};var qe=window.wp.privateApis;const{lock:Ye,unlock:Ke}=(0,qe.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/edit-site"),{useGlobalSetting:Xe,useGlobalStyle:Je}=Ke(he.privateApis);function Qe(){const[e="black"]=Je("color.text"),[t="white"]=Je("color.background"),[n=e]=Je("elements.h1.color.text"),[a]=Xe("color.palette.core"),[r]=Xe("color.palette.theme"),[s]=Xe("color.palette.custom"),i=(null!=r?r:[]).concat(null!=s?s:[]).concat(null!=a?a:[]),o=i.filter((({color:e})=>e!==t&&e!==n)).slice(0,2);return{paletteColors:i,highlightedColors:o}}!function(e){e.forEach((function(e){We.indexOf(e)<0&&(e(He,De),We.push(e))}))}([function(e){e.prototype.luminance=function(){return e=Ze(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,a,r,s,i,o,l,c=t instanceof e?t:new e(t);return s=this.rgba,i=c.toRgb(),n=(o=Ze(s))>(l=Ze(i))?(o+.05)/(l+.05):(l+.05)/(o+.05),void 0===(a=2)&&(a=0),void 0===r&&(r=Math.pow(10,a)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(s=(n=t).size)?"normal":s,"AAA"===(r=void 0===(a=n.level)?"AA":a)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,a,r,s,i}}]);const{cleanEmptyObject:$e,GlobalStylesContext:et}=Ke(he.privateApis),tt={...c.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},nt={"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"},at={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},rt=["border","color","spacing","typography"],st=(e,t)=>{let n=e;return t.forEach((e=>{n=n?.[e]})),n},it=["borderColor","borderWidth","borderStyle"],ot=["top","right","bottom","left"];function lt(e,t,n){if(!t?.[e]||n?.[e]?.style)return[];const{color:a,style:r,width:s}=t[e];return!(a||s)||r?[]:[{path:["border",e,"style"],value:"solid"}]}function ct(e,t,n){const a=function(e,t){const{supportedPanels:n}=(0,d.useSelect)((n=>({supportedPanels:Ke(n(c.store)).getSupportedStyles(e,t)})),[e,t]);return n}(e),r=n?.styles?.blocks?.[e];return(0,f.useMemo)((()=>{const e=a.flatMap((e=>{if(!tt[e])return[];const{value:n}=tt[e],a=n.join("."),r=t[at[a]],s=r?`var:preset|${nt[a]}|${r}`:st(t.style,n);if("linkColor"===e){const e=s?[{path:n,value:s}]:[],a=["elements","link",":hover","color","text"],r=st(t.style,a);return r&&e.push({path:a,value:r}),e}if(it.includes(e)&&s){const e=[{path:n,value:s}];return ot.forEach((t=>{const a=[...n];a.splice(-1,0,t),e.push({path:a,value:s})})),e}return s?[{path:n,value:s}]:[]}));return function(e,t,n){if(!e&&!t)return[];const a=[...lt("top",e,n),...lt("right",e,n),...lt("bottom",e,n),...lt("left",e,n)],{color:r,style:s,width:i}=e||{};return(t||r||i)&&!s&&ot.forEach((e=>{n?.[e]?.style||a.push({path:["border",e,"style"],value:"solid"})})),a}(t.style?.border,t.borderColor,r?.border).forEach((t=>e.push(t))),e}),[a,t,r])}function ut(e,t,n){return e&&"object"==typeof e?(t.reduce(((e,a,r)=>(void 0===e[a]&&(Number.isInteger(t[r+1])?e[a]=[]:e[a]={}),r===t.length-1&&(e[a]=n),e[a])),e),e):e}function dt(e){return e?JSON.parse(JSON.stringify(e)):{}}function mt({name:e,attributes:t,setAttributes:n}){const{user:a,setUserConfig:r}=(0,f.useContext)(et),s=ct(e,t,a),{__unstableMarkNextChangeAsNotPersistent:i}=(0,d.useDispatch)(he.store),{createSuccessNotice:o}=(0,d.useDispatch)(fe.store),u=(0,f.useCallback)((()=>{if(0!==s.length&&s.length>0){const{style:l}=t,u=dt(l),d=dt(a);for(const{path:t,value:n}of s)ut(u,t,void 0),ut(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:$e(u)};i(),n(m),r((()=>d),{undoIgnore:!0}),o((0,b.sprintf)((0,b.__)("%s styles applied."),(0,c.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,b.__)("Undo"),onClick(){i(),n(t),r((()=>a),{undoIgnore:!0})}}]})}}),[i,t,s,o,e,n,r,a]);return(0,l.createElement)(_.BaseControl,{className:"edit-site-push-changes-to-global-styles-control",help:(0,b.sprintf)((0,b.__)("Apply this blocks typography, spacing, dimensions, and color styles to all %s blocks."),(0,c.getBlockType)(e).title)},(0,l.createElement)(_.BaseControl.VisualLabel,null,(0,b.__)("Styles")),(0,l.createElement)(_.Button,{variant:"primary",disabled:0===s.length,onClick:u},(0,b.__)("Apply globally")))}function pt(e){const t=(0,he.useBlockEditingMode)(),n=(0,d.useSelect)((e=>e(ge.store).getCurrentTheme()?.is_block_theme),[]),a=rt.some((t=>(0,c.hasBlockSupport)(e.name,t)));return"default"===t&&a&&n?(0,l.createElement)(he.InspectorAdvancedControls,null,(0,l.createElement)(mt,{...e})):null}const ht=(0,se.createHigherOrderComponent)((e=>t=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{...t}),t.isSelected&&(0,l.createElement)(pt,{...t}))));(0,me.addFilter)("editor.BlockEdit","core/edit-site/push-changes-to-global-styles",ht);var ft=window.wp.router,gt=window.wp.url;function yt(){return void 0!==(0,gt.getQueryArg)(window.location.href,"wp_theme_preview")}function vt(){return yt()?(0,gt.getQueryArg)(window.location.href,"wp_theme_preview"):null}const{useHistory:_t}=Ke(ft.privateApis);function bt(e,t={},n,a=!1){const r=(0,gt.getQueryArgs)(window.location.href),s=(0,gt.removeQueryArgs)(window.location.href,...Object.keys(r));yt()&&(t={...t,wp_theme_preview:vt()});return{href:(0,gt.addQueryArgs)(s,t),onClick:function(r){r.preventDefault(),a?e.replace(t,n):e.push(t,n)}}}function Et(e,t,n){return bt(_t(),e,t,n)}function wt({params:e={},state:t,replace:n=!1,children:a,...r}){const{href:s,onClick:i}=Et(e,t,n);return(0,l.createElement)("a",{href:s,onClick:i,...r},a)}var xt=window.wp.patterns;const St="wp_navigation",Ct="wp_template",kt="wp_template_part",Tt={custom:"custom",theme:"theme",plugin:"plugin"},Pt="uncategorized",{PATTERN_TYPES:Mt,PATTERN_DEFAULT_CATEGORY:It,PATTERN_USER_CATEGORY:At,EXCLUDED_PATTERN_SOURCES:Nt,PATTERN_SYNC_TYPES:Ot}=Ke(xt.privateApis),Rt=[kt,St,Mt.user],Ft={[Ct]:(0,b.__)("Template"),[kt]:(0,b.__)("Template part"),[Mt.user]:(0,b.__)("Pattern"),[St]:(0,b.__)("Navigation")},Dt="grid",Bt="table",Vt="list",Lt="enumeration",zt="in",Gt="notIn",{useLocation:Ht}=Ke(ft.privateApis);function Ut({attributes:e}){const{theme:t,slug:n}=e,{params:a}=Ht(),r=(0,d.useSelect)((e=>{const{getCurrentTheme:a,getEntityRecord:r}=e(ge.store);return r("postType",kt,`${t||a()?.stylesheet}//${n}`)}),[t,n]),s=Et({postId:r?.id,postType:r?.type,canvas:"edit"},{fromTemplateId:a.postId||r?.id});return r?(0,l.createElement)(_.ToolbarButton,{...s,onClick:e=>{s.onClick(e)}},(0,b.__)("Edit")):null}const Wt=(0,se.createHigherOrderComponent)((e=>t=>{const{attributes:n,name:a}=t,r="core/template-part"===a&&n.slug;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{key:"edit",...t}),r&&(0,l.createElement)(he.BlockControls,{group:"other"},(0,l.createElement)(Ut,{attributes:n})))}),"withEditBlockControls");(0,me.addFilter)("editor.BlockEdit","core/edit-site/template-part-edit-button",Wt);const{useLocation:jt}=Ke(ft.privateApis);function Zt({attributes:e}){const{ref:t}=e,{params:n}=jt(),a=(0,he.useBlockEditingMode)(),r=(0,d.useSelect)((e=>e(ge.store).getEntityRecord("postType",St,t)),[t]),s=Et({postId:r?.id,postType:r?.type,canvas:"edit"},{fromTemplateId:n.postId||r?.id});return r&&"default"===a?(0,l.createElement)(he.BlockControls,{group:"other"},(0,l.createElement)(_.ToolbarButton,{...s,onClick:e=>{s.onClick(e)}},(0,b.__)("Edit"))):null}const qt=(0,se.createHigherOrderComponent)((e=>t=>{const{attributes:n,name:a}=t,r="core/navigation"===a&&n.ref;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{...t}),r&&(0,l.createElement)(Zt,{attributes:n}))}),"withEditBlockControls");(0,me.addFilter)("editor.BlockEdit","core/edit-site/navigation-edit-button",qt);var Yt=(0,d.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}}),Kt=window.wp.apiFetch,Xt=n.n(Kt),Jt=window.wp.a11y;const Qt="core/edit-site";function $t(e){return!!e&&(e?.source===Tt.custom&&e?.has_theme_file)}var en=window.wp.htmlEntities;const tn=e=>({registry:t,dispatch:n})=>{t.dispatch(he.store).__unstableSetEditorMode("edit"),n({type:"SET_CANVAS_MODE",mode:e}),"edit"===e&&t.select(k.store).get("core","showListViewByDefault")&&!t.select(k.store).get("core","distractionFree")?t.dispatch(g.store).setIsListViewOpened(!0):t.dispatch(g.store).setIsListViewOpened(!1),t.dispatch(g.store).setIsInserterOpened(!1)},nn=e=>({dispatch:t})=>{t({type:"SET_EDITOR_CANVAS_CONTAINER_VIEW",view:e})},an=e=>async({registry:t})=>{const n=e[0].type===Ct,a=await Promise.allSettled(e.map((e=>t.dispatch(ge.store).deleteEntityRecord("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(a.every((({status:e})=>"fulfilled"===e))){let a;if(1===e.length){const t="string"==typeof e[0].title?e[0].title:e[0].title?.rendered;a=(0,b.sprintf)((0,b.__)('"%s" deleted.'),(0,en.decodeEntities)(t))}else a=n?(0,b.__)("Templates deleted."):(0,b.__)("Template parts deleted.");t.dispatch(fe.store).createSuccessNotice(a,{type:"snackbar",id:"site-editor-template-deleted-success"})}else{let e;if(1===a.length)e=a[0].reason?.message?a[0].reason.message:n?(0,b.__)("An error occurred while deleting the template."):(0,b.__)("An error occurred while deleting the template part.");else{const t=new Set,r=a.filter((({status:e})=>"rejected"===e));for(const e of r)e.reason?.message&&t.add(e.reason.message);e=0===t.size?n?(0,b.__)("An error occurred while deleting the templates."):(0,b.__)("An error occurred while deleting the template parts."):1===t.size?n?(0,b.sprintf)((0,b.__)("An error occurred while deleting the templates: %s"),[...t][0]):(0,b.sprintf)((0,b.__)("An error occurred while deleting the template parts: %s"),[...t][0]):n?(0,b.sprintf)((0,b.__)("Some errors occurred while deleting the templates: %s"),[...t].join(",")):(0,b.sprintf)((0,b.__)("Some errors occurred while deleting the template parts: %s"),[...t].join(","))}t.dispatch(fe.store).createErrorNotice(e,{type:"snackbar"})}};function rn(e){return function({registry:t}){h()("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(k.store).toggle("core/edit-site",e)}}const sn=e=>({registry:t})=>{h()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(g.store).setDeviceType(e)};function on(){return h()("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 ln=e=>async({dispatch:t,registry:n})=>{h()("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});const a=await n.dispatch(ge.store).saveEntityRecord("postType",Ct,e);e.content&&n.dispatch(ge.store).editEntityRecord("postType",Ct,a.id,{blocks:(0,c.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:Ct,id:a.id})},cn=e=>an([e]);function un(e){return{type:"SET_EDITED_POST",postType:kt,id:e}}function dn(e){return{type:"SET_EDITED_POST",postType:St,id:e}}function mn(e,t,n){return{type:"SET_EDITED_POST",postType:e,id:t,context:n}}function pn(){return h()("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function hn(e){return{type:"SET_EDITED_POST_CONTEXT",context:e}}function fn(){return h()("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 gn(){return h()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function yn(){return h()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function vn(){return h()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}const _n=e=>({registry:t})=>{h()("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(g.store).setIsInserterOpened(e)},bn=e=>({registry:t})=>{h()("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(g.store).setIsListViewOpened(e)};function En(e){return{type:"UPDATE_SETTINGS",settings:e}}function wn(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}const xn=(e,{allowUndo:t=!0}={})=>async({registry:n})=>{const a="edit-site-template-reverted";if(n.dispatch(fe.store).removeNotice(a),$t(e))try{const r=n.select(ge.store).getEntityConfig("postType",e.type);if(!r)return void n.dispatch(fe.store).createErrorNotice((0,b.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const s=(0,gt.addQueryArgs)(`${r.baseURL}/${e.id}`,{context:"edit",source:"theme"}),i=await Xt()({path:s});if(!i)return void n.dispatch(fe.store).createErrorNotice((0,b.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const o=({blocks:e=[]})=>(0,c.__unstableSerializeAndClean)(e),l=n.select(ge.store).getEditedEntityRecord("postType",e.type,e.id);n.dispatch(ge.store).editEntityRecord("postType",e.type,e.id,{content:o,blocks:l.blocks,source:"custom"},{undoIgnore:!0});const u=(0,c.parse)(i?.content?.raw);if(n.dispatch(ge.store).editEntityRecord("postType",e.type,i.id,{content:o,blocks:u,source:"theme"}),t){const t=()=>{n.dispatch(ge.store).editEntityRecord("postType",e.type,l.id,{content:o,blocks:l.blocks,source:"custom"})};n.dispatch(fe.store).createSuccessNotice((0,b.__)("Template reverted."),{type:"snackbar",id:a,actions:[{label:(0,b.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("Template revert failed. Please reload.");n.dispatch(fe.store).createErrorNotice(t,{type:"snackbar"})}else n.dispatch(fe.store).createErrorNotice((0,b.__)("This template is not revertable."),{type:"snackbar"})},Sn=e=>({dispatch:t,registry:n})=>{n.select(k.store).get("core","distractionFree")&&t.toggleDistractionFree(),n.dispatch(W).enableComplementaryArea(Qt,e)},Cn=()=>({registry:e})=>{e.dispatch(W).disableComplementaryArea(Qt)},kn=e=>({dispatch:t,registry:n})=>{if(n.dispatch("core/preferences").set("core","editorMode",e),"visual"!==e&&n.dispatch(he.store).clearSelectedBlock(),"visual"===e)(0,Jt.speak)((0,b.__)("Visual editor selected"),"assertive");else if("text"===e){n.select(k.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,Jt.speak)((0,b.__)("Code editor selected"),"assertive")}},Tn=e=>({dispatch:t,registry:n})=>{h()("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&n.dispatch(he.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},Pn=()=>({dispatch:e,registry:t})=>{const n=t.select(k.store).get("core","distractionFree");n||t.batch((()=>{t.dispatch(k.store).set("core","fixedToolbar",!0),t.dispatch(g.store).setIsInserterOpened(!1),t.dispatch(g.store).setIsListViewOpened(!1),e.closeGeneralSidebar()})),t.batch((()=>{t.dispatch(k.store).set("core","distractionFree",!n),t.dispatch(fe.store).createInfoNotice(n?(0,b.__)("Distraction free off."):(0,b.__)("Distraction free on."),{id:"core/edit-site/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,b.__)("Undo"),onClick:()=>{t.dispatch(k.store).toggle("core","distractionFree")}}]})}))};const Mn=[];const In=function(e,t){var n,a,r=0;function s(){var s,i,o=n,l=arguments.length;e:for(;o;){if(o.args.length===arguments.length){for(i=0;i<l;i++)if(o.args[i]!==arguments[i]){o=o.next;continue e}return o!==n&&(o===a&&(a=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n,o.prev=null,n.prev=o,n=o),o.val}o=o.next}for(s=new Array(l),i=0;i<l;i++)s[i]=arguments[i];return o={args:s,val:e.apply(null,s)},n?(n.prev=o,o.next=n):a=o,r===t.maxSize?(a=a.prev).next=null:r++,n=o,o.val}return t=t||{},s.clear=function(){n=null,a=null,r=0},s}((function(e=Mn,t){const n=t?t.reduce(((e,t)=>({...e,[t.id]:t})),{}):{},a=[],r=[...e];for(;r.length;){const{innerBlocks:e,...t}=r.shift();if(r.unshift(...e),(0,c.isTemplatePart)(t)){const{attributes:{theme:e,slug:r}}=t,s=n[`${e}//${r}`];s&&a.push({templatePart:s,block:t})}}return a})),An=(0,d.createRegistrySelector)((e=>(t,n)=>(h()("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(k.store).get("core/edit-site",n)))),Nn=(0,d.createRegistrySelector)((e=>()=>(h()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(g.store).getDeviceType()))),On=(0,d.createRegistrySelector)((e=>()=>e(ge.store).canUser("create","media"))),Rn=(0,d.createRegistrySelector)((e=>()=>{h()("select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )",{since:"6.5",version:"6.8"});return"web"===f.Platform.OS?e(ge.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]}));function Fn(e){return e.settings}function Dn(){h()("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function Bn(e){return e.editedPost.postType}function Vn(e){return e.editedPost.id}function Ln(e){return e.editedPost.context}function zn(e){return{context:e.editedPost.context}}const Gn=(0,d.createRegistrySelector)((e=>()=>(h()("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(g.store).isInserterOpened()))),Hn=(0,d.createRegistrySelector)((e=>()=>(h()("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),Ke(e(g.store)).getInsertionPoint()))),Un=(0,d.createRegistrySelector)((e=>()=>(h()("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(g.store).isListViewOpened())));function Wn(e){return e.saveViewPanel}const jn=(0,d.createRegistrySelector)((e=>()=>{const t=e(ge.store).getEntityRecords("postType",kt,{per_page:-1}),n=e(he.store).getBlocksByName("core/template-part"),a=e(he.store).getBlocksByClientId(n);return In(a,t)})),Zn=(0,d.createRegistrySelector)((e=>()=>e(k.store).get("core","editorMode")));function qn(){h()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function Yn(){h()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function Kn(){h()("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function Xn(e){return!!e.editedPost.context?.postId}function Jn(){return h()("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}function Qn(e){return e.canvasMode}function $n(e){return e.editorCanvasContainerView}const ea={reducer:Yt,actions:s,selectors:i},ta=(0,d.createReduxStore)(Qt,ea);(0,d.register)(ta),Ke(ta).registerPrivateSelectors(o),Ke(ta).registerPrivateActions(r);var na=window.wp.keyboardShortcuts,aa=window.wp.commands,ra=window.wp.coreCommands;var sa=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var ia=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var oa=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,l.createElement)(E.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"}));var la=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var ca=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var ua=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var da=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));function ma(e){return(0,l.createElement)(_.Button,{...e,className:v()("edit-site-sidebar-button",e.className)})}const{useLocation:pa}=Ke(ft.privateApis);function ha({isRoot:e,title:t,actions:n,meta:a,content:r,footer:s,description:i,backPath:o}){const{dashboardLink:c,dashboardLinkText:u,previewingThemeName:m}=(0,d.useSelect)((e=>{const{getSettings:t}=Ke(e(ta)),n=vt();return{dashboardLink:t().__experimentalDashboardLink,dashboardLinkText:t().__experimentalDashboardLinkText,previewingThemeName:n?e(ge.store).getTheme(n)?.name?.rendered:void 0}}),[]),p=pa(),h=(0,_.__experimentalUseNavigator)(),f=(0,b.isRTL)()?ua:da;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalVStack,{className:v()("edit-site-sidebar-navigation-screen__main",{"has-footer":!!s}),spacing:0,justify:"flex-start"},(0,l.createElement)(_.__experimentalHStack,{spacing:4,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon"},!e&&(0,l.createElement)(ma,{onClick:()=>{const e=null!=o?o:p.state?.backPath;e?h.goTo(e,{isBack:!0}):h.goToParent()},icon:f,label:(0,b.__)("Back"),showTooltip:!1}),e&&(0,l.createElement)(ma,{icon:f,label:u||(0,b.__)("Go to the Dashboard"),href:c||"index.php"}),(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20},yt()?(0,b.sprintf)("Previewing %1$s: %2$s",m,t):t),n&&(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__actions"},n)),a&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__meta"},a)),(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__content"},i&&(0,l.createElement)("p",{className:"edit-site-sidebar-navigation-screen__description"},i),r)),s&&(0,l.createElement)("footer",{className:"edit-site-sidebar-navigation-screen__footer"},s))}var fa=(0,f.forwardRef)((function({icon:e,size:t=24,...n},a){return(0,f.cloneElement)(e,{width:t,height:t,...n,ref:a})}));var ga=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));var ya=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));function va({className:e,icon:t,withChevron:n=!1,suffix:a,children:r,...s}){return(0,l.createElement)(_.__experimentalItem,{className:v()("edit-site-sidebar-navigation-item",{"with-suffix":!n&&a},e),...s},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},t&&(0,l.createElement)(fa,{style:{fill:"currentcolor"},icon:t,size:24}),(0,l.createElement)(_.FlexBlock,null,r),n&&(0,l.createElement)(fa,{icon:(0,b.isRTL)()?ga:ya,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!n&&a))}var _a=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var ba=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),Ea=ba,wa=window.wp.keycodes,xa=n(1919),Sa=n.n(xa);
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
function Ca(e){return"[object Object]"===Object.prototype.toString.call(e)}function ka(e){var t,n;return!1!==Ca(e)&&(void 0===(t=e.constructor)||!1!==Ca(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const{GlobalStylesContext:Ta,cleanEmptyObject:Pa}=Ke(he.privateApis);function Ma(e,t){return Sa()(e,t,{isMergeableObject:ka})}function Ia(){const[e,t,n]=function(){const{globalStylesId:e,isReady:t,settings:n,styles:a}=(0,d.useSelect)((e=>{const{getEditedEntityRecord:t,hasFinishedResolution:n}=e(ge.store),a=e(ge.store).__experimentalGetCurrentGlobalStylesId(),r=a?t("root","globalStyles",a):void 0;let s=!1;return n("__experimentalGetCurrentGlobalStylesId")&&(s=!a||n("getEditedEntityRecord",["root","globalStyles",a])),{globalStylesId:a,isReady:s,settings:r?.settings,styles:r?.styles}}),[]),{getEditedEntityRecord:r}=(0,d.useSelect)(ge.store),{editEntityRecord:s}=(0,d.useDispatch)(ge.store);return[t,(0,f.useMemo)((()=>({settings:null!=n?n:{},styles:null!=a?a:{}})),[n,a]),(0,f.useCallback)(((t,n={})=>{var a,i;const o=r("root","globalStyles",e),l=t({styles:null!==(a=o?.styles)&&void 0!==a?a:{},settings:null!==(i=o?.settings)&&void 0!==i?i:{}});s("root","globalStyles",e,{styles:Pa(l.styles)||{},settings:Pa(l.settings)||{}},n)}),[e])]}(),[a,r]=function(){const e=(0,d.useSelect)((e=>e(ge.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),s=(0,f.useMemo)((()=>r&&t?Ma(r,t):{}),[t,r]);return(0,f.useMemo)((()=>({isReady:e&&a,user:t,base:r,merged:s,setUserConfig:n})),[s,t,r,n,e,a])}function Aa({children:e}){const t=Ia();return t.isReady?(0,l.createElement)(Ta.Provider,{value:t},e):null}const{useGlobalStyle:Na,useGlobalStylesOutput:Oa}=Ke(he.privateApis),Ra={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Fa={hover:{opacity:1},start:{opacity:.5}},Da={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}},Ba={leading:!0,trailing:!0};var Va=({label:e,isFocused:t,withHoverView:n})=>{const[a]=Na("typography.fontWeight"),[r="serif"]=Na("typography.fontFamily"),[s=r]=Na("elements.h1.typography.fontFamily"),[i=a]=Na("elements.h1.typography.fontWeight"),[o="black"]=Na("color.text"),[c=o]=Na("elements.h1.color.text"),[u="white"]=Na("color.background"),[d]=Na("color.gradient"),[m]=Oa(),p=(0,se.useReducedMotion)(),[h,g]=(0,f.useState)(!1),[y,{width:v}]=(0,se.useResizeObserver)(),[b,E]=(0,f.useState)(v),[w,x]=(0,f.useState)(),S=(0,se.useThrottle)(E,250,Ba);(0,f.useLayoutEffect)((()=>{v&&S(v)}),[v,S]),(0,f.useLayoutEffect)((()=>{const e=b?b/248:1,t=e-(w||0);!(Math.abs(t)>.1)&&w||x(e)}),[b,w]);const C=w||(v?v/248:1),{paletteColors:k,highlightedColors:T}=Qe(),P=(0,f.useMemo)((()=>m?[...m,{css:"html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}",isGlobalStyles:!0}]:m),[m]),M=!!v;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{style:{position:"relative"}},y),M&&(0,l.createElement)(he.__unstableIframe,{className:"edit-site-global-styles-preview__iframe",style:{width:"100%",height:152*C},onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),tabIndex:-1},(0,l.createElement)(he.__unstableEditorStyles,{styles:P}),(0,l.createElement)(_.__unstableMotion.div,{style:{height:152*C,width:"100%",background:null!=d?d:u,cursor:n?"pointer":void 0},initial:"start",animate:(h||t)&&!p&&e?"hover":"start"},(0,l.createElement)(_.__unstableMotion.div,{variants:Ra,style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(_.__experimentalHStack,{spacing:10*C,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(_.__unstableMotion.div,{style:{fontFamily:s,fontSize:65*C,color:c,fontWeight:i},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"}},"Aa"),(0,l.createElement)(_.__experimentalVStack,{spacing:4*C},T.map((({slug:e,color:t},n)=>(0,l.createElement)(_.__unstableMotion.div,{key:e,style:{height:32*C,width:32*C,background:t,borderRadius:32*C/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===n?.2:.1}})))))),(0,l.createElement)(_.__unstableMotion.div,{variants:n&&Fa,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1}},(0,l.createElement)(_.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"}},k.slice(0,4).map((({color:e},t)=>(0,l.createElement)("div",{key:t,style:{height:"100%",background:e,flexGrow:1}}))))),(0,l.createElement)(_.__unstableMotion.div,{variants:Da,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0}},(0,l.createElement)(_.__experimentalVStack,{spacing:3*C,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*C,boxSizing:"border-box"}},e&&(0,l.createElement)("div",{style:{fontSize:40*C,fontFamily:s,color:c,fontWeight:i,lineHeight:"1em",textAlign:"center"}},e))))))};const{GlobalStylesContext:La,areGlobalStyleConfigsEqual:za}=Ke(he.privateApis);function Ga({variation:e}){const[t,n]=(0,f.useState)(!1),{base:a,user:r,setUserConfig:s}=(0,f.useContext)(La),i=(0,f.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:a,merged:Ma(a,e),setUserConfig:()=>{}}}),[e,a]),o=()=>{s((()=>({settings:e.settings,styles:e.styles})))},c=(0,f.useMemo)((()=>za(r,e)),[r,e]);let u=e?.title;return e?.description&&(u=(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),e?.title,e?.description)),(0,l.createElement)(La.Provider,{value:i},(0,l.createElement)("div",{className:v()("edit-site-global-styles-variations_item",{"is-active":c}),role:"button",onClick:o,onKeyDown:e=>{e.keyCode===wa.ENTER&&(e.preventDefault(),o())},tabIndex:"0","aria-label":u,"aria-current":c,onFocus:()=>n(!0),onBlur:()=>n(!1)},(0,l.createElement)("div",{className:"edit-site-global-styles-variations_item-preview"},(0,l.createElement)(Va,{label:e?.title,isFocused:t,withHoverView:!0}))))}function Ha(){const e=(0,d.useSelect)((e=>e(ge.store).__experimentalGetCurrentThemeGlobalStylesVariations()),[]),t=(0,f.useMemo)((()=>[{title:(0,b.__)("Default"),settings:{},styles:{}},...(null!=e?e:[]).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:{}}}))]),[e]);return(0,l.createElement)(_.__experimentalGrid,{columns:2,className:"edit-site-global-styles-style-variations-container"},t.map(((e,t)=>(0,l.createElement)(Ga,{key:t,variation:e}))))}const Ua=20;function Wa({variation:e="default",direction:t,resizeWidthBy:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("button",{className:`resizable-editor__drag-handle is-${t} is-variation-${e}`,"aria-label":(0,b.__)("Drag to resize"),"aria-describedby":`resizable-editor__resize-help-${t}`,onKeyDown:function(e){const{keyCode:a}=e;"left"===t&&a===wa.LEFT||"right"===t&&a===wa.RIGHT?n(Ua):("left"===t&&a===wa.RIGHT||"right"===t&&a===wa.LEFT)&&n(-Ua)},type:"button"}),(0,l.createElement)(_.VisuallyHidden,{id:`resizable-editor__resize-help-${t}`},(0,b.__)("Use left and right arrow keys to resize the canvas.")))}const ja={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};var Za=function({enableResizing:e,height:t,children:n}){const[a,r]=(0,f.useState)("100%"),s=(0,f.useRef)(),i=(0,f.useCallback)((e=>{s.current&&r(s.current.offsetWidth+e)}),[]);return(0,l.createElement)(_.ResizableBox,{ref:e=>{s.current=e?.resizable},size:{width:e?a:"100%",height:e&&t?t:"100%"},onResizeStop:(e,t,n)=>{r(n.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:e,right:e},showHandle:e,resizeRatio:2,handleComponent:{left:(0,l.createElement)(Wa,{direction:"left",resizeWidthBy:i}),right:(0,l.createElement)(Wa,{direction:"right",resizeWidthBy:i})},handleClasses:void 0,handleStyles:{left:ja,right:ja}},n)};function qa(e){switch(e){case"style-book":return(0,b.__)("Style Book");case"global-styles-revisions":case"global-styles-revisions:style-book":return(0,b.__)("Style Revisions");default:return""}}const{createPrivateSlotFill:Ya}=Ke(_.privateApis),{privateKey:Ka,Slot:Xa,Fill:Ja}=Ya("EditSiteEditorCanvasContainerSlot");function Qa({children:e,closeButtonLabel:t,onClose:n,enableResizing:a=!1}){const{editorCanvasContainerView:r,showListViewByDefault:s}=(0,d.useSelect)((e=>({editorCanvasContainerView:Ke(e(ta)).getEditorCanvasContainerView(),showListViewByDefault:e(k.store).get("core","showListViewByDefault")})),[]),[i,o]=(0,f.useState)(!1),{setEditorCanvasContainerView:c}=Ke((0,d.useDispatch)(ta)),{setIsListViewOpened:u}=(0,d.useDispatch)(g.store),m=(0,se.useFocusOnMount)("firstElement"),p=(0,se.useFocusReturn)(),h=(0,f.useMemo)((()=>qa(r)),[r]);function y(){u(s),c(void 0),o(!0),"function"==typeof n&&n()}const v=Array.isArray(e)?f.Children.map(e,((e,t)=>0===t?(0,f.cloneElement)(e,{ref:p}):e)):(0,f.cloneElement)(e,{ref:p});if(i)return null;const E=n||t;return(0,l.createElement)(Ja,null,(0,l.createElement)(Za,{enableResizing:a},(0,l.createElement)("section",{className:"edit-site-editor-canvas-container",ref:E?m:null,onKeyDown:function(e){e.keyCode!==wa.ESCAPE||e.defaultPrevented||(e.preventDefault(),y())},"aria-label":h},E&&(0,l.createElement)(_.Button,{className:"edit-site-editor-canvas-container__close-button",icon:T,label:t||(0,b.__)("Close"),onClick:y,showTooltip:!1}),v)))}Qa.Slot=Xa;var $a=Qa;const{ExperimentalBlockEditorProvider:er,useGlobalStyle:tr,GlobalStylesContext:nr,useGlobalStylesOutputWithConfig:ar}=Ke(he.privateApis),{CompositeV2:rr,CompositeItemV2:sr,useCompositeStoreV2:ir,Tabs:or}=Ke(_.privateApis);function lr(e){return!e||0===Object.keys(e).length}function cr(){return[{name:"core/heading",title:(0,b.__)("Headings"),category:"text",blocks:[(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:1}),(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:2}),(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:3}),(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:4}),(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:5})]},...(0,c.getBlockTypes)().filter((e=>{const{name:t,example:n,supports:a}=e;return"core/heading"!==t&&!!n&&!1!==a.inserter})).map((e=>({name:e.name,title:e.title,category:e.category,blocks:(0,c.getBlockFromExample)(e.name,e.example)})))]}const ur=({category:e,examples:t,isSelected:n,onClick:a,onSelect:r,settings:s,sizes:i,title:o})=>{const[c,u]=(0,f.useState)(!1),d={role:"button",onFocus:()=>u(!0),onBlur:()=>u(!1),onKeyDown:e=>{if(e.defaultPrevented)return;const{keyCode:t}=e;!a||t!==wa.ENTER&&t!==wa.SPACE||(e.preventDefault(),a(e))},onClick:e=>{e.defaultPrevented||a&&(e.preventDefault(),a(e))},readonly:!0},m=a?"body { cursor: pointer; } body * { pointer-events: none; }":"";return(0,l.createElement)(he.__unstableIframe,{className:v()("edit-site-style-book__iframe",{"is-focused":c&&!!a,"is-button":!!a}),name:"style-book-canvas",tabIndex:0,...a?d:{}},(0,l.createElement)(he.__unstableEditorStyles,{styles:s.styles}),(0,l.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,l.createElement)(dr,{className:v()("edit-site-style-book__examples",{"is-wide":i.width>600}),examples:t,category:e,label:o?(0,b.sprintf)((0,b.__)("Examples of blocks in the %s category"),o):(0,b.__)("Examples of blocks"),isSelected:n,onSelect:r,key:e}))},dr=(0,f.memo)((({className:e,examples:t,category:n,label:a,isSelected:r,onSelect:s})=>{const i=ir({orientation:"vertical"});return(0,l.createElement)(rr,{store:i,className:e,"aria-label":a,role:"grid"},t.filter((e=>!n||e.category===n)).map((e=>(0,l.createElement)(mr,{key:e.name,id:`example-${e.name}`,title:e.title,blocks:e.blocks,isSelected:r(e.name),onClick:()=>{s?.(e.name)}}))))})),mr=({id:e,title:t,blocks:n,isSelected:a,onClick:r})=>{const s=(0,d.useSelect)((e=>e(he.store).getSettings()),[]),i=(0,f.useMemo)((()=>({...s,__unstableIsPreviewMode:!0})),[s]),o=(0,f.useMemo)((()=>Array.isArray(n)?n:[n]),[n]);return(0,l.createElement)("div",{role:"row"},(0,l.createElement)("div",{role:"gridcell"},(0,l.createElement)(sr,{className:v()("edit-site-style-book__example",{"is-selected":a}),id:e,"aria-label":(0,b.sprintf)((0,b.__)("Open %s styles in Styles panel"),t),render:(0,l.createElement)("div",null),role:"button",onClick:r},(0,l.createElement)("span",{className:"edit-site-style-book__example-title"},t),(0,l.createElement)("div",{className:"edit-site-style-book__example-preview","aria-hidden":!0},(0,l.createElement)(_.Disabled,{className:"edit-site-style-book__example-preview__content"},(0,l.createElement)(er,{value:o,settings:i},(0,l.createElement)(he.BlockList,{renderAppender:!1})))))))};var pr=function({enableResizing:e=!0,isSelected:t,onClick:n,onSelect:a,showCloseButton:r=!0,onClose:s,showTabs:i=!0,userConfig:o={}}){const[u,m]=(0,se.useResizeObserver)(),[p]=tr("color.text"),[h]=tr("color.background"),g=(0,f.useMemo)(cr,[]),y=(0,f.useMemo)((()=>(0,c.getCategories)().filter((e=>g.some((t=>t.category===e.slug)))).map((e=>({name:e.slug,title:e.title,icon:e.icon})))),[g]),{base:_}=(0,f.useContext)(nr),E=(0,f.useMemo)((()=>lr(o)||lr(_)?{}:Ma(_,o)),[_,o]),w=(0,d.useSelect)((e=>e(he.store).getSettings()),[]),x=(0,f.useMemo)((()=>({...w,__unstableIsPreviewMode:!0})),[w]),[S]=ar(E);return x.styles=lr(S)||lr(o)?x.styles:S,(0,l.createElement)($a,{onClose:s,enableResizing:e,closeButtonLabel:r?(0,b.__)("Close Style Book"):null},(0,l.createElement)("div",{className:v()("edit-site-style-book",{"is-wide":m.width>600,"is-button":!!n}),style:{color:p,background:h}},u,i?(0,l.createElement)("div",{className:"edit-site-style-book__tabs"},(0,l.createElement)(or,null,(0,l.createElement)(or.TabList,null,y.map((e=>(0,l.createElement)(or.Tab,{tabId:e.name,key:e.name},e.title)))),y.map((e=>(0,l.createElement)(or.TabPanel,{key:e.name,tabId:e.name,focusable:!1},(0,l.createElement)(ur,{category:e.name,examples:g,isSelected:t,onSelect:a,settings:x,sizes:m,title:e.title})))))):(0,l.createElement)(ur,{examples:g,isSelected:t,onClick:n,onSelect:a,settings:x,sizes:m})))};const hr={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},fr={per_page:100,page:1},gr=[],{GlobalStylesContext:yr}=Ke(he.privateApis);function vr({query:e}={}){const{user:t}=(0,f.useContext)(yr),n={...fr,...e},{authors:a,currentUser:r,isDirty:s,revisions:i,isLoadingGlobalStylesRevisions:o,revisionsCount:l}=(0,d.useSelect)((e=>{var t;const{__experimentalGetDirtyEntityRecords:a,getCurrentUser:r,getUsers:s,getRevisions:i,__experimentalGetCurrentGlobalStylesId:o,getEntityRecord:l,isResolving:c}=e(ge.store),u=a(),d=r(),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=i("root","globalStyles",p,n)||gr;return{authors:s(hr)||gr,currentUser:d,isDirty:m,revisions:g,isLoadingGlobalStylesRevisions:c("getRevisions",["root","globalStyles",p,n]),revisionsCount:f}}),[e]);return(0,f.useMemo)((()=>{if(!a.length||o)return{revisions:gr,hasUnsavedChanges:s,isLoading:!0,revisionsCount:l};const e=i.map((e=>({...e,author:a.find((t=>t.id===e.author))})));if(i.length){if("unsaved"!==e[0].id&&1===n.page&&(e[0].isLatest=!0),s&&t&&Object.keys(t).length>0&&r&&1===n.page){const n={id:"unsaved",styles:t?.styles,settings:t?.settings,author:{name:r?.name,avatar_urls:r?.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:s,isLoading:!1,revisionsCount:l}}),[s,i,r,a,t,o])}var _r=window.wp.date;var br=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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({children:e}){return(0,l.createElement)(_.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__label"},e)}function wr({label:e,children:t,className:n,...a}){return(0,l.createElement)(_.__experimentalHStack,{key:e,spacing:5,alignment:"left",className:v()("edit-site-sidebar-navigation-details-screen-panel__row",n),...a},t)}function xr({children:e}){return(0,l.createElement)(_.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__value"},e)}function Sr({title:e,children:t,spacing:n}){return(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-sidebar-navigation-details-screen-panel",spacing:n},e&&(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-details-screen-panel__heading",level:2},e),t)}function Cr({record:e,...t}){const n={};return e?._links?.["predecessor-version"]?.[0]?.id&&(n.href=(0,gt.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),n.as="a"),(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-details-footer"},(0,l.createElement)(va,{"aria-label":(0,b.__)("Revisions"),...n,...t},(0,l.createElement)(wr,{justify:"space-between"},(0,l.createElement)(Er,null,(0,b.__)("Last modified")),(0,l.createElement)(xr,null,(0,f.createInterpolateElement)((0,b.sprintf)((0,b.__)("<time>%s</time>"),(0,_r.humanTimeDiff)(e.modified)),{time:(0,l.createElement)("time",{dateTime:e.modified})})),(0,l.createElement)(_.Icon,{className:"edit-site-sidebar-navigation-screen-details-footer__icon",icon:br}))))}const kr=()=>{};function Tr(e){const{openGeneralSidebar:t}=(0,d.useDispatch)(ta),{setCanvasMode:n}=Ke((0,d.useDispatch)(ta));return(0,d.useSelect)((e=>!!e(ge.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length),[])?(0,l.createElement)(_.__experimentalNavigatorButton,{...e,as:va,path:"/wp_global_styles"}):(0,l.createElement)(va,{...e,onClick:()=>{n("edit"),t("edit-site/global-styles")}})}function Pr(){const{storedSettings:e}=(0,d.useSelect)((e=>{const{getSettings:t}=Ke(e(ta));return{storedSettings:t()}}),[]);return(0,l.createElement)(he.BlockEditorProvider,{settings:e,onChange:kr,onInput:kr},(0,l.createElement)(Ha,null))}function Mr(){const{revisions:e,isLoading:t}=vr(),{openGeneralSidebar:n}=(0,d.useDispatch)(ta),{setIsListViewOpened:a}=(0,d.useDispatch)(g.store),r=(0,se.useViewportMatch)("medium","<"),{setCanvasMode:s,setEditorCanvasContainerView:i}=Ke((0,d.useDispatch)(ta)),{isViewMode:o,isStyleBookOpened:c,revisionsCount:u}=(0,d.useSelect)((e=>{var t;const{getCanvasMode:n,getEditorCanvasContainerView:a}=Ke(e(ta)),{getEntityRecord:r,__experimentalGetCurrentGlobalStylesId:s}=e(ge.store),i=s(),o=i?r("root","globalStyles",i):void 0;return{isViewMode:"view"===n(),isStyleBookOpened:"style-book"===a(),revisionsCount:null!==(t=o?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}}),[]),m=(0,f.useCallback)((async()=>Promise.all([s("edit"),n("edit-site/global-styles")])),[s,n]),p=(0,f.useCallback)((async()=>{await m(),i("style-book"),a(!1)}),[m,i,a]),h=(0,f.useCallback)((async()=>{await m(),i("global-styles-revisions")}),[m,i]),y=u>0,v=e?.[0]?.modified,_=y&&!t&&v;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ha,{title:(0,b.__)("Styles"),description:(0,b.__)("Choose a different style combination for the theme styles."),content:(0,l.createElement)(Pr,null),footer:_&&(0,l.createElement)(Cr,{record:e?.[0],onClick:h}),actions:(0,l.createElement)(l.Fragment,null,!r&&(0,l.createElement)(ma,{icon:_a,label:(0,b.__)("Style Book"),onClick:()=>i(c?void 0:"style-book"),isPressed:c}),(0,l.createElement)(ma,{icon:Ea,label:(0,b.__)("Edit styles"),onClick:async()=>await m()}))}),c&&!r&&o&&(0,l.createElement)(pr,{enableResizing:!1,isSelected:()=>!1,onClick:p,onSelect:p,showCloseButton:!1,showTabs:!1}))}const Ir="isTemplatePartMoveHintVisible";function Ar(){const e=(0,d.useSelect)((e=>{var t;return null===(t=e(k.store).get("core",Ir))||void 0===t||t}),[]),{set:t}=(0,d.useDispatch)(k.store);return e?(0,l.createElement)(_.Notice,{politeness:"polite",className:"edit-site-sidebar__notice",onRemove:()=>{t("core",Ir,!1)}},(0,b.__)('Looking for template parts? Find them in "Patterns".')):null}function Nr(){const{location:e}=(0,_.__experimentalUseNavigator)(),{setEditorCanvasContainerView:t}=Ke((0,d.useDispatch)(ta));return(0,f.useEffect)((()=>{"/"===e?.path&&t(void 0)}),[t,e?.path]),(0,l.createElement)(ha,{isRoot:!0,title:(0,b.__)("Design"),description:(0,b.__)("Customize the appearance of your website using the block editor."),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(_.__experimentalNavigatorButton,{as:va,path:"/navigation",withChevron:!0,icon:sa},(0,b.__)("Navigation")),(0,l.createElement)(Tr,{withChevron:!0,icon:ia},(0,b.__)("Styles")),(0,l.createElement)(_.__experimentalNavigatorButton,{as:va,path:"/page",withChevron:!0,icon:oa},(0,b.__)("Pages")),(0,l.createElement)(_.__experimentalNavigatorButton,{as:va,path:"/wp_template",withChevron:!0,icon:la},(0,b.__)("Templates")),(0,l.createElement)(_.__experimentalNavigatorButton,{as:va,path:"/patterns",withChevron:!0,icon:ca},(0,b.__)("Patterns"))),(0,l.createElement)(Ar,null))})}var Or=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"}));var Rr=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var Fr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Dr=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var Br=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Vr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Lr=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var zr=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var Gr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Hr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Ur=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var Wr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var jr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,l.createElement)(E.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"}));var Zr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"}));var qr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));const Yr=(e,t)=>{let n=e;return t.split(".").forEach((e=>{n=n?.[e]})),n},Kr=(e,t)=>(e||[]).map((e=>({...e,name:(0,en.decodeEntities)(Yr(e,t))}))),Xr=()=>(0,d.useSelect)((e=>e(ge.store).getEntityRecords("postType",Ct,{per_page:-1})),[]),Jr=()=>(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplateTypes()),[]),Qr=()=>{const e=(0,d.useSelect)((e=>e(ge.store).getPostTypes({per_page:-1})),[]);return(0,f.useMemo)((()=>{const t=["attachment"];return e?.filter((({viewable:e,slug:n})=>e&&!t.includes(n)))}),[e])};function $r(e){const t=(0,f.useMemo)((()=>e?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{})));return(0,f.useCallback)((({labels:e,slug:n})=>{const a=e.singular_name.toLowerCase();return t[a]>1&&a!==n}),[t])}function es(){const e=Qr(),t=(0,f.useMemo)((()=>e?.filter((e=>e.has_archive))),[e]),n=Xr(),a=$r(t);return(0,f.useMemo)((()=>t?.filter((e=>!(n||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{let t;return t=a(e)?(0,b.sprintf)((0,b.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,b.sprintf)((0,b.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,b.sprintf)((0,b.__)("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):Dr,templatePrefix:"archive"}}))||[]),[t,n,a])}const ts=e=>{const t=Qr(),n=Xr(),a=Jr(),r=$r(t),s=(0,f.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return"page"!==t&&(n=`single-${n}`),e[t]=n,e}),{})),[t]),i=is("postType",s),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c,icon:u}=n,d=s[l],m=a?.find((({slug:e})=>e===d)),p=o?.includes(d),h=r(n);let f=(0,b.sprintf)((0,b.__)("Single item: %s"),c.singular_name);h&&(f=(0,b.sprintf)((0,b.__)("Single item: %1$s (%2$s)"),c.singular_name,l));const g=m?{...m,templatePrefix:s[l]}:{slug:d,title:f,description:(0,b.sprintf)((0,b.__)("Displays a single item: %s."),c.singular_name),icon:u?.startsWith("dashicons-")?u.slice(10):qr,templatePrefix:s[l]},y=i?.[l]?.hasEntities;return y&&(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:i[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${s[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:s[l]}}},labels:c,hasGeneralTemplate:p,template:t})}),p&&!y||t.push(g),t}),[]),c=(0,f.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let a="postTypesMenuItems";return"page"===n&&(a="defaultPostTypesMenuItems"),e[a].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[l]);return c},ns=e=>{const t=(()=>{const e=(0,d.useSelect)((e=>e(ge.store).getTaxonomies({per_page:-1})),[]);return(0,f.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))),[e])})(),n=Xr(),a=Jr(),r=(0,f.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]),s=t?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{}),i=is("taxonomy",r),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c}=n,u=r[l],d=a?.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 s[n]>1&&n!==t})(c,l);let h=c.singular_name;p&&(h=(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),c.singular_name,l));const f=d?{...d,templatePrefix:r[l]}:{slug:u,title:h,description:(0,b.sprintf)((0,b.__)("Displays taxonomy: %s."),c.singular_name),icon:Hr,templatePrefix:r[l]},g=i?.[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:i[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${r[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:r[l]}}},labels:c,hasGeneralTemplate:m,template:t})}),m&&!g||t.push(f),t}),[]);return(0,f.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let a="taxonomiesMenuItems";return["category","tag"].includes(n)&&(a="defaultTaxonomiesMenuItems"),e[a].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[l])},as={user:"author"},rs={user:{who:"authors"}};const ss=(e,t,n={})=>{const a=(e=>{const t=Xr();return(0,f.useMemo)((()=>Object.entries(e||{}).reduce(((e,[n,a])=>{const r=(t||[]).reduce(((e,t)=>{const n=`${a}-`;return t.slug.startsWith(n)&&e.push(t.slug.substring(n.length)),e}),[]);return r.length&&(e[n]=r),e}),{})),[e,t])})(t);return(0,d.useSelect)((t=>Object.entries(a||{}).reduce(((a,[r,s])=>{const i=t(ge.store).getEntityRecords(e,r,{_fields:"id",context:"view",slug:s,...n[r]});return i?.length&&(a[r]=i),a}),{})),[a])},is=(e,t,n={})=>{const a=ss(e,t,n);return(0,d.useSelect)((r=>Object.keys(t||{}).reduce(((t,s)=>{const i=a?.[s]?.map((({id:e})=>e))||[];return t[s]={hasEntities:!!r(ge.store).getEntityRecords(e,s,{per_page:1,_fields:"id",context:"view",exclude:i,...n[s]})?.length,existingEntitiesIds:i},t}),{})),[t,a])},{CompositeV2:os,CompositeItemV2:ls,useCompositeStoreV2:cs}=Ke(_.privateApis),us=[];function ds({suggestion:e,search:t,onSelect:n,entityForSuggestions:a}){const r="edit-site-custom-template-modal__suggestions_list__list-item";return(0,l.createElement)(ls,{render:(0,l.createElement)(_.Button,{role:"option",className:r,onClick:()=>n(a.config.getSpecificTemplate(e))})},(0,l.createElement)(_.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${r}__title`},(0,l.createElement)(_.TextHighlight,{text:(0,en.decodeEntities)(e.name),highlight:t})),e.link&&(0,l.createElement)(_.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${r}__info`},e.link))}function ms({entityForSuggestions:e,onSelect:t}){const n=cs({orientation:"vertical"}),[a,r,s]=(0,se.useDebouncedInput)(),i=function(e,t){const{config:n}=e,a=(0,f.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...n.queryArgs(t)})),[t,n]),{records:r,hasResolved:s}=(0,ge.useEntityRecords)(e.type,e.slug,a),[i,o]=(0,f.useState)(us);return(0,f.useEffect)((()=>{if(!s)return;let e=us;r?.length&&(e=r,n.recordNamePath&&(e=Kr(e,n.recordNamePath))),o(e)}),[r,s]),i}(e,s),{labels:o}=e,[c,u]=(0,f.useState)(!1);return!c&&i?.length>9&&u(!0),(0,l.createElement)(l.Fragment,null,c&&(0,l.createElement)(_.SearchControl,{__nextHasNoMarginBottom:!0,onChange:r,value:a,label:o.search_items,placeholder:o.search_items}),!!i?.length&&(0,l.createElement)(os,{store:n,role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,b.__)("Suggestions list")},i.map((n=>(0,l.createElement)(ds,{key:n.slug,suggestion:n,search:s,onSelect:t,entityForSuggestions:e})))),s&&!i?.length&&(0,l.createElement)(_.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results"},o.not_found))}var ps=function({onSelect:e,entityForSuggestions:t}){const[n,a]=(0,f.useState)(t.hasGeneralTemplate);return(0,l.createElement)(_.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left"},!n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{as:"p"},(0,b.__)("Select whether to create a single template for all items or a specific one.")),(0,l.createElement)(_.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial"},(0,l.createElement)(_.FlexItem,{isBlock:!0,as:_.Button,onClick:()=>{const{slug:n,title:a,description:r,templatePrefix:s}=t.template;e({slug:n,title:a,description:r,templatePrefix:s})}},(0,l.createElement)(_.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.all_items),(0,l.createElement)(_.__experimentalText,{as:"span",lineHeight:1.53846153846},(0,b.__)("For all items"))),(0,l.createElement)(_.FlexItem,{isBlock:!0,as:_.Button,onClick:()=>{a(!0)}},(0,l.createElement)(_.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.singular_name),(0,l.createElement)(_.__experimentalText,{as:"span",lineHeight:1.53846153846},(0,b.__)("For a specific item"))))),n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{as:"p"},(0,b.__)("This template will be used only for the specific item chosen.")),(0,l.createElement)(ms,{entityForSuggestions:t,onSelect:e})))};var hs=function(){return hs=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},hs.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function fs(e){return e.toLowerCase()}var gs=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ys=/[^A-Z0-9]+/gi;function vs(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,a=void 0===n?gs:n,r=t.stripRegexp,s=void 0===r?ys:r,i=t.transform,o=void 0===i?fs:i,l=t.delimiter,c=void 0===l?" ":l,u=_s(_s(e,a,"$1\0$2"),s,"\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 _s(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function bs(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),vs(e,hs({delimiter:"."},t))}(e,hs({delimiter:"-"},t))}var Es=function({onClose:e,createTemplate:t}){const[n,a]=(0,f.useState)(""),r=(0,b.__)("Custom Template"),[s,i]=(0,f.useState)(!1);return(0,l.createElement)("form",{onSubmit:async function(e){if(e.preventDefault(),!s){i(!0);try{await t({slug:"wp-custom-template-"+bs(n||r),title:n||r},!1)}finally{i(!1)}}}},(0,l.createElement)(_.__experimentalVStack,{spacing:6},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:n,onChange:a,placeholder:r,disabled:s,help:(0,b.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,l.createElement)(_.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{e()}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit",isBusy:s,"aria-disabled":s},(0,b.__)("Create")))))};function ws(){const e="edit-site-template-actions-loading-screen-modal";return(0,l.createElement)(_.Modal,{isFullScreen:!0,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:()=>{},__experimentalHideHeader:!0,className:e},(0,l.createElement)("div",{className:`${e}__content`},(0,l.createElement)(_.Spinner,null)))}const{useHistory:xs}=Ke(ft.privateApis),Ss=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],Cs={"front-page":Or,home:Rr,single:Fr,page:oa,archive:Dr,search:Br,404:Vr,index:Lr,category:zr,author:Gr,taxonomy:Hr,date:Ur,tag:Wr,attachment:jr};function ks({title:e,direction:t,className:n,description:a,icon:r,onClick:s,children:i}){return(0,l.createElement)(_.Button,{className:n,onClick:s,label:a,showTooltip:!!a},(0,l.createElement)(_.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t},(0,l.createElement)("div",{className:"edit-site-add-new-template__template-icon"},(0,l.createElement)(_.Icon,{icon:r})),(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0},(0,l.createElement)(_.__experimentalText,{weight:500,lineHeight:1.53846153846},e),i)))}const Ts={templatesList:1,customTemplate:2,customGenericTemplate:3};function Ps({postType:e,toggleProps:t,showIcon:n=!0}){const[a,r]=(0,f.useState)(!1),[s,i]=(0,f.useState)(Ts.templatesList),[o,c]=(0,f.useState)({}),[u,m]=(0,f.useState)(!1),p=xs(),{saveEntityRecord:h}=(0,d.useDispatch)(ge.store),{createErrorNotice:g,createSuccessNotice:y}=(0,d.useDispatch)(fe.store),{homeUrl:E}=(0,d.useSelect)((e=>{const{getUnstableBase:t}=e(ge.store);return{homeUrl:t()?.home}}),[]),w={"front-page":E,date:(0,b.sprintf)((0,b.__)("E.g. %s"),E+"/"+(new Date).getFullYear())};async function x(e,t=!0){if(!u){m(!0);try{const{title:n,description:a,slug:r}=e,s=await h("postType",Ct,{description:a,slug:r.toString(),status:"publish",title:n,is_wp_suggestion:t},{throwOnError:!0});p.push({postId:s.id,postType:s.type,canvas:"edit"}),y((0,b.sprintf)((0,b.__)('"%s" successfully created.'),(0,en.decodeEntities)(s.title?.rendered||n)),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while creating the template.");g(t,{type:"snackbar"})}finally{m(!1)}}}const S=()=>{r(!1),i(Ts.templatesList)},C=function(e,t){const n=Xr(),a=Jr(),r=(n||[]).map((({slug:e})=>e)),s=(a||[]).filter((e=>Ss.includes(e.slug)&&!r.includes(e.slug))),i=n=>{t?.(),e(n)},o=[...s],{defaultTaxonomiesMenuItems:l,taxonomiesMenuItems:c}=ns(i),{defaultPostTypesMenuItems:u,postTypesMenuItems:d}=ts(i),m=function(e){const t=Xr(),n=Jr(),a=is("root",as,rs);let r=n?.find((({slug:e})=>"author"===e));r||(r={description:(0,b.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const s=!!t?.find((({slug:e})=>"author"===e));if(a.user?.hasEntities&&(r={...r,templatePrefix:"author"},r.onClick=t=>{e({type:"root",slug:"user",config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"registered_date",exclude:a.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:e=>{const t=`author-${e.slug}`;return{title:t,slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,b.__)("Author"),search_items:(0,b.__)("Search Authors"),not_found:(0,b.__)("No authors found."),all_items:(0,b.__)("All Authors")},hasGeneralTemplate:s,template:t})}),!s||a.user?.hasEntities)return r}(i);[...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)=>Ss.indexOf(e.slug)-Ss.indexOf(t.slug)));const p=[...o,...es(),...d,...c];return p}(c,(()=>i(Ts.customTemplate)));if(!C.length)return null;const{as:k=_.Button,...T}=null!=t?t:{};let P=(0,b.__)("Add template");return s===Ts.customTemplate?P=(0,b.sprintf)((0,b.__)("Add template: %s"),o.labels.singular_name):s===Ts.customGenericTemplate&&(P=(0,b.__)("Create custom template")),(0,l.createElement)(l.Fragment,null,u&&(0,l.createElement)(ws,null),(0,l.createElement)(k,{...T,onClick:()=>r(!0),icon:n?Zr:null,label:e.labels.add_new_item},n?null:e.labels.add_new_item),a&&(0,l.createElement)(_.Modal,{title:P,className:v()("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":s===Ts.templatesList,"edit-site-custom-template-modal":s===Ts.customTemplate}),onRequestClose:S,overlayClassName:s===Ts.customGenericTemplate?"edit-site-custom-generic-template__modal":void 0},s===Ts.templatesList&&(0,l.createElement)(_.__experimentalGrid,{columns:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents"},(0,l.createElement)(_.Flex,{className:"edit-site-add-new-template__template-list__prompt"},(0,b.__)("Select what the new template should apply to:")),C.map((e=>{const{title:t,slug:n,onClick:a}=e;return(0,l.createElement)(ks,{key:n,title:t,direction:"column",className:"edit-site-add-new-template__template-button",description:w[n],icon:Cs[n]||la,onClick:()=>a?a(e):x(e)})})),(0,l.createElement)(ks,{title:(0,b.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:Ea,onClick:()=>i(Ts.customGenericTemplate)},(0,l.createElement)(_.__experimentalText,{lineHeight:1.53846153846},(0,b.__)("A custom template can be manually applied to any post or page.")))),s===Ts.customTemplate&&(0,l.createElement)(ps,{onSelect:x,entityForSuggestions:o}),s===Ts.customGenericTemplate&&(0,l.createElement)(Es,{onClose:S,createTemplate:x})))}function Ms({templateType:e=Ct,...t}){const n=(0,d.useSelect)((t=>t(ge.store).getPostType(e)),[e]);return n&&e===Ct?(0,l.createElement)(Ps,{...t,postType:n}):null}const Is=({postType:e,postId:t,...n})=>{const a=Et({postType:e,postId:t});return(0,l.createElement)(va,{...a,...n})};function As(){const e=(0,se.useViewportMatch)("medium","<"),{records:t,isResolving:n}=(0,ge.useEntityRecords)("postType",Ct,{per_page:-1}),a=Et({path:"/wp_template/all"}),r=!e;return(0,l.createElement)(ha,{title:(0,b.__)("Templates"),description:(0,b.__)("Express the layout of your site with templates."),actions:r&&(0,l.createElement)(Ms,{templateType:Ct,toggleProps:{as:ma}}),content:(0,l.createElement)(l.Fragment,null,n&&(0,b.__)("Loading templates…"),!n&&(0,l.createElement)(Os,{templates:t})),footer:!e&&(0,l.createElement)(va,{withChevron:!0,...a},(0,b.__)("Manage all templates"))})}function Ns({title:e,templates:t}){return(0,l.createElement)(_.__experimentalItemGroup,null,!!e&&(0,l.createElement)(_.__experimentalItem,{className:"edit-site-sidebar-navigation-screen-templates__templates-group-title"},e),t.map((e=>(0,l.createElement)(Is,{postType:Ct,postId:e.id,key:e.id,withChevron:!0},(0,en.decodeEntities)(e.title?.rendered||e.slug)))))}function Os({templates:e}){if(!e?.length)return(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(_.__experimentalItem,null,(0,b.__)("No templates found")));const t=e?[...e]:[];t.sort(((e,t)=>e.title.rendered.localeCompare(t.title.rendered)));const{hierarchyTemplates:n,customTemplates:a,...r}=t.reduce(((e,t)=>{const{original_source:n,author_text:a}=t;return"plugin"===n?(e[a]||(e[a]=[]),e[a].push(t)):t.is_custom?e.customTemplates.push(t):e.hierarchyTemplates.push(t),e}),{hierarchyTemplates:[],customTemplates:[]});return(0,l.createElement)(_.__experimentalVStack,{spacing:3},!!n.length&&(0,l.createElement)(Ns,{templates:n}),!!a.length&&(0,l.createElement)(Ns,{title:(0,b.__)("Custom"),templates:a}),Object.entries(r).map((([e,t])=>(0,l.createElement)(Ns,{key:e,title:e,templates:t}))))}function Rs({postId:e,area:t,title:n}){const a=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas().find((e=>e.area===t))),[t]),r=Et({postType:kt,postId:e});return(0,l.createElement)(va,{className:"edit-site-sidebar-navigation-screen-template__template-area-button",...r,icon:a?.icon,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{limit:20,ellipsizeMode:"tail",numberOfLines:1,className:"edit-site-sidebar-navigation-screen-template__template-area-label-text"},(0,en.decodeEntities)(n)))}function Fs(){const{templatePartAreas:e,currentTemplateParts:t}=(0,d.useSelect)((e=>{const{getSettings:t,getCurrentTemplateTemplateParts:n}=Ke(e(ta));return{templatePartAreas:t()?.defaultTemplatePartAreas,currentTemplateParts:n()}}),[]),n=(0,f.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,l.createElement)(Sr,{title:(0,b.__)("Areas"),spacing:3},(0,l.createElement)(_.__experimentalItemGroup,null,n.map((({clientId:e,label:t,area:n,theme:a,slug:r,title:s})=>(0,l.createElement)(wr,{key:e},(0,l.createElement)(Rs,{postId:`${a}//${r}`,title:s?.rendered||t,area:n})))))):null}function Ds(e,t){const{record:n,title:a,description:r,isLoaded:s,icon:i}=(0,d.useSelect)((n=>{const{getEditedPostType:a,getEditedPostId:r}=n(ta),{getEditedEntityRecord:s,hasFinishedResolution:i}=n(ge.store),{__experimentalGetTemplateInfo:o}=n(g.store),l=null!=e?e:a(),c=null!=t?t:r(),u=s("postType",l,c),d=c&&i("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:s,icon:i,record:n,getTitle:()=>a?(0,en.decodeEntities)(a):null,getDescription:()=>r?(0,en.decodeEntities)(r):null}}var Bs=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Vs=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));function Ls(e,t){return(0,d.useSelect)((n=>{const{getEntityRecord:a,getMedia:r,getUser:s,getEditedEntityRecord:i}=n(ge.store),o=i("postType",e,t),l=o?.original_source,c=o?.author_text;switch(l){case"theme":return{type:l,icon:la,text:c,isCustomized:o.source===Tt.custom};case"plugin":return{type:l,icon:Bs,text:c,isCustomized:o.source===Tt.custom};case"site":{const e=a("root","__unstableBase");return{type:l,icon:Vs,imageUrl:e?.site_logo?r(e.site_logo)?.source_url:void 0,text:c,isCustomized:!1}}default:{const e=s(o.author);return{type:"user",icon:Gr,imageUrl:e?.avatar_urls?.[48],text:c,isCustomized:!1}}}}),[e,t])}function zs({imageUrl:e}){const[t,n]=(0,f.useState)(!1);return(0,l.createElement)("div",{className:v()("edit-site-list-added-by__avatar",{"is-loaded":t})},(0,l.createElement)("img",{onLoad:()=>n(!0),alt:"",src:e}))}function Gs(e){return!!e&&(e.source===Tt.custom&&!e.has_theme_file)}function Hs({template:e,onClose:t}){const n=(0,en.decodeEntities)(e.title.rendered),[a,r]=(0,f.useState)(n),[s,i]=(0,f.useState)(!1),{editEntityRecord:o,__experimentalSaveSpecifiedEntityEdits:c}=(0,d.useDispatch)(ge.store),{createSuccessNotice:u,createErrorNotice:m}=(0,d.useDispatch)(fe.store);if(e.type===Ct&&!e.is_custom)return null;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{i(!0),r(n)}},(0,b.__)("Rename")),s&&(0,l.createElement)(_.Modal,{title:(0,b.__)("Rename"),onRequestClose:()=>{i(!1)},overlayClassName:"edit-site-list__rename-modal"},(0,l.createElement)("form",{onSubmit:async function(n){n.preventDefault();try{await o("postType",e.type,e.id,{title:a}),r(""),i(!1),t(),await c("postType",e.type,e.id,["title"],{throwOnError:!0}),u(e.type===Ct?(0,b.__)("Template renamed."):(0,b.__)("Template part renamed."),{type:"snackbar"})}catch(t){const n=e.type===Ct?(0,b.__)("An error occurred while renaming the template."):(0,b.__)("An error occurred while renaming the template part."),a=t.message&&"unknown_error"!==t.code?t.message:n;m(a,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,b.__)("Name"),value:a,onChange:r,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{i(!1)}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,b.__)("Save")))))))}function Us({postType:e,postId:t,className:n,toggleProps:a,onRemove:r}){const s=(0,d.useSelect)((n=>n(ge.store).getEntityRecord("postType",e,t)),[e,t]),{removeTemplate:i,revertTemplate:o}=(0,d.useDispatch)(ta),{saveEditedEntityRecord:c}=(0,d.useDispatch)(ge.store),{createSuccessNotice:u,createErrorNotice:m}=(0,d.useDispatch)(fe.store),p=Gs(s),h=$t(s);if(!p&&!h)return null;return(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),className:n,toggleProps:a},(({onClose:e})=>(0,l.createElement)(_.MenuGroup,null,p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Hs,{template:s,onClose:e}),(0,l.createElement)(Ws,{onRemove:()=>{i(s),r?.(),e()},title:s.title.rendered})),h&&(0,l.createElement)(_.MenuItem,{info:(0,b.__)("Use the template as supplied by the theme."),onClick:()=>{!async function(){try{await o(s,{allowUndo:!1}),await c("postType",s.type,s.id),u((0,b.sprintf)((0,b.__)('"%s" reverted.'),(0,en.decodeEntities)(s.title.rendered)),{type:"snackbar",id:"edit-site-template-reverted"})}catch(e){const t=s.type===Ct?(0,b.__)("An error occurred while reverting the template."):(0,b.__)("An error occurred while reverting the template part."),n=e.message&&"unknown_error"!==e.code?e.message:t;m(n,{type:"snackbar"})}}(),e()}},(0,b.__)("Clear customizations")))))}function Ws({onRemove:e,title:t}){const[n,a]=(0,f.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{isDestructive:!0,onClick:()=>a(!0)},(0,b.__)("Delete")),(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:n,onConfirm:e,onCancel:()=>a(!1),confirmButtonText:(0,b.__)("Delete")},(0,b.sprintf)((0,b.__)('Are you sure you want to delete "%s"?'),(0,en.decodeEntities)(t))))}const js={};function Zs(){const{editEntityRecord:e}=(0,d.useDispatch)(ge.store),{allowCommentsOnNewPosts:t,postsPerPage:n,postsPageTitle:a,postsPageId:r}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(ge.store),n=t("root","site"),a=n?.page_for_posts?t("postType","page",n?.page_for_posts):js;return{allowCommentsOnNewPosts:"open"===n?.default_comment_status,postsPageTitle:a?.title?.rendered,postsPageId:a?.id,postsPerPage:n?.posts_per_page}}),[]),[s,i]=(0,f.useState)(""),[o,c]=(0,f.useState)(1),[u,m]=(0,f.useState)("");(0,f.useEffect)((()=>{i(t),m(a),c(n)}),[a,t,n]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Sr,{spacing:6},r&&(0,l.createElement)(wr,null,(0,l.createElement)(_.__experimentalInputControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:(0,b.__)("No Title"),size:"__unstable-large",value:u,onChange:(0,se.debounce)((t=>{m(t),e("postType","page",r,{title:t})}),300),label:(0,b.__)("Blog title"),help:(0,b.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media.")})),(0,l.createElement)(wr,null,(0,l.createElement)(_.__experimentalNumberControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:0,value:o,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:t=>{c(t),e("root","site",void 0,{posts_per_page:t})},label:(0,b.__)("Posts per page"),help:(0,b.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.")}))),(0,l.createElement)(Sr,{title:(0,b.__)("Discussion"),spacing:3},(0,l.createElement)(wr,null,(0,l.createElement)(_.CheckboxControl,{className:"edit-site-sidebar-navigation-screen__input-control",label:(0,b.__)("Allow comments on new posts"),help:(0,b.__)("Changes will apply to new posts only. Individual posts may override these settings."),checked:s,onChange:t=>{i(t),e("root","site",void 0,{default_comment_status:t?"open":null})}}))))}function qs(){const e=(0,_.__experimentalUseNavigator)(),{params:{postType:t,postId:n}}=e,{setCanvasMode:a}=Ke((0,d.useDispatch)(ta)),{title:r,content:s,description:i,footer:o}=function(e,t){const{getDescription:n,getTitle:a,record:r}=Ds(e,t),s=(0,d.useSelect)((e=>e(ge.store).getCurrentTheme()),[]),i=Ls(e,t),o="theme"===i.type&&r.theme===s?.stylesheet,c=a();let u=n();!u&&i.text&&(u=(0,b.__)("This is a custom template that can be applied manually to any Post or Page."));const m="home"===r?.slug||"index"===r?.slug?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Zs,null),(0,l.createElement)(Fs,null)):(0,l.createElement)(Fs,null),p=r?.modified?(0,l.createElement)(Cr,{record:r}):null;return{title:c,description:(0,l.createElement)(l.Fragment,null,u,i.text&&!o&&(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description"},(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author"},(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author-icon"},i.imageUrl?(0,l.createElement)("img",{src:i.imageUrl,alt:"",width:"24",height:"24"}):(0,l.createElement)(_.Icon,{icon:i.icon})),i.text),i.isCustomized&&(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-customized"},(0,b._x)("(Customized)","template")))),content:m,footer:p}}(t,n);return(0,l.createElement)(ha,{title:r,actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Us,{postType:t,postId:n,toggleProps:{as:ma},onRemove:()=>{e.goTo(`/${t}/all`)}}),(0,l.createElement)(ma,{onClick:()=>a("edit"),label:(0,b.__)("Edit"),icon:ba})),description:i,content:s,footer:o})}var Ys=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var Ks=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Xs=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));const Js=()=>(0,d.useSelect)((e=>e(ge.store).getEntityRecords("postType",kt,{per_page:-1})),[]),Qs=(e,t)=>{const n=e.toLowerCase(),a=t.map((e=>e.title.rendered.toLowerCase()));if(!a.includes(n))return e;let r=2;for(;a.includes(`${n} ${r}`);)r++;return`${e} ${r}`},$s=e=>bs(e).replace(/[^\w-]+/g,"")||"wp-custom-part";function ei({modalTitle:e=(0,b.__)("Create template part"),...t}){return(0,l.createElement)(_.Modal,{title:e,onRequestClose:t.closeModal,overlayClassName:"edit-site-create-template-part-modal"},(0,l.createElement)(ti,{...t}))}function ti({defaultArea:e=Pt,blocks:t=[],confirmLabel:n=(0,b.__)("Create"),closeModal:a,onCreate:r,onError:s,defaultTitle:i=""}){const{createErrorNotice:o}=(0,d.useDispatch)(fe.store),{saveEntityRecord:u}=(0,d.useDispatch)(ge.store),m=Js(),[p,h]=(0,f.useState)(i),[y,v]=(0,f.useState)(e),[E,x]=(0,f.useState)(!1),S=(0,se.useInstanceId)(ei),C=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas()),[]);return(0,l.createElement)("form",{onSubmit:async e=>{e.preventDefault(),await async function(){if(p&&!E)try{x(!0);const e=Qs(p,m),n=$s(e),a=await u("postType",kt,{slug:n,title:e,content:(0,c.serialize)(t),area:y},{throwOnError:!0});await r(a)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while creating the template part.");o(t,{type:"snackbar"}),s?.()}finally{x(!1)}}()}},(0,l.createElement)(_.__experimentalVStack,{spacing:"4"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:p,onChange:h,required:!0}),(0,l.createElement)(_.BaseControl,{label:(0,b.__)("Area"),id:`edit-site-create-template-part-modal__area-selection-${S}`,className:"edit-site-create-template-part-modal__area-base-control"},(0,l.createElement)(_.__experimentalRadioGroup,{label:(0,b.__)("Area"),className:"edit-site-create-template-part-modal__area-radio-group",id:`edit-site-create-template-part-modal__area-selection-${S}`,onChange:v,checked:y},C.map((({icon:e,label:t,area:n,description:a})=>(0,l.createElement)(_.__experimentalRadio,{key:t,value:n,className:"edit-site-create-template-part-modal__area-radio"},(0,l.createElement)(_.Flex,{align:"start",justify:"start"},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Icon,{icon:e})),(0,l.createElement)(_.FlexBlock,{className:"edit-site-create-template-part-modal__option-label"},t,(0,l.createElement)("div",null,a)),(0,l.createElement)(_.FlexItem,{className:"edit-site-create-template-part-modal__checkbox"},y===n&&(0,l.createElement)(_.Icon,{icon:w})))))))),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{a()}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit","aria-disabled":!p||E,isBusy:E},n))))}const ni=(e,t,n)=>t===n.findIndex((t=>e.name===t.name));var ai={};function ri(e){return[e]}function si(e,t,n){var a;if(e.length!==t.length)return!1;for(a=n;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}function ii(e,t){var n,a=t||ri;function r(){n=new WeakMap}function s(){var t,r,s,i,o,l=arguments.length;for(i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];for(t=function(e){var t,a,r,s,i,o=n,l=!0;for(t=0;t<e.length;t++){if(!(i=a=e[t])||"object"!=typeof i){l=!1;break}o.has(a)?o=o.get(a):(r=new WeakMap,o.set(a,r),o=r)}return o.has(ai)||((s=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,o.set(ai,s)),o.get(ai)}(o=a.apply(null,i)),t.isUniqueByDependants||(t.lastDependants&&!si(o,t.lastDependants,0)&&t.clear(),t.lastDependants=o),r=t.head;r;){if(si(r.args,i,1))return r!==t.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=t.head,r.prev=null,t.head.prev=r,t.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,t.head&&(t.head.prev=r,r.next=t.head),t.head=r,r.val}return s.getDependants=a,s.clear=r,r(),s}var oi=n(4793),li=n.n(oi);const ci=e=>e.name||"",ui=e=>e.title,di=e=>e.description||"",mi=e=>e.keywords||[],pi=()=>!1;function hi(e=""){return vs(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function fi(e=""){return e=(e=(e=li()(e)).replace(/^\//,"")).toLowerCase()}const gi=(e="")=>hi(fi(e)),yi=(e=[],t="",n={})=>{const a=gi(t),r=n.categoryId!==It&&!a.length,s={...n,onlyFilterByCategory:r},i=r?0:1,o=e.map((e=>[e,vi(e,t,s)])).filter((([,e])=>e>i));return 0===a.length||o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function vi(e,t,n){const{categoryId:a,getName:r=ci,getTitle:s=ui,getDescription:i=di,getKeywords:o=mi,hasCategory:l=pi,onlyFilterByCategory:c}=n;let u=a===It||a===At&&e.type===Mt.user||l(e,a)?1:0;if(!u||c)return u;const d=r(e),m=s(e),p=i(e),h=o(e),f=fi(t),g=fi(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=>!gi(t).some((t=>t.includes(e))))))(hi(f),e).length&&(u+=10)}return u}const _i=[],bi=(e,t)=>e&&t?e+"//"+t:null,Ei=ii(((e,t,n="")=>{var a;const{getEntityRecords:r,getIsResolving:s}=e(ge.store),{__experimentalGetDefaultTemplatePartAreas:i}=e(g.store),o={per_page:-1},l=(null!==(a=r("postType",kt,o))&&void 0!==a?a:_i).map((e=>(e=>({blocks:(0,c.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),categories:[e.area],description:e.description||"",isCustom:e.source===Tt.custom,keywords:e.keywords||[],id:bi(e.theme,e.slug),name:bi(e.theme,e.slug),title:(0,en.decodeEntities)(e.title.rendered),type:e.type,templatePart:e}))(e))),u=(i()||[]).map((e=>e.area)),d=s("getEntityRecords",["postType",kt,o]),m=yi(l,n,{categoryId:t,hasCategory:(e,t)=>t!==Pt?e.templatePart.area===t:e.templatePart.area===t||!u.includes(e.templatePart.area)});return{patterns:m,isResolving:d}}),(e=>[e(ge.store).getEntityRecords("postType",kt,{per_page:-1}),e(ge.store).getIsResolving("getEntityRecords",["postType",kt,{per_page:-1}]),e(g.store).__experimentalGetDefaultTemplatePartAreas()])),wi=ii((e=>{var t;const{getSettings:n}=Ke(e(ta)),a=n();return{patterns:[...(null!==(t=a.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:a.__experimentalBlockPatterns)||[],...e(ge.store).getBlockPatterns()||[]].filter((e=>!Nt.includes(e.source))).filter(ni).filter((e=>!1!==e.inserter)).map((e=>({...e,keywords:e.keywords||[],type:Mt.theme,blocks:(0,c.parse)(e.content,{__unstableSkipMigrationLogs:!0})}))),isResolving:!1}}),(e=>[e(ge.store).getBlockPatterns(),Ke(e(ta)).getSettings()])),xi=ii(((e,t,n,a="")=>{const{patterns:r}=wi(e),{patterns:s}=Si(e);let i=[...r||[],...s||[]];return n&&(i=i.filter((e=>e.type===Mt.user?e.syncStatus===n:n===Ot.unsynced))),i=yi(i,a,t?{categoryId:t,hasCategory:(e,t)=>e.categories?.includes(t)}:{hasCategory:e=>!e.hasOwnProperty("categories")}),{patterns:i,isResolving:!1}}),(e=>[wi(e),Si(e)])),Si=ii(((e,t,n="")=>{const{getEntityRecords:a,getIsResolving:r,getUserPatternCategories:s}=e(ge.store),i={per_page:-1},o=a("postType",Mt.user,i),l=s(),u=new Map;l.forEach((e=>u.set(e.id,e)));let d=o?o.map((e=>((e,t)=>({blocks:(0,c.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||Ot.full,title:e.title.raw,type:e.type,patternPost:e}))(e,u))):_i;const m=r("getEntityRecords",["postType",Mt.user,i]);return t&&(d=d.filter((e=>e.syncStatus===t))),d=yi(d,n,{hasCategory:()=>!0}),{patterns:d,isResolving:m,categories:l}}),(e=>[e(ge.store).getEntityRecords("postType",Mt.user,{per_page:-1}),e(ge.store).getIsResolving("getEntityRecords",["postType",Mt.user,{per_page:-1}]),e(ge.store).getUserPatternCategories()]));var Ci=(e,t,{search:n="",syncStatus:a}={})=>(0,d.useSelect)((r=>e===kt?Ei(r,t,n):e===Mt.theme?xi(r,t,a,n):e===Mt.user?Si(r,a,n):{patterns:_i,isResolving:!1}),[t,e,n,a]);function ki(){const e=function(){const e=(0,d.useSelect)((e=>{var t;const{getSettings:n}=Ke(e(ta)),a=n();return null!==(t=a.__experimentalAdditionalBlockPatternCategories)&&void 0!==t?t:a.__experimentalBlockPatternCategories}));return[...e||[],...(0,d.useSelect)((e=>e(ge.store).getBlockPatternCategories()))||[]]}();e.push({name:Pt,label:(0,b.__)("Uncategorized")});const t=function(){const e=(0,d.useSelect)((e=>{var t;const{getSettings:n}=Ke(e(ta));return null!==(t=n().__experimentalAdditionalBlockPatterns)&&void 0!==t?t:n().__experimentalBlockPatterns})),t=(0,d.useSelect)((e=>e(ge.store).getBlockPatterns()));return(0,f.useMemo)((()=>[...e||[],...t||[]].filter((e=>!Nt.includes(e.source))).filter(ni).filter((e=>!1!==e.inserter))),[e,t])}(),{patterns:n,categories:a}=Ci(Mt.user),r=(0,f.useMemo)((()=>{const r={},s=[];e.forEach((e=>{r[e.name]||(r[e.name]={...e,count:0})})),a.forEach((e=>{r[e.name]||(r[e.name]={...e,count:0})})),t.forEach((e=>{e.categories?.forEach((e=>{r[e]&&(r[e].count+=1)})),e.categories?.length||(r.uncategorized.count+=1)})),n.forEach((e=>{e.categories?.forEach((e=>{r[e]&&(r[e].count+=1)})),e.categories?.length||(r.uncategorized.count+=1)})),[...e,...a].forEach((e=>{r[e.name].count&&!s.find((t=>t.name===e.name))&&s.push(r[e.name])}));const i=s.sort(((e,t)=>e.label.localeCompare(t.label)));return i.unshift({name:At,label:(0,b.__)("My patterns"),count:n.length}),i.unshift({name:It,label:(0,b.__)("All patterns"),description:(0,b.__)("A list of all patterns from all sources."),count:t.length+n.length}),i}),[e,t,a,n]);return{patternCategories:r,hasPatterns:!!r.length}}const{useHistory:Ti,useLocation:Pi}=Ke(ft.privateApis),{CreatePatternModal:Mi}=Ke(xt.privateApis);function Ii(){const e=Ti(),{params:t}=Pi(),[n,a]=(0,f.useState)(!1),[r,s]=(0,f.useState)(!1),i=(0,d.useSelect)((e=>e(ge.store).getCurrentTheme()?.is_block_theme),[]),{createPatternFromFile:o}=Ke((0,d.useDispatch)(xt.store)),{createSuccessNotice:c,createErrorNotice:u}=(0,d.useDispatch)(fe.store),m=(0,f.useRef)(),{patternCategories:p}=ki();function h(){a(!1),s(!1)}const g=[{icon:ca,onClick:()=>a(!0),title:(0,b.__)("Create pattern")}];return i&&g.push({icon:Ks,onClick:()=>s(!0),title:(0,b.__)("Create template part")}),g.push({icon:Xs,onClick:()=>{m.current.click()},title:(0,b.__)("Import pattern from JSON")}),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.DropdownMenu,{controls:g,toggleProps:{as:ma},icon:Zr,label:(0,b.__)("Create pattern")}),n&&(0,l.createElement)(Mi,{onClose:()=>a(!1),onSuccess:function({pattern:t,categoryId:n}){a(!1),e.push({postId:t.id,postType:Mt.user,categoryType:Mt.theme,categoryId:n,canvas:"edit"})},onError:h}),r&&(0,l.createElement)(ei,{closeModal:()=>s(!1),blocks:[],onCreate:function(t){s(!1),e.push({postId:t.id,postType:kt,canvas:"edit"})},onError:h}),(0,l.createElement)("input",{type:"file",accept:".json",hidden:!0,ref:m,onChange:async n=>{const a=n.target.files?.[0];if(a)try{const n=t.categoryType!==kt&&p.find((e=>e.name===t.categoryId))?.id,r=await o(a,n?[n]:void 0);n||e.push({path:"/patterns",categoryType:Mt.theme,categoryId:It}),c((0,b.sprintf)((0,b.__)('Imported "%s" from JSON.'),r.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(e){u(e.message,{type:"snackbar",id:"import-pattern-error"})}finally{n.target.value=""}}}))}function Ai({count:e,icon:t,id:n,isActive:a,label:r,type:s}){const i=Et({path:"/patterns",categoryType:s,categoryId:n});if(e)return(0,l.createElement)(va,{...i,icon:t,suffix:(0,l.createElement)("span",null,e),"aria-current":a?"true":void 0},r)}const Ni=e=>{const t=e||[],n=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas()),[]),a={header:{},footer:{},sidebar:{},uncategorized:{}};n.forEach((e=>a[e.area]={...e,templateParts:[]}));return t.reduce(((e,t)=>(e[e[t.area]?t.area:Pt].templateParts.push(t),e)),a)};function Oi({areas:e,currentArea:t,currentType:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-patterns__group-header"},(0,l.createElement)(_.__experimentalHeading,{level:2},(0,b.__)("Template parts"))),(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},Object.entries(e).map((([e,{label:a,templateParts:r}])=>(0,l.createElement)(Ai,{key:e,count:r?.length,icon:(0,g.getTemplatePartIcon)(e),label:a,id:e,type:kt,isActive:t===e&&n===kt})))))}function Ri({categories:e,currentCategory:t,currentType:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},e.map((e=>(0,l.createElement)(Ai,{key:e.name,count:e.count,label:e.label,icon:Ys,id:e.name,type:"pattern",isActive:t===`${e.name}`&&(n===Mt.theme||n===Mt.user)})))))}function Fi(){const e=(0,se.useViewportMatch)("medium","<"),{categoryType:t,categoryId:n}=(0,gt.getQueryArgs)(window.location.href),a=n||It,r=t||Mt.theme,{templatePartAreas:s,hasTemplateParts:i,isLoading:o}=function(){const{records:e,isResolving:t}=(0,ge.useEntityRecords)("postType",kt,{per_page:-1});return{hasTemplateParts:!!e&&!!e.length,isLoading:t,templatePartAreas:Ni(e)}}(),{patternCategories:c,hasPatterns:u}=ki(),m=(0,d.useSelect)((e=>e(ge.store).getCurrentTheme()?.is_block_theme),[]),p=(0,d.useSelect)((e=>!!e(ta).getSettings().supportsTemplatePartsMode),[]),h=Et({path:"/wp_template_part/all",didAccessPatternsPage:!m&&p?1:void 0}),f=e?void 0:(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(va,{as:"a",href:"edit.php?post_type=wp_block",withChevron:!0},(0,b.__)("Manage all of my patterns")),(m||p)&&(0,l.createElement)(va,{withChevron:!0,...h},(0,b.__)("Manage all template parts")));return(0,l.createElement)(ha,{isRoot:!m,title:(0,b.__)("Patterns"),description:(0,b.__)("Manage what patterns are available when editing the site."),actions:(0,l.createElement)(Ii,null),footer:f,content:(0,l.createElement)(l.Fragment,null,o&&(0,b.__)("Loading patterns…"),!o&&(0,l.createElement)(l.Fragment,null,!i&&!u&&(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},(0,l.createElement)(_.__experimentalItem,null,(0,b.__)("No template parts or patterns found"))),u&&(0,l.createElement)(Ri,{categories:c,currentCategory:a,currentType:r}),i&&(0,l.createElement)(Oi,{areas:s,currentArea:a,currentType:r})))})}const{useLocation:Di}=Ke(ft.privateApis),Bi=[Ct,kt,St,Mt.user];function Vi(){const{params:e={}}=Di(),{postType:t,postId:n,context:a,isReady:r}=function({path:e,postId:t,postType:n}){const{hasLoadedAllDependencies:a,homepageId:r,url:s,frontPageTemplateId:i}=(0,d.useSelect)((e=>{const{getSite:t,getUnstableBase:n,getEntityRecords:a}=e(ge.store),r=t(),s=n(),i=a("postType",Ct,{per_page:-1});let o;if(i){const e=i.find((e=>"front-page"===e.slug));o=!!e&&e.id}return{hasLoadedAllDependencies:!!s&&!!r,homepageId:"page"===r?.show_on_front&&["number","string"].includes(typeof r.page_on_front)?r.page_on_front.toString():null,url:s?.home,frontPageTemplateId:o}}),[]),o=(0,d.useSelect)((o=>{if(Bi.includes(n))return;const{getEditedEntityRecord:l,getEntityRecords:c,getDefaultTemplateId:u,__experimentalGetTemplateForLink:d}=o(ge.store);function m(e,t){if("page"===e&&r===t){if(void 0===i)return;if(i)return i}const n=l("postType",e,t);if(!n)return;const a=n.template;if(a){const e=c("postType",Ct,{per_page:-1})?.find((({slug:e})=>e===a));if(e)return e.id}let s;return s=n.slug?"page"===e?`${e}-${n.slug}`:`single-${e}-${n.slug}`:"page"===e?"page":`single-${e}`,u({slug:s})}if(a){if(n&&t)return m(n,t);if("/pages"===e&&t)return m("page",t);if(r)return m("page",r);if(s){const e=d(s);return e?.id}}}),[r,a,s,t,n,e,i]),l=(0,f.useMemo)((()=>Bi.includes(n)?{}:n&&t?{postType:n,postId:t}:"/pages"===e&&t?{postType:"page",postId:t}:r?{postType:"page",postId:r}:{}),[r,n,t,e]);return"/wp_template/all"===e&&t?{isReady:!0,postType:"wp_template",postId:t,context:l}:"/wp_template_part/all"===e&&t?{isReady:!0,postType:"wp_template_part",postId:t,context:l}:Bi.includes(n)?{isReady:!0,postType:n,postId:t,context:l}:a?{isReady:void 0!==o,postType:Ct,postId:o,context:l}:{isReady:!1}}(e),{setEditedEntity:s}=(0,d.useDispatch)(ta);(0,f.useEffect)((()=>{r&&s(t,n,a)}),[r,t,n,a,s])}function Li(e,t){var n=e.toLowerCase();return 0===t?function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(n):n}var zi=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var Gi=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const{useLocation:Hi,useHistory:Ui}=Ke(ft.privateApis);function Wi(e){var t;let n=null!==(t=e?.path)&&void 0!==t?t:"/";if(e?.postType&&e?.postId)switch(e.postType){case Mt.user:case Ct:case kt:case"page":n=`/${encodeURIComponent(e.postType)}/${encodeURIComponent(e.postId)}`;break;default:n=`/navigation/${encodeURIComponent(e.postType)}/${encodeURIComponent(e.postId)}`}return n}function ji(){const e=Ui(),{params:t}=Hi(),{location:n,params:a,goTo:r}=(0,_.__experimentalUseNavigator)(),s=(0,f.useRef)(!0);(0,f.useEffect)((()=>{function r(n){if(a=n,r=t,Object.entries(a).every((([e,t])=>r[e]===t)))return;var a,r;const s={...t,...n};e.push(s)}s.current?s.current=!1:a?.postType&&a?.postId?r({postType:a?.postType,postId:a?.postId,path:void 0,layout:void 0}):n.path.startsWith("/page/")&&a?.postId?r({postType:"page",postId:a?.postId,path:void 0,layout:void 0}):"/patterns"===n.path?r({postType:void 0,postId:void 0,canvas:void 0,path:n.path}):"/wp_template/all"!==n.path||window?.__experimentalAdminViews?"/pages"===n.path&&window?.__experimentalAdminViews||"/wp_template/all"===n.path&&window?.__experimentalAdminViews||"/wp_template_part/all"===n.path&&window?.__experimentalAdminViews?r({postType:void 0,categoryType:void 0,categoryId:void 0,path:n.path}):r({postType:void 0,postId:void 0,categoryType:void 0,categoryId:void 0,layout:void 0,path:"/"===n.path?void 0:n.path}):r({postType:void 0,categoryType:void 0,categoryId:void 0,path:n.path,layout:void 0})}),[n?.path,a]),(0,f.useEffect)((()=>{const e=Wi(t);n.path!==e&&r(e)}),[t])}const Zi={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useLocation:qi,useHistory:Yi}=Ke(ft.privateApis);function Ki(e){const t=qi(),n=Yi(),{block:a}=e,{clientId:r}=a,{moveBlocksDown:s,moveBlocksUp:i,removeBlocks:o}=(0,d.useDispatch)(he.store),c=(0,b.sprintf)((0,b.__)("Remove %s"),(0,he.BlockTitle)({clientId:r,maximumLength:25})),u=(0,b.sprintf)((0,b.__)("Go to %s"),(0,he.BlockTitle)({clientId:r,maximumLength:25})),m=(0,d.useSelect)((e=>{const{getBlockRootClientId:t}=e(he.store);return t(r)}),[r]),p=(0,f.useCallback)((e=>{const{attributes:a,name:r}=e;"post-type"===a.kind&&a.id&&a.type&&n&&n.push({postType:a.type,postId:a.id,...yt()&&{wp_theme_preview:vt()}},{backPath:Wi(t.params)}),"core/page-list-item"===r&&a.id&&n&&n.push({postType:"page",postId:a.id,...yt()&&{wp_theme_preview:vt()}},{backPath:Wi(t.params)})}),[n]);return(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Zi,noIcons:!0,...e},(({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{icon:zi,onClick:()=>{i([r],m),e()}},(0,b.__)("Move up")),(0,l.createElement)(_.MenuItem,{icon:Gi,onClick:()=>{s([r],m),e()}},(0,b.__)("Move down")),"page"===a.attributes?.type&&a.attributes?.id&&(0,l.createElement)(_.MenuItem,{onClick:()=>{p(a),e()}},u)),(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{o([r],!1),e()}},c)))))}const{PrivateListView:Xi}=Ke(he.privateApis),Ji=["postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function Qi({rootClientId:e}){const{listViewRootClientId:t,isLoading:n}=(0,d.useSelect)((t=>{const{areInnerBlocksControlled:n,getBlockName:a,getBlockCount:r,getBlockOrder:s}=t(he.store),{isResolving:i}=t(ge.store),o=s(e),l=1===o.length&&"core/page-list"===a(o[0])&&r(o[0])>0,c=i("getEntityRecords",Ji);return{listViewRootClientId:l?o[0]:e,isLoading:!n(e)||c}}),[e]),{replaceBlock:a,__unstableMarkNextChangeAsNotPersistent:r}=(0,d.useDispatch)(he.store),s=(0,f.useCallback)((e=>{"core/navigation-link"!==e.name||e.attributes.url||(r(),a(e.clientId,(0,c.createBlock)("core/navigation-link",e.attributes)))}),[r,a]);return(0,l.createElement)(l.Fragment,null,!n&&(0,l.createElement)(Xi,{rootClientId:t,onSelect:s,blockSettingsMenu:Ki,showAppender:!1}),(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor"},(0,l.createElement)(he.BlockList,null)))}const $i=()=>{};function eo({navigationMenuId:e}){const{storedSettings:t}=(0,d.useSelect)((e=>{const{getSettings:t}=Ke(e(ta));return{storedSettings:t()}}),[]),n=(0,f.useMemo)((()=>e?[(0,c.createBlock)("core/navigation",{ref:e})]:[]),[e]);return e&&n?.length?(0,l.createElement)(he.BlockEditorProvider,{settings:t,value:n,onChange:$i,onInput:$i},(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content"},(0,l.createElement)(Qi,{rootClientId:n[0].clientId}))):null}function to(e){return(0,d.useSelect)((t=>{if(!e)return;const n=t(ge.store).getEditedEntityRecord("postType",St,e);return"trash"===n.status?void 0:n.title}),[e])}function no({id:e}){const t=to(e);return e&&void 0!==t?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},t||(0,b.__)("Navigation")),(0,l.createElement)(eo,{navigationMenuId:e})):null}function ao({id:e}){const t=to(e),n=Et({postId:e,postType:St});return e&&void 0!==t?(0,l.createElement)(va,{withChevron:!0,...n},t||(0,b.__)("(no title)")):null}function ro({menus:e}){return(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu-list"},e.map((e=>(0,l.createElement)(ao,{key:e,id:e}))))}function so({menus:e}){return e.length?1===e.length?(0,l.createElement)(no,{id:e[0]}):(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},(0,b.__)("Navigation")),(0,l.createElement)(ro,{menus:e})):null}function io(e,t){const{record:n}=Ds(e,t);if(e!==kt)return;const a=function(e){return e?.blocks?e?.blocks:e?.content&&"function"!=typeof e.content?(0,c.parse)(e.content):[]}(n),r=function(e,t){if(!e||!t?.length)return[];const n=t=>{if(!t)return[];const a=[];for(const r of t)if(r.name===e&&a.push(r),r?.innerBlocks){const e=n(r.innerBlocks);e.length&&a.push(...e)}return a};return n(t)}("core/navigation",a);if(!r.length)return;const s=r?.map((e=>e.attributes.ref)),i=[...new Set(s)].filter((e=>e));return i?.length?(0,l.createElement)(so,{menus:i}):void 0}function oo(e,t){const{getDescription:n,getTitle:a,record:r}=Ds(e,t),s=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas()),[]),{currentTheme:i,userPatternCategories:o}=(0,d.useSelect)((e=>{const{getCurrentTheme:t,getUserPatternCategories:n}=e(ge.store);return{currentTheme:t(),userPatternCategories:n()}}),[]),c=Ls(e,t),u="theme"===c.type&&r.theme===i?.stylesheet,m=a();let p=n();!p&&c.text&&(p=e===Mt.user?(0,b.sprintf)((0,b.__)("This is the %s pattern."),a()):(0,b.sprintf)((0,b.__)("This is the %s template part."),a())),!p&&e===Mt.user&&r?.title&&(p=(0,b.sprintf)((0,b.__)("This is the %s pattern."),r.title));const h=r?.modified?(0,l.createElement)(Cr,{record:r}):null,f=[];if((e===Mt.user||e===kt)&&(f.push({label:(0,b.__)("Syncing"),value:r.wp_pattern_sync_status===Ot.unsynced?(0,b.__)("Not synced"):(0,b.__)("Fully synced")}),0===r.wp_pattern_category?.length&&f.push({label:(0,b.__)("Categories"),value:(0,b.__)("Uncategorized")}),r.wp_pattern_category?.length>0)){const e=new Map;o.forEach((t=>e.set(t.id,t)));const t=r.wp_pattern_category.filter((t=>e.get(t))).map((t=>e.get(t).label));f.push({label:(0,b.__)("Categories"),value:t.length>0?t.join(", "):""})}if(e===kt){const e=s.find((e=>e.area===r.area));let t=e?.label;t||(t=r.area?(0,b.sprintf)((0,b.__)("%s (removed)"),(y=r.area,void 0===v&&(v={}),vs(y,hs({delimiter:" ",transform:Li},v)))):(0,b.__)("None")),f.push({label:(0,b.__)("Area"),value:t})}var y,v;e===kt&&c.text&&!u&&f.push({label:(0,b.__)("Added by"),value:(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-author"},c.text)}),e!==kt||!c.text||r.origin!==Tt.plugin&&!0!==r.has_theme_file||f.push({label:(0,b.__)("Customized"),value:(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-customized"},c.isCustomized?(0,b.__)("Yes"):(0,b.__)("No"))});return{title:m,description:p,content:(0,l.createElement)(l.Fragment,null,io(e,t),!!f.length&&(0,l.createElement)(Sr,{spacing:5,title:(0,b.__)("Details")},f.map((({label:e,value:t})=>(0,l.createElement)(wr,{key:e},(0,l.createElement)(Er,null,e),(0,l.createElement)(xr,null,t)))))),footer:h}}function lo(){const e=(0,_.__experimentalUseNavigator)(),{params:{postType:t,postId:n}}=e,{categoryType:a}=(0,gt.getQueryArgs)(window.location.href),{setCanvasMode:r}=Ke((0,d.useDispatch)(ta));Vi();const s=oo(t,n),i=a||t!==kt?"/patterns":"/wp_template_part/all";return(0,l.createElement)(ha,{actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Us,{postType:t,postId:n,toggleProps:{as:ma},onRemove:()=>{e.goTo(i)}}),(0,l.createElement)(ma,{onClick:()=>r("edit"),label:(0,b.__)("Edit"),icon:ba})),backPath:i,...s})}const co={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},uo=e=>e?.trim()?.length>0;function mo({menuTitle:e,onClose:t,onSave:n}){const[a,r]=(0,f.useState)(e),s=a!==e&&uo(a);return(0,l.createElement)(_.Modal,{title:(0,b.__)("Rename"),onRequestClose:t},(0,l.createElement)("form",{className:"sidebar-navigation__rename-modal-form"},(0,l.createElement)(_.__experimentalVStack,{spacing:"3"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:a,placeholder:(0,b.__)("Navigation title"),onChange:r}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,disabled:!s,variant:"primary",type:"submit",onClick:e=>{e.preventDefault(),s&&(n({title:a}),t())}},(0,b.__)("Save"))))))}function po({onClose:e,onConfirm:t}){return(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:!0,onConfirm:n=>{n.preventDefault(),t(),e()},onCancel:e,confirmButtonText:(0,b.__)("Delete")},(0,b.__)("Are you sure you want to delete this Navigation menu?"))}const ho={position:"bottom right"};function fo(e){const{onDelete:t,onSave:n,onDuplicate:a,menuTitle:r}=e,[s,i]=(0,f.useState)(!1),[o,c]=(0,f.useState)(!1),u=()=>{i(!1),c(!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,b.__)("Actions"),icon:ce,popoverProps:ho},(({onClose:e})=>(0,l.createElement)("div",null,(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{i(!0),e()}},(0,b.__)("Rename")),(0,l.createElement)(_.MenuItem,{onClick:()=>{a(),e()}},(0,b.__)("Duplicate")),(0,l.createElement)(_.MenuItem,{isDestructive:!0,onClick:()=>{c(!0),e()}},(0,b.__)("Delete")))))),o&&(0,l.createElement)(po,{onClose:u,onConfirm:t}),s&&(0,l.createElement)(mo,{onClose:u,menuTitle:r,onSave:n}))}function go(e,t,n){return e?.rendered?"publish"===n?(0,en.decodeEntities)(e?.rendered):(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),(0,en.decodeEntities)(e?.rendered),n):(0,b.sprintf)((0,b.__)("(no title %s)"),t)}function yo({postId:e}){const t=Et({postId:e,postType:St,canvas:"edit"});return(0,l.createElement)(ma,{...t,label:(0,b.__)("Edit"),icon:ba})}function vo({navigationMenu:e,handleDelete:t,handleDuplicate:n,handleSave:a}){const r=e?.title?.rendered;return(0,l.createElement)(To,{actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(fo,{menuTitle:(0,en.decodeEntities)(r),onDelete:t,onSave:a,onDuplicate:n}),(0,l.createElement)(yo,{postId:e?.id})),title:go(e?.title,e?.id,e?.status),description:(0,b.__)("Navigation menus are a curated collection of blocks that allow visitors to get around your site.")},(0,l.createElement)(eo,{navigationMenuId:e?.id}))}const _o="wp_navigation";function bo(){const{params:{postId:e}}=(0,_.__experimentalUseNavigator)(),{record:t,isResolving:n}=(0,ge.useEntityRecord)("postType",_o,e),{isSaving:a,isDeleting:r}=(0,d.useSelect)((t=>{const{isSavingEntityRecord:n,isDeletingEntityRecord:a}=t(ge.store);return{isSaving:n("postType",_o,e),isDeleting:a("postType",_o,e)}}),[e]),s=n||a||r,i=t?.title?.rendered||t?.slug,{handleSave:o,handleDelete:c,handleDuplicate:u}=So(),m=()=>c(t),p=e=>o(t,e),h=()=>u(t);return s?(0,l.createElement)(To,{description:(0,b.__)("Navigation menus are a curated collection of blocks that allow visitors to get around your site.")},(0,l.createElement)(_.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):s||t?t?.content?.raw?(0,l.createElement)(vo,{navigationMenu:t,handleDelete:m,handleSave:p,handleDuplicate:h}):(0,l.createElement)(To,{actions:(0,l.createElement)(fo,{menuTitle:(0,en.decodeEntities)(i),onDelete:m,onSave:p,onDuplicate:h}),title:go(t?.title,t?.id,t?.status),description:(0,b.__)("This Navigation Menu is empty.")}):(0,l.createElement)(To,{description:(0,b.__)("Navigation Menu missing.")})}function Eo(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),{deleteEntityRecord:t}=(0,d.useDispatch)(ge.store),{createSuccessNotice:n,createErrorNotice:a}=(0,d.useDispatch)(fe.store);return async r=>{const s=r?.id;try{await t("postType",_o,s,{force:!0},{throwOnError:!0}),n((0,b.__)("Deleted Navigation menu"),{type:"snackbar"}),e("/navigation")}catch(e){a((0,b.sprintf)((0,b.__)("Unable to delete Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function wo(){const{getEditedEntityRecord:e}=(0,d.useSelect)((e=>{const{getEditedEntityRecord:t}=e(ge.store);return{getEditedEntityRecord:t}}),[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:n}=(0,d.useDispatch)(ge.store),{createSuccessNotice:a,createErrorNotice:r}=(0,d.useDispatch)(fe.store);return async(s,i)=>{if(!i)return;const o=s?.id,l=e("postType",St,o);t("postType",_o,o,i);const c=Object.keys(i);try{await n("postType",_o,o,c,{throwOnError:!0}),a((0,b.__)("Renamed Navigation menu"),{type:"snackbar"})}catch(e){t("postType",_o,o,l),r((0,b.sprintf)((0,b.__)("Unable to rename Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function xo(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),{saveEntityRecord:t}=(0,d.useDispatch)(ge.store),{createSuccessNotice:n,createErrorNotice:a}=(0,d.useDispatch)(fe.store);return async r=>{const s=r?.title?.rendered||r?.slug;try{const a=await t("postType",_o,{title:(0,b.sprintf)((0,b.__)("%s (Copy)"),s),content:r?.content?.raw,status:"publish"},{throwOnError:!0});a&&(n((0,b.__)("Duplicated Navigation menu"),{type:"snackbar"}),e(`/navigation/${_o}/${a.id}`))}catch(e){a((0,b.sprintf)((0,b.__)("Unable to duplicate Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function So(){return{handleDelete:Eo(),handleSave:wo(),handleDuplicate:xo()}}let Co=!1;function ko(){const{records:e,isResolving:t,hasResolved:n}=(0,ge.useEntityRecords)("postType",St,co),a=t&&!n,{getNavigationFallbackId:r}=Ke((0,d.useSelect)(ge.store)),s=e?.[0];s&&(Co=!0),s||t||!n||Co||r();const{handleSave:i,handleDelete:o,handleDuplicate:c}=So(),u=!!e?.length;return a?(0,l.createElement)(To,null,(0,l.createElement)(_.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):a||u?1===e?.length?(0,l.createElement)(vo,{navigationMenu:s,handleDelete:()=>o(s),handleDuplicate:()=>c(s),handleSave:e=>i(s,e)}):(0,l.createElement)(To,null,(0,l.createElement)(_.__experimentalItemGroup,null,e?.map((({id:e,title:t,status:n},a)=>(0,l.createElement)(Po,{postId:e,key:e,withChevron:!0,icon:sa},function(e,t,n){return e?"publish"===n?(0,en.decodeEntities)(e):(0,b.sprintf)((0,b.__)("%1$s (%2$s)"),(0,en.decodeEntities)(e),n):(0,b.sprintf)((0,b.__)("(no title %s)"),t)}(t?.rendered,a+1,n)))))):(0,l.createElement)(To,{description:(0,b.__)("No Navigation Menus found.")})}function To({children:e,actions:t,title:n,description:a}){return(0,l.createElement)(ha,{title:n||(0,b.__)("Navigation"),actions:t,description:a||(0,b.__)("Manage your Navigation menus."),content:e})}const Po=({postId:e,...t})=>{const n=Et({postId:e,postType:St});return(0,l.createElement)(va,{...n,...t})};var Mo=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var Io=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Ao=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var No=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));var Oo=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"}));const{lock:Ro,unlock:Fo}=(0,qe.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/dataviews"),{DropdownMenuV2:Do,DropdownMenuGroupV2:Bo,DropdownMenuItemV2:Vo,DropdownMenuItemLabelV2:Lo,kebabCase:zo}=Fo(_.privateApis);function Go({action:e,onClick:t}){return(0,l.createElement)(_.Button,{label:e.label,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t})}function Ho({action:e,onClick:t}){return(0,l.createElement)(Vo,{onClick:t,hideOnClick:!e.RenderModal},(0,l.createElement)(Lo,null,e.label))}function Uo({action:e,item:t,ActionTrigger:n}){const[a,r]=(0,f.useState)(!1),s={action:e,onClick:()=>r(!0)},{RenderModal:i,hideModalHeader:o}=e;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(n,{...s}),a&&(0,l.createElement)(_.Modal,{title:e.modalHeader||e.label,__experimentalHideHeader:!!o,onRequestClose:()=>{r(!1)},overlayClassName:`dataviews-action-modal dataviews-action-modal__${zo(e.id)}`},(0,l.createElement)(i,{items:[t],closeModal:()=>r(!1)})))}function Wo({actions:e,item:t}){return(0,l.createElement)(Bo,null,e.map((e=>e.RenderModal?(0,l.createElement)(Uo,{key:e.id,action:e,item:t,ActionTrigger:Ho}):(0,l.createElement)(Ho,{key:e.id,action:e,onClick:()=>e.callback([t])}))))}function jo({item:e,actions:t,isCompact:n}){const{primaryActions:a,secondaryActions:r}=(0,f.useMemo)((()=>t.reduce(((t,n)=>(n.isEligible&&!n.isEligible(e)||(n.isPrimary&&n.icon?t.primaryActions.push(n):t.secondaryActions.push(n)),t)),{primaryActions:[],secondaryActions:[]})),[t,e]);return n?(0,l.createElement)(Zo,{item:e,primaryActions:a,secondaryActions:r}):(0,l.createElement)(_.__experimentalHStack,{spacing:1,justify:"flex-end",style:{flexShrink:"0",width:"auto"}},!!a.length&&a.map((t=>t.RenderModal?(0,l.createElement)(Uo,{key:t.id,action:t,item:e,ActionTrigger:Go}):(0,l.createElement)(Go,{key:t.id,action:t,onClick:()=>t.callback([e])}))),(0,l.createElement)(Do,{trigger:(0,l.createElement)(_.Button,{size:"compact",icon:ce,label:(0,b.__)("Actions"),disabled:!r.length}),placement:"bottom-end"},(0,l.createElement)(Wo,{actions:r,item:e})))}function Zo({item:e,primaryActions:t,secondaryActions:n}){return(0,l.createElement)(Do,{trigger:(0,l.createElement)(_.Button,{size:"compact",icon:ce,label:(0,b.__)("Actions"),disabled:!t.length&&!n.length}),placement:"bottom-end"},!!t.length&&(0,l.createElement)(Wo,{actions:t,item:e}),!!n.length&&(0,l.createElement)(Wo,{actions:n,item:e}))}const{DropdownMenuItemV2:qo}=Fo(_.privateApis),Yo=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Circle,{cx:12,cy:12,r:3})),Ko=(0,f.forwardRef)((function({checked:e,name:t,value:n,hideOnClick:a,onChange:r,onClick:s,...i},o){return(0,l.createElement)(qo,{ref:o,role:"menuitemradio",name:t,"aria-checked":e,hideOnClick:!!a,prefix:e?(0,l.createElement)(_.Icon,{icon:Yo}):(0,l.createElement)("span",{className:"dataviews-filters__custom-menu-radio-item-prefix","aria-hidden":"true"}),onClick:e=>{s?.(e),r?.({...e,target:{...e.target,value:n}})},...i})})),{DropdownMenuV2:Xo,DropdownMenuGroupV2:Jo,DropdownMenuItemV2:Qo,DropdownMenuRadioItemV2:$o,DropdownMenuSeparatorV2:el,DropdownMenuItemLabelV2:tl,DropdownMenuItemHelpTextV2:nl}=Fo(_.privateApis),al={asc:"↑",desc:"↓"},rl=(0,f.forwardRef)((function({field:e,view:t,onChangeView:n,onHide:a},r){const s=!1!==e.enableHiding,i=!1!==e.enableSorting,o=t.sort?.field===e.id;let c,u,d,m,p;const h=(e=>{let t=e.filterBy?.operators;return t&&Array.isArray(t)||(t=Object.keys(pl)),t.filter((e=>Object.keys(pl).includes(e)))})(e);e.type===ul&&h.length>0&&(c={field:e.id,operators:h,elements:e.elements||[]},u=t.filters.find((e=>e.field===c.field)),p=t.filters.filter((e=>e.field!==c.field)),d=c.elements.find((e=>e.value===u?.value)),m=u?.operator||c.operators[0]);const f=!!c;return i||s||f?(0,l.createElement)(Xo,{align:"start",trigger:(0,l.createElement)(_.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:r,variant:"tertiary"},e.header,o&&(0,l.createElement)("span",{"aria-hidden":"true"},o&&al[t.sort.direction])),style:{minWidth:"240px"}},(0,l.createElement)(sl,null,i&&(0,l.createElement)(Jo,null,Object.entries(hl).map((([a,r])=>{const s=o&&t.sort.direction===a,i=`${e.id}-${a}`;return(0,l.createElement)($o,{key:i,name:"view-table-sorting",value:i,checked:s,onChange:()=>{n({...t,sort:{field:e.id,direction:a}})}},(0,l.createElement)(tl,null,r.label))}))),s&&(0,l.createElement)(Qo,{prefix:(0,l.createElement)(_.Icon,{icon:No}),onClick:()=>{a(e),n({...t,hiddenFields:t.hiddenFields.concat(e.id)})}},(0,l.createElement)(tl,null,(0,b.__)("Hide"))),f&&(0,l.createElement)(Jo,null,(0,l.createElement)(Xo,{key:c.field,trigger:(0,l.createElement)(Qo,{prefix:(0,l.createElement)(_.Icon,{icon:Oo}),suffix:d&&(0,l.createElement)("span",{"aria-hidden":"true"},m in pl&&`${pl[m].label} `,d?.label)},(0,l.createElement)(tl,null,(0,b.__)("Filter by")))},(0,l.createElement)(sl,null,(0,l.createElement)(Jo,null,c.elements.map((e=>{const a=d?.value===e.value;return(0,l.createElement)(Ko,{key:e.value,name:`view-table-${c.field}`,value:e.value,checked:a,onClick:()=>{n({...t,page:1,filters:[...p,{field:c.field,operator:m,value:a?void 0:e.value}]})}},(0,l.createElement)(tl,null,e.label),!!e.description&&(0,l.createElement)(nl,null,e.description))}))),c.operators.length>1&&(0,l.createElement)(Xo,{trigger:(0,l.createElement)(Qo,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},pl[m]?.label)},(0,l.createElement)(tl,null,(0,b.__)("Conditions")))},Object.entries(pl).map((([e,{label:a,key:r}])=>(0,l.createElement)($o,{key:r,name:`view-table-${c.field}-conditions`,value:e,checked:m===e,onChange:e=>n({...t,page:1,filters:[...p,{field:c.field,operator:e.target.value,value:u?.value}]})},(0,l.createElement)(tl,null,a)))))))))):e.header}));function sl({children:e}){return f.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,l.createElement)(f.Fragment,{key:t},t>0&&(0,l.createElement)(el,null),e)))}function il({selection:e,onSelectionChange:t,data:n}){const a=e.length===n.length;return(0,l.createElement)(_.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:a,indeterminate:!a&&e.length,onChange:()=>{t(a?[]:n)},label:a?(0,b.__)("Deselect all"):(0,b.__)("Select all")})}function ol({selection:e,onSelectionChange:t,item:n,data:a,getItemId:r,primaryField:s}){const i=r(n),o=e.includes(i);let c;return c=s?.getValue&&n?(0,b.sprintf)(o?(0,b.__)("Deselect item: %s"):(0,b.__)("Select item: %s"),s.getValue({item:n})):o?(0,b.__)("Select a new item"):(0,b.__)("Deselect item"),(0,l.createElement)(_.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:o,label:c,onChange:()=>{t(o?a.filter((t=>{const n=r?.(t);return n!==i&&e.includes(n)})):a.filter((t=>{const n=r?.(t);return n===i||e.includes(n)})))}})}var ll=function({view:e,onChangeView:t,fields:n,actions:a,data:r,getItemId:s,isLoading:i=!1,deferredRendering:o,selection:c,onSelectionChange:u}){const d=a?.some((e=>e.supportsBulk)),m=(0,f.useRef)(new Map),p=(0,f.useRef)(),[h,g]=(0,f.useState)();(0,f.useEffect)((()=>{p.current&&(p.current.focus(),p.current=void 0)}));const y=(0,se.useAsyncList)(r),_=(0,f.useId)();if(h)return p.current=h,void g();const E=e=>{const t=m.current.get(e.id),n=m.current.get(t.fallback);g(n?.node)},w=n.filter((t=>!e.hiddenFields.includes(t.id)&&![e.layout.mediaField].includes(t.id))),x=o?y:r,S=!!x?.length,C={asc:"ascending",desc:"descending"},k=n.find((t=>t.id===e.layout.primaryField));return(0,l.createElement)("div",{className:"dataviews-view-table-wrapper"},(0,l.createElement)("table",{className:"dataviews-view-table","aria-busy":i,"aria-describedby":_},(0,l.createElement)("thead",null,(0,l.createElement)("tr",{className:"dataviews-view-table__row"},d&&(0,l.createElement)("th",{className:"dataviews-view-table__checkbox-column",style:{width:20,minWidth:20},"data-field-id":"selection",scope:"col"},(0,l.createElement)(il,{selection:c,onSelectionChange:u,data:r})),w.map(((n,a)=>(0,l.createElement)("th",{key:n.id,style:{width:n.width||void 0,minWidth:n.minWidth||void 0,maxWidth:n.maxWidth||void 0},"data-field-id":n.id,"aria-sort":e.sort?.field===n.id&&C[e.sort.direction],scope:"col"},(0,l.createElement)(rl,{ref:e=>{e?m.current.set(n.id,{node:e,fallback:w[a>0?a-1:1]?.id}):m.current.delete(n.id)},field:n,view:e,onChangeView:t,onHide:E})))),!!a?.length&&(0,l.createElement)("th",{"data-field-id":"actions",className:"dataviews-view-table__actions-column"},(0,l.createElement)("span",{className:"dataviews-view-table-header"},(0,b.__)("Actions"))))),(0,l.createElement)("tbody",null,S&&x.map(((e,t)=>(0,l.createElement)("tr",{key:s(e),className:v()("dataviews-view-table__row",{"is-selected":c.includes(s(e)||t)})},d&&(0,l.createElement)("td",{className:"dataviews-view-table__checkbox-column",style:{width:20,minWidth:20}},(0,l.createElement)("span",{className:"dataviews-view-table__cell-content-wrapper"},(0,l.createElement)(ol,{id:s(e)||t,item:e,selection:c,onSelectionChange:u,getItemId:s,data:r,primaryField:k}))),w.map((t=>(0,l.createElement)("td",{key:t.id,style:{width:t.width||void 0,minWidth:t.minWidth||void 0,maxWidth:t.maxWidth||void 0}},(0,l.createElement)("span",{className:v()("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__primary-field":k?.id===t.id})},t.render({item:e}))))),!!a?.length&&(0,l.createElement)("td",{className:"dataviews-view-table__actions-column"},(0,l.createElement)(jo,{item:e,actions:a}))))))),(0,l.createElement)("div",{className:v()({"dataviews-loading":i,"dataviews-no-results":!S&&!i}),id:_},!S&&(0,l.createElement)("p",null,i?(0,b.__)("Loading…"):(0,b.__)("No results"))))};var cl=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M12 3.2c-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.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));const ul="enumeration",dl="in",ml="notIn",pl={[dl]:{key:"in-filter",label:(0,b.__)("Is")},[ml]:{key:"not-in-filter",label:(0,b.__)("Is not")}},hl={asc:{label:(0,b.__)("Sort ascending")},desc:{label:(0,b.__)("Sort descending")}},fl="table",gl="list",yl=[{type:fl,label:(0,b.__)("Table"),component:ll,icon:Mo},{type:"grid",label:(0,b.__)("Grid"),component:function({data:e,fields:t,view:n,actions:a,getItemId:r,deferredRendering:s}){const i=t.find((e=>e.id===n.layout.mediaField)),o=t.find((e=>e.id===n.layout.primaryField)),c=t.filter((e=>!n.hiddenFields.includes(e.id)&&![n.layout.mediaField,n.layout.primaryField].includes(e.id))),u=(0,se.useAsyncList)(e,{step:3}),d=s?u:e;return(0,l.createElement)(_.__experimentalGrid,{gap:6,columns:2,alignment:"top",className:"dataviews-view-grid"},d.map((e=>(0,l.createElement)(_.__experimentalVStack,{spacing:0,key:r(e),className:"dataviews-view-grid__card"},(0,l.createElement)("div",{className:"dataviews-view-grid__media"},i?.render({item:e})),(0,l.createElement)(_.__experimentalHStack,{justify:"space-between",className:"dataviews-view-grid__title-actions"},(0,l.createElement)(_.__experimentalHStack,{className:"dataviews-view-grid__primary-field"},o?.render({item:e})),(0,l.createElement)(jo,{item:e,actions:a,isCompact:!0})),(0,l.createElement)(_.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:3},c.map((t=>{const n=t.render({item:e});return n?(0,l.createElement)(_.__experimentalVStack,{className:"dataviews-view-grid__field",key:t.id,spacing:1},(0,l.createElement)(_.Tooltip,{text:t.header,placement:"left"},(0,l.createElement)("div",{className:"dataviews-view-grid__field-value"},n))):null})))))))},icon:zr},{type:gl,label:(0,b.__)("List"),component:function({view:e,fields:t,data:n,isLoading:a,getItemId:r,onSelectionChange:s,onDetailsChange:i,selection:o,deferredRendering:c}){const u=(0,se.useAsyncList)(n,{step:3}),d=c?u:n,m=t.find((t=>t.id===e.layout.mediaField)),p=t.find((t=>t.id===e.layout.primaryField)),h=t.filter((t=>!e.hiddenFields.includes(t.id)&&![e.layout.primaryField,e.layout.mediaField].includes(t.id))),f=e=>t=>{const{keyCode:n}=t;[wa.ENTER,wa.SPACE].includes(n)&&s([e])},g=d?.length;return g?(0,l.createElement)("ul",{className:"dataviews-view-list"},d.map((e=>(0,l.createElement)("li",{key:r(e),className:v()({"is-selected":o.includes(e.id)})},(0,l.createElement)(_.__experimentalHStack,{className:"dataviews-view-list__item-wrapper"},(0,l.createElement)("div",{role:"button",tabIndex:0,"aria-pressed":o.includes(e.id),onKeyDown:f(e),className:"dataviews-view-list__item",onClick:()=>s([e])},(0,l.createElement)(_.__experimentalHStack,{spacing:3,justify:"start"},(0,l.createElement)("div",{className:"dataviews-view-list__media-wrapper"},m?.render({item:e})||(0,l.createElement)("div",{className:"dataviews-view-list__media-placeholder"})),(0,l.createElement)(_.__experimentalVStack,{spacing:1},(0,l.createElement)("span",{className:"dataviews-view-list__primary-field"},p?.render({item:e})),(0,l.createElement)("div",{className:"dataviews-view-list__fields"},h.map((t=>(0,l.createElement)("span",{key:t.id,className:"dataviews-view-list__field"},t.render({item:e})))))))),i&&(0,l.createElement)(_.Button,{className:"dataviews-view-list__details-button",onClick:()=>i([e]),icon:cl,label:(0,b.__)("View details"),size:"compact"})))))):(0,l.createElement)("div",{className:v()({"dataviews-loading":a,"dataviews-no-results":!g&&!a})},!g&&(0,l.createElement)("p",null,a?(0,b.__)("Loading…"):(0,b.__)("No results")))},icon:(0,b.isRTL)()?Io:Ao}],{useLocation:vl}=Ke(ft.privateApis);function _l({title:e,slug:t,customViewId:n,type:a,icon:r,isActive:s,isCustom:i,suffix:o}){const{params:{path:c,layout:u}}=vl(),d=r||yl.find((e=>e.type===a)).icon,m=Et({path:c,layout:u,activeView:"true"===i?n:t,isCustom:i});return(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",className:v()("edit-site-sidebar-dataviews-dataview-item",{"is-selected":s})},(0,l.createElement)(va,{icon:d,...m,"aria-current":s?"true":void 0},e),o)}const bl=[];function El({template:e,isActive:t}){const{text:n,icon:a}=Ls(e.type,e.id);return(0,l.createElement)(_l,{key:n,slug:n,title:n,icon:a,isActive:t,isCustom:"false"})}function wl({activeView:e,postType:t,config:n}){const{records:a}=(0,ge.useEntityRecords)("postType",t,{per_page:-1}),r=(0,f.useMemo)((()=>{var e;const t=a?.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:bl}),[a]);return(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(_l,{slug:"all",title:n[t].title,icon:la,isActive:"all"===e,isCustom:"false"}),r.map((t=>(0,l.createElement)(El,{key:t.author_text,template:t,isActive:e===t.author_text}))))}const xl={[Ct]:{title:(0,b.__)("All templates"),description:(0,b.__)("Create new templates, or reset any customizations made to the templates supplied by your theme.")},[kt]:{title:(0,b.__)("All template parts"),description:(0,b.__)("Create new template parts, or reset any customizations made to the template parts supplied by your theme."),backPath:"/patterns"}},{useLocation:Sl}=Ke(ft.privateApis);function Cl(){const{params:{postType:e}}=(0,_.__experimentalUseNavigator)(),{params:{didAccessPatternsPage:t,activeView:n="all"}}=Sl(),a=(0,d.useSelect)((e=>!!e(ta).getSettings().supportsTemplatePartsMode),[]);return(0,l.createElement)(ha,{isRoot:a&&!t,title:xl[e].title,description:xl[e].description,backPath:xl[e].backPath,content:(0,l.createElement)(wl,{activeView:n,postType:e,config:xl})})}function kl({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:n=!0,defaultLabel:a,icon:r,__next40pxDefaultSize:s=!1}){const{isDirty:i,isSaving:o,isSaveViewOpen:c,previewingThemeName:u}=(0,d.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n,isResolving:a}=e(ge.store),r=t(),{isSaveViewOpened:s}=e(ta),i=a("activateTheme"),o=vt();return{isDirty:r.length>0,isSaving:r.some((e=>n(e.kind,e.name,e.key)))||i,isSaveViewOpen:s(),previewingThemeName:o?e(ge.store).getTheme(o)?.name?.rendered:void 0}}),[]),{setIsSaveViewOpened:m}=(0,d.useDispatch)(ta),p=yt()||i,h=o||!p,f=yt()?o?(0,b.sprintf)((0,b.__)("Activating %s"),u):h?(0,b.__)("Saved"):i?(0,b.sprintf)((0,b.__)("Activate %s & Save"),u):(0,b.sprintf)((0,b.__)("Activate %s"),u):o?(0,b.__)("Saving"):h?(0,b.__)("Saved"):a||(0,b.__)("Save");return(0,l.createElement)(_.Button,{variant:t,className:e,"aria-disabled":h,"aria-expanded":c,isBusy:o,onClick:h?void 0:()=>m(!0),label:f,shortcut:h?void 0:wa.displayShortcut.primary("s"),showTooltip:n,icon:r,__next40pxDefaultSize:s,size:"compact"},f)}const{useLocation:Tl}=Ke(ft.privateApis),Pl=[{kind:"postType",name:St}];function Ml(){const e="site-edit-save-notice",{params:t}=Tl(),{__unstableMarkLastChangeAsPersistent:n}=(0,d.useDispatch)(he.store),{createSuccessNotice:a,createErrorNotice:r,removeNotice:s}=(0,d.useDispatch)(fe.store),{dirtyCurrentEntity:i,countUnsavedChanges:o,isDirty:c,isSaving:u}=(0,d.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:n,isSavingEntityRecord:a}=e(ge.store),r=n();let s=null;return 1===r.length&&(t.path?.includes("wp_global_styles")?s=r.find((e=>"globalStyles"===e.name)):t.postId&&(s=r.find((e=>e.name===t.postType&&String(e.key)===t.postId)))),{dirtyCurrentEntity:s,isDirty:r.length>0,isSaving:r.some((e=>a(e.kind,e.name,e.key))),countUnsavedChanges:r.length}}),[t.path,t.postType,t.postId]),{editEntityRecord:m,saveEditedEntityRecord:p,__experimentalSaveSpecifiedEntityEdits:h}=(0,d.useDispatch)(ge.store),f=u||!c&&!yt();let g=i?(0,b.__)("Save"):(0,b.sprintf)((0,b._n)("Review %d change…","Review %d changes…",o),o);u&&(g=(0,b.__)("Saving"));const{homeUrl:y}=(0,d.useSelect)((e=>{const{getUnstableBase:t}=e(ge.store);return{homeUrl:t()?.home}}),[]);return(0,l.createElement)(_.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4},i?(0,l.createElement)(_.Button,{variant:"primary",onClick:async()=>{if(!i)return;s(e);const{kind:t,name:o,key:l,property:c}=i;try{"root"===i.kind&&"site"===o?await h("root","site",void 0,[c]):(Pl.some((e=>e.kind===t&&e.name===o))&&m(t,o,l,{status:"publish"}),await p(t,o,l)),n(),a((0,b.__)("Site updated."),{type:"snackbar",actions:[{label:(0,b.__)("View site"),url:y}],id:e})}catch(e){r(`${(0,b.__)("Saving failed.")} ${e}`)}},isBusy:u,disabled:u,"aria-disabled":u,className:"edit-site-save-hub__button",__next40pxDefaultSize:!0},g):(0,l.createElement)(kl,{className:"edit-site-save-hub__button",variant:f?null:"primary",showTooltip:!1,icon:f&&!u?w:null,defaultLabel:g,__next40pxDefaultSize:!0}))}function Il({onSave:e,onClose:t}){const[n,a]=(0,f.useState)(!1),[r,s]=(0,f.useState)(""),{saveEntityRecord:i}=(0,d.useDispatch)(ge.store),{createErrorNotice:o,createSuccessNotice:c}=(0,d.useDispatch)(fe.store);return(0,l.createElement)(_.Modal,{title:(0,b.__)("Draft a new page"),onRequestClose:t},(0,l.createElement)("form",{onSubmit:async function(t){if(t.preventDefault(),!n){a(!0);try{const t=await i("postType","page",{status:"draft",title:r,slug:r||(0,b.__)("No title")},{throwOnError:!0});e(t),c((0,b.sprintf)((0,b.__)('"%s" successfully created.'),t.title?.rendered||r),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while creating the page.");o(t,{type:"snackbar"})}finally{a(!1)}}}},(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(_.TextControl,{label:(0,b.__)("Page title"),onChange:s,placeholder:(0,b.__)("No title"),value:r}),(0,l.createElement)(_.__experimentalHStack,{spacing:2,justify:"end"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit",isBusy:n,"aria-disabled":n},(0,b.__)("Create draft"))))))}const{useHistory:Al}=Ke(ft.privateApis),Nl=({postType:e="page",postId:t,...n})=>{const a=Et({postType:e,postId:t},{backPath:"/page"});return(0,l.createElement)(va,{...a,...n})};function Ol(){const{records:e,isResolving:t}=(0,ge.useEntityRecords)("postType","page",{status:"any",per_page:-1}),{records:n,isResolving:a}=(0,ge.useEntityRecords)("postType",Ct,{per_page:-1}),r=n?.filter((({slug:e})=>["404","search"].includes(e))),s=n?.find((e=>"front-page"===e.slug))||n?.find((e=>"home"===e.slug))||n?.find((e=>"index"===e.slug)),i=e?.concat(r,[s]),{frontPage:o,postsPage:c}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(ge.store),n=t("root","site");return{frontPage:n?.page_on_front,postsPage:n?.page_for_posts}}),[]),u=o===c,m=e&&[...e];if(!u&&m?.length){const e=m.findIndex((e=>e.id===o)),t=m.splice(e,1);m?.splice(0,0,...t);const n=m.findIndex((e=>e.id===c)),a=m.splice(n,1);m.splice(1,0,...a)}const[p,h]=(0,f.useState)(!1),g=Al(),y=e=>{let t=oa;const a=c&&c===e?(n?.find((e=>"home"===e.slug))||n?.find((e=>"index"===e.slug)))?.id:null;switch(e){case o:t=Or;break;case c:t=Rr}return{icon:t,postType:a?Ct:"page",postId:a||e}},v=Et({path:"/pages"});return(0,l.createElement)(l.Fragment,null,p&&(0,l.createElement)(Il,{onSave:({type:e,id:t})=>{g.push({postId:t,postType:e,canvas:"edit"}),h(!1)},onClose:()=>h(!1)}),(0,l.createElement)(ha,{title:(0,b.__)("Pages"),description:(0,b.__)("Browse and manage pages."),actions:(0,l.createElement)(ma,{icon:Zr,label:(0,b.__)("Draft a new page"),onClick:()=>h(!0)}),content:(0,l.createElement)(l.Fragment,null,(t||a)&&(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(_.__experimentalItem,null,(0,b.__)("Loading pages…"))),!(t||a)&&(0,l.createElement)(_.__experimentalItemGroup,null,!i?.length&&(0,l.createElement)(_.__experimentalItem,null,(0,b.__)("No page found")),u&&s&&(0,l.createElement)(Nl,{postType:Ct,postId:s.id,key:s.id,icon:Or,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(s.title?.rendered||(0,b.__)("(no title)")))),m?.map((({id:e,title:t})=>(0,l.createElement)(Nl,{...y(e),key:e,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(t?.rendered||(0,b.__)("(no title)")))))))),footer:(0,l.createElement)(_.__experimentalVStack,{spacing:0},r?.map((e=>(0,l.createElement)(Nl,{postType:Ct,postId:e.id,key:e.id,icon:la,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(e.title?.rendered||(0,b.__)("(no title)")))))),(0,l.createElement)(va,{className:"edit-site-sidebar-navigation-screen-pages__see-all",...v},(0,b.__)("Manage all pages")))}))}var Rl=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));const Fl={[Bt]:{primaryField:"title"},[Dt]:{mediaField:"featured-image",primaryField:"title"},[Vt]:{primaryField:"title",mediaField:"featured-image"}},Dl={type:Bt,search:"",filters:[],page:1,perPage:20,sort:{field:"date",direction:"desc"},hiddenFields:["date","featured-image"],layout:{...Fl[Vt]}},Bl={page:[{title:(0,b.__)("All"),slug:"all",view:Dl},{title:(0,b.__)("Drafts"),slug:"drafts",view:{...Dl,filters:[{field:"status",operator:zt,value:"draft"}]}},{title:(0,b.__)("Trash"),slug:"trash",icon:Rl,view:{...Dl,filters:[{field:"status",operator:zt,value:"trash"}]}}]},{useHistory:Vl,useLocation:Ll}=Ke(ft.privateApis);function zl({type:e,setIsAdding:t}){const{params:{path:n}}=Ll(),a=Vl(),{saveEntityRecord:r}=(0,d.useDispatch)(ge.store),[s,i]=(0,f.useState)(""),[o,c]=(0,f.useState)(!1);return(0,l.createElement)("form",{onSubmit:async i=>{i.preventDefault(),c(!0);const{getEntityRecords:o}=(0,d.resolveSelect)(ge.store);let l;const u=await o("taxonomy","wp_dataviews_type",{slug:e});if(u&&u.length>0)l=u[0].id;else{const t=await r("taxonomy","wp_dataviews_type",{name:e});t&&t.id&&(l=t.id)}const m=await r("postType","wp_dataviews",{title:s,status:"publish",wp_dataviews_type:l,content:JSON.stringify(Bl[e][0].view)});a.push({path:n,activeView:m.id,isCustom:"true"}),c(!1),t(!1)}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:s,onChange:i,placeholder:(0,b.__)("My view"),className:"patterns-create-modal__name-input"}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{t(!1)}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit","aria-disabled":!s||o,isBusy:o},(0,b.__)("Create")))))}function Gl({type:e}){const[t,n]=(0,f.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(va,{icon:Zr,onClick:()=>{n(!0)},className:"dataviews__siderbar-content-add-new-item"},(0,b.__)("New view")),t&&(0,l.createElement)(_.Modal,{title:(0,b.__)("Add new view"),onRequestClose:()=>{n(!1)}},(0,l.createElement)(zl,{type:e,setIsAdding:n})))}const{useHistory:Hl,useLocation:Ul}=Ke(ft.privateApis),Wl=[];function jl({dataviewId:e,currentTitle:t,setIsRenaming:n}){const{editEntityRecord:a}=(0,d.useDispatch)(ge.store),[r,s]=(0,f.useState)(t);return(0,l.createElement)("form",{onSubmit:async t=>{t.preventDefault(),await a("postType","wp_dataviews",e,{title:r}),n(!1)}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:r,onChange:s,placeholder:(0,b.__)("My view"),className:"patterns-create-modal__name-input"}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{n(!1)}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit","aria-disabled":!r},(0,b.__)("Rename")))))}function Zl({dataviewId:e,isActive:t}){const{params:{path:n}}=Ul(),a=Hl(),{dataview:r}=(0,d.useSelect)((t=>{const{getEditedEntityRecord:n}=t(ge.store);return{dataview:n("postType","wp_dataviews",e)}}),[e]),{deleteEntityRecord:s}=(0,d.useDispatch)(ge.store),i=(0,f.useMemo)((()=>JSON.parse(r.content).type),[r.content]),[o,c]=(0,f.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_l,{title:r.title,type:i,isActive:t,isCustom:"true",customViewId:e,suffix:(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),className:"edit-site-sidebar-dataviews-dataview-item__dropdown-menu",toggleProps:{style:{color:"inherit"},size:"small"}},(({onClose:e})=>(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{c(!0),e()}},(0,b.__)("Rename")),(0,l.createElement)(_.MenuItem,{onClick:async()=>{await s("postType","wp_dataviews",r.id,{force:!0}),t&&a.replace({path:n}),e()},isDestructive:!0},(0,b.__)("Delete")))))}),o&&(0,l.createElement)(_.Modal,{title:(0,b.__)("Rename view"),onRequestClose:()=>{c(!1)}},(0,l.createElement)(jl,{dataviewId:e,setIsRenaming:c,currentTitle:r.title})))}function ql({type:e,activeView:t,isCustom:n}){const a=function(e){return(0,d.useSelect)((t=>{const{getEntityRecords:n}=t(ge.store),a=n("taxonomy","wp_dataviews_type",{slug:e});if(!a||0===a.length)return Wl;return n("postType","wp_dataviews",{wp_dataviews_type:a[0].id,orderby:"date",order:"asc"})||Wl}))}(e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-dataviews__group-header"},(0,l.createElement)(_.__experimentalHeading,{level:2},(0,b.__)("Custom Views"))),(0,l.createElement)(_.__experimentalItemGroup,null,a.map((e=>(0,l.createElement)(Zl,{key:e.id,dataviewId:e.id,isActive:"true"===n&&Number(t)===e.id}))),(0,l.createElement)(Gl,{type:e})))}const{useLocation:Yl}=Ke(ft.privateApis),Kl={"/pages":"page"};function Xl(){const{params:{path:e,activeView:t="all",isCustom:n="false"}}=Yl();if(!e||!Kl[e])return null;const a=Kl[e];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,null,Bl[a].map((e=>(0,l.createElement)(_l,{key:e.slug,slug:e.slug,title:e.title,icon:e.icon,type:e.view.type,isActive:"false"===n&&e.slug===t,isCustom:"false"})))),window?.__experimentalAdminViews&&(0,l.createElement)(ql,{activeView:t,type:a,isCustom:"true"}))}const Jl=({postType:e="page",postId:t,...n})=>{const a=Et({postType:e,postId:t},{backPath:"/page"});return(0,l.createElement)(va,{...a,...n})};function Ql(){const{records:e}=(0,ge.useEntityRecords)("postType",Ct,{per_page:-1}),{frontPage:t,postsPage:n}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(ge.store),n=t("root","site");return{frontPage:n?.page_on_front,postsPage:n?.page_for_posts}}),[]),a=(0,f.useMemo)((()=>{if(!e)return[];const a=t===n,r=e?.find((e=>"front-page"===e.slug))||e?.find((e=>"home"===e.slug))||e?.find((e=>"index"===e.slug));return[a?r:null,...e?.filter((({slug:e})=>["404","search"].includes(e)))].filter(Boolean)}),[e,t,n]);return(0,l.createElement)(ha,{title:(0,b.__)("Pages"),description:(0,b.__)("Browse and manage pages."),content:(0,l.createElement)(Xl,null),backPath:"/page",footer:(0,l.createElement)(_.__experimentalVStack,{spacing:0},a?.map((e=>(0,l.createElement)(Jl,{postType:Ct,postId:e.id,key:e.id,icon:la,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,en.decodeEntities)(e.title?.rendered||(0,b.__)("(no title)")))))))})}var $l=window.wp.dom,ec=window.wp.escapeHtml,tc=window.wp.wordcount;function nc({status:e,date:t,short:n}){const a=(0,_r.humanTimeDiff)(t);let r=e;switch(e){case"publish":r=t?(0,f.createInterpolateElement)((0,b.sprintf)((0,b.__)("Published <time>%s</time>"),a),{time:(0,l.createElement)("time",{dateTime:t})}):(0,b.__)("Published");break;case"future":const e=(0,_r.dateI18n)(n?"M j":"F j",(0,_r.getDate)(t));r=t?(0,f.createInterpolateElement)((0,b.sprintf)((0,b.__)("Scheduled: <time>%s</time>"),e),{time:(0,l.createElement)("time",{dateTime:t})}):(0,b.__)("Scheduled");break;case"draft":r=(0,b.__)("Draft");break;case"pending":r=(0,b.__)("Pending");break;case"private":r=(0,b.__)("Private");break;case"protected":r=(0,b.__)("Password protected")}return(0,l.createElement)("div",{className:v()("edit-site-sidebar-navigation-screen-page__status",{[`has-status has-${e}-status`]:!!e})},r)}const ac=189;function rc({id:e}){const{record:t}=(0,ge.useEntityRecord)("postType","page",e),{parentTitle:n,templateTitle:a,isPostsPage:r}=(0,d.useSelect)((e=>{const{getEditedPostId:n}=Ke(e(ta)),a=e(ge.store).getEntityRecord("postType",Ct,n()),r=a?.title?.rendered,s=t?.parent?e(ge.store).getEntityRecord("postType","page",t.parent,{_fields:["title"]})?.title?.rendered:null,{getEntityRecord:i}=e(ge.store),o=i("root","site");return{parentTitle:s,templateTitle:r,isPostsPage:t?.id===o?.page_for_posts}}),[t?.parent,t?.id]);return(0,l.createElement)(Sr,{spacing:5,title:(0,b.__)("Details")},function(e){if(!e)return[];const t=[{label:(0,b.__)("Status"),value:(0,l.createElement)(nc,{status:e?.password?"protected":e.status,date:e?.date,short:!0})},{label:(0,b.__)("Slug"),value:(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,gt.safeDecodeURIComponent)(e.slug||e.generated_slug))}];e?.templateTitle&&t.push({label:(0,b.__)("Template"),value:(0,en.decodeEntities)(e.templateTitle)}),e?.parentTitle&&t.push({label:(0,b.__)("Parent"),value:(0,en.decodeEntities)(e.parentTitle||(0,b.__)("(no title)"))});const n=(0,b._x)("words","Word count type. Do not translate!"),a=e?.content?.rendered?(0,tc.count)(e.content.rendered,n):0,r=Math.round(a/ac);return a&&!e?.isPostsPage&&t.push({label:(0,b.__)("Words"),value:a.toLocaleString()||(0,b.__)("Unknown")},{label:(0,b.__)("Time to read"),value:r>1?(0,b.sprintf)((0,b.__)("%s mins"),r.toLocaleString()):(0,b.__)("< 1 min")}),t}({parentTitle:n,templateTitle:a,isPostsPage:r,...t}).map((({label:e,value:t})=>(0,l.createElement)(wr,{key:e},(0,l.createElement)(Er,null,e),(0,l.createElement)(xr,null,t)))))}function sc({postId:e,onRemove:t}){const{createSuccessNotice:n,createErrorNotice:a}=(0,d.useDispatch)(fe.store),{deleteEntityRecord:r}=(0,d.useDispatch)(ge.store),s=(0,d.useSelect)((t=>t(ge.store).getEntityRecord("postType","page",e)),[e]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>async function(){try{await r("postType","page",e,{},{throwOnError:!0}),n((0,b.sprintf)((0,b.__)('"%s" moved to the Trash.'),(0,en.decodeEntities)(s.title.rendered)),{type:"snackbar",id:"edit-site-page-trashed"}),t?.()}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while moving the page to the trash.");a(t,{type:"snackbar"})}}(),isDestructive:!0,variant:"secondary"},(0,b.__)("Move to Trash")))}function ic({postId:e,toggleProps:t,onRemove:n}){return(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),toggleProps:t},(()=>(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(sc,{postId:e,onRemove:n}))))}const{useHistory:oc}=Ke(ft.privateApis);function lc({backPath:e}){const{setCanvasMode:t}=Ke((0,d.useDispatch)(ta)),n=oc(),{params:{postId:a},goTo:r}=(0,_.__experimentalUseNavigator)(),{record:s,hasResolved:i}=(0,ge.useEntityRecord)("postType","page",a),{featuredMediaAltText:o,featuredMediaSourceUrl:c}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(ge.store),n=s?.featured_media?t("postType","attachment",s?.featured_media):null;return{featuredMediaSourceUrl:n?.media_details.sizes?.medium?.source_url||n?.source_url,featuredMediaAltText:(0,ec.escapeAttribute)(n?.alt_text||n?.description?.raw||"")}}),[s]);(0,f.useEffect)((()=>{i&&!s&&n.push({path:"/page",postId:void 0,postType:void 0,canvas:"view"})}),[i,n]);const u=o?(0,en.decodeEntities)(o):(0,en.decodeEntities)(s?.title?.rendered||(0,b.__)("Featured image"));return s?(0,l.createElement)(ha,{backPath:e,title:(0,en.decodeEntities)(s?.title?.rendered||(0,b.__)("(no title)")),actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ic,{postId:a,toggleProps:{as:ma},onRemove:()=>{r("/page")}}),(0,l.createElement)(ma,{onClick:()=>t("edit"),label:(0,b.__)("Edit"),icon:ba})),meta:(0,l.createElement)(_.ExternalLink,{className:"edit-site-sidebar-navigation-screen__page-link",href:s.link},(0,gt.filterURLForDisplay)((0,gt.safeDecodeURIComponent)(s.link))),content:(0,l.createElement)(l.Fragment,null,!!c&&(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-sidebar-navigation-screen-page__featured-image-wrapper",alignment:"left",spacing:2},(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-page__featured-image has-image"},(0,l.createElement)("img",{alt:u,src:c}))),!!s?.excerpt?.rendered&&(0,l.createElement)(_.__experimentalTruncate,{className:"edit-site-sidebar-navigation-screen-page__excerpt",numberOfLines:3},(0,$l.__unstableStripHTML)(s.excerpt.rendered)),(0,l.createElement)(rc,{id:a})),footer:s?.modified?(0,l.createElement)(Cr,{record:s}):null}):null}const{useLocation:cc}=Ke(ft.privateApis);function uc({className:e,...t}){return(0,l.createElement)(_.__experimentalNavigatorScreen,{className:v()("edit-site-sidebar__screen-wrapper",e),...t})}function dc(){return ji(),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(uc,{path:"/"},(0,l.createElement)(Nr,null)),(0,l.createElement)(uc,{path:"/navigation"},(0,l.createElement)(ko,null)),(0,l.createElement)(uc,{path:"/navigation/:postType/:postId"},(0,l.createElement)(bo,null)),(0,l.createElement)(uc,{path:"/wp_global_styles"},(0,l.createElement)(Mr,null)),(0,l.createElement)(uc,{path:"/page"},(0,l.createElement)(Ol,null)),(0,l.createElement)(uc,{path:"/pages"},(0,l.createElement)(Ql,null)),(0,l.createElement)(uc,{path:"/page/:postId"},(0,l.createElement)(lc,null)),(0,l.createElement)(uc,{path:"/:postType(wp_template)"},(0,l.createElement)(As,null)),(0,l.createElement)(uc,{path:"/patterns"},(0,l.createElement)(Fi,null)),(0,l.createElement)(uc,{path:"/:postType(wp_template|wp_template_part)/all"},(0,l.createElement)(Cl,null)),(0,l.createElement)(uc,{path:"/:postType(wp_template_part|wp_block)/:postId"},(0,l.createElement)(lo,null)),(0,l.createElement)(uc,{path:"/:postType(wp_template)/:postId"},(0,l.createElement)(qs,null)))}var mc=(0,f.memo)((function(){const{params:e}=cc(),t=(0,f.useRef)(Wi(e));return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalNavigatorProvider,{className:"edit-site-sidebar__content",initialPath:t.current},(0,l.createElement)(dc,null)),(0,l.createElement)(Ml,null))}));function pc({text:e,children:t}){const n=(0,se.useCopyToClipboard)(e);return(0,l.createElement)(_.Button,{variant:"secondary",ref:n},t)}function hc({message:e,error:t}){const n=[(0,l.createElement)(pc,{key:"copy-error",text:t.stack},(0,b.__)("Copy Error"))];return(0,l.createElement)(he.Warning,{className:"editor-error-boundary",actions:n},e)}class fc extends f.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,me.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,l.createElement)(hc,{message:(0,b.__)("The editor has encountered an unexpected error."),error:this.state.error}):this.props.children}}var gc=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"}));var yc=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"}));var vc=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));const _c=[{keyCombination:{modifier:"primary",character:"b"},description:(0,b.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,b.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,b.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,b.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,b.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,b.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,b.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,b.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},description:(0,b.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,b.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")}];function bc({keyCombination:e,forceAriaLabel:t}){const n=e.modifier?wa.displayShortcutList[e.modifier](e.character):e.character,a=e.modifier?wa.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,l.createElement)("kbd",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||a},(Array.isArray(n)?n:[n]).map(((e,t)=>"+"===e?(0,l.createElement)(f.Fragment,{key:t},e):(0,l.createElement)("kbd",{key:t,className:"edit-site-keyboard-shortcut-help-modal__shortcut-key"},e))))}function Ec({description:e,keyCombination:t,aliases:n=[],ariaLabel:a}){return(0,l.createElement)(f.Fragment,null,(0,l.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-description"},e),(0,l.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-term"},(0,l.createElement)(bc,{keyCombination:t,forceAriaLabel:a}),n.map(((e,t)=>(0,l.createElement)(bc,{keyCombination:e,forceAriaLabel:a,key:t})))))}function wc({name:e}){const{keyCombination:t,description:n,aliases:a}=(0,d.useSelect)((t=>{const{getShortcutKeyCombination:n,getShortcutDescription:a,getShortcutAliases:r}=t(na.store);return{keyCombination:n(e),aliases:r(e),description:a(e)}}),[e]);return t?(0,l.createElement)(Ec,{keyCombination:t,description:n,aliases:a}):null}const xc="edit-site/keyboard-shortcut-help",Sc=({shortcuts:e})=>(0,l.createElement)("ul",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-list",role:"list"},e.map(((e,t)=>(0,l.createElement)("li",{className:"edit-site-keyboard-shortcut-help-modal__shortcut",key:t},"string"==typeof e?(0,l.createElement)(wc,{name:e}):(0,l.createElement)(Ec,{...e}))))),Cc=({title:e,shortcuts:t,className:n})=>(0,l.createElement)("section",{className:v()("edit-site-keyboard-shortcut-help-modal__section",n)},!!e&&(0,l.createElement)("h2",{className:"edit-site-keyboard-shortcut-help-modal__section-title"},e),(0,l.createElement)(Sc,{shortcuts:t})),kc=({title:e,categoryName:t,additionalShortcuts:n=[]})=>{const a=(0,d.useSelect)((e=>e(na.store).getCategoryShortcuts(t)),[t]);return(0,l.createElement)(Cc,{title:e,shortcuts:a.concat(n)})};function Tc(){const e=(0,d.useSelect)((e=>e(W).isModalActive(xc))),{closeModal:t,openModal:n}=(0,d.useDispatch)(W),a=()=>e?t():n(xc);return(0,na.useShortcut)("core/edit-site/keyboard-shortcuts",a),e?(0,l.createElement)(_.Modal,{className:"edit-site-keyboard-shortcut-help-modal",title:(0,b.__)("Keyboard shortcuts"),onRequestClose:a},(0,l.createElement)(Cc,{className:"edit-site-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-site/keyboard-shortcuts"]}),(0,l.createElement)(kc,{title:(0,b.__)("Global shortcuts"),categoryName:"global"}),(0,l.createElement)(kc,{title:(0,b.__)("Selection shortcuts"),categoryName:"selection"}),(0,l.createElement)(kc,{title:(0,b.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,b.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,b.__)("Forward-slash")}]}),(0,l.createElement)(Cc,{title:(0,b.__)("Text formatting"),shortcuts:_c})):null}const{PreferencesModal:Pc}=Ke(g.privateApis),Mc="edit-site/preferences";function Ic(){const e=(0,d.useSelect)((e=>e(W).isModalActive(Mc))),{closeModal:t}=(0,d.useDispatch)(W);return e?(0,l.createElement)(Pc,{isActive:e,onClose:t}):null}const{Fill:Ac,Slot:Nc}=(0,_.createSlotFill)("EditSiteToolsMoreMenuGroup");Ac.Slot=({fillProps:e})=>(0,l.createElement)(Nc,{fillProps:e},(e=>e&&e.length>0));var Oc=Ac;var Rc=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"})),Fc=window.wp.blob;function Dc(){const{createErrorNotice:e}=(0,d.useDispatch)(fe.store);return(0,l.createElement)(_.MenuItem,{role:"menuitem",icon:Rc,onClick:async function(){try{const e=await Xt()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),n=e.headers.get("content-disposition").match(/=(.+)\.zip/),a=n[1]?n[1]:"edit-site-export";(0,Fc.downloadBlob)(a+".zip",t,"application/zip")}catch(t){let n={};try{n=await t.json()}catch(e){}const a=n.message&&"unknown_error"!==n.code?n.message:(0,b.__)("An error occurred while creating the site export.");e(a,{type:"snackbar"})}},info:(0,b.__)("Download your theme with updated templates and styles.")},(0,b._x)("Export","site exporter menu item"))}function Bc(){const{toggle:e}=(0,d.useDispatch)(k.store);return(0,l.createElement)(_.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide")},(0,b.__)("Welcome Guide"))}function Vc(){const{createNotice:e}=(0,d.useDispatch)(fe.store),{getEditedPostId:t,getEditedPostType:n}=(0,d.useSelect)(ta),{getEditedEntityRecord:a}=(0,d.useSelect)(ge.store);const r=(0,se.useCopyToClipboard)((function(){const e=a("postType",n(),t());return e?"function"==typeof e.content?e.content(e):e.blocks?(0,c.__unstableSerializeAndClean)(e.blocks):e.content?e.content:void 0:""}),(function(){e("info",(0,b.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return(0,l.createElement)(_.MenuItem,{ref:r},(0,b.__)("Copy all blocks"))}const Lc=[{value:"visual",label:(0,b.__)("Visual editor")},{value:"text",label:(0,b.__)("Code editor")}];var zc=function(){const{shortcut:e,mode:t}=(0,d.useSelect)((e=>({shortcut:e(na.store).getShortcutRepresentation("core/edit-site/toggle-mode"),mode:e(ta).getEditorMode()})),[]),{switchEditorMode:n}=(0,d.useDispatch)(ta),a=Lc.map((n=>n.value!==t?{...n,shortcut:e}:n));return(0,l.createElement)(_.MenuGroup,{label:(0,b.__)("Editor")},(0,l.createElement)(_.MenuItemsChoice,{choices:a,value:t,onSelect:n}))};function Gc({showIconLabels:e}){const t=(0,d.useRegistry)(),{closeGeneralSidebar:n}=(0,d.useDispatch)(ta),{setIsInserterOpened:a,setIsListViewOpened:r}=(0,d.useDispatch)(g.store),{openModal:s}=(0,d.useDispatch)(W),{set:i}=(0,d.useDispatch)(k.store),o=()=>{t.batch((()=>{i("core","fixedToolbar",!0),a(!1),r(!1),n()}))},c=()=>{i("core","distractionFree",!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ue,{toggleProps:{showTooltip:!e,...e&&{variant:"tertiary"}}},(({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuGroup,{label:(0,b._x)("View","noun")},(0,l.createElement)(k.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:c,label:(0,b.__)("Top toolbar"),info:(0,b.__)("Access all block and document tools in a single place"),messageActivated:(0,b.__)("Top toolbar activated"),messageDeactivated:(0,b.__)("Top toolbar deactivated")}),(0,l.createElement)(k.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",onToggle:o,label:(0,b.__)("Distraction free"),info:(0,b.__)("Write with calmness"),messageActivated:(0,b.__)("Distraction free mode activated"),messageDeactivated:(0,b.__)("Distraction free mode deactivated"),shortcut:wa.displayShortcut.primaryShift("\\")}),(0,l.createElement)(k.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,b.__)("Spotlight mode"),info:(0,b.__)("Focus on one block at a time"),messageActivated:(0,b.__)("Spotlight mode activated"),messageDeactivated:(0,b.__)("Spotlight mode deactivated")})),(0,l.createElement)(zc,null),(0,l.createElement)(J.Slot,{name:"core/edit-site/plugin-more-menu",label:(0,b.__)("Plugins"),as:_.MenuGroup,fillProps:{onClick:e}}),(0,l.createElement)(_.MenuGroup,{label:(0,b.__)("Tools")},(0,l.createElement)(Dc,null),(0,l.createElement)(_.MenuItem,{onClick:()=>s(xc),shortcut:wa.displayShortcut.access("h")},(0,b.__)("Keyboard shortcuts")),(0,l.createElement)(Bc,null),(0,l.createElement)(Vc,null),(0,l.createElement)(_.MenuItem,{icon:vc,role:"menuitem",href:(0,b.__)("https://wordpress.org/documentation/article/site-editor/"),target:"_blank",rel:"noopener noreferrer"},(0,b.__)("Help"),(0,l.createElement)(_.VisuallyHidden,{as:"span"},(0,b.__)("(opens in a new tab)"))),(0,l.createElement)(Oc.Slot,{fillProps:{onClose:e}})),(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>s(Mc)},(0,b.__)("Preferences")))))),(0,l.createElement)(Tc,null),(0,l.createElement)(Ic,null))}var Hc=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m12 20-4.5-3.6-.9 1.2L12 22l5.5-4.4-.9-1.2L12 20zm0-16 4.5 3.6.9-1.2L12 2 6.5 6.4l.9 1.2L12 4z"}));const{DocumentTools:Uc}=Ke(g.privateApis);function Wc({blockEditorMode:e,hasFixedToolbar:t,isDistractionFree:n}){const{isVisualMode:a}=(0,d.useSelect)((e=>{const{getEditorMode:t}=e(ta);return{isVisualMode:"visual"===t()}}),[]),{__unstableSetEditorMode:r}=(0,d.useDispatch)(he.store),{setDeviceType:s}=(0,d.useDispatch)(g.store),i=(0,se.useViewportMatch)("medium"),o=window?.__experimentalEnableZoomedOutView&&a,c="zoom-out"===e;return(0,l.createElement)(Uc,{disableBlockTools:!a,listViewLabel:(0,b.__)("List View")},o&&i&&!n&&!t&&(0,l.createElement)(_.ToolbarItem,{as:_.Button,className:"edit-site-header-edit-mode__zoom-out-view-toggle",icon:Hc,isPressed:c,label:(0,b.__)("Zoom-out View"),onClick:()=>{s("Desktop"),r(c?"edit":"zoom-out")},size:"compact"}))}const{PostViewLink:jc,PreviewDropdown:Zc}=Ke(g.privateApis);function qc(){const{templateType:e,isDistractionFree:t,blockEditorMode:n,blockSelectionStart:a,showIconLabels:r,editorCanvasView:s,hasFixedToolbar:i,isZoomOutMode:o}=(0,d.useSelect)((e=>{const{getEditedPostType:t}=e(ta),{getBlockSelectionStart:n,__unstableGetEditorMode:a}=e(he.store),{get:r}=e(k.store),{getDeviceType:s}=e(g.store);return{deviceType:s(),templateType:t(),blockEditorMode:a(),blockSelectionStart:n(),showIconLabels:r("core","showIconLabels"),editorCanvasView:Ke(e(ta)).getEditorCanvasContainerView(),hasFixedToolbar:r("core","fixedToolbar"),isDistractionFree:r("core","distractionFree"),isZoomOutMode:"zoom-out"===a()}}),[]),c=(0,se.useViewportMatch)("medium"),u=!o&&i&&c,m=(0,f.useRef)(),p=(0,se.useReducedMotion)(),h=!function(){const e=(0,_.__experimentalUseSlotFills)(Ka);return!!e?.length}(),y=Rt.includes(e),E="zoom-out"===n,[w,x]=(0,f.useState)(!0),S=!!a;(0,f.useEffect)((()=>{a&&x(!1)}),[a]);const C={isDistractionFree:{y:"-50px"},isDistractionFreeHovering:{y:0},view:{y:0},edit:{y:0}},T={type:"tween",duration:p?0:.2,ease:"easeOut"};return(0,l.createElement)("div",{className:v()("edit-site-header-edit-mode",{"show-icon-labels":r})},h&&(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-header-edit-mode__start",variants:C,transition:T},(0,l.createElement)(Wc,{blockEditorMode:n,isDistractionFree:t}),u&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:v()("selected-block-tools-wrapper",{"is-collapsed":w})},(0,l.createElement)(he.BlockToolbar,{hideDragHandle:!0})),(0,l.createElement)(_.Popover.Slot,{ref:m,name:"block-toolbar"}),S&&(0,l.createElement)(_.Button,{className:"edit-site-header-edit-mode__block-tools-toggle",icon:w?gc:yc,onClick:()=>{x((e=>!e))},label:w?(0,b.__)("Show block tools"):(0,b.__)("Hide block tools")}))),!t&&(0,l.createElement)("div",{className:v()("edit-site-header-edit-mode__center",{"is-collapsed":!w&&c})},h?(0,l.createElement)(g.DocumentBar,null):qa(s)),(0,l.createElement)("div",{className:"edit-site-header-edit-mode__end"},(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-header-edit-mode__actions",variants:C,transition:T},c&&(0,l.createElement)("div",{className:v()("edit-site-header-edit-mode__preview-options",{"is-zoomed-out":E})},(0,l.createElement)(Zc,{disabled:y||!h})),(0,l.createElement)(jc,null),(0,l.createElement)(kl,null),!t&&(0,l.createElement)(te.Slot,{scope:"core/edit-site"}),(0,l.createElement)(Gc,{showIconLabels:r}))))}var Yc=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,l.createElement)(E.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"}));var Kc=function({className:e}){const{isRequestingSite:t,siteIconUrl:n}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(ge.store),n=t("root","__unstableBase",void 0);return{isRequestingSite:!n,siteIconUrl:n?.site_icon_url}}),[]);if(t&&!n)return(0,l.createElement)("div",{className:"edit-site-site-icon__image"});const a=n?(0,l.createElement)("img",{className:"edit-site-site-icon__image",alt:(0,b.__)("Site Icon"),src:n}):(0,l.createElement)(_.Icon,{className:"edit-site-site-icon__icon",size:"48px",icon:Yc});return(0,l.createElement)("div",{className:v()(e,"edit-site-site-icon")},a)};const Xc=(0,f.memo)((({isTransparent:e,className:t})=>{const{canvasMode:n,dashboardLink:a,homeUrl:r,siteTitle:s}=(0,d.useSelect)((e=>{const{getCanvasMode:t,getSettings:n}=Ke(e(ta)),{getSite:a,getUnstableBase:r}=e(ge.store);return{canvasMode:t(),dashboardLink:n().__experimentalDashboardLink||"index.php",homeUrl:r()?.home,siteTitle:a()?.title}}),[]),{open:i}=(0,d.useDispatch)(aa.store),o=(0,se.useReducedMotion)(),{setCanvasMode:c}=Ke((0,d.useDispatch)(ta)),{clearSelectedBlock:u}=(0,d.useDispatch)(he.store),{setDeviceType:m}=(0,d.useDispatch)(g.store),p="view"===n?{href:a,label:(0,b.__)("Go to the Dashboard")}:{href:a,role:"button",label:(0,b.__)("Open Navigation"),onClick:e=>{e.preventDefault(),"edit"===n&&(u(),m("Desktop"),c("view"))}};return(0,l.createElement)(_.__unstableMotion.div,{className:v()("edit-site-site-hub",t),variants:{isDistractionFree:{x:"-100%"},isDistractionFreeHovering:{x:0},view:{x:0},edit:{x:0}},initial:!1,transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between",alignment:"center",className:"edit-site-site-hub__container"},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",className:"edit-site-site-hub__text-content",spacing:"0"},(0,l.createElement)(_.__unstableMotion.div,{className:v()("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),layout:!0,transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(_.Button,{...p,className:"edit-site-layout__view-mode-toggle"},(0,l.createElement)(_.__unstableMotion.div,{initial:!1,animate:{scale:"view"===n?.5:1},whileHover:{scale:"view"===n?.5:.96},transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(Kc,{className:"edit-site-layout__view-mode-toggle-icon"})))),(0,l.createElement)(_.__unstableAnimatePresence,null,(0,l.createElement)(_.__unstableMotion.div,{layout:"edit"===n,animate:{opacity:"view"===n?1:0},exit:{opacity:0},className:v()("edit-site-site-hub__site-title",{"is-transparent":e}),transition:{type:"tween",duration:o?0:.2,ease:"easeOut",delay:"view"===n?.1:0}},(0,en.decodeEntities)(s))),"view"===n&&(0,l.createElement)(_.Button,{href:r,target:"_blank",label:(0,b.__)("View site (opens in a new tab)"),"aria-label":(0,b.__)("View site (opens in a new tab)"),icon:vc,className:v()("edit-site-site-hub__site-view-link",{"is-transparent":e})})),"view"===n&&(0,l.createElement)(_.Button,{className:v()("edit-site-site-hub_toggle-command-center",{"is-transparent":e}),icon:Br,onClick:()=>i(),label:(0,b.__)("Open command palette"),shortcut:wa.displayShortcut.primary("k")})))}));var Jc=Xc;const Qc={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},$c=320,eu=1300,tu=9/19.5,nu={width:"100%",height:"100%"};function au(e,t){const n=1-Math.max(0,Math.min(1,(e-$c)/(eu-$c))),a=((e,t,n)=>e+(t-e)*n)(t,tu,n);return e/a}var ru=function e({isFullWidth:t,isOversized:n,setIsOversized:a,isReady:r,children:s,defaultSize:i,innerContentStyle:o}){const[c,u]=(0,f.useState)(nu),[m,p]=(0,f.useState)(),[h,g]=(0,f.useState)(!1),[y,E]=(0,f.useState)(!1),[w,x]=(0,f.useState)(1),S=(0,d.useSelect)((e=>Ke(e(ta)).getCanvasMode()),[]),{setCanvasMode:C}=Ke((0,d.useDispatch)(ta)),k={type:"tween",duration:h?0:.5},T=(0,f.useRef)(null),P=(0,se.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),M=i.width/i.height,I={default:{flexGrow:0,height:c.height},fullWidth:{flexGrow:1,height:c.height}},A=h?"active":y?"visible":"hidden";return(0,l.createElement)(_.ResizableBox,{as:_.__unstableMotion.div,ref:T,initial:!1,variants:I,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&u({width:"100%",height:"100%"})},transition:k,size:c,enable:{top:!1,right:!1,bottom:!1,left:r,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:w,handleClasses:void 0,handleStyles:{left:Qc,right:Qc},minWidth:$c,maxWidth:t?"100%":"150%",maxHeight:"100%",onFocus:()=>E(!0),onBlur:()=>E(!1),onMouseOver:()=>E(!0),onMouseOut:()=>E(!1),handleComponent:{left:"view"===S&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.Tooltip,{text:(0,b.__)("Drag to resize")},(0,l.createElement)(_.__unstableMotion.button,{key:"handle",role:"separator","aria-orientation":"vertical",className:v()("edit-site-resizable-frame__handle",{"is-resizing":h}),variants:{hidden:{opacity:0,left:0},visible:{opacity:1,left:-16},active:{opacity:1,left:-16,scaleY:1.3}},animate:A,"aria-label":(0,b.__)("Drag to resize"),"aria-describedby":P,"aria-valuenow":T.current?.resizable?.offsetWidth||void 0,"aria-valuemin":$c,"aria-valuemax":i.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($c,T.current.resizable.offsetWidth+t),i.width);u({width:n,height:au(n,M)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"})),(0,l.createElement)("div",{hidden:!0,id:P},(0,b.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")))},onResizeStart:(e,t,n)=>{p(n.offsetWidth),g(!0)},onResize:(e,t,r,s)=>{const o=s.width/w,l=Math.abs(o),c=s.width<0?l:(i.width-m)/2,d=Math.min(l,c),p=0===l?0:d/l;x(1-p+2*p);const h=m+s.width;a(h>i.width),u({height:n?"100%":au(h,M)})},onResizeStop:(e,t,r)=>{if(g(!1),!n)return;a(!1);r.ownerDocument.documentElement.offsetWidth-r.offsetWidth>200?u(nu):C("edit")},className:v()("edit-site-resizable-frame__inner",{"is-resizing":h})},(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-resizable-frame__inner-content",animate:{borderRadius:t?0:8},transition:k,style:o},s))};const{useLocation:su,useHistory:iu}=Ke(ft.privateApis);const{useHistory:ou,useLocation:lu}=Ke(ft.privateApis);const{EntitiesSavedStatesExtensible:cu}=Ke(g.privateApis),uu=({onClose:e})=>{var t,n;const a=(0,g.useEntitiesSavedStatesIsDirty)();let r;r=a.isDirty?(0,b.__)("Activate & Save"):(0,b.__)("Activate");const s=function(){const[e,t]=(0,f.useState)();return(0,f.useEffect)((()=>{const e=(0,gt.addQueryArgs)("/wp/v2/themes?status=active",{context:"edit",wp_theme_preview:""});Xt()({path:e}).then((e=>t(e[0]))).catch((()=>{}))}),[]),e}(),i=(0,d.useSelect)((e=>e(ge.store).getCurrentTheme()),[]),o=(0,l.createElement)("p",null,(0,b.sprintf)((0,b.__)("Saving your changes will change your active theme from %1$s to %2$s."),null!==(t=s?.name?.rendered)&&void 0!==t?t:"...",null!==(n=i?.name?.rendered)&&void 0!==n?n:"...")),c=function(){const e=ou(),t=lu(),{startResolution:n,finishResolution:a}=(0,d.useDispatch)(ge.store);return async()=>{if(yt()){const r="themes.php?action=activate&stylesheet="+vt()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;n("activateTheme"),await window.fetch(r),a("activateTheme");const{wp_theme_preview:s,...i}=t.params;e.replace(i)}}}();return(0,l.createElement)(cu,{...a,additionalPrompt:o,close:e,onSave:async e=>(await c(),e),saveEnabled:!0,saveLabel:r})},du=({onClose:e})=>yt()?(0,l.createElement)(uu,{onClose:e}):(0,l.createElement)(g.EntitiesSavedStates,{close:e});function mu(){const{isSaveViewOpen:e,canvasMode:t}=(0,d.useSelect)((e=>{const{isSaveViewOpened:t,getCanvasMode:n}=Ke(e(ta));return{isSaveViewOpen:t(),canvasMode:n()}}),[]),{setIsSaveViewOpened:n}=(0,d.useDispatch)(ta),a=()=>n(!1);return"view"===t?e?(0,l.createElement)(_.Modal,{className:"edit-site-save-panel__modal",onRequestClose:a,__experimentalHideHeader:!0,contentLabel:(0,b.__)("Save site, content, and template changes")},(0,l.createElement)(du,{onClose:a})):null:(0,l.createElement)(ie,{className:v()("edit-site-layout__actions",{"is-entity-save-view-open":e}),ariaLabel:(0,b.__)("Save panel")},e?(0,l.createElement)(du,{onClose:a}):(0,l.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},(0,l.createElement)(_.Button,{variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:()=>n(!0),"aria-expanded":!1},(0,b.__)("Open save panel"))))}var pu=function(){const{registerShortcut:e}=(0,d.useDispatch)(na.store);return(0,f.useEffect)((()=>{e({name:"core/edit-site/save",category:"global",description:(0,b.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-site/toggle-block-settings-sidebar",category:"global",description:(0,b.__)("Show or hide the Settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/edit-site/keyboard-shortcuts",category:"main",description:(0,b.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/edit-site/next-region",category:"global",description:(0,b.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-site/previous-region",category:"global",description:(0,b.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]}),e({name:"core/edit-site/toggle-mode",category:"global",description:(0,b.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/edit-site/transform-heading-to-paragraph",category:"block-library",description:(0,b.__)("Transform heading to paragraph."),keyCombination:{modifier:"access",character:"0"}}),[1,2,3,4,5,6].forEach((t=>{e({name:`core/edit-site/transform-paragraph-to-heading-${t}`,category:"block-library",description:(0,b.__)("Transform paragraph to heading."),keyCombination:{modifier:"access",character:`${t}`}})})),e({name:"core/edit-site/toggle-distraction-free",category:"global",description:(0,b.__)("Toggle distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}})}),[e]),null};var hu=function(){const{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,d.useSelect)(ge.store),{setIsSaveViewOpened:n}=(0,d.useDispatch)(ta);return(0,na.useShortcut)("core/edit-site/save",(a=>{a.preventDefault();const r=e(),s=!!r.length;!r.some((e=>t(e.kind,e.name,e.key)))&&s&&n(!0)})),null};var fu=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var gu=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));var yu=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"}));var vu=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.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"}));function _u({path:e,categoryType:t,categoryId:n},a){return["/wp_template/all","/wp_template_part/all","/pages"].includes(e)||"/patterns"===e&&(!a||!!t&&!!n)}const{useGlobalStylesReset:bu}=Ke(he.privateApis),{useHistory:Eu,useLocation:wu}=Ke(ft.privateApis);function xu(){const{openGeneralSidebar:e,setCanvasMode:t}=Ke((0,d.useDispatch)(ta)),{params:n}=wu(),a=!_u(n,(0,se.useViewportMatch)("medium","<")),{getCanvasMode:r}=Ke((0,d.useSelect)(ta)),s=Eu(),i=(0,d.useSelect)((e=>e(ge.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,f.useMemo)((()=>i?[{name:"core/edit-site/open-styles",label:(0,b.__)("Open styles"),callback:({close:n})=>{n(),a||s.push({path:"/wp_global_styles",canvas:"edit"}),a&&"edit"!==r()&&t("edit"),e("edit-site/global-styles")},icon:ia}]:[]),[s,e,t,a,r,i])}}function Su(){const{openGeneralSidebar:e,setCanvasMode:t}=Ke((0,d.useDispatch)(ta)),{params:n}=wu(),a=!_u(n,(0,se.useViewportMatch)("medium","<")),{getCanvasMode:r}=Ke((0,d.useSelect)(ta)),{set:s}=(0,d.useDispatch)(k.store),i=Eu(),o=(0,d.useSelect)((e=>e(ge.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,f.useMemo)((()=>o?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,b.__)("Learn about styles"),callback:({close:n})=>{n(),a||i.push({path:"/wp_global_styles",canvas:"edit"}),a&&"edit"!==r()&&t("edit"),e("edit-site/global-styles"),s("core/edit-site","welcomeGuideStyles",!0),setTimeout((()=>{s("core/edit-site","welcomeGuideStyles",!0)}),500)},icon:fu}]:[]),[i,e,t,a,r,o,s])}}function Cu(){const[e,t]=bu();return{isLoading:!1,commands:(0,f.useMemo)((()=>e?[{name:"core/edit-site/reset-global-styles",label:(0,b.__)("Reset styles"),icon:(0,b.isRTL)()?gu:yu,callback:({close:e})=>{e(),t()}}]:[]),[e,t])}}function ku(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=Ke((0,d.useDispatch)(ta)),{params:a}=wu(),r=!_u(a,(0,se.useViewportMatch)("medium","<")),s=Eu(),{canEditCSS:i}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ge.store),a=n(),r=a?t("root","globalStyles",a):void 0;return{canEditCSS:!!r?._links?.["wp:action-edit-css"]}}),[]),{getCanvasMode:o}=Ke((0,d.useSelect)(ta));return{isLoading:!1,commands:(0,f.useMemo)((()=>i?[{name:"core/edit-site/open-styles-css",label:(0,b.__)("Customize CSS"),icon:vu,callback:({close:a})=>{a(),r||s.push({path:"/wp_global_styles",canvas:"edit"}),r&&"edit"!==o()&&n("edit"),e("edit-site/global-styles"),t("global-styles-css")}}]:[]),[s,e,t,i,r,o,n])}}function Tu(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=Ke((0,d.useDispatch)(ta)),{getCanvasMode:a}=Ke((0,d.useSelect)(ta)),{params:r}=wu(),s=!_u(r,(0,se.useViewportMatch)("medium","<")),i=Eu(),o=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ge.store),a=n(),r=a?t("root","globalStyles",a):void 0;return!!r?._links?.["version-history"]?.[0]?.count}),[]);return{isLoading:!1,commands:(0,f.useMemo)((()=>o?[{name:"core/edit-site/open-global-styles-revisions",label:(0,b.__)("Style revisions"),icon:br,callback:({close:r})=>{r(),s||i.push({path:"/wp_global_styles",canvas:"edit"}),s&&"edit"!==a()&&n("edit"),e("edit-site/global-styles"),t("global-styles-revisions")}}]:[]),[o,i,e,t,s,a,n])}}var Pu=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));var Mu=(0,l.createElement)(E.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Iu=(0,l.createElement)(E.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Au=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var Nu=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,l.createElement)(E.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"}));var Ou=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"}));const{RenamePatternModal:Ru}=Ke(xt.privateApis);function Fu(){const{record:e}=Ds(),{closeModal:t}=(0,d.useDispatch)(W);return(0,d.useSelect)((e=>e(W).isModalActive(Lu.rename)))?(0,l.createElement)(Ru,{onClose:t,pattern:e}):null}const{DuplicatePatternModal:Du}=Ke(xt.privateApis),{useHistory:Bu}=Ke(ft.privateApis);function Vu(){const{record:e}=Ds(),{categoryType:t,categoryId:n}=(0,gt.getQueryArgs)(window.location.href),{closeModal:a}=(0,d.useDispatch)(W),r=Bu();if(!(0,d.useSelect)((e=>e(W).isModalActive(Lu.duplicate))))return null;return(0,l.createElement)(Du,{onClose:a,onSuccess:function({pattern:e}){r.push({categoryType:t,categoryId:n,postType:Mt.user,postId:e.id}),a()},pattern:e})}const Lu={rename:"edit-site/pattern-rename",duplicate:"edit-site/pattern-duplicate"};function zu(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Vu,null),(0,l.createElement)(Fu,null))}const{useHistory:Gu}=Ke(ft.privateApis);function Hu(){const{record:e}=Ds(),{isPage:t,canvasMode:n,renderingMode:a}=(0,d.useSelect)((e=>{const{isPage:t,getCanvasMode:n}=Ke(e(ta)),{getRenderingMode:a}=e(g.store);return{isPage:t(),canvasMode:n(),renderingMode:a()}}),[]),{setRenderingMode:r}=(0,d.useDispatch)(g.store);if(!t||"edit"!==n)return{isLoading:!1,commands:[]};const s=[];return"template-only"!==a?s.push({name:"core/switch-to-template-focus",label:(0,b.sprintf)("Edit template: %s",(0,en.decodeEntities)(e.title)),icon:la,callback:({close:e})=>{r("template-only"),e()}}):s.push({name:"core/switch-to-page-focus",label:(0,b.__)("Back to page"),icon:oa,callback:({close:e})=>{r("template-locked"),e()}}),{isLoading:!1,commands:s}}function Uu(){const{switchEditorMode:e}=(0,d.useDispatch)(ta),{canvasMode:t,editorMode:n}=(0,d.useSelect)((e=>({canvasMode:Ke(e(ta)).getCanvasMode(),editorMode:e(ta).getEditorMode()})),[]);if("edit"!==t||"text"!==n)return{isLoading:!1,commands:[]};const a=[];return"text"===n&&a.push({name:"core/exit-code-editor",label:(0,b.__)("Exit code editor"),icon:Pu,callback:({close:t})=>{e("visual"),t()}}),{isLoading:!1,commands:a}}function Wu(){const{isLoaded:e,record:t}=Ds(),{removeTemplate:n,revertTemplate:a}=(0,d.useDispatch)(ta),r=Gu(),s=(0,d.useSelect)((e=>e(ta).isPage()&&"template-only"!==e(g.store).getRenderingMode()),[]);if(!e)return{isLoading:!0,commands:[]};const i=[];if($t(t)&&!s){const e=t.type===Ct?(0,b.sprintf)("Reset template: %s",(0,en.decodeEntities)(t.title)):(0,b.sprintf)("Reset template part: %s",(0,en.decodeEntities)(t.title));i.push({name:"core/reset-template",label:e,icon:(0,b.isRTL)()?gu:yu,callback:({close:e})=>{a(t),e()}})}if(Gs(t)&&!s){const e=t.type===Ct?(0,b.sprintf)("Delete template: %s",(0,en.decodeEntities)(t.title)):(0,b.sprintf)("Delete template part: %s",(0,en.decodeEntities)(t.title)),a=t.type===Ct?"/wp_template":"/wp_template_part/all";i.push({name:"core/remove-template",label:e,icon:Rl,callback:({close:e})=>{n(t),r.push({path:a}),e()}})}return{isLoading:!e,commands:i}}function ju(){const{openGeneralSidebar:e,closeGeneralSidebar:t,toggleDistractionFree:n,setIsListViewOpened:a,switchEditorMode:r}=(0,d.useDispatch)(ta),{canvasMode:s,editorMode:i,activeSidebar:o,showBlockBreadcrumbs:l,isListViewOpen:c,isDistractionFree:u,isTopToolbar:m,isFocusMode:p}=(0,d.useSelect)((e=>{const{get:t}=e(k.store),{getEditorMode:n}=e(ta),{isListViewOpened:a}=e(g.store);return{canvasMode:Ke(e(ta)).getCanvasMode(),editorMode:n(),activeSidebar:e(W).getActiveComplementaryArea(ta.name),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),isListViewOpen:a(),isDistractionFree:t("core","distractionFree"),isFocusMode:t("core","focusMode"),isTopToolbar:t("core","fixedToolbar")}}),[]),{openModal:h}=(0,d.useDispatch)(W),{toggle:f}=(0,d.useDispatch)(k.store),{createInfoNotice:y}=(0,d.useDispatch)(fe.store);if("edit"!==s)return{isLoading:!1,commands:[]};const v=[];return v.push({name:"core/open-settings-sidebar",label:(0,b.__)("Toggle settings sidebar"),icon:(0,b.isRTL)()?Mu:Iu,callback:({close:n})=>{n(),"edit-site/template"===o?t():e("edit-site/template")}}),v.push({name:"core/open-block-inspector",label:(0,b.__)("Toggle block inspector"),icon:Au,callback:({close:n})=>{n(),"edit-site/block-inspector"===o?t():e("edit-site/block-inspector")}}),v.push({name:"core/toggle-spotlight-mode",label:(0,b.__)("Toggle spotlight"),callback:({close:e})=>{f("core","focusMode"),e(),y(p?(0,b.__)("Spotlight off."):(0,b.__)("Spotlight on."),{id:"core/edit-site/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,b.__)("Undo"),onClick:()=>{f("core","focusMode")}}]})}}),v.push({name:"core/toggle-distraction-free",label:u?(0,b.__)("Exit Distraction Free"):(0,b.__)("Enter Distraction Free "),callback:({close:e})=>{n(),e()}}),v.push({name:"core/toggle-top-toolbar",label:(0,b.__)("Toggle top toolbar"),callback:({close:e})=>{f("core","fixedToolbar"),u&&n(),e(),y(m?(0,b.__)("Top toolbar off."):(0,b.__)("Top toolbar on."),{id:"core/edit-site/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,b.__)("Undo"),onClick:()=>{f("core","fixedToolbar")}}]})}}),"visual"===i&&v.push({name:"core/toggle-code-editor",label:(0,b.__)("Open code editor"),icon:Pu,callback:({close:e})=>{r("text"),e()}}),v.push({name:"core/open-preferences",label:(0,b.__)("Editor preferences"),callback:()=>{h(Mc)}}),v.push({name:"core/open-shortcut-help",label:(0,b.__)("Keyboard shortcuts"),icon:Nu,callback:()=>{h(xc)}}),v.push({name:"core/toggle-breadcrumbs",label:l?(0,b.__)("Hide block breadcrumbs"):(0,b.__)("Show block breadcrumbs"),callback:({close:e})=>{f("core","showBlockBreadcrumbs"),e(),y(l?(0,b.__)("Breadcrumbs hidden."):(0,b.__)("Breadcrumbs visible."),{id:"core/edit-site/toggle-breadcrumbs/notice",type:"snackbar"})}}),v.push({name:"core/toggle-list-view",label:c?(0,b.__)("Close List View"):(0,b.__)("Open List View"),icon:Ou,callback:({close:e})=>{a(!c),e(),y(c?(0,b.__)("List View off."):(0,b.__)("List View on."),{id:"core/edit-site/toggle-list-view/notice",type:"snackbar"})}}),{isLoading:!1,commands:v}}function Zu(){const{isLoaded:e,record:t}=Ds(),{openModal:n}=(0,d.useDispatch)(W);if(!e)return{isLoading:!0,commands:[]};const a=[];return"wp_block"===t?.type&&(a.push({name:"core/rename-pattern",label:(0,b.__)("Rename pattern"),icon:Ea,callback:({close:e})=>{n(Lu.rename),e()}}),a.push({name:"core/duplicate-pattern",label:(0,b.__)("Duplicate pattern"),icon:ca,callback:({close:e})=>{n(Lu.duplicate),e()}})),{isLoading:!1,commands:a}}const qu=1e4;function Yu(){const{isLoaded:e}=Ds(),[t,n]=(0,f.useState)(!1),a=(0,d.useSelect)((e=>{const n=e(ge.store).hasResolvingSelectors();return!t&&!n}),[t]);return(0,f.useEffect)((()=>{let e;return t||(e=setTimeout((()=>{n(!0)}),qu)),()=>{clearTimeout(e)}}),[t]),(0,f.useEffect)((()=>{if(a){const e=setTimeout((()=>{n(!0)}),100);return()=>{clearTimeout(e)}}}),[a]),!t||!e}function Ku({className:e,identifier:t,title:n,icon:a,children:r,closeLabel:s,header:i,headerClassName:o,panelClassName:c}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(re,{className:e,scope:"core/edit-site",identifier:t,title:n,smallScreenTitle:n,icon:a,closeLabel:s,header:i,headerClassName:o,panelClassName:c},r),(0,l.createElement)($,{scope:"core/edit-site",identifier:t,icon:a},n))}function Xu({className:e,...t}){return(0,l.createElement)(_.Icon,{className:v()(e,"edit-site-global-styles-icon-with-current-color"),...t})}function Ju({icon:e,children:t,...n}){return(0,l.createElement)(_.__experimentalItem,{...n},e&&(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(Xu,{icon:e,size:24}),(0,l.createElement)(_.FlexItem,null,t)),!e&&t)}function Qu(e){return(0,l.createElement)(_.__experimentalNavigatorButton,{as:Ju,...e})}var $u=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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"}));var ed=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"}));const{useHasDimensionsPanel:td,useHasTypographyPanel:nd,useHasColorPanel:ad,useGlobalSetting:rd,useSettingsForBlockElement:sd}=Ke(he.privateApis);var id=function(){const[e]=rd(""),t=sd(e),n=nd(t),a=ad(t),r=td(t);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,null,n&&(0,l.createElement)(Qu,{icon:$u,path:"/typography","aria-label":(0,b.__)("Typography styles")},(0,b.__)("Typography")),a&&(0,l.createElement)(Qu,{icon:ed,path:"/colors","aria-label":(0,b.__)("Colors styles")},(0,b.__)("Colors")),r&&(0,l.createElement)(Qu,{icon:la,path:"/layout","aria-label":(0,b.__)("Layout styles")},(0,b.__)("Layout"))))};const{useGlobalStyle:od}=Ke(he.privateApis);var ld=function(){const[e]=od("css"),{hasVariations:t,canEditCSS:n}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n,__experimentalGetCurrentThemeGlobalStylesVariations:a}=e(ge.store),r=n(),s=r?t("root","globalStyles",r):void 0;return{hasVariations:!!a()?.length,canEditCSS:!!s?._links?.["wp:action-edit-css"]}}),[]);return(0,l.createElement)(_.Card,{size:"small",className:"edit-site-global-styles-screen-root"},(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalVStack,{spacing:4},(0,l.createElement)(_.Card,null,(0,l.createElement)(_.CardMedia,null,(0,l.createElement)(Va,null))),t&&(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(Qu,{path:"/variations","aria-label":(0,b.__)("Browse styles")},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,b.__)("Browse styles")),(0,l.createElement)(Xu,{icon:(0,b.isRTL)()?da:ua})))),(0,l.createElement)(id,null))),(0,l.createElement)(_.CardDivider,null),(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,b.__)("Customize the appearance of specific blocks for the whole site.")),(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(Qu,{path:"/blocks","aria-label":(0,b.__)("Blocks styles")},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,b.__)("Blocks")),(0,l.createElement)(Xu,{icon:(0,b.isRTL)()?da:ua}))))),n&&!!e&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.CardDivider,null),(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,b.__)("Add your own CSS to customize the appearance and layout of your site.")),(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(Qu,{path:"/css","aria-label":(0,b.__)("Additional CSS")},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,b.__)("Additional CSS")),(0,l.createElement)(Xu,{icon:(0,b.isRTL)()?da:ua})))))))};function cd(e){const t=function(e){return e?.filter((e=>"block"===e.source))}((0,d.useSelect)((t=>{const{getBlockStyles:n}=t(c.store);return n(e)}),[e]));return t}function ud({name:e}){const t=cd(e);return(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},t.map(((t,n)=>t?.isDefault?null:(0,l.createElement)(Qu,{key:n,path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(t.name),"aria-label":t.label},t.label))))}var dd=function({title:e,description:t,onBack:n}){return(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(_.__experimentalView,null,(0,l.createElement)(_.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,l.createElement)(_.__experimentalHStack,{spacing:2},(0,l.createElement)(_.__experimentalNavigatorToParentButton,{style:{minWidth:24,padding:0},icon:(0,b.isRTL)()?ua:da,isSmall:!0,"aria-label":(0,b.__)("Navigate to the previous view"),onClick:n}),(0,l.createElement)(_.__experimentalSpacer,null,(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-global-styles-header",level:2,size:13},e))))),t&&(0,l.createElement)("p",{className:"edit-site-global-styles-header__description"},t))};const{useHasDimensionsPanel:md,useHasTypographyPanel:pd,useHasBorderPanel:hd,useGlobalSetting:fd,useSettingsForBlockElement:gd,useHasColorPanel:yd}=Ke(he.privateApis);function vd(e){const[t]=fd("",e),n=gd(t,e),a=pd(n),r=yd(n),s=hd(n),i=md(n),o=s||i,l=!!cd(e)?.length;return a||r||o||l}function _d({block:e}){if(!vd(e.name))return null;const t=(0,b.sprintf)((0,b.__)("%s block styles"),e.title);return(0,l.createElement)(Qu,{path:"/blocks/"+encodeURIComponent(e.name),"aria-label":t},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(he.BlockIcon,{icon:e.icon}),(0,l.createElement)(_.FlexItem,null,e.title)))}const bd=(0,f.memo)((function({filterValue:e}){const t=function(){const e=(0,d.useSelect)((e=>e(c.store).getBlockTypes()),[]),{core:t,noncore:n}=e.reduce(((e,t)=>{const{core:n,noncore:a}=e;return(t.name.startsWith("core/")?n:a).push(t),e}),{core:[],noncore:[]});return[...t,...n]}(),n=(0,se.useDebounce)(Jt.speak,500),{isMatchingSearchTerm:a}=(0,d.useSelect)(c.store),r=e?t.filter((t=>a(t,e))):t,s=(0,f.useRef)();return(0,f.useEffect)((()=>{if(!e)return;const t=s.current.childElementCount,a=(0,b.sprintf)((0,b._n)("%d result found.","%d results found.",t),t);n(a,t)}),[e,n]),(0,l.createElement)("div",{ref:s,className:"edit-site-block-types-item-list"},r.map((e=>(0,l.createElement)(_d,{block:e,key:"menu-itemblock-"+e.name}))))}));var Ed=function(){const[e,t]=(0,f.useState)(""),n=(0,f.useDeferredValue)(e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{title:(0,b.__)("Blocks"),description:(0,b.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,l.createElement)(_.SearchControl,{__nextHasNoMarginBottom:!0,className:"edit-site-block-types-search",onChange:t,value:e,label:(0,b.__)("Search for blocks"),placeholder:(0,b.__)("Search")}),(0,l.createElement)(bd,{filterValue:n}))};var wd=({name:e,variation:t=""})=>{var n;const a=(0,c.getBlockType)(e)?.example,r=(0,f.useMemo)((()=>{if(!a)return null;let n=a;return t&&(n={...n,attributes:{...n.attributes,className:"is-style-"+t}}),(0,c.getBlockFromExample)(e,n)}),[e,a,t]),s=null!==(n=a?.viewportWidth)&&void 0!==n?n:null,i="150px";return a?(0,l.createElement)(_.__experimentalSpacer,{marginX:4,marginBottom:4},(0,l.createElement)("div",{className:"edit-site-global-styles__block-preview-panel",style:{maxHeight:i,boxSizing:"initial"}},(0,l.createElement)(he.BlockPreview,{blocks:r,viewportWidth:s,minHeight:i,additionalStyles:[{css:`\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tmin-height:${i};\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};var xd=function({children:e,level:t}){return(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:null!=t?t:2},e)};function Sd(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:Cd,useHasTypographyPanel:kd,useHasBorderPanel:Td,useGlobalSetting:Pd,useSettingsForBlockElement:Md,useHasColorPanel:Id,useHasEffectsPanel:Ad,useHasFiltersPanel:Nd,useHasImageSettingsPanel:Od,useGlobalStyle:Rd,BorderPanel:Fd,ColorPanel:Dd,TypographyPanel:Bd,DimensionsPanel:Vd,EffectsPanel:Ld,FiltersPanel:zd,ImageSettingsPanel:Gd,AdvancedPanel:Hd}=Ke(he.privateApis);var Ud=function({name:e,variation:t}){let n=[];t&&(n=["variations",t].concat(n));const a=n.join("."),[r]=Rd(a,e,"user",{shouldDecodeEncode:!1}),[s,i]=Rd(a,e,"all",{shouldDecodeEncode:!1}),[o]=Pd("",e,"user"),[u,m]=Pd("",e),p=Md(u,e),h=(0,c.getBlockType)(e);p?.spacing?.blockGap&&h?.supports?.spacing?.blockGap&&(!0===h?.supports?.spacing?.__experimentalSkipSerialization||h?.supports?.spacing?.__experimentalSkipSerialization?.some?.((e=>"blockGap"===e)))&&(p.spacing.blockGap=!1),p?.dimensions?.aspectRatio&&"core/group"===e&&(p.dimensions.aspectRatio=!1);const g=cd(e),y=kd(p),v=Id(p),E=Td(p),w=Cd(p),x=Ad(p),S=Nd(p),C=Od(e,o,p),k=!!g?.length&&!t,{canEditCSS:T}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ge.store),a=n(),r=a?t("root","globalStyles",a):void 0;return{canEditCSS:!!r?._links?.["wp:action-edit-css"]}}),[]),P=t?g.find((e=>e.name===t)):null,M=(0,f.useMemo)((()=>({...s,layout:p.layout})),[s,p.layout]),I=(0,f.useMemo)((()=>({...r,layout:o.layout})),[r,o.layout]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{title:t?P.label:h.title}),(0,l.createElement)(wd,{name:e,variation:t}),k&&(0,l.createElement)("div",{className:"edit-site-global-styles-screen-variations"},(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(xd,null,(0,b.__)("Style Variations")),(0,l.createElement)(ud,{name:e}))),v&&(0,l.createElement)(Dd,{inheritedValue:s,value:r,onChange:i,settings:p}),y&&(0,l.createElement)(Bd,{inheritedValue:s,value:r,onChange:i,settings:p}),w&&(0,l.createElement)(Vd,{inheritedValue:M,value:I,onChange:e=>{const t={...e};delete t.layout,i(t),e.layout!==o.layout&&m({...o,layout:e.layout})},settings:p,includeLayoutControls:!0}),E&&(0,l.createElement)(Fd,{inheritedValue:s,value:r,onChange:e=>{if(!e?.border)return void i(e);const{radius:t,...n}=e.border,a=function(e){return e?(0,_.__experimentalHasSplitBorders)(e)?{top:Sd(e.top),right:Sd(e.right),bottom:Sd(e.bottom),left:Sd(e.left)}:Sd(e):e}(n),r=(0,_.__experimentalHasSplitBorders)(a)?{color:null,style:null,width:null,...a}:{top:a,right:a,bottom:a,left:a};i({...e,border:{...r,radius:t}})},settings:p}),x&&(0,l.createElement)(Ld,{inheritedValue:M,value:I,onChange:i,settings:p,includeLayoutControls:!0}),S&&(0,l.createElement)(zd,{inheritedValue:M,value:I,onChange:i,settings:p,includeLayoutControls:!0}),C&&(0,l.createElement)(Gd,{onChange:e=>{m(void 0===e?{...u,lightbox:void 0}:{...u,lightbox:{...u.lightbox,...e}})},value:o,inheritedValue:p}),T&&(0,l.createElement)(_.PanelBody,{title:(0,b.__)("Advanced"),initialOpen:!1},(0,l.createElement)("p",null,(0,b.sprintf)((0,b.__)("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."),h?.title)),(0,l.createElement)(Hd,{value:r,onChange:i,inheritedValue:s})))};const{useGlobalStyle:Wd}=Ke(he.privateApis);function jd({parentMenu:e,element:t,label:n}){const a="text"!==t&&t?`elements.${t}.`:"",r="link"===t?{textDecoration:"underline"}:{},[s]=Wd(a+"typography.fontFamily"),[i]=Wd(a+"typography.fontStyle"),[o]=Wd(a+"typography.fontWeight"),[c]=Wd(a+"typography.letterSpacing"),[u]=Wd(a+"color.background"),[d]=Wd(a+"color.gradient"),[m]=Wd(a+"color.text"),p=(0,b.sprintf)((0,b.__)("Typography %s styles"),n);return(0,l.createElement)(Qu,{path:e+"/typography/"+t,"aria-label":p},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(_.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:null!=s?s:"serif",background:null!=d?d:u,color:m,fontStyle:i,fontWeight:o,letterSpacing:c,...r}},(0,b.__)("Aa")),(0,l.createElement)(_.FlexItem,null,n)))}var Zd=function(){return(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(xd,{level:3},(0,b.__)("Elements")),(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,l.createElement)(jd,{parentMenu:"",element:"text",label:(0,b.__)("Text")}),(0,l.createElement)(jd,{parentMenu:"",element:"link",label:(0,b.__)("Links")}),(0,l.createElement)(jd,{parentMenu:"",element:"heading",label:(0,b.__)("Headings")}),(0,l.createElement)(jd,{parentMenu:"",element:"caption",label:(0,b.__)("Captions")}),(0,l.createElement)(jd,{parentMenu:"",element:"button",label:(0,b.__)("Buttons")})))};const qd="/wp/v2/font-families",Yd="/wp/v2/font-collections";const Kd=["otf","ttf","woff","woff2"],Xd={100:(0,b._x)("Thin","font weight"),200:(0,b._x)("Extra-light","font weight"),300:(0,b._x)("Light","font weight"),400:(0,b._x)("Normal","font weight"),500:(0,b._x)("Medium","font weight"),600:(0,b._x)("Semi-bold","font weight"),700:(0,b._x)("Bold","font weight"),800:(0,b._x)("Extra-bold","font weight"),900:(0,b._x)("Black","font weight")},Jd={normal:(0,b._x)("Normal","font style"),italic:(0,b._x)("Italic","font style")};function Qd(e){return e.split(",").map((e=>(e=e.trim()).startsWith('"')||e.startsWith("'")||-1===e.indexOf(" ")?e:`"${e}"`)).join(", ")}function $d(e){const t={fontFamily:Qd(e.fontFamily)};if(!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){const r=e.fontFace.filter((e=>"normal"===e.fontStyle.toLowerCase()));if(r.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]),a=parseInt(n[1]);for(let n=e;n<=a;n+=100)t.push(n)}else 1===n.length&&t.push(parseInt(n[0]))})),t}(r),s=(n=400,0===(a=e).length?null:(a.sort(((e,t)=>Math.abs(n-e)-Math.abs(n-t))),a[0]));t.fontWeight=String(s)||"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,a;return t}const{File:em}=window;function tm(e,t={}){return e.name||!e.fontFamily&&!e.slug||(e.name=e.fontFamily||e.slug),{...e,...t}}function nm(e){return`${Xd[e.fontWeight]||e.fontWeight} ${"normal"===e.fontStyle?"":Jd[e.fontStyle]||e.fontStyle}`}function am(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())}async function rm(e,t,n="all"){let a;if("string"==typeof t)a=`url(${t})`;else{if(!(t instanceof em))return;a=await t.arrayBuffer()}const r=new window.FontFace(Qd(e.fontFamily),a,{style:e.fontStyle,weight:e.fontWeight}),s=await r.load();if("document"!==n&&"all"!==n||document.fonts.add(s),"iframe"===n||"all"===n){document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts.add(s)}}function sm(e,t){if(!e)return;let n;var a;return n=Array.isArray(e)?e[0]:e,n.startsWith("file:.")&&t&&(n=n.replace("file:.",t)),("string"!=typeof(a=n)||a===decodeURIComponent(a))&&(n=encodeURI(n)),n}async function im(e,t){const n=t.map((t=>async function(e,t){const n={path:`${qd}/${e}/font-faces`,method:"POST",body:t},a=await Xt()(n);return{id:a.id,...a.font_face_settings}}(e,t))),a=await Promise.allSettled(n),r={errors:[],successes:[]};return a.forEach(((e,n)=>{if("fulfilled"===e.status){const a=e.value;a.id?r.successes.push(a):r.errors.push({data:t[n],message:`Error: ${a.message}`})}else r.errors.push({data:t[n],message:`Fetch error: ${e.reason.message}`})})),r}function om(e,t){return-1!==t.findIndex((t=>t.fontWeight===e.fontWeight&&t.fontStyle===e.fontStyle))}function lm(e,t,n){const a=t=>t.slug===e.slug,r=n.find(a);return t?(r=>{const s=e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle;if(!r)return[...n,{...e,fontFace:[t]}];let i=r.fontFace||[];return i=i.find(s)?i.filter((e=>!s(e))):[...i,t],0===i.length?n.filter((e=>!a(e))):n.map((e=>a(e)?{...e,fontFace:i}:e))})(r):(t=>t?n.filter((e=>!a(e))):[...n,e])(r)}const{useGlobalSetting:cm}=Ke(he.privateApis),um=(0,f.createContext)({});var dm=function({children:e}){const{__experimentalSaveSpecifiedEntityEdits:t}=(0,d.useDispatch)(ge.store),{globalStylesId:n}=(0,d.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(ge.store);return{globalStylesId:t()}})),a=(0,ge.useEntityRecord)("root","globalStyles",n),r=!!a?.edits?.settings?.typography?.fontFamilies,[s,i]=(0,f.useState)(!1),[o,c]=(0,f.useState)(0),u=()=>{c(Date.now())},{records:m=[],isResolving:p,hasResolved:h}=(0,ge.useEntityRecords)("postType","wp_font_family",{refreshKey:o,_embed:!0}),g=(m||[]).map((e=>({id:e.id,...e.font_family_settings,fontFace:e?._embedded?.font_faces.map((e=>e.font_face_settings))||[]})))||[],[y,v]=cm("typography.fontFamilies"),[E]=cm("typography.fontFamilies",void 0,"base"),[w,x]=(0,f.useState)(!1),[S,C]=(0,f.useState)(null),k=E?.theme?E.theme.map((e=>tm(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],T=y?.theme?y.theme.map((e=>tm(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],P=y?.custom?y.custom.map((e=>tm(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],M=g?g.map((e=>tm(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[];(0,f.useEffect)((()=>{w||C(null)}),[w]);const[I]=(0,f.useState)(new Set),{site:A,currentTheme:N}=(0,d.useSelect)((e=>({site:e(ge.store).getSite(),currentTheme:e(ge.store).getCurrentTheme()}))),O=A?.url+"/wp-content/themes/"+N?.stylesheet,R=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}),{}),F=e=>R("theme"===e?T:P),D=e=>{var t;const n=(null!==(t=y?.[e.source])&&void 0!==t?t:[]).filter((t=>t.slug!==e.slug));v({...y,[e.source]:n})},B=e=>{const t=function(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,...a}=e,r=am(n.get(e.slug).fontFace,t);n.set(e.slug,{...a,fontFace:r})}else n.set(e.slug,{...e});return Array.from(n.values())}(y?.custom,e);v({...y,custom:t}),e.forEach((e=>{e.fontFace&&e.fontFace.forEach((e=>{rm(e,sm(e.src),"iframe")}))}))},[V,L]=(0,f.useState)([]),z=async()=>{const e=await async function(){const e={path:Yd,method:"GET"};return await Xt()(e)}();L(e)};return(0,f.useEffect)((()=>{z()}),[]),(0,l.createElement)(um.Provider,{value:{libraryFontSelected:S,handleSetLibraryFontSelected:e=>{if(!e)return void C(null);const t=("theme"===e.source?k:M).find((t=>t.slug===e.slug));C({...t||e,source:e.source})},themeFonts:T,baseThemeFonts:k,customFonts:P,baseCustomFonts:M,isFontActivated:(e,t,n,a)=>t||n?!!F(a)[e]?.includes(t+n):!!F(a)[e],getFontFacesActivated:(e,t)=>F(t)[e]||[],loadFontFaceAsset:async e=>{if(!e.src)return;const t=sm(e.src,O);t&&!I.has(t)&&(rm(e,t,"document"),I.add(t))},installFont:async function(e){i(!0);try{let a=await async function(e){const t={path:`${qd}?slug=${e}&_embed=true`,method:"GET"},n=await Xt()(t);if(!n||0===n.length)return null;const a=n[0];return{id:a.id,...a.font_family_settings,fontFace:a?._embedded?.font_faces.map((e=>e.font_face_settings))||[]}}(e.slug);a||(a=await async function(e){const t={path:qd,method:"POST",body:e},n=await Xt()(t);return{id:n.id,...n.font_family_settings,fontFace:[]}}(function(e){const t=new FormData,{kebabCase:n}=Ke(_.privateApis),{fontFace:a,category:r,...s}=e,i={...s,slug:n(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}(e)));const r=a.fontFace&&e.fontFace?a.fontFace.filter((t=>om(t,e.fontFace))):[];a.fontFace&&e.fontFace&&(e.fontFace=e.fontFace.filter((e=>!om(e,a.fontFace))));let s=[],i=[];if(e?.fontFace?.length>0){const t=await im(a.id,function(e){if(e?.fontFace)return e.fontFace.map(((e,t)=>{const n=new FormData;if(e.file){const a=`file-${t}`;n.append(a,e.file,e.file.name);const{file:r,...s}=e,i={...s,src:a};n.append("font_face_settings",JSON.stringify(i))}else n.append("font_face_settings",JSON.stringify(e));return n}))}(e));s=t?.successes,i=t?.errors}const o=i.reduce(((e,t)=>`${e} ${t.message}`),"");if(e?.fontFace?.length>0&&0===s.length&&0===r.length)throw new Error((0,b.sprintf)((0,b.__)("No font faces were installed. %s"),o));if((s?.length>0||r?.length>0)&&(e.fontFace=[...s,...r]),B([e]),t("root","globalStyles",n,["settings.typography.fontFamilies"]),u(),i.length>0)throw new Error((0,b.sprintf)((0,b.__)("Some font faces were installed. There were some errors. %s"),o))}finally{i(!1)}},uninstallFontFamily:async function(e){try{const a=await async function(e){const t={path:`${qd}/${e}?force=true`,method:"DELETE"};return await Xt()(t)}(e.id);return a.deleted&&(D(e),await t("root","globalStyles",n,["settings.typography.fontFamilies"])),u(),a}catch(e){throw console.error("There was an error uninstalling the font family:",e),e}},toggleActivateFont:(e,t)=>{var n;const a=lm(e,t,null!==(n=y?.[e.source])&&void 0!==n?n:[]);v({...y,[e.source]:a})},getAvailableFontsOutline:R,modalTabOpen:w,toggleModal:e=>{x(e||null)},refreshLibrary:u,saveFontFamilies:()=>{t("root","globalStyles",n,["settings.typography.fontFamilies"])},fontFamiliesHasChanges:r,isResolvingLibrary:p,hasResolvedLibrary:h,isInstalling:s,collections:V,getFontCollection:async e=>{try{if(!!V.find((t=>t.slug===e))?.font_families)return;const t=await async function(e){const t={path:`${Yd}/${e}`,method:"GET"};return await Xt()(t)}(e),n=V.map((n=>n.slug===e?{...n,...t}:n));L(n)}catch(e){throw console.error(e),e}}}},e)};var mm=function({title:e,description:t,handleBack:n,children:a,footer:r}){return(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout"},(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalVStack,{spacing:4,justify:"space-between"},(0,l.createElement)(_.__experimentalVStack,{spacing:2},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},!!n&&(0,l.createElement)(_.Button,{variant:"tertiary",onClick:n,icon:da,size:"small"}),e&&(0,l.createElement)(_.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header"},e)),t&&(0,l.createElement)(_.__experimentalText,null,t)),(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout__main"},a),r&&(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout__footer"},r)))};var pm=function({title:e,children:t,pageSize:n=32}){const[a,r]=(0,f.useState)(null),[s,i]=(0,f.useState)(1),o=s*n,c=t.slice(0,o);return(0,f.useEffect)((()=>{if(a){const e=new window.IntersectionObserver((([e])=>{e.isIntersecting&&i((e=>e+1))}));return e.observe(a),()=>e.disconnect()}}),[a]),(0,l.createElement)("div",{className:"font-library-modal__fonts-grid"},(0,l.createElement)(_.__experimentalVStack,{spacing:0},e&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__subtitle"},e),(0,l.createElement)(_.__experimentalSpacer,{margin:2})),(0,l.createElement)("div",{className:"font-library-modal__fonts-grid__main"},c.map(((e,t)=>t===o-1?(0,l.createElement)("div",{key:e.key,ref:r},e):(0,l.createElement)("div",{key:e.key},e))))))};var hm=function({customPreviewUrl:e,fontFace:t,text:n,style:a={}}){const r=(0,f.useRef)(null),[s,i]=(0,f.useState)(!1),[o,c]=(0,f.useState)(!1),{loadFontFaceAsset:u}=(0,f.useContext)(um),d=null!=e?e:function(e){return e.preview?e.preview:e.src?Array.isArray(e.src)?e.src[0]:e.src:void 0}(t),m=d&&d.match(/\.(png|jpg|jpeg|gif|svg)$/i);var p;const h={whiteSpace:"nowrap",flexShrink:0,fontSize:"18px",opacity:o?"1":"0",transition:"opacity 0.3s ease-in-out",...{fontFamily:Qd((p=t).fontFamily),fontStyle:p.fontStyle||"normal",fontWeight:p.fontWeight||"400"},...a};return(0,f.useEffect)((()=>{const e=new window.IntersectionObserver((([e])=>{i(e.isIntersecting)}),{});return e.observe(r.current),()=>e.disconnect()}),[r]),(0,f.useEffect)((()=>{(async()=>{s&&(!m&&t.src&&await u(t),c(!0))})()}),[t,s,u]),(0,l.createElement)("div",{ref:r},m?(0,l.createElement)("img",{src:d,loading:"lazy",alt:n,style:{height:"23px",width:"auto"}}):(0,l.createElement)(_.__experimentalText,{style:h},n))};var fm=function({face:e,font:t}){const{isFontActivated:n,toggleActivateFont:a}=(0,f.useContext)(um),r=t?.fontFace?.length>0?n(t.slug,e.fontStyle,e.fontWeight,t.source):n(t.slug,null,null,t.source),s=t.name+" "+nm(e),{kebabCase:i}=Ke(_.privateApis),o=i(`${t.slug}-${nm(e)}`);return(0,l.createElement)("label",{className:"font-library-modal__library-font-variant",htmlFor:o},(0,l.createElement)(_.Flex,{justify:"space-between",align:"center",gap:"1rem"},(0,l.createElement)(hm,{fontFace:e,text:s}),(0,l.createElement)(_.CheckboxControl,{checked:r,onChange:()=>{t?.fontFace?.length>0?a(t,e):a(t)},__nextHasNoMarginBottom:!0,id:o,label:!1})))};function gm(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 ym(e){return e.sort(((e,t)=>"normal"===e.fontStyle&&"normal"!==t.fontStyle?-1:"normal"===t.fontStyle&&"normal"!==e.fontStyle?1:e.fontStyle===t.fontStyle?gm(e.fontWeight)-gm(t.fontWeight):e.fontStyle.localeCompare(t.fontStyle)))}var vm=function({font:e}){const t=e.fontFace&&e.fontFace.length?ym(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(_.__experimentalSpacer,{margin:8}),t.map(((t,n)=>(0,l.createElement)(fm,{font:e,face:t,key:`face${n}`})))),(0,l.createElement)(_.__experimentalSpacer,{margin:8}))};var _m=function({font:e,onClick:t,variantsText:n}){const a={fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily,fake:!0},r=e.fontFace&&e.fontFace.length?e?.fontFace?.find((e=>"normal"===e.fontStyle&&"400"===e.fontWeight))||e.fontFace[0]:a,s=$d(e),i=e.fontFace?.length||1,o={cursor:t?"pointer":"default"};return(0,l.createElement)(_.Button,{onClick:t,style:o,className:"font-library-modal__font-card"},(0,l.createElement)(_.Flex,{justify:"space-between",wrap:!1},(0,l.createElement)(hm,{customPreviewUrl:e.preview,fontFace:r,text:e.name,style:s}),(0,l.createElement)(_.Flex,{justify:"flex-end"},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__font-card__count"},n||i+" "+(0,b._n)("variant","variants",i))),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Icon,{icon:ua})))))};var bm=function({font:e,...t}){const{getFontFacesActivated:n}=(0,f.useContext)(um),a=e?.fontFace?.length>0?e.fontFace.length:1,r=n(e.slug,e.source).length,s=(0,b.sprintf)((0,b.__)("%1$s/%2$s variants active"),r,a);return(0,l.createElement)(_m,{font:e,variantsText:s,...t})};var Em=function({font:e,isConfirmDeleteOpen:t,handleConfirmUninstall:n,handleCancelUninstall:a}){return(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,b.__)("Cancel"),confirmButtonText:(0,b.__)("Delete"),onCancel:a,onConfirm:n},e&&(0,b.sprintf)((0,b.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name))};const{ProgressBar:wm}=Ke(_.privateApis);function xm({shouldDisplayDeleteButton:e,handleUninstallClick:t}){const{saveFontFamilies:n,fontFamiliesHasChanges:a,isInstalling:r}=(0,f.useContext)(um);return(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},r&&(0,l.createElement)(wm,null),(0,l.createElement)("div",null,e&&(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Delete"))),(0,l.createElement)(_.Button,{disabled:!a,variant:"primary",onClick:n},(0,b.__)("Update")))}var Sm=function(){const{baseCustomFonts:e,libraryFontSelected:t,baseThemeFonts:n,handleSetLibraryFontSelected:a,refreshLibrary:r,uninstallFontFamily:s,isResolvingLibrary:i}=(0,f.useContext)(um),[o,c]=(0,f.useState)(!1),u=()=>{a(null)},d=e=>{a(e)},[m,p]=(0,f.useState)(null),h=async()=>{try{await s(t),p({type:"success",message:(0,b.__)("Font family uninstalled successfully.")}),u(),c(!1)}catch(e){p({type:"error",message:(0,b.__)("There was an error uninstalling the font family. ")+e.message})}},g=()=>{c(!1)},y=t?(0,b.__)("Choose font variants. Keep in mind that too many variants could make your site slower."):null,v=!!t&&"theme"!==t?.source;return(0,f.useEffect)((()=>{d(t),r()}),[]),(0,f.useEffect)((()=>{if(m){const e=setTimeout((()=>{p(null)}),5e3);return()=>clearTimeout(e)}}),[m]),(0,l.createElement)(mm,{title:t?.name||"",description:y,handleBack:!!t&&u,footer:(0,l.createElement)(xm,{shouldDisplayDeleteButton:v,handleUninstallClick:async()=>{c(!0)}})},(0,l.createElement)(Em,{font:t,isConfirmDeleteOpen:o,handleConfirmUninstall:h,handleCancelUninstall:g}),m&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(_.Notice,{isDismissible:!1,status:m.type,className:"font-library-modal__font-collection__notice"},m.message)),(0,l.createElement)(_.__experimentalSpacer,{margin:4})),!t&&(0,l.createElement)(l.Fragment,null,i&&(0,l.createElement)(_.Spinner,null),e.length>0&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(pm,null,e.map((e=>(0,l.createElement)(bm,{font:e,key:e.slug,onClick:()=>{d(e)}})))),(0,l.createElement)(_.__experimentalSpacer,{margin:8})),n.length>0&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(pm,{title:(0,b.__)("Theme Fonts")},n.map((e=>(0,l.createElement)(bm,{font:e,key:e.slug,onClick:()=>{d(e)}})))))),t&&(0,l.createElement)(vm,{font:t,isConfirmDeleteOpen:o,handleConfirmUninstall:h,handleCancelUninstall:g}))};var Cm=function({face:e,font:t,handleToggleVariant:n,selected:a}){const r=t.name+" "+nm(e),{kebabCase:s}=Ke(_.privateApis),i=s(`${t.slug}-${nm(e)}`);return(0,l.createElement)("label",{className:"font-library-modal__library-font-variant",htmlFor:i},(0,l.createElement)(_.Flex,{justify:"space-between",align:"center",gap:"1rem"},(0,l.createElement)(hm,{fontFace:e,text:r}),(0,l.createElement)(_.CheckboxControl,{checked:a,onChange:()=>{t?.fontFace?n(t,e):n(t)},__nextHasNoMarginBottom:!0,id:i,label:!1})))};function km(e,t,n){return t?!!n[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!n[e]}var Tm=function({font:e,handleToggleVariant:t,fontToInstallOutline:n}){const a=e.fontFace&&e.fontFace.length?ym(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(_.__experimentalSpacer,{margin:8}),a.map(((a,r)=>(0,l.createElement)(Cm,{font:e,face:a,key:`face${r}`,handleToggleVariant:t,selected:km(e.slug,e.fontFace?a:null,n)})))),(0,l.createElement)(_.__experimentalSpacer,{margin:8}))};var Pm=function(){return(0,l.createElement)("div",{className:"font-library__google-fonts-confirm"},(0,l.createElement)(_.Card,null,(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalText,{as:"h3"},"Connect to Google Fonts"),(0,l.createElement)(_.__experimentalSpacer,{margin:6}),(0,l.createElement)(_.__experimentalText,{as:"p"},(0,b.__)("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,l.createElement)(_.__experimentalSpacer,{margin:3}),(0,l.createElement)(_.__experimentalText,{as:"p"},(0,b.__)("You can alternatively upload files directly on the Library tab.")),(0,l.createElement)(_.__experimentalSpacer,{margin:6}),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>{window.localStorage.setItem("wp-font-library-default-font-collection-permission","true"),window.dispatchEvent(new Event("storage"))}},(0,b.__)("Allow access to Google Fonts")))))};const Mm={slug:"all",name:(0,b.__)("All")};function Im({handleInstall:e}){const{isInstalling:t}=(0,f.useContext)(um);return(0,l.createElement)(_.Flex,{justify:"flex-end"},(0,l.createElement)(_.Button,{variant:"primary",onClick:e,isBusy:t,disabled:t},(0,b.__)("Install")))}var Am=function({slug:e}){var t;const n="default-font-collection"===e,a=()=>"true"===window.localStorage.getItem("wp-font-library-default-font-collection-permission"),[r,s]=(0,f.useState)(null),[i,o]=(0,f.useState)(null),[c,u]=(0,f.useState)([]),[d,m]=(0,f.useState)({}),[p,h]=(0,f.useState)(n&&!a()),{collections:g,getFontCollection:y,installFont:v}=(0,f.useContext)(um),E=g.find((t=>t.slug===e));(0,f.useEffect)((()=>{const e=()=>{h(n&&!a())};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[e,n]),(0,f.useEffect)((()=>{(async()=>{try{await y(e),P()}catch(e){s({type:"error",message:e?.message,duration:0})}})()}),[e,y]),(0,f.useEffect)((()=>{o(null),s(null)}),[e]),(0,f.useEffect)((()=>{u([])}),[i]),(0,f.useEffect)((()=>{if(r&&0!==r?.duration){var e;const t=setTimeout((()=>{s(null)}),null!==(e=r.duration)&&void 0!==e?e:5e3);return()=>clearTimeout(t)}}),[r]);const w=(0,f.useMemo)((()=>{var e;return null!==(e=E?.font_families)&&void 0!==e?e:[]}),[E]),x=null!==(t=E?.categories)&&void 0!==t?t:[],S=[Mm,...x],C=(0,f.useMemo)((()=>function(e,t){const{category:n,search:a}=t;let r=e||[];return n&&"all"!==n&&(r=r.filter((e=>-1!==e.categories.indexOf(n)))),a&&(r=r.filter((e=>e.font_family_settings.name.toLowerCase().includes(a.toLowerCase())))),r}(w,d)),[w,d]),k=(0,se.debounce)((e=>{m({...d,search:e})}),300),P=()=>{m({})},M=function(e){return e.reduce(((e,t)=>({...e,[t.slug]:(t?.fontFace||[]).reduce(((e,t)=>({...e,[`${t.fontStyle}-${t.fontWeight}`]:!0})),{})})),{})}(c);return(0,l.createElement)(mm,{title:i?i.name:E.name,description:i?(0,b.__)("Select font variants to install."):E.description,handleBack:!!i&&(()=>{o(null)}),footer:c.length>0&&(0,l.createElement)(Im,{handleInstall:async()=>{const e=c[0];try{e?.fontFace&&await Promise.all(e.fontFace.map((async e=>{e.src&&(e.file=await async function(e){return 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 em([t],n,{type:t.type})})).catch((t=>{throw console.error(`Error downloading font face asset from ${e}:`,t),t}))}(e.src))})))}catch(e){return void s({type:"error",message:(0,b.__)("Error installing the fonts, could not be downloaded.")})}try{await v(e),s({type:"success",message:(0,b.__)("Fonts were installed successfully.")})}catch(e){s({type:"error",message:e.message})}u([])}})},p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:8}),(0,l.createElement)(Pm,null)),r&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(_.Notice,{isDismissible:!1,status:r.type,className:"font-library-modal__font-collection__notice"},r.message)),(0,l.createElement)(_.__experimentalSpacer,{margin:2})),!p&&!i&&(0,l.createElement)(_.Flex,null,(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalInputControl,{value:d.search,placeholder:(0,b.__)("Font name…"),label:(0,b.__)("Search"),onChange:k,prefix:(0,l.createElement)(_.Icon,{icon:Br}),suffix:d?.search?(0,l.createElement)(_.Icon,{icon:T,onClick:()=>{m({...d,search:""})}}):null})),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.SelectControl,{label:(0,b.__)("Category"),value:d.category,onChange:e=>{m({...d,category:e})}},S&&S.map((e=>(0,l.createElement)("option",{value:e.slug,key:e.slug},e.name)))))),(0,l.createElement)(_.__experimentalSpacer,{margin:4}),!p&&!E?.font_families&&!r&&(0,l.createElement)(_.Spinner,null),!p&&!!E?.font_families?.length&&!C.length&&(0,l.createElement)(_.__experimentalText,null,(0,b.__)("No fonts found. Try with a different search term")),!p&&i&&(0,l.createElement)(Tm,{font:i,handleToggleVariant:(e,t)=>{const n=lm(e,t,c);u(n)},fontToInstallOutline:M}),!p&&!i&&(0,l.createElement)(pm,null,C.map((e=>(0,l.createElement)(_m,{key:e.font_family_settings.slug,font:e.font_family_settings,onClick:()=>{o(e.font_family_settings)}})))))},Nm=n(5723),Om=n.n(Nm),Rm=n(2591),Fm=n.n(Rm);globalThis.fetch;class Dm{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 Bm{constructor(){this.listeners={}}addEventListener(e,t,n){let a=this.listeners[e]||[];n?a.unshift(t):a.push(t),this.listeners[e]=a}removeEventListener(e,t){let n=this.listeners[e]||[],a=n.findIndex((e=>e===t));a>-1&&(n.splice(a,1),this.listeners[e]=n)}dispatch(e){let t=this.listeners[e.type];if(t)for(let n=0,a=t.length;n<a&&e.__mayPropagate;n++)t[n](e)}}const Vm=new Date("1904-01-01T00:00:00+0000").getTime();class Lm{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(Vm+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,a=!1){if(0===(e=e||this.length))return[];t&&(this.currentPosition=t);const r=`${a?"":"u"}int${n}`,s=[];for(;e--;)s.push(this[r]);return s}}class zm{constructor(e){const t={enumerable:!1,get:()=>e};Object.defineProperty(this,"parser",t);const n=e.currentPosition,a={enumerable:!1,get:()=>n};Object.defineProperty(this,"start",a)}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 Gm extends zm{constructor(e,t,n){const{parser:a,start:r}=super(new Lm(e,t,n)),s={enumerable:!1,get:()=>a};Object.defineProperty(this,"p",s);const i={enumerable:!1,get:()=>r};Object.defineProperty(this,"tableStart",i)}}function Hm(e,t,n){let a;Object.defineProperty(e,t,{get:()=>a||(a=n(),a),enumerable:!0})}class Um extends Gm{constructor(e,t,n){const{p:a}=super({offset:0,length:12},t,"sfnt");this.version=a.uint32,this.numTables=a.uint16,this.searchRange=a.uint16,this.entrySelector=a.uint16,this.rangeShift=a.uint16,a.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new Wm(a))),this.tables={},this.directory.forEach((e=>{Hm(this.tables,e.tag.trim(),(()=>n(this.tables,{tag:e.tag,offset:e.offset,length:e.length},t)))}))}}class Wm{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}}const jm=Fm().inflate||void 0;let Zm;class qm extends Gm{constructor(e,t,n){const{p:a}=super({offset:0,length:44},t,"woff");this.signature=a.tag,this.flavor=a.uint32,this.length=a.uint32,this.numTables=a.uint16,a.uint16,this.totalSfntSize=a.uint32,this.majorVersion=a.uint16,this.minorVersion=a.uint16,this.metaOffset=a.uint32,this.metaLength=a.uint32,this.metaOrigLength=a.uint32,this.privOffset=a.uint32,this.privLength=a.uint32,a.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new Ym(a))),Km(this,t,n)}}class Ym{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}}function Km(e,t,n){e.tables={},e.directory.forEach((a=>{Hm(e.tables,a.tag.trim(),(()=>{let r=0,s=t;if(a.compLength!==a.origLength){const e=t.buffer.slice(a.offset,a.offset+a.compLength);let n;if(jm)n=jm(new Uint8Array(e));else{if(!Zm){const e="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(e),new Error(e)}n=Zm(new Uint8Array(e))}s=new DataView(n.buffer)}else r=a.offset;return n(e.tables,{tag:a.tag,offset:r,length:a.origLength},s)}))}))}const Xm=Om();let Jm;class Qm extends Gm{constructor(e,t,n){const{p:a}=super({offset:0,length:48},t,"woff2");this.signature=a.tag,this.flavor=a.uint32,this.length=a.uint32,this.numTables=a.uint16,a.uint16,this.totalSfntSize=a.uint32,this.totalCompressedSize=a.uint32,this.majorVersion=a.uint16,this.minorVersion=a.uint16,this.metaOffset=a.uint32,this.metaLength=a.uint32,this.metaOrigLength=a.uint32,this.privOffset=a.uint32,this.privLength=a.uint32,a.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new $m(a)));let r,s=a.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 i=t.buffer.slice(s);if(Xm)r=Xm(new Uint8Array(i));else{if(!Jm){const t="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(t),new Error(t)}r=new Uint8Array(Jm(i))}!function(e,t,n){e.tables={},e.directory.forEach((a=>{Hm(e.tables,a.tag.trim(),(()=>{const r=a.offset,s=r+(a.transformLength?a.transformLength:a.origLength),i=new DataView(t.slice(r,s).buffer);try{return n(e.tables,{tag:a.tag,offset:0,length:a.origLength},i)}catch(e){console.error(e)}}))}))}(this,r,n)}}class $m{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 ep={};let tp=!1;function np(e,t,n){let a=t.tag.replace(/[^\w\d]/g,""),r=ep[a];return r?new r(t,n,e):(console.warn(`lib-font has no definition for ${a}. The table was skipped.`),{})}function ap(){let e=0;function t(n,a){if(!tp)return e>10?a(new Error("loading took too long")):(e++,setTimeout((()=>t(n)),250));n(np)}return new Promise(((e,n)=>t(e)))}async function rp(e,t,n={}){if(!globalThis.document)return;let a=function(e,t){let n=e.lastIndexOf("."),a=(e.substring(n+1)||"").toLowerCase(),r={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[a];if(r)return r;let s={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."}[a];if(s||(s=`${e} is not a known webfont format.`),t)throw new Error(s);console.warn(`Could not load font: ${s}`)}(t,n.errorOnStyle);if(!a)return;let r=document.createElement("style");r.className="injected-by-Font-js";let s=[];return n.styleRules&&(s=Object.entries(n.styleRules).map((([e,t])=>`${e}: ${t};`))),r.textContent=`\n@font-face {\n font-family: "${e}";\n ${s.join("\n\t")}\n src: url("${t}") format("${a}");\n}`,globalThis.document.head.appendChild(r),r}Promise.all([Promise.resolve().then((function(){return Tp})),Promise.resolve().then((function(){return Pp})),Promise.resolve().then((function(){return Mp})),Promise.resolve().then((function(){return Ap})),Promise.resolve().then((function(){return Np})),Promise.resolve().then((function(){return Fp})),Promise.resolve().then((function(){return Dp})),Promise.resolve().then((function(){return Vp})),Promise.resolve().then((function(){return Kp})),Promise.resolve().then((function(){return oh})),Promise.resolve().then((function(){return rf})),Promise.resolve().then((function(){return sf})),Promise.resolve().then((function(){return cf})),Promise.resolve().then((function(){return mf})),Promise.resolve().then((function(){return pf})),Promise.resolve().then((function(){return hf})),Promise.resolve().then((function(){return gf})),Promise.resolve().then((function(){return yf})),Promise.resolve().then((function(){return vf})),Promise.resolve().then((function(){return _f})),Promise.resolve().then((function(){return bf})),Promise.resolve().then((function(){return Ef})),Promise.resolve().then((function(){return xf})),Promise.resolve().then((function(){return Pf})),Promise.resolve().then((function(){return If})),Promise.resolve().then((function(){return Af})),Promise.resolve().then((function(){return Nf})),Promise.resolve().then((function(){return Of})),Promise.resolve().then((function(){return Rf})),Promise.resolve().then((function(){return Bf})),Promise.resolve().then((function(){return Hf})),Promise.resolve().then((function(){return jf})),Promise.resolve().then((function(){return qf})),Promise.resolve().then((function(){return Xf})),Promise.resolve().then((function(){return Jf})),Promise.resolve().then((function(){return Qf})),Promise.resolve().then((function(){return eg})),Promise.resolve().then((function(){return tg})),Promise.resolve().then((function(){return sg})),Promise.resolve().then((function(){return ig})),Promise.resolve().then((function(){return lg}))]).then((e=>{e.forEach((e=>{let t=Object.keys(e)[0];ep[t]=e[t]})),tp=!0}));const sp=[0,1,0,0],ip=[79,84,84,79],op=[119,79,70,70],lp=[119,79,70,50];function cp(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}class up extends Bm{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 rp(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 a=new Dm("error",n,`Failed to load font at ${t||e}`);this.dispatch(a),this.onerror&&this.onerror(a)}))}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 cp(t,sp)||cp(t,ip)?"SFNT":cp(t,op)?"WOFF":cp(t,lp)?"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 a=new Dm("load",{font:this});this.dispatch(a),this.onload&&this.onload(a)}async parseBasicData(e){return ap().then((t=>("SFNT"===e&&(this.opentype=new Um(this,this.fontData,t)),"WOFF"===e&&(this.opentype=new qm(this,this.fontData,t)),"WOFF2"===e&&(this.opentype=new Qm(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 a=n.getBoundingClientRect();document.body.removeChild(n);const r=this.opentype.tables["OS/2"];return a.fontSize=t,a.ascender=r.sTypoAscender,a.descender=r.sTypoDescender,a}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);const e=new Dm("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 Dm("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}}globalThis.Font=up;class dp extends zm{constructor(e,t,n){super(e),this.plaformID=t,this.encodingID=n}}class mp extends dp{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 pp extends dp{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 a=Math.max(...this.subHeaderKeys),r=e.currentPosition;Hm(this,"subHeaders",(()=>(e.currentPosition=r,[...new Array(a)].map((t=>new hp(e))))));const s=r+8*a;Hm(this,"glyphIndexArray",(()=>(e.currentPosition=s,[...new Array(a)].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,a=this.subHeaders[n],r=this.subHeaders[a],s=r.firstCode,i=s+r.entryCount;return s<=t&&t<=i}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 hp{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 fp extends dp{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 a=e.currentPosition;Hm(this,"endCode",(()=>e.readBytes(this.segCount,a,16)));const r=a+2+this.segCountX2;Hm(this,"startCode",(()=>e.readBytes(this.segCount,r,16)));const s=r+this.segCountX2;Hm(this,"idDelta",(()=>e.readBytes(this.segCount,s,16,!0)));const i=s+this.segCountX2;Hm(this,"idRangeOffset",(()=>e.readBytes(this.segCount,i,16)));const o=i+this.segCountX2,l=this.length-(o-this.tableStart);Hm(this,"glyphIdArray",(()=>e.readBytes(l,o,16))),Hm(this,"segments",(()=>this.buildSegments(i,o,e)))}buildSegments(e,t,n){return[...new Array(this.segCount)].map(((t,a)=>{let r=this.startCode[a],s=this.endCode[a],i=this.idDelta[a],o=this.idRangeOffset[a],l=e+2*a,c=[];if(0===o)for(let e=r+i,t=s+i;e<=t;e++)c.push(e);else for(let e=0,t=s-r;e<=t;e++)n.currentPosition=l+o+2*e,c.push(n.uint16);return{startCode:r,endCode:s,idDelta:i,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 gp extends dp{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;Hm(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 yp extends dp{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;Hm(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new vp(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 vp{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}}class _p extends dp{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;Hm(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 bp extends dp{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;Hm(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Ep(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 a=t.startCharCode+(e-n);return{code:a,unicode:String.fromCodePoint(a)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Ep{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}}class wp extends dp{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;Hm(this,"groups",[...new Array(this.numGroups)].map((t=>new xp(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 xp{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}}class Sp extends dp{constructor(e,t,n){super(e,t,n),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,Hm(this,"varSelectors",(()=>[...new Array(this.numVarSelectorRecords)].map((t=>new Cp(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 Cp{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}}class kp{constructor(e,t){const n=this.platformID=e.uint16,a=this.encodingID=e.uint16,r=this.offset=e.Offset32;Hm(this,"table",(()=>(e.currentPosition=t+r,function(e,t,n){const a=e.uint16;return 0===a?new mp(e,t,n):2===a?new pp(e,t,n):4===a?new fp(e,t,n):6===a?new gp(e,t,n):8===a?new yp(e,t,n):10===a?new _p(e,t,n):12===a?new bp(e,t,n):13===a?new wp(e,t,n):14===a?new Sp(e,t,n):{}}(e,n,a))))}}var Tp=Object.freeze({__proto__:null,cmap:class extends Gm{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 kp(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,a)=>{let r=this.getSubTable(a);return!!r.getGlyphId&&(t=r.getGlyphId(e),0!==t)})),t}supports(e){return this.encodingRecords.some(((t,n)=>{const a=this.getSubTable(n);return a.supports&&!1!==a.supports(e)}))}supportsVariation(e){return this.encodingRecords.some(((t,n)=>{const a=this.getSubTable(n);return a.supportsVariation&&!1!==a.supportsVariation(e)}))}}});var Pp=Object.freeze({__proto__:null,head:class extends Gm{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 Mp=Object.freeze({__proto__:null,hhea:class extends Gm{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 Ip{constructor(e,t){this.advanceWidth=e,this.lsb=t}}var Ap=Object.freeze({__proto__:null,hmtx:class extends Gm{constructor(e,t,n){const{p:a}=super(e,t),r=n.hhea.numberOfHMetrics,s=n.maxp.numGlyphs,i=a.currentPosition;if(Hm(this,"hMetrics",(()=>(a.currentPosition=i,[...new Array(r)].map((e=>new Ip(a.uint16,a.int16)))))),r<s){const e=i+4*r;Hm(this,"leftSideBearings",(()=>(a.currentPosition=e,[...new Array(s-r)].map((e=>a.int16)))))}}}});var Np=Object.freeze({__proto__:null,maxp:class extends Gm{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 Op{constructor(e,t){this.length=e,this.offset=t}}class Rp{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,Hm(this,"string",(()=>(e.currentPosition=t.stringStart+this.offset,function(e,t){const{platformID:n,length:a}=t;if(0===a)return"";if(0===n||3===n){const t=[];for(let n=0,r=a/2;n<r;n++)t[n]=String.fromCharCode(e.uint16);return t.join("")}const r=e.readBytes(a),s=[];return r.forEach((function(e,t){s[t]=String.fromCharCode(e)})),s.join("")}(e,this))))}}var Fp=Object.freeze({__proto__:null,name:class extends Gm{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 Rp(n,this))),1===this.format&&(this.langTagCount=n.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map((e=>new Op(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 Dp=Object.freeze({__proto__:null,OS2:class extends Gm{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 Bp=[".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 Vp=Object.freeze({__proto__:null,post:class extends Gm{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]<Bp.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 Bp[t];let n=this.glyphNameOffsets[e],a=this.glyphNameOffsets[e+1]-n-1;if(0===a)return".notdef.";this.parser.currentPosition=this.namesOffset+n;return this.parser.readBytes(a,this.namesOffset+n,8,!0).map((e=>String.fromCharCode(e))).join("")}}});class Lp extends Gm{constructor(e,t){const{p:n}=super(e,t,"AxisTable");this.baseTagListOffset=n.Offset16,this.baseScriptListOffset=n.Offset16,Hm(this,"baseTagList",(()=>new zp({offset:e.offset+this.baseTagListOffset},t))),Hm(this,"baseScriptList",(()=>new Gp({offset:e.offset+this.baseScriptListOffset},t)))}}class zp extends Gm{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 Gp extends Gm{constructor(e,t){const{p:n}=super(e,t,"BaseScriptListTable");this.baseScriptCount=n.uint16;const a=n.currentPosition;Hm(this,"baseScriptRecords",(()=>(n.currentPosition=a,[...new Array(this.baseScriptCount)].map((e=>new Hp(this.start,n))))))}}class Hp{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,Hm(this,"baseScriptTable",(()=>(t.currentPosition=e+this.baseScriptOffset,new Up(t))))}}class Up{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 Wp(this.start,e))),Hm(this,"baseValues",(()=>(e.currentPosition=this.start+this.baseValuesOffset,new jp(e)))),Hm(this,"defaultMinMax",(()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new Zp(e))))}}class Wp{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,Hm(this,"minMax",(()=>(t.currentPosition=e+this.minMaxOffset,new Zp(t))))}}class jp{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 Yp(this.parser)}}class Zp{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;const t=e.currentPosition;Hm(this,"featMinMaxRecords",(()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map((t=>new qp(e))))))}}class qp{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}}class Yp{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 Kp=Object.freeze({__proto__:null,BASE:class extends Gm{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,Hm(this,"horizAxis",(()=>new Lp({offset:e.offset+this.horizAxisOffset},t))),Hm(this,"vertAxis",(()=>new Lp({offset:e.offset+this.vertAxisOffset},t))),1===this.majorVersion&&1===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,Hm(this,"itemVarStore",(()=>new Lp({offset:e.offset+this.itemVarStoreOffset},t))))}}});class Xp{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 Jp(e))))}}class Jp{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}}class Qp extends zm{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 $p(e))))}}class $p{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}}class eh{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 th extends zm{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 nh(this.parser)}}class nh{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map((t=>e.uint16))}}class ah extends zm{constructor(e){super(e),this.coverageOffset=e.Offset16,Hm(this,"coverage",(()=>(e.currentPosition=this.start+this.coverageOffset,new Qp(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 rh(this.parser)}}class rh extends zm{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 sh(this.parser)}}class sh{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 ih extends zm{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 Qp(this.parser)}}var oh=Object.freeze({__proto__:null,GDEF:class extends Gm{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.glyphClassDefOffset=n.Offset16,Hm(this,"glyphClassDefs",(()=>{if(0!==this.glyphClassDefOffset)return n.currentPosition=this.tableStart+this.glyphClassDefOffset,new Xp(n)})),this.attachListOffset=n.Offset16,Hm(this,"attachList",(()=>{if(0!==this.attachListOffset)return n.currentPosition=this.tableStart+this.attachListOffset,new th(n)})),this.ligCaretListOffset=n.Offset16,Hm(this,"ligCaretList",(()=>{if(0!==this.ligCaretListOffset)return n.currentPosition=this.tableStart+this.ligCaretListOffset,new ah(n)})),this.markAttachClassDefOffset=n.Offset16,Hm(this,"markAttachClassDef",(()=>{if(0!==this.markAttachClassDefOffset)return n.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Xp(n)})),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=n.Offset16,Hm(this,"markGlyphSetsDef",(()=>{if(0!==this.markGlyphSetsDefOffset)return n.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new ih(n)}))),3===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,Hm(this,"itemVarStore",(()=>{if(0!==this.itemVarStoreOffset)return n.currentPosition=this.tableStart+this.itemVarStoreOffset,new eh(n)})))}}});class lh extends zm{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map((t=>new ch(e)))}}class ch{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}}class uh extends zm{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map((t=>new dh(e)))}}class dh{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}}class mh{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 ph extends zm{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map((t=>new hh(e)))}}class hh{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}}class fh extends zm{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 yh(e);if(t.startsWith("cc"))return new gh(e);if(t.startsWith("ss"))return new vh(e)}}}class gh{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 yh{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}}class vh{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}}function _h(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}class bh extends zm{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 Qp(e)}}class Eh{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class wh extends bh{constructor(e){super(e),this.deltaGlyphID=e.int16}}class xh extends bh{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 Sh(t)}}class Sh{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class Ch extends bh{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 kh(t)}}class kh{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class Th extends bh{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 Ph(t)}}class Ph extends zm{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 Mh(t)}}class Mh{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map((t=>e.uint16))}}class Ih extends bh{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&&(_h(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 Eh(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 Ah(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 Oh(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 Qp(t)}}class Ah extends zm{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 Nh(t)}}class Nh{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 Eh(e)))}}class Oh extends zm{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 Rh(t)}}class Rh extends Nh{constructor(e){super(e)}}class Fh extends bh{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&&(_h(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 zh(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 Dh(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 Vh(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 Qp(t)}}class Dh extends zm{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 Bh(t)}}class Bh{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 Eh(e)))}}class Vh extends zm{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 Lh(t)}}class Lh{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 zh(e)))}}class zh extends zm{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class Gh extends zm{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}}class Hh extends bh{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 Uh={buildSubtable:function(e,t){const n=new[void 0,wh,xh,Ch,Th,Ih,Fh,Gh,Hh][e](t);return n.type=e,n}};class Wh extends zm{constructor(e){super(e)}}class jh extends Wh{constructor(e){super(e),console.log("lookup type 1")}}class Zh extends Wh{constructor(e){super(e),console.log("lookup type 2")}}class qh extends Wh{constructor(e){super(e),console.log("lookup type 3")}}class Yh extends Wh{constructor(e){super(e),console.log("lookup type 4")}}class Kh extends Wh{constructor(e){super(e),console.log("lookup type 5")}}class Xh extends Wh{constructor(e){super(e),console.log("lookup type 6")}}class Jh extends Wh{constructor(e){super(e),console.log("lookup type 7")}}class Qh extends Wh{constructor(e){super(e),console.log("lookup type 8")}}class $h extends Wh{constructor(e){super(e),console.log("lookup type 9")}}var ef={buildSubtable:function(e,t){const n=new[void 0,jh,Zh,qh,Yh,Kh,Xh,Jh,Qh,$h][e](t);return n.type=e,n}};class tf extends zm{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map((t=>e.Offset16))}}class nf extends zm{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?Uh:ef;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}}class af extends Gm{constructor(e,t,n){const{p:a,tableStart:r}=super(e,t,n);this.majorVersion=a.uint16,this.minorVersion=a.uint16,this.scriptListOffset=a.Offset16,this.featureListOffset=a.Offset16,this.lookupListOffset=a.Offset16,1===this.majorVersion&&1===this.minorVersion&&(this.featureVariationsOffset=a.Offset32);const s=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Hm(this,"scriptList",(()=>s?lh.EMPTY:(a.currentPosition=r+this.scriptListOffset,new lh(a)))),Hm(this,"featureList",(()=>s?ph.EMPTY:(a.currentPosition=r+this.featureListOffset,new ph(a)))),Hm(this,"lookupList",(()=>s?tf.EMPTY:(a.currentPosition=r+this.lookupListOffset,new tf(a)))),this.featureVariationsOffset&&Hm(this,"featureVariations",(()=>s?FeatureVariations.EMPTY:(a.currentPosition=r+this.featureVariationsOffset,new FeatureVariations(a))))}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 uh(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 mh(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 a=new mh(this.parser);return a.langSysTag=t,a}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 fh(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 nf(this.parser,t)}}var rf=Object.freeze({__proto__:null,GSUB:class extends af{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}}});var sf=Object.freeze({__proto__:null,GPOS:class extends af{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}}});class of extends zm{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map((t=>new lf(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 lf{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}}var cf=Object.freeze({__proto__:null,SVG:class extends Gm{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 of(n)}}});class uf{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 df{constructor(e,t,n){let a=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map((t=>e.fixed)),e.currentPosition-a<n&&(this.postScriptNameID=e.uint16)}}var mf=Object.freeze({__proto__:null,fvar:class extends Gm{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 a=this.tableStart+this.axesArrayOffset;Hm(this,"axes",(()=>(n.currentPosition=a,[...new Array(this.axisCount)].map((e=>new uf(n))))));const r=a+this.axisCount*this.axisSize;Hm(this,"instances",(()=>{let e=[];for(let t=0;t<this.instanceCount;t++)n.currentPosition=r+t*this.instanceSize,e.push(new df(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 pf=Object.freeze({__proto__:null,cvt:class extends Gm{constructor(e,t){const{p:n}=super(e,t),a=e.length/2;Hm(this,"items",(()=>[...new Array(a)].map((e=>n.fword))))}}});var hf=Object.freeze({__proto__:null,fpgm:class extends Gm{constructor(e,t){const{p:n}=super(e,t);Hm(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});class ff{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}}var gf=Object.freeze({__proto__:null,gasp:class extends Gm{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRanges=n.uint16;Hm(this,"gaspRanges",(()=>[...new Array(this.numRanges)].map((e=>new ff(n)))))}}});var yf=Object.freeze({__proto__:null,glyf:class extends Gm{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}}});var vf=Object.freeze({__proto__:null,loca:class extends Gm{constructor(e,t,n){const{p:a}=super(e,t),r=n.maxp.numGlyphs+1;0===n.head.indexToLocFormat?(this.x2=!0,Hm(this,"offsets",(()=>[...new Array(r)].map((e=>a.Offset16))))):Hm(this,"offsets",(()=>[...new Array(r)].map((e=>a.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 _f=Object.freeze({__proto__:null,prep:class extends Gm{constructor(e,t){const{p:n}=super(e,t);Hm(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});var bf=Object.freeze({__proto__:null,CFF:class extends Gm{constructor(e,t){const{p:n}=super(e,t);Hm(this,"data",(()=>n.readBytes()))}}});var Ef=Object.freeze({__proto__:null,CFF2:class extends Gm{constructor(e,t){const{p:n}=super(e,t);Hm(this,"data",(()=>n.readBytes()))}}});class wf{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}}var xf=Object.freeze({__proto__:null,VORG:class extends Gm{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,Hm(this,"vertORiginYMetrics",(()=>[...new Array(this.numVertOriginYMetrics)].map((e=>new wf(n)))))}}});class Sf{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new kf(e),this.vert=new kf(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 Cf{constructor(e){this.hori=new kf(e),this.vert=new kf(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}}class kf{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 Tf extends Gm{constructor(e,t,n){const{p:a}=super(e,t,n);this.majorVersion=a.uint16,this.minorVersion=a.uint16,this.numSizes=a.uint32,Hm(this,"bitMapSizes",(()=>[...new Array(this.numSizes)].map((e=>new Sf(a)))))}}var Pf=Object.freeze({__proto__:null,EBLC:Tf});class Mf extends Gm{constructor(e,t,n){const{p:a}=super(e,t,n);this.majorVersion=a.uint16,this.minorVersion=a.uint16}}var If=Object.freeze({__proto__:null,EBDT:Mf});var Af=Object.freeze({__proto__:null,EBSC:class extends Gm{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.numSizes=n.uint32,Hm(this,"bitmapScales",(()=>[...new Array(this.numSizes)].map((e=>new Cf(n)))))}}});var Nf=Object.freeze({__proto__:null,CBLC:class extends Tf{constructor(e,t){super(e,t,"CBLC")}}});var Of=Object.freeze({__proto__:null,CBDT:class extends Mf{constructor(e,t){super(e,t,"CBDT")}}});var Rf=Object.freeze({__proto__:null,sbix:class extends Gm{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.flags=n.flags(16),this.numStrikes=n.uint32,Hm(this,"strikeOffsets",(()=>[...new Array(this.numStrikes)].map((e=>n.Offset32))))}}});class Ff{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}}class Df{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}}var Bf=Object.freeze({__proto__:null,COLR:class extends Gm{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 Ff(this.parser),a=n.gID,r=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=r;let s=new Ff(this.parser),i=s.gID;if(a===e)return n;if(i===e)return s;for(;t!==r;){let n=t+(r-t)/12;this.parser.currentPosition=n;let a=new Ff(this.parser),s=a.gID;if(s===e)return a;s>e?r=n:s<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 Df(p)))}}});class Vf{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}}class Lf{constructor(e,t){this.paletteTypes=[...new Array(t)].map((t=>e.uint32))}}class zf{constructor(e,t){this.paletteLabels=[...new Array(t)].map((t=>e.uint16))}}class Gf{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map((t=>e.uint16))}}var Hf=Object.freeze({__proto__:null,CPAL:class extends Gm{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numPaletteEntries=n.uint16;const a=this.numPalettes=n.uint16;this.numColorRecords=n.uint16,this.offsetFirstColorRecord=n.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map((e=>n.uint16)),Hm(this,"colorRecords",(()=>(n.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map((e=>new Vf(n)))))),1===this.version&&(this.offsetPaletteTypeArray=n.Offset32,this.offsetPaletteLabelArray=n.Offset32,this.offsetPaletteEntryLabelArray=n.Offset32,Hm(this,"paletteTypeArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new Lf(n,a)))),Hm(this,"paletteLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new zf(n,a)))),Hm(this,"paletteEntryLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new Gf(n,a)))))}}});class Uf{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}}class Wf{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}}var jf=Object.freeze({__proto__:null,DSIG:class extends Gm{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 Uf(n)))}getData(e){const t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new Wf(this.parser)}}});class Zf{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}}var qf=Object.freeze({__proto__:null,hdmx:class extends Gm{constructor(e,t,n){const{p:a}=super(e,t),r=n.hmtx.numGlyphs;this.version=a.uint16,this.numRecords=a.int16,this.sizeDeviceRecord=a.int32,this.records=[...new Array(numRecords)].map((e=>new Zf(a,r)))}}});class Yf{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,Hm(this,"pairs",(()=>[...new Array(this.nPairs)].map((t=>new Kf(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 Kf{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}}var Xf=Object.freeze({__proto__:null,kern:class extends Gm{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.nTables=n.uint16,Hm(this,"tables",(()=>{let e=this.tableStart+4;const t=[];for(let a=0;a<this.nTables;a++){n.currentPosition=e;let a=new Yf(n);t.push(a),e+=a}return t}))}}});var Jf=Object.freeze({__proto__:null,LTSH:class extends Gm{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numGlyphs=n.uint16,this.yPels=n.readBytes(this.numGlyphs)}}});var Qf=Object.freeze({__proto__:null,MERG:class extends Gm{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,Hm(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 $f{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 eg=Object.freeze({__proto__:null,meta:class extends Gm{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 $f(this.tableStart,n)))}}});var tg=Object.freeze({__proto__:null,PCLT:class extends Gm{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 ng{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}}class ag{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map((t=>new rg(e)))}}class rg{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}}var sg=Object.freeze({__proto__:null,VDMX:class extends Gm{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 ng(n))),this.offsets=[...new Array(this.numRatios)].map((e=>n.Offset16)),this.VDMXGroups=[...new Array(this.numRecs)].map((e=>new ag(n)))}}});var ig=Object.freeze({__proto__:null,vhea:class extends Gm{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 og{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}}var lg=Object.freeze({__proto__:null,vmtx:class extends Gm{constructor(e,t,n){super(e,t);const a=n.vhea.numOfLongVerMetrics,r=n.maxp.numGlyphs,s=p.currentPosition;if(lazy(this,"vMetrics",(()=>(p.currentPosition=s,[...new Array(a)].map((e=>new og(p.uint16,p.int16)))))),a<r){const e=s+4*a;lazy(this,"topSideBearings",(()=>(p.currentPosition=e,[...new Array(r-a)].map((e=>p.int16)))))}}}});const{ProgressBar:cg}=Ke(_.privateApis);var ug=function(){const{installFont:e}=(0,f.useContext)(um),[t,n]=(0,f.useState)(null),[a,r]=(0,f.useState)(!1),s=Kd.slice(0,-1).map((e=>`.${e}`)).join(", ")+` ${(0,b.__)("and")} .${Kd.slice(-1)}`;(0,f.useEffect)((()=>{if(t){const e=setTimeout((()=>{n(null)}),5e3);return()=>clearTimeout(e)}}),[t]);const i=e=>{n(null),r(!0);const t=new Set,a=[...e].filter((e=>{if(t.has(e.name))return!1;const n=e.name.split(".").pop().toLowerCase();return!!Kd.includes(n)&&(t.add(e.name),!0)}));a.length>0&&o(a)},o=async e=>{const t=await Promise.all(e.map((async e=>{const t=await c(e);return await rm(t,t.file,"all"),t})));await u(t)},c=async e=>{const t=await async function(e){return new Promise(((t,n)=>{const a=new window.FileReader;a.readAsArrayBuffer(e),a.onload=()=>t(a.result),a.onerror=n}))}(e),n=new up("Uploaded Font");n.fromDataBuffer(t,e.name);const a=(await new Promise((e=>n.onload=e))).detail.font,{name:r}=a.opentype.tables,s=r.get(16)||r.get(1),i=r.get(2).toLowerCase().includes("italic"),o=a.opentype.tables["OS/2"].usWeightClass||"normal",l=!!a.opentype.tables.fvar&&a.opentype.tables.fvar.axes.find((({tag:e})=>"wght"===e));return{file:e,fontFamily:s,fontStyle:i?"italic":"normal",fontWeight:(l?`${l.minValue} ${l.maxValue}`:null)||o}},u=async t=>{const a=function(e){const t=e.reduce(((e,t)=>(e[t.fontFamily]||(e[t.fontFamily]={name:t.fontFamily,fontFamily:t.fontFamily,slug:t.fontFamily.replace(/\s+/g,"-").toLowerCase(),fontFace:[]}),e[t.fontFamily].fontFace.push(t),e)),{});return Object.values(t)}(t);if(a.length>1)return n({type:"error",message:(0,b.__)("Variants from only one font family can be uploaded at a time.")}),void r(!1);try{await e(a[0]),n({type:"success",message:(0,b.__)("Fonts were installed successfully.")})}catch(e){n({type:"error",message:e.message})}r(!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:16}),(0,l.createElement)(_.DropZone,{onFilesDrop:e=>{i(e)}}),(0,l.createElement)(_.__experimentalVStack,{className:"font-library-modal__local-fonts"},!a&&(0,l.createElement)(_.FormFileUpload,{accept:Kd.map((e=>`.${e}`)).join(","),multiple:!0,onChange:e=>{i(e.target.files)},render:({openFileDialog:e})=>(0,l.createElement)(_.Button,{className:"font-library-modal__upload-area",onClick:e},(0,l.createElement)("span",null,(0,b.__)("Upload font")))}),a&&(0,l.createElement)(_.FlexItem,null,(0,l.createElement)("div",{className:"font-library-modal__upload-area"},(0,l.createElement)(cg,null))),(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__upload-area__text"},(0,b.sprintf)((0,b.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: %s."),s)),!a&&t&&(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(_.Notice,{isDismissible:!1,status:t.type,className:"font-library-modal__upload-area__notice"},t.message))))};var dg=function(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:8}),(0,l.createElement)(ug,null))};const{Tabs:mg}=Ke(_.privateApis),pg=[{id:"installed-fonts",title:(0,b.__)("Library")},{id:"upload-fonts",title:(0,b.__)("Upload")}],hg=e=>e.map((({slug:t,name:n})=>({id:t,title:1===e.length&&"default-font-collection"===t?(0,b.__)("Install Fonts"):n})));var fg=function({onRequestClose:e,initialTabId:t="installed-fonts"}){const{collections:n}=(0,f.useContext)(um),a=[...pg,...hg(n||[])];return(0,l.createElement)(_.Modal,{title:(0,b.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal"},(0,l.createElement)("div",{className:"font-library-modal__tabs"},(0,l.createElement)(mg,{initialTabId:t},(0,l.createElement)(mg.TabList,null,a.map((({id:e,title:t})=>(0,l.createElement)(mg.Tab,{key:e,tabId:e},t)))),a.map((({id:e})=>{let t;switch(e){case"upload-fonts":t=(0,l.createElement)(dg,null);break;case"installed-fonts":t=(0,l.createElement)(Sm,null);break;default:t=(0,l.createElement)(Am,{slug:e})}return(0,l.createElement)(mg.TabPanel,{key:e,tabId:e,focusable:!1},t)})))))};var gg=function({font:e}){const{handleSetLibraryFontSelected:t,toggleModal:n}=(0,f.useContext)(um),a=e?.fontFace?.length||1,r=$d(e);return(0,l.createElement)(_.__experimentalItem,{onClick:()=>{t(e),n("installed-fonts")}},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,{style:r},e.name),(0,l.createElement)(_.FlexItem,{className:"edit-site-global-styles-screen-typography__font-variants-count"},(0,b.sprintf)((0,b._n)("%d variant","%d variants",a),a))))};function yg(){const{modalTabOpen:e,toggleModal:t,themeFonts:n,customFonts:a}=(0,f.useContext)(um),r=0<a.length||0<n.length;return(0,l.createElement)(l.Fragment,null,!!e&&(0,l.createElement)(fg,{onRequestClose:()=>t(),initialTabName:e}),(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(xd,{level:3},(0,b.__)("Fonts")),(0,l.createElement)(_.__experimentalHStack,{justify:"flex-end"},(0,l.createElement)(_.Tooltip,{text:(0,b.__)("Manage fonts")},(0,l.createElement)(_.Button,{onClick:()=>t("installed-fonts"),"aria-label":(0,b.__)("Manage fonts"),icon:$u,size:"small"})))),r?(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},a.map((e=>(0,l.createElement)(gg,{key:e.slug,font:e}))),n.map((e=>(0,l.createElement)(gg,{key:e.slug,font:e})))):(0,l.createElement)(l.Fragment,null,(0,b.__)("No fonts installed."))))}var vg=({...e})=>(0,l.createElement)(dm,null,(0,l.createElement)(yg,{...e}));var _g=function(){const e=(0,d.useSelect)((e=>e(g.store).getEditorSettings().fontLibraryEnabled),[]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{title:(0,b.__)("Typography"),description:(0,b.__)("Manage the typography settings for different elements.")}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-typography"},(0,l.createElement)(_.__experimentalVStack,{spacing:6},e&&(0,l.createElement)(vg,null),(0,l.createElement)(Zd,null))))};const{useGlobalStyle:bg,useGlobalSetting:Eg,useSettingsForBlockElement:wg,TypographyPanel:xg}=Ke(he.privateApis);function Sg({element:e,headingLevel:t}){let n=[];"heading"===e?n=n.concat(["elements",t]):e&&"text"!==e&&(n=n.concat(["elements",e]));const a=n.join("."),[r]=bg(a,void 0,"user",{shouldDecodeEncode:!1}),[s,i]=bg(a,void 0,"all",{shouldDecodeEncode:!1}),[o]=Eg(""),c=wg(o,void 0,"heading"===e?t:e);return(0,l.createElement)(xg,{inheritedValue:s,value:r,onChange:i,settings:c})}const{useGlobalStyle:Cg}=Ke(he.privateApis);function kg({name:e,element:t,headingLevel:n}){let a="";"heading"===t?a=`elements.${n}.`:t&&"text"!==t&&(a=`elements.${t}.`);const[r]=Cg(a+"typography.fontFamily",e),[s]=Cg(a+"color.gradient",e),[i]=Cg(a+"color.background",e),[o]=Cg(a+"color.text",e),[c]=Cg(a+"typography.fontSize",e),[u]=Cg(a+"typography.fontStyle",e),[d]=Cg(a+"typography.fontWeight",e),[m]=Cg(a+"typography.letterSpacing",e),p="link"===t?{textDecoration:"underline"}:{};return(0,l.createElement)("div",{className:"edit-site-typography-preview",style:{fontFamily:null!=r?r:"serif",background:null!=s?s:i,color:o,fontSize:c,fontStyle:u,fontWeight:d,letterSpacing:m,...p}},"Aa")}const Tg={text:{description:(0,b.__)("Manage the fonts used on the site."),title:(0,b.__)("Text")},link:{description:(0,b.__)("Manage the fonts and typography used on the links."),title:(0,b.__)("Links")},heading:{description:(0,b.__)("Manage the fonts and typography used on headings."),title:(0,b.__)("Headings")},caption:{description:(0,b.__)("Manage the fonts and typography used on captions."),title:(0,b.__)("Captions")},button:{description:(0,b.__)("Manage the fonts and typography used on buttons."),title:(0,b.__)("Buttons")}};var Pg=function({element:e}){const[t,n]=(0,f.useState)("heading");return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{title:Tg[e].title,description:Tg[e].description}),(0,l.createElement)(_.__experimentalSpacer,{marginX:4},(0,l.createElement)(kg,{element:e,headingLevel:t})),"heading"===e&&(0,l.createElement)(_.__experimentalSpacer,{marginX:4,marginBottom:"1em"},(0,l.createElement)(_.__experimentalToggleGroupControl,{label:(0,b.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:n,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0},(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"heading",label:(0,b.__)("All")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h1",label:(0,b.__)("H1")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h2",label:(0,b.__)("H2")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h3",label:(0,b.__)("H3")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h4",label:(0,b.__)("H4")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h5",label:(0,b.__)("H5")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h6",label:(0,b.__)("H6")}))),(0,l.createElement)(Sg,{element:e,headingLevel:t}))};var Mg=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG"},(0,l.createElement)(E.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"}));var Ig=function({className:e,...t}){return(0,l.createElement)(_.Flex,{className:v()("edit-site-global-styles__color-indicator-wrapper",e),...t})};const{useGlobalSetting:Ag}=Ke(he.privateApis),Ng=[];var Og=function({name:e}){const[t]=Ag("color.palette.custom"),[n]=Ag("color.palette.theme"),[a]=Ag("color.palette.default"),[r]=Ag("color.defaultPalette",e),[s]=function(e){const[t,n]=Xe("color.palette.theme",e);return window.__experimentalEnableColorRandomizer?[function(){const e=Math.floor(225*Math.random()),a=t.map((t=>{const{color:n}=t,a=Ue(n).rotate(e).toHex();return{...t,color:a}}));n(a)}]:[]}(),i=(0,f.useMemo)((()=>[...t||Ng,...n||Ng,...a&&r?a:Ng]),[t,n,a,r]),o=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette",c=i.length>0?(0,b.sprintf)((0,b._n)("%d color","%d colors",i.length),i.length):(0,b.__)("Add custom colors");return(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(xd,{level:3},(0,b.__)("Palette")),(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,l.createElement)(Qu,{path:o,"aria-label":(0,b.__)("Color palettes")},(0,l.createElement)(_.__experimentalHStack,{direction:0===i.length?"row-reverse":"row"},(0,l.createElement)(_.__experimentalZStack,{isLayered:!1,offset:-8},i.slice(0,5).map((({color:e},t)=>(0,l.createElement)(Ig,{key:`${e}-${t}`},(0,l.createElement)(_.ColorIndicator,{colorValue:e}))))),(0,l.createElement)(_.FlexItem,null,c)))),window.__experimentalEnableColorRandomizer&&n?.length>0&&(0,l.createElement)(_.Button,{variant:"secondary",icon:Mg,onClick:s},(0,b.__)("Randomize colors")))};const{useGlobalStyle:Rg,useGlobalSetting:Fg,useSettingsForBlockElement:Dg,ColorPanel:Bg}=Ke(he.privateApis);var Vg=function(){const[e]=Rg("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Rg("",void 0,"all",{shouldDecodeEncode:!1}),[a]=Fg(""),r=Dg(a);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{title:(0,b.__)("Colors"),description:(0,b.__)("Manage palettes and the default color of different global elements on the site.")}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-colors"},(0,l.createElement)(_.__experimentalVStack,{spacing:10},(0,l.createElement)(Og,null),(0,l.createElement)(Bg,{inheritedValue:t,value:e,onChange:n,settings:r}))))};const{useGlobalSetting:Lg}=Ke(he.privateApis),zg={placement:"bottom-start",offset:8};function Gg({name:e}){const[t,n]=Lg("color.palette.theme",e),[a]=Lg("color.palette.theme",e,"base"),[r,s]=Lg("color.palette.default",e),[i]=Lg("color.palette.default",e,"base"),[o,c]=Lg("color.palette.custom",e),[u]=Lg("color.defaultPalette",e),d=(0,se.useViewportMatch)("small","<")?zg:void 0;return(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:10},!!t&&!!t.length&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:t!==a,canOnlyChangeValues:!0,colors:t,onChange:n,paletteLabel:(0,b.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:d}),!!r&&!!r.length&&!!u&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:r!==i,canOnlyChangeValues:!0,colors:r,onChange:s,paletteLabel:(0,b.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:d}),(0,l.createElement)(_.__experimentalPaletteEdit,{colors:o,onChange:c,paletteLabel:(0,b.__)("Custom"),paletteLabelHeadingLevel:3,emptyMessage:(0,b.__)("Custom colors are empty! Add some colors to create your own color palette."),slugPrefix:"custom-",popoverProps:d}))}const{useGlobalSetting:Hg}=Ke(he.privateApis),Ug={placement:"bottom-start",offset:8},Wg=()=>{};function jg({name:e}){const[t,n]=Hg("color.gradients.theme",e),[a]=Hg("color.gradients.theme",e,"base"),[r,s]=Hg("color.gradients.default",e),[i]=Hg("color.gradients.default",e,"base"),[o,c]=Hg("color.gradients.custom",e),[u]=Hg("color.defaultGradients",e),[d]=Hg("color.duotone.custom")||[],[m]=Hg("color.duotone.default")||[],[p]=Hg("color.duotone.theme")||[],[h]=Hg("color.defaultDuotone"),f=[...d||[],...p||[],...m&&h?m:[]],g=(0,se.useViewportMatch)("small","<")?Ug:void 0;return(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:10},!!t&&!!t.length&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:t!==a,canOnlyChangeValues:!0,gradients:t,onChange:n,paletteLabel:(0,b.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:g}),!!r&&!!r.length&&!!u&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:r!==i,canOnlyChangeValues:!0,gradients:r,onChange:s,paletteLabel:(0,b.__)("Default"),paletteLabelLevel:3,popoverProps:g}),(0,l.createElement)(_.__experimentalPaletteEdit,{gradients:o,onChange:c,paletteLabel:(0,b.__)("Custom"),paletteLabelLevel:3,emptyMessage:(0,b.__)("Custom gradients are empty! Add some gradients to create your own palette."),slugPrefix:"custom-",popoverProps:g}),!!f&&!!f.length&&(0,l.createElement)("div",null,(0,l.createElement)(xd,{level:3},(0,b.__)("Duotone")),(0,l.createElement)(_.__experimentalSpacer,{margin:3}),(0,l.createElement)(_.DuotonePicker,{duotonePalette:f,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:Wg})))}const{Tabs:Zg}=Ke(_.privateApis);var qg=function({name:e}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{title:(0,b.__)("Palette"),description:(0,b.__)("Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.")}),(0,l.createElement)(Zg,null,(0,l.createElement)(Zg.TabList,null,(0,l.createElement)(Zg.Tab,{tabId:"solid"},"Solid"),(0,l.createElement)(Zg.Tab,{tabId:"gradient"},"Gradient")),(0,l.createElement)(Zg.TabPanel,{tabId:"solid",focusable:!1},(0,l.createElement)(Gg,{name:e})),(0,l.createElement)(Zg.TabPanel,{tabId:"gradient",focusable:!1},(0,l.createElement)(jg,{name:e}))))};const{useGlobalStyle:Yg,useGlobalSetting:Kg,useSettingsForBlockElement:Xg,DimensionsPanel:Jg}=Ke(he.privateApis),Qg={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,childLayout:!1};function $g(){const[e]=Yg("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Yg("",void 0,"all",{shouldDecodeEncode:!1}),[a]=Kg("",void 0,"user"),[r,s]=Kg(""),i=Xg(r),o=(0,f.useMemo)((()=>({...t,layout:i.layout})),[t,i.layout]),c=(0,f.useMemo)((()=>({...e,layout:a.layout})),[e,a.layout]);return(0,l.createElement)(Jg,{inheritedValue:o,value:c,onChange:e=>{const t={...e};if(delete t.layout,n(t),e.layout!==a.layout){const t={...a,layout:e.layout};t.layout?.definitions&&delete t.layout.definitions,s(t)}},settings:i,includeLayoutControls:!0,defaultControls:Qg})}const{useHasDimensionsPanel:ey,useGlobalSetting:ty,useSettingsForBlockElement:ny}=Ke(he.privateApis);var ay=function(){const[e]=ty(""),t=ny(e),n=ey(t);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{title:(0,b.__)("Layout")}),n&&(0,l.createElement)($g,null))};var ry=function(){const{mode:e}=(0,d.useSelect)((e=>({mode:e(he.store).__unstableGetEditorMode()})),[]),t=(0,f.useRef)(null);(0,f.useEffect)((()=>{"zoom-out"!==e&&(t.current=!1)}),[e]),(0,f.useEffect)((()=>{if("zoom-out"!==e)return n("zoom-out"),t.current=!0,()=>{t.current&&n(e)}}),[]);const{__unstableSetEditorMode:n}=(0,d.useDispatch)(he.store);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{back:"/",title:(0,b.__)("Browse styles"),description:(0,b.__)("Choose a variation to change the look of the site.")}),(0,l.createElement)(_.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-style-variations"},(0,l.createElement)(_.CardBody,null,(0,l.createElement)(Ha,null))))};const{useGlobalStyle:sy,AdvancedPanel:iy}=Ke(he.privateApis);var oy=function(){const e=(0,b.__)("Add your own CSS to customize the appearance and layout of your site."),[t]=sy("",void 0,"user",{shouldDecodeEncode:!1}),[n,a]=sy("",void 0,"all",{shouldDecodeEncode:!1});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{title:(0,b.__)("CSS"),description:(0,l.createElement)(l.Fragment,null,e,(0,l.createElement)(_.ExternalLink,{href:"https://wordpress.org/documentation/article/css/",className:"edit-site-global-styles-screen-css-help-link"},(0,b.__)("Learn more about CSS")))}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-css"},(0,l.createElement)(iy,{value:t,onChange:a,inheritedValue:n})))};const{ExperimentalBlockEditorProvider:ly,GlobalStylesContext:cy,useGlobalStylesOutputWithConfig:uy}=Ke(he.privateApis);function dy(e){return!e||0===Object.keys(e).length}var my=function({userConfig:e,blocks:t}){const{base:n}=(0,f.useContext)(cy),a=(0,f.useMemo)((()=>dy(e)||dy(n)?{}:Ma(n,e)),[n,e]),r=(0,f.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),s=(0,d.useSelect)((e=>e(he.store).getSettings()),[]),i=(0,f.useMemo)((()=>({...s,__unstableIsPreviewMode:!0})),[s]),[o]=uy(a),c=dy(o)||dy(e)?i.styles:o;return(0,l.createElement)($a,{title:(0,b.__)("Revisions"),closeButtonLabel:(0,b.__)("Close revisions"),enableResizing:!0},(0,l.createElement)(he.__unstableIframe,{className:"edit-site-revisions__iframe",name:"revisions",tabIndex:0},(0,l.createElement)(he.__unstableEditorStyles,{styles:c}),(0,l.createElement)("style",null,".is-root-container { display: flow-root; }"),(0,l.createElement)(_.Disabled,{className:"edit-site-revisions__example-preview__content"},(0,l.createElement)(ly,{value:r,settings:i},(0,l.createElement)(he.BlockList,{renderAppender:!1})))))};const{getGlobalStylesChanges:py}=Ke(he.privateApis);function hy({revision:e,previousRevision:t}){const n=py(e,t,{maxResults:7});return n.length?(0,l.createElement)("span",{"data-testid":"global-styles-revision-changes",className:"edit-site-global-styles-screen-revisions__changes"},n.join(", ")):null}var fy=function({userRevisions:e,selectedRevisionId:t,onChange:n,canApplyRevision:a,onApplyRevision:r}){const{currentThemeName:s,currentUser:i}=(0,d.useSelect)((e=>{const{getCurrentTheme:t,getCurrentUser:n}=e(ge.store),a=t();return{currentThemeName:a?.name?.rendered||a?.stylesheet,currentUser:n()}}),[]),o=(0,_r.getDate)().getTime(),{datetimeAbbreviated:c}=(0,_r.getSettings)().formats;return(0,l.createElement)("ol",{className:"edit-site-global-styles-screen-revisions__revisions-list","aria-label":(0,b.__)("Global styles revisions list"),role:"group"},e.map(((u,d)=>{const{id:m,author:p,modified:h}=u,f="unsaved"===m,g=f?i:p,y=g?.name||(0,b.__)("User"),E=g?.avatar_urls?.[48],w=t?t===m:0===d,x=!a&&w,S="parent"===m,C=(0,_r.getDate)(h),k=h&&o-C.getTime()>864e5?(0,_r.dateI18n)(c,C):(0,_r.humanTimeDiff)(h),T=function(e,t,n,a){return"parent"===e?(0,b.__)("Reset the styles to the theme defaults"):"unsaved"===e?(0,b.sprintf)((0,b.__)("Unsaved changes by %s"),t):a?(0,b.sprintf)((0,b.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,n):(0,b.sprintf)((0,b.__)("Changes saved by %1$s on %2$s"),t,n)}(m,y,(0,_r.dateI18n)(c,C),x);return(0,l.createElement)("li",{className:v()("edit-site-global-styles-screen-revisions__revision-item",{"is-selected":w,"is-active":x,"is-reset":S}),key:m,"aria-current":w},(0,l.createElement)(_.Button,{className:"edit-site-global-styles-screen-revisions__revision-button",disabled:w,onClick:()=>{n(u)},"aria-label":T},S?(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},(0,b.__)("Default styles"),(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},s)):(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},f?(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__date"},(0,b.__)("(Unsaved)")):(0,l.createElement)("time",{className:"edit-site-global-styles-screen-revisions__date",dateTime:h},k),(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},(0,l.createElement)("img",{alt:y,src:E}),y),w&&(0,l.createElement)(hy,{revision:u,previousRevision:d<e.length?e[d+1]:{}}))),w&&(x?(0,l.createElement)("p",{className:"edit-site-global-styles-screen-revisions__applied-text"},(0,b.__)("These styles are already applied to your site.")):(0,l.createElement)(_.Button,{disabled:x,variant:"primary",className:"edit-site-global-styles-screen-revisions__apply-button",onClick:r},S?(0,b.__)("Reset to defaults"):(0,b.__)("Apply"))))})))};function gy({currentPage:e,numPages:t,changePage:n,totalItems:a,className:r,disabled:s=!1,buttonVariant:i="tertiary",label:o=(0,b.__)("Pagination Navigation")}){return(0,l.createElement)(_.__experimentalHStack,{expanded:!1,as:"nav","aria-label":o,spacing:3,justify:"flex-start",className:v()("edit-site-pagination",r)},(0,l.createElement)(_.__experimentalText,{variant:"muted",className:"edit-site-pagination__total"},(0,b.sprintf)((0,b._n)("%s item","%s items",a),a)),(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(1),disabled:s||1===e,"aria-label":(0,b.__)("First page")},"«"),(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(e-1),disabled:s||1===e,"aria-label":(0,b.__)("Previous page")},"")),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.sprintf)((0,b._x)("%1$s of %2$s","paging"),e,t)),(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(e+1),disabled:s||e===t,"aria-label":(0,b.__)("Next page")},""),(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(t),disabled:s||e===t,"aria-label":(0,b.__)("Last page")},"»")))}const{GlobalStylesContext:yy,areGlobalStyleConfigsEqual:vy}=Ke(he.privateApis);var _y=function(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),{user:t,setUserConfig:n}=(0,f.useContext)(yy),{blocks:a,editorCanvasContainerView:r}=(0,d.useSelect)((e=>({editorCanvasContainerView:Ke(e(ta)).getEditorCanvasContainerView(),blocks:e(he.store).getBlocks()})),[]),[s,i]=(0,f.useState)(1),[o,c]=(0,f.useState)([]),{revisions:u,isLoading:m,hasUnsavedChanges:p,revisionsCount:h}=vr({query:{per_page:10,page:s}}),g=Math.ceil(h/10),[y,v]=(0,f.useState)(t),[E,w]=(0,f.useState)(!1),{setEditorCanvasContainerView:x}=Ke((0,d.useDispatch)(ta)),S=vy(y,t),C=()=>{e("/"),x(void 0)},k=e=>{n((()=>({styles:e?.styles,settings:e?.settings}))),w(!1),C()};(0,f.useEffect)((()=>{r&&r.startsWith("global-styles-revisions")||(e("/"),x(r))}),[r]),(0,f.useEffect)((()=>{!m&&u.length&&c(u)}),[u,m]);const T=u[0],P=y?.id,M=!!T?.id&&!S&&!P;(0,f.useEffect)((()=>{M&&v({styles:T?.styles||{},settings:T?.settings||{},id:T?.id})}),[M,T]);const I=!!P&&"unsaved"!==P&&!S,A=!!o.length;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dd,{title:h&&(0,b.sprintf)((0,b.__)("Revisions (%s)"),h),description:(0,b.__)('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:C}),!A&&(0,l.createElement)(_.Spinner,{className:"edit-site-global-styles-screen-revisions__loading"}),A&&("global-styles-revisions:style-book"===r?(0,l.createElement)(pr,{userConfig:y,isSelected:()=>{},onClose:()=>{x("global-styles-revisions")}}):(0,l.createElement)(my,{blocks:a,userConfig:y,closeButtonLabel:(0,b.__)("Close revisions")})),(0,l.createElement)(fy,{onChange:e=>{v({styles:e?.styles||{},settings:e?.settings||{},id:e?.id})},selectedRevisionId:P,userRevisions:o,canApplyRevision:I,onApplyRevision:()=>p?w(!0):k(y)}),g>1&&(0,l.createElement)("div",{className:"edit-site-global-styles-screen-revisions__footer"},(0,l.createElement)(gy,{className:"edit-site-global-styles-screen-revisions__pagination",currentPage:s,numPages:g,changePage:i,totalItems:h,disabled:m,label:(0,b.__)("Global Styles pagination navigation")})),E&&(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:E,confirmButtonText:(0,b.__)("Apply"),onConfirm:()=>k(y),onCancel:()=>w(!1)},(0,b.__)("Any unsaved changes will be lost when you apply this revision.")))};const{useGlobalStylesReset:by}=Ke(he.privateApis),{Slot:Ey,Fill:wy}=(0,_.createSlotFill)("GlobalStylesMenu");function xy(){const[e,t]=by(),{toggle:n}=(0,d.useDispatch)(k.store),{canEditCSS:a}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(ge.store),a=n(),r=a?t("root","globalStyles",a):void 0;return{canEditCSS:!!r?._links?.["wp:action-edit-css"]}}),[]),{setEditorCanvasContainerView:r}=Ke((0,d.useDispatch)(ta)),{goTo:s}=(0,_.__experimentalUseNavigator)(),i=()=>{r("global-styles-css"),s("/css")};return(0,l.createElement)(wy,null,(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("More")},(({onClose:r})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuGroup,null,a&&(0,l.createElement)(_.MenuItem,{onClick:i},(0,b.__)("Additional CSS")),(0,l.createElement)(_.MenuItem,{onClick:()=>{n("core/edit-site","welcomeGuideStyles"),r()}},(0,b.__)("Welcome Guide"))),(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{t(),r()},disabled:!e},(0,b.__)("Reset styles")))))))}function Sy({className:e,...t}){return(0,l.createElement)(_.__experimentalNavigatorScreen,{className:["edit-site-global-styles-sidebar__navigator-screen",e].filter(Boolean).join(" "),...t})}function Cy({parentMenu:e,blockStyles:t,blockName:n}){return t.map(((t,a)=>(0,l.createElement)(Sy,{key:a,path:e+"/variations/"+t.name},(0,l.createElement)(Ud,{name:n,variation:t.name}))))}function ky({name:e,parentMenu:t=""}){const n=(0,d.useSelect)((t=>{const{getBlockStyles:n}=t(c.store);return n(e)}),[e]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Sy,{path:t+"/colors/palette"},(0,l.createElement)(qg,{name:e})),!!n?.length&&(0,l.createElement)(Cy,{parentMenu:t,blockStyles:n,blockName:e}))}function Ty(){const e=(0,_.__experimentalUseNavigator)(),{path:t}=e.location;return(0,l.createElement)(pr,{isSelected:e=>t===`/blocks/${encodeURIComponent(e)}`||t.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t=>{e.goTo("/blocks/"+encodeURIComponent(t))}})}function Py(){const e=(0,_.__experimentalUseNavigator)(),{selectedBlockName:t,selectedBlockClientId:n}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n}=e(he.store),a=t();return{selectedBlockName:n(a),selectedBlockClientId:a}}),[]),a=vd(t);(0,f.useEffect)((()=>{if(!n||!a)return;const r=e.location.path;if("/blocks"!==r&&!r.startsWith("/blocks/"))return;const s="/blocks/"+encodeURIComponent(t);s!==r&&e.goTo(s,{skipFocus:!0})}),[n,t,a])}function My(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),t=(0,d.useSelect)((e=>Ke(e(ta)).getEditorCanvasContainerView()),[]);(0,f.useEffect)((()=>{switch(t){case"global-styles-revisions":case"global-styles-revisions:style-book":e("/revisions");break;case"global-styles-css":e("/css");break;default:e("/")}}),[t,e])}var Iy=function(){const e=(0,c.getBlockTypes)(),t=(0,d.useSelect)((e=>Ke(e(ta)).getEditorCanvasContainerView()),[]);return(0,l.createElement)(_.__experimentalNavigatorProvider,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/"},(0,l.createElement)(Sy,{path:"/"},(0,l.createElement)(ld,null)),(0,l.createElement)(Sy,{path:"/variations"},(0,l.createElement)(ry,null)),(0,l.createElement)(Sy,{path:"/blocks"},(0,l.createElement)(Ed,null)),(0,l.createElement)(Sy,{path:"/typography"},(0,l.createElement)(_g,null)),(0,l.createElement)(Sy,{path:"/typography/text"},(0,l.createElement)(Pg,{element:"text"})),(0,l.createElement)(Sy,{path:"/typography/link"},(0,l.createElement)(Pg,{element:"link"})),(0,l.createElement)(Sy,{path:"/typography/heading"},(0,l.createElement)(Pg,{element:"heading"})),(0,l.createElement)(Sy,{path:"/typography/caption"},(0,l.createElement)(Pg,{element:"caption"})),(0,l.createElement)(Sy,{path:"/typography/button"},(0,l.createElement)(Pg,{element:"button"})),(0,l.createElement)(Sy,{path:"/colors"},(0,l.createElement)(Vg,null)),(0,l.createElement)(Sy,{path:"/layout"},(0,l.createElement)(ay,null)),(0,l.createElement)(Sy,{path:"/css"},(0,l.createElement)(oy,null)),(0,l.createElement)(Sy,{path:"/revisions"},(0,l.createElement)(_y,null)),e.map((e=>(0,l.createElement)(Sy,{key:"menu-block-"+e.name,path:"/blocks/"+encodeURIComponent(e.name)},(0,l.createElement)(Ud,{name:e.name})))),(0,l.createElement)(ky,null),e.map((e=>(0,l.createElement)(ky,{key:"screens-block-"+e.name,name:e.name,parentMenu:"/blocks/"+encodeURIComponent(e.name)}))),"style-book"===t&&(0,l.createElement)(Ty,null),(0,l.createElement)(xy,null),(0,l.createElement)(Py,null),(0,l.createElement)(My,null))};function Ay(){const{shouldClearCanvasContainerView:e,isStyleBookOpened:t,showListViewByDefault:n,hasRevisions:a,isRevisionsOpened:r,isRevisionsStyleBookOpened:s}=(0,d.useSelect)((e=>{const{getActiveComplementaryArea:t}=e(W),{getEditorCanvasContainerView:n,getCanvasMode:a}=Ke(e(ta)),r=n(),s="visual"===e(ta).getEditorMode(),i="edit"===a(),o=e(k.store).get("core","showListViewByDefault"),{getEntityRecord:l,__experimentalGetCurrentGlobalStylesId:c}=e(ge.store),u=c(),d=u?l("root","globalStyles",u):void 0;return{isStyleBookOpened:"style-book"===r,shouldClearCanvasContainerView:"edit-site/global-styles"!==t("core/edit-site")||!s||!i,showListViewByDefault:o,hasRevisions:!!d?._links?.["version-history"]?.[0]?.count,isRevisionsStyleBookOpened:"global-styles-revisions:style-book"===r,isRevisionsOpened:"global-styles-revisions"===r}}),[]),{setEditorCanvasContainerView:i}=Ke((0,d.useDispatch)(ta));(0,f.useEffect)((()=>{e&&i(void 0)}),[e]);const{setIsListViewOpened:o}=(0,d.useDispatch)(g.store),{goTo:c}=(0,_.__experimentalUseNavigator)();return(0,l.createElement)(Ku,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,b.__)("Styles"),icon:ia,closeLabel:(0,b.__)("Close Styles"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,l.createElement)(_.Flex,{className:"edit-site-global-styles-sidebar__header",role:"menubar","aria-label":(0,b.__)("Styles actions")},(0,l.createElement)(_.FlexBlock,{style:{minWidth:"min-content"}},(0,l.createElement)("strong",null,(0,b.__)("Styles"))),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Button,{icon:_a,label:(0,b.__)("Style Book"),isPressed:t||s,disabled:e,onClick:()=>{r?i("global-styles-revisions:style-book"):s?i("global-styles-revisions"):(o(t&&n),i(t?void 0:"style-book"))}})),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Button,{label:(0,b.__)("Revisions"),icon:br,onClick:()=>(o(!1),s?(c("/"),void i("style-book")):r?(c("/"),void i(void 0)):(c("/revisions"),void i(t?"global-styles-revisions:style-book":"global-styles-revisions"))),disabled:!a,isPressed:r||s})),(0,l.createElement)(Ey,null))},(0,l.createElement)(Iy,null))}const Ny="edit-site/template",Oy="edit-site/block-inspector";var Ry=({sidebarName:e})=>{const{isEditingPage:t,entityType:n}=(0,d.useSelect)((e=>{const{getEditedPostType:t,isPage:n}=e(ta),{getRenderingMode:a}=e(g.store);return{isEditingPage:n()&&"template-only"!==a(),entityType:t()}})),a=Ft[n]||Ft[Ct],{enableComplementaryArea:r}=(0,d.useDispatch)(W);let s;return s=t?e===Ny?(0,b.__)("Page (selected)"):(0,b.__)("Page"):e===Ny?(0,b.sprintf)((0,b.__)("%s (selected)"),a):a,(0,l.createElement)("ul",null,(0,l.createElement)("li",null,(0,l.createElement)(_.Button,{onClick:()=>r(Qt,Ny),className:v()("edit-site-sidebar-edit-mode__panel-tab",{"is-active":e===Ny}),"aria-label":s,"data-label":t?(0,b.__)("Page"):a},t?(0,b.__)("Page"):a)),(0,l.createElement)("li",null,(0,l.createElement)(_.Button,{onClick:()=>r(Qt,Oy),className:v()("edit-site-sidebar-edit-mode__panel-tab",{"is-active":e===Oy}),"aria-label":e===Oy?(0,b.__)("Block (selected)"):(0,b.__)("Block"),"data-label":(0,b.__)("Block")},(0,b.__)("Block"))))};function Fy({className:e,title:t,icon:n,description:a,actions:r,children:s}){return(0,l.createElement)("div",{className:v()("edit-site-sidebar-card",e)},(0,l.createElement)(_.Icon,{className:"edit-site-sidebar-card__icon",icon:n}),(0,l.createElement)("div",{className:"edit-site-sidebar-card__content"},(0,l.createElement)("div",{className:"edit-site-sidebar-card__header"},(0,l.createElement)("h2",{className:"edit-site-sidebar-card__title"},t),r),(0,l.createElement)("div",{className:"edit-site-sidebar-card__description"},a),s))}const{BlockQuickNavigation:Dy}=Ke(he.privateApis);function By(){const e=(0,d.useSelect)((e=>Ke(e(he.store)).getEnabledClientIdsTree()),[]),t=(0,f.useMemo)((()=>e.map((({clientId:e})=>e))),[e]);return(0,l.createElement)(Dy,{clientIds:t})}const{PostPanelRow:Vy}=Ke(g.privateApis),Ly=[{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Draft"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Not ready to publish."))),value:"draft"},{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Pending"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Waiting for review before publishing."))),value:"pending"},{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Private"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Only visible to site admins and editors."))),value:"private"},{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Scheduled"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Publish automatically on a chosen date."))),value:"future"},{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Published"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Visible to everyone."))),value:"publish"}];function zy({postType:e,postId:t,status:n,password:a,date:r}){const[s,i]=(0,f.useState)(!!a),o=(0,se.useInstanceId)(zy),{editEntityRecord:c}=(0,d.useDispatch)(ge.store),{createErrorNotice:u}=(0,d.useDispatch)(fe.store),[m,p]=(0,f.useState)(null),h=(0,f.useMemo)((()=>({anchor:m,"aria-label":(0,b.__)("Change status"),placement:"bottom-end"})),[m]),g=async({status:s=n,password:i=a,date:o=r})=>{try{await c("postType",e,t,{status:s,date:o,password:i})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while updating the status");u(t,{type:"snackbar"})}},y=e=>{i(e),e||g({password:""})},v=e=>{let t=r,n=a;"publish"===e?new Date(r)>new Date&&(t=null):"future"===e?(!r||new Date(r)<new Date)&&(t=new Date,t.setDate(t.getDate()+7)):"private"===e&&a&&(i(!1),n=""),g({status:e,date:t,password:n})};return(0,l.createElement)(Vy,{label:(0,b.__)("Status")},(0,l.createElement)(_.Dropdown,{contentClassName:"edit-site-change-status__content",popoverProps:h,focusOnMount:!0,ref:p,renderToggle:({onToggle:e})=>(0,l.createElement)(_.Button,{className:"edit-site-summary-field__trigger",variant:"tertiary",onClick:e},(0,l.createElement)(nc,{status:a?"protected":n})),renderContent:({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(he.__experimentalInspectorPopoverHeader,{title:(0,b.__)("Status"),onClose:e}),(0,l.createElement)("form",null,(0,l.createElement)(_.__experimentalVStack,{spacing:5},(0,l.createElement)(_.RadioControl,{className:"edit-site-change-status__options",hideLabelFromVision:!0,label:(0,b.__)("Status"),options:Ly,onChange:v,selected:n}),"private"!==n&&(0,l.createElement)("fieldset",{className:"edit-site-change-status__password-fieldset"},(0,l.createElement)(_.__experimentalText,{as:"legend",className:"edit-site-change-status__password-legend",size:"11",lineHeight:1.4,weight:500,upperCase:!0},(0,b.__)("Password")),(0,l.createElement)(_.ToggleControl,{label:(0,b.__)("Hide this page behind a password"),checked:s,onChange:y}),s&&(0,l.createElement)("div",{className:"edit-site-change-status__password-input"},(0,l.createElement)(_.VisuallyHidden,{as:"label",htmlFor:`edit-site-change-status__password-input-${o}`},(0,b.__)("Create password")),(0,l.createElement)(_.TextControl,{onChange:e=>g({password:e}),value:a,placeholder:(0,b.__)("Use a secure password"),type:"text",id:`edit-site-change-status__password-input-${o}`}))))))}))}function Gy({status:e,date:t,password:n,postId:a,postType:r}){return(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(zy,{status:e,date:t,password:n,postId:a,postType:r}),(0,l.createElement)(g.PostSchedulePanel,null),(0,l.createElement)(g.PostTemplatePanel,null),(0,l.createElement)(g.PostURLPanel,null),(0,l.createElement)(g.PostAuthorPanel,null))}function Hy(){const{id:e,type:t,hasResolved:n,status:a,date:r,password:s,title:i,modified:o,renderingMode:c}=(0,d.useSelect)((e=>{const{getEditedPostContext:t}=e(ta),{getEditedEntityRecord:n,hasFinishedResolution:a}=e(ge.store),{getRenderingMode:r}=e(g.store),s=t(),i=["postType",s.postType,s.postId],o=n(...i);return{hasResolved:a("getEditedEntityRecord",i),title:o?.title,id:o?.id,type:o?.type,status:o?.status,date:o?.date,password:o?.password,modified:o?.modified,renderingMode:r()}}),[]);return n?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.PanelBody,null,(0,l.createElement)(Fy,{title:(0,en.decodeEntities)(i),icon:oa,description:(0,l.createElement)(_.__experimentalVStack,null,(0,l.createElement)(_.__experimentalText,null,(0,b.sprintf)((0,b.__)("Last edited %s"),(0,_r.humanTimeDiff)(o))))})),(0,l.createElement)(_.PanelBody,{title:(0,b.__)("Summary")},(0,l.createElement)(Gy,{status:a,date:r,password:s,postId:e,postType:t})),"post-only"!==c&&(0,l.createElement)(_.PanelBody,{title:(0,b.__)("Content")},(0,l.createElement)(By,null)),(0,l.createElement)(g.PostLastRevisionPanel,null),(0,l.createElement)(g.PostTaxonomiesPanel,null),(0,l.createElement)(g.PostFeaturedImagePanel,null),(0,l.createElement)(g.PostExcerptPanel,null),(0,l.createElement)(g.PostDiscussionPanel,null),(0,l.createElement)(g.PageAttributesPanel,null)):null}function Uy({onClick:e,availableTemplates:t}){const{editEntityRecord:n}=(0,d.useDispatch)(ge.store),[a,r]=(0,f.useState)(!1),s=()=>{r(!1)},{postId:i,postType:o}=(0,d.useSelect)((e=>({postId:e(ta).getEditedPostId(),postType:e(ta).getEditedPostType()})),[]);return!t.length||t.length<1?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{info:(0,b.__)("Replace the contents of this template with another."),onClick:()=>r(!0)},(0,b.__)("Replace template")),a&&(0,l.createElement)(_.Modal,{title:(0,b.__)("Choose a template"),onRequestClose:s,overlayClassName:"edit-site-template-panel__replace-template-modal",isFullScreen:!0},(0,l.createElement)("div",{className:"edit-site-template-panel__replace-template-modal__content"},(0,l.createElement)(Wy,{availableTemplates:t,onSelect:async t=>{s(),e(),await n("postType",o,i,{blocks:t.blocks,content:(0,c.serialize)(t.blocks)})}}))))}function Wy({availableTemplates:e,onSelect:t}){const n=(0,se.useAsyncList)(e);return(0,l.createElement)(he.__experimentalBlockPatternsList,{label:(0,b.__)("Templates"),blockPatterns:e,shownPatterns:n,onClickPattern:t})}function jy(e,t){return e.innerBlocks=e.innerBlocks.map((e=>jy(e,t))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=t),e}function Zy(e,t,n){return e.filter(((e,n,a)=>(e=>!Nt.includes(e.source))(e)&&((e,t,n)=>t===n.findIndex((t=>e.name===t.name)))(e,n,a)&&(e=>e.templateTypes?.includes(t.slug))(e))).map((e=>({...e,keywords:e.keywords||[],type:Mt.theme,blocks:(0,c.parse)(e.content,{__unstableSkipMigrationLogs:!0}).map((e=>jy(e,n)))})))}function qy({template:e}){const t=function(e){const{blockPatterns:t,restBlockPatterns:n,currentThemeStylesheet:a}=(0,d.useSelect)((e=>{var t;const{getSettings:n}=Ke(e(ta)),a=n();return{blockPatterns:null!==(t=a.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:a.__experimentalBlockPatterns,restBlockPatterns:e(ge.store).getBlockPatterns(),currentThemeStylesheet:e(ge.store).getCurrentTheme().stylesheet}}),[]);return(0,f.useMemo)((()=>Zy([...t||[],...n||[]],e,a)),[t,n,e,a])}(e),{revertTemplate:n}=(0,d.useDispatch)(ta),a=$t(e);return a||t.length&&!(t.length<1)?(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),className:"edit-site-template-card__actions",toggleProps:{isSmall:!0}},(({onClose:r})=>(0,l.createElement)(_.MenuGroup,null,a&&(0,l.createElement)(_.MenuItem,{info:(0,b.__)("Use the template as supplied by the theme."),onClick:()=>{n(e),r()}},(0,b.__)("Clear customizations")),(0,l.createElement)(Uy,{availableTemplates:t,template:e,onClick:r})))):null}function Yy({area:e,clientId:t}){const{selectBlock:n,toggleBlockHighlight:a}=(0,d.useDispatch)(he.store),r=(0,d.useSelect)((t=>t(g.store).__experimentalGetDefaultTemplatePartAreas().find((t=>t.area===e))),[e]),s=()=>a(t,!0),i=()=>a(t,!1);return(0,l.createElement)(_.Button,{className:"edit-site-template-card__template-areas-item",icon:r?.icon,onMouseOver:s,onMouseLeave:i,onFocus:s,onBlur:i,onClick:()=>{n(t)}},r?.label)}function Ky(){const e=(0,d.useSelect)((e=>e(ta).getCurrentTemplateTemplateParts()),[]);return e.length?(0,l.createElement)("section",{className:"edit-site-template-card__template-areas"},(0,l.createElement)(_.__experimentalHeading,{level:3,className:"edit-site-template-card__template-areas-title"},(0,b.__)("Areas")),(0,l.createElement)("ul",{className:"edit-site-template-card__template-areas-list"},e.map((({templatePart:e,block:t})=>(0,l.createElement)("li",{key:t.clientId},(0,l.createElement)(Yy,{area:e.area,clientId:t.clientId})))))):null}const Xy={wp_block:ca,wp_navigation:sa};function Jy(){var e;const{title:t,description:n,icon:a,record:r}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(ta),{getEditedEntityRecord:a}=e(ge.store),{__experimentalGetTemplateInfo:r}=e(g.store),s=a("postType",t(),n()),i=r(s);return{title:i.title,description:i.description,icon:i.icon,record:s}}),[]);return t||n?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.PanelBody,null,(0,l.createElement)(Fy,{className:"edit-site-template-card",title:(0,en.decodeEntities)(t),icon:null!==(e=Xy[r?.type])&&void 0!==e?e:a,description:(0,en.decodeEntities)(n),actions:(0,l.createElement)(qy,{template:r})},(0,l.createElement)(Ky,null))),(0,l.createElement)(g.PostLastRevisionPanel,null),(0,l.createElement)(g.PostTaxonomiesPanel,null),(0,l.createElement)(g.PostFeaturedImagePanel,null),(0,l.createElement)(g.PostExcerptPanel,null),(0,l.createElement)(g.PostDiscussionPanel,null),(0,l.createElement)(g.PageAttributesPanel,null)):null}const{Fill:Qy,Slot:$y}=(0,_.createSlotFill)("PluginTemplateSettingPanel"),ev=Qy;ev.Slot=$y;var tv=ev;const{Slot:nv,Fill:av}=(0,_.createSlotFill)("EditSiteSidebarInspector"),rv=av;function sv(){const{sidebar:e,isEditorSidebarOpened:t,hasBlockSelection:n,supportsGlobalStyles:a,isEditingPage:r}=(0,d.useSelect)((e=>{const t=e(W).getActiveComplementaryArea(Qt),n=[Oy,Ny].includes(t),a=e(ta).getSettings();return{sidebar:t,isEditorSidebarOpened:n,hasBlockSelection:!!e(he.store).getBlockSelectionStart(),supportsGlobalStyles:!a?.supportsTemplatePartsMode,isEditingPage:e(ta).isPage()&&"template-only"!==e(g.store).getRenderingMode()}}),[]),{enableComplementaryArea:s}=(0,d.useDispatch)(W);(0,f.useEffect)((()=>{t&&(n?r||s(Qt,Oy):s(Qt,Ny))}),[n,t,r,s]);let i=e;return t||(i=n?Oy:Ny),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ku,{identifier:i,title:(0,b.__)("Settings"),icon:(0,b.isRTL)()?Mu:Iu,closeLabel:(0,b.__)("Close Settings"),header:(0,l.createElement)(Ry,{sidebarName:i}),headerClassName:"edit-site-sidebar-edit-mode__panel-tabs"},i===Ny&&(0,l.createElement)(l.Fragment,null,r?(0,l.createElement)(Hy,null):(0,l.createElement)(Jy,null),(0,l.createElement)(tv.Slot,null)),i===Oy&&(0,l.createElement)(nv,{bubblesVirtually:!0})),a&&(0,l.createElement)(Ay,null))}var iv=n(773);function ov(){const e=(0,se.useInstanceId)(ov),{shortcut:t,content:n,blocks:a,type:r,id:s}=(0,d.useSelect)((e=>{const{getEditedEntityRecord:t}=e(ge.store),{getEditedPostType:n,getEditedPostId:a}=e(ta),{getShortcutRepresentation:r}=e(na.store),s=n(),i=a(),o=t("postType",s,i);return{shortcut:r("core/edit-site/toggle-mode"),content:o?.content,blocks:o?.blocks,type:s,id:i}}),[]),{editEntityRecord:i}=(0,d.useDispatch)(ge.store),o=(0,f.useMemo)((()=>n instanceof Function?n({blocks:a}):a?(0,c.__unstableSerializeAndClean)(a):n),[n,a]),{switchEditorMode:u}=(0,d.useDispatch)(ta);return(0,l.createElement)("div",{className:"edit-site-code-editor"},(0,l.createElement)("div",{className:"edit-site-code-editor__toolbar"},(0,l.createElement)("h2",null,(0,b.__)("Editing code")),(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>u("visual"),shortcut:t},(0,b.__)("Exit code editor"))),(0,l.createElement)("div",{className:"edit-site-code-editor__body"},(0,l.createElement)(_.VisuallyHidden,{as:"label",htmlFor:`code-editor-text-area-${e}`},(0,b.__)("Type text or HTML")),(0,l.createElement)(iv.Z,{autoComplete:"off",dir:"auto",value:o,onChange:e=>{i("postType",r,s,{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,b.__)("Start writing with text or HTML")})))}var lv=function(){const{getEditorMode:e}=(0,d.useSelect)(ta),t=(0,d.useSelect)((e=>e(W).getActiveComplementaryArea(ta.name)===Oy),[]),{switchEditorMode:n,toggleDistractionFree:a}=(0,d.useDispatch)(ta),{enableComplementaryArea:r,disableComplementaryArea:s}=(0,d.useDispatch)(W),{replaceBlocks:i}=(0,d.useDispatch)(he.store),{getBlockName:o,getSelectedBlockClientId:l,getBlockAttributes:u}=(0,d.useSelect)(he.store),m=(e,t)=>{e.preventDefault();const n=0===t?"core/paragraph":"core/heading",a=l();if(null===a)return;const r=o(a);if("core/paragraph"!==r&&"core/heading"!==r)return;const s=u(a),d="core/paragraph"===r?"align":"textAlign",m="core/paragraph"===n?"align":"textAlign";i(a,(0,c.createBlock)(n,{level:t,content:s.content,[m]:s[d]}))};return(0,na.useShortcut)("core/edit-site/toggle-block-settings-sidebar",(e=>{e.preventDefault(),t?s(Qt):r(Qt,Oy)})),(0,na.useShortcut)("core/edit-site/toggle-mode",(()=>{n("visual"===e()?"text":"visual")})),(0,na.useShortcut)("core/edit-site/transform-heading-to-paragraph",(e=>m(e,0))),[1,2,3,4,5,6].forEach((e=>{(0,na.useShortcut)(`core/edit-site/transform-paragraph-to-heading-${e}`,(t=>m(t,e)))})),(0,na.useShortcut)("core/edit-site/toggle-distraction-free",(()=>{a()})),null};function cv({nonAnimatedSrc:e,animatedSrc:t}){return(0,l.createElement)("picture",{className:"edit-site-welcome-guide__image"},(0,l.createElement)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,l.createElement)("img",{src:t,width:"312",height:"240",alt:""}))}function uv(){const{toggle:e}=(0,d.useDispatch)(k.store);return(0,d.useSelect)((e=>!!e(k.store).get("core/edit-site","welcomeGuide")),[])?(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,b.__)("Welcome to the site editor"),finishButtonText:(0,b.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,l.createElement)(cv,{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,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,b.__)("Edit your site")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("Design everything on your site — from the header right down to the footer — using blocks.")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,f.createInterpolateElement)((0,b.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,l.createElement)("img",{alt:(0,b.__)("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}function dv(){const{toggle:e}=(0,d.useDispatch)(k.store),{isActive:t,isStylesOpen:n}=(0,d.useSelect)((e=>{const t=e(W).getActiveComplementaryArea(ta.name);return{isActive:!!e(k.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);if(!t||!n)return null;const a=(0,b.__)("Welcome to Styles");return(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-styles",contentLabel:a,finishButtonText:(0,b.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,l.createElement)(cv,{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,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},a),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("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,l.createElement)(cv,{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,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,b.__)("Set the design")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("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,l.createElement)(cv,{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,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,b.__)("Personalize blocks")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("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,l.createElement)(cv,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,b.__)("Learn more")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("New to block themes and styling your site?")," ",(0,l.createElement)(_.ExternalLink,{href:(0,b.__)("https://wordpress.org/documentation/article/styles-overview/")},(0,b.__)("Heres a detailed guide to learn how to make the most of it."))))}]})}function mv(){const{toggle:e}=(0,d.useDispatch)(k.store),t=(0,d.useSelect)((e=>{const t=!!e(k.store).get("core/edit-site","welcomeGuidePage"),n=!!e(k.store).get("core/edit-site","welcomeGuide"),{isPage:a}=e(ta);return t&&!n&&a()}),[]);if(!t)return null;const n=(0,b.__)("Editing a page");return(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:n,finishButtonText:(0,b.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,l.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,l.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("Its 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 pv(){const{toggle:e}=(0,d.useDispatch)(k.store),t=(0,d.useSelect)((e=>{const t=!!e(k.store).get("core/edit-site","welcomeGuideTemplate"),n=!!e(k.store).get("core/edit-site","welcomeGuide"),{isPage:a}=e(ta),{getRenderingMode:r}=e(g.store);return t&&!n&&a()&&"template-only"===r()}),[]);if(!t)return null;const n=(0,b.__)("Editing a template");return(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:n,finishButtonText:(0,b.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,l.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,l.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("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 hv(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(uv,null),(0,l.createElement)(dv,null),(0,l.createElement)(mv,null),(0,l.createElement)(pv,null))}function fv(e){const{slug:t,patterns:n}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(ta),{getEntityRecord:a}=e(ge.store),r=n(),s=a("postType",t(),r),{getSettings:i}=e(he.store);return{slug:s.slug,patterns:i().__experimentalBlockPatterns}}),[]),a=(0,d.useSelect)((e=>e(ge.store).getCurrentTheme().stylesheet));return(0,f.useMemo)((()=>[{name:"fallback",blocks:(0,c.parse)(e),title:(0,b.__)("Fallback content")},...n.filter((e=>Array.isArray(e.templateTypes)&&e.templateTypes.some((e=>t.startsWith(e))))).map((e=>({...e,blocks:(0,c.parse)(e.content).map((e=>function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e}(e)))})))]),[e,t,n])}function gv({fallbackContent:e,onChoosePattern:t,postType:n}){const[,,a]=(0,ge.useEntityBlockEditor)("postType",n),r=fv(e),s=(0,se.useAsyncList)(r);return(0,l.createElement)(he.__experimentalBlockPatternsList,{blockPatterns:r,shownPatterns:s,onClickPattern:(e,n)=>{a(n,{selection:void 0}),t()}})}function yv({slug:e,isCustom:t,onClose:n,postType:a}){const r=function(e,t=!1){return(0,d.useSelect)((n=>{const{getEntityRecord:a,getDefaultTemplateId:r}=n(ge.store),s=r({slug:e,is_custom:t,ignore_empty:!0});return s?a("postType",Ct,s)?.content?.raw:void 0}),[e,t])}(e,t);return r?(0,l.createElement)(_.Modal,{className:"edit-site-start-template-options__modal",title:(0,b.__)("Choose a pattern"),closeLabel:(0,b.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:n,isFullScreen:!0},(0,l.createElement)("div",{className:"edit-site-start-template-options__modal-content"},(0,l.createElement)(gv,{fallbackContent:r,slug:e,isCustom:t,postType:a,onChoosePattern:()=>{n()}})),(0,l.createElement)(_.Flex,{className:"edit-site-start-template-options__modal__actions",justify:"flex-end",expanded:!1},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Button,{variant:"tertiary",onClick:n},(0,b.__)("Skip"))))):null}const vv={INITIAL:"INITIAL",CLOSED:"CLOSED"};function _v(){const[e,t]=(0,f.useState)(vv.INITIAL),{shouldOpenModal:n,slug:a,isCustom:r,postType:s}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(ta),a=t(),r=n(),{getEditedEntityRecord:s,hasEditsForEntityRecord:i}=e(ge.store),o=s("postType",a,r);return{shouldOpenModal:!i("postType",a,r)&&""===o.content&&Ct===a&&!e(k.store).get("core/edit-site","welcomeGuide"),slug:o.slug,isCustom:o.is_custom,postType:a}}),[]);return e===vv.INITIAL&&!n||e===vv.CLOSED?null:(0,l.createElement)(yv,{slug:a,isCustom:r,postType:s,onClose:()=>t(vv.CLOSED)})}const{useGlobalStylesOutput:bv}=Ke(he.privateApis);function Ev(){return function(){const[e,t]=bv(),{getSettings:n}=(0,d.useSelect)(ta),{updateSettings:a}=(0,d.useDispatch)(ta);(0,f.useEffect)((()=>{var r;if(!e||!t)return;const s=n(),i=Object.values(null!==(r=s.styles)&&void 0!==r?r:[]).filter((e=>!e.isGlobalStyles));a({...s,styles:[...i,...e],__experimentalFeatures:t})}),[e,t,a,n])}(),null}const{useLocation:wv}=Ke(ft.privateApis);const{ProgressBar:xv,Theme:Sv}=Ke(_.privateApis),{useGlobalStyle:Cv}=Ke(he.privateApis);function kv({id:e}){var t;const[n]=Cv("color.text"),[a]=Cv("color.background"),{highlightedColors:r}=Qe(),s=null!==(t=r[0]?.color)&&void 0!==t?t:n,{elapsed:i,total:o}=(0,d.useSelect)((e=>{var t,n;const a=e(ge.store).countSelectorsByStatus(),r=null!==(t=a.resolving)&&void 0!==t?t:0,s=null!==(n=a.finished)&&void 0!==n?n:0;return{elapsed:s,total:s+r}}),[]);return(0,l.createElement)("div",{className:"edit-site-canvas-loader"},(0,l.createElement)(Sv,{accent:s,background:a},(0,l.createElement)(xv,{id:e,max:o,value:i})))}var Tv=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));const{useLocation:Pv,useHistory:Mv}=Ke(ft.privateApis);var Iv=function(){const e=Pv(),t=Mv(),n=e.params.postType===kt,a=e.params.postType===St,r=e.params.postType===Mt.user,s=e.state?.fromTemplateId;return(n||a||r)&&(s||r)?(0,l.createElement)(_.Button,{className:"edit-site-visual-editor__back-button",icon:Tv,onClick:()=>{t.back()}},(0,b.__)("Back")):null};const{EditorCanvas:Av}=Ke(g.privateApis);var Nv=function({enableResizing:e,settings:t,children:n,...a}){const{hasBlocks:r,isFocusMode:s,templateType:i,canvasMode:o,isZoomOutMode:c}=(0,d.useSelect)((e=>{const{getBlockCount:t,__unstableGetEditorMode:n}=e(he.store),{getEditedPostType:a,getCanvasMode:r}=Ke(e(ta)),s=a();return{templateType:s,isFocusMode:Rt.includes(s),isZoomOutMode:"zoom-out"===n(),canvasMode:r(),hasBlocks:!!t()}}),[]),{setCanvasMode:u}=Ke((0,d.useDispatch)(ta)),[m,p]=(0,f.useState)(!1);(0,f.useEffect)((()=>{"edit"===o&&p(!1)}),[o]);const h={"aria-label":(0,b.__)("Editor Canvas"),role:"button",tabIndex:0,onFocus:()=>p(!0),onBlur:()=>p(!1),onKeyDown:e=>{const{keyCode:t}=e;t!==wa.ENTER&&t!==wa.SPACE||(e.preventDefault(),u("edit"))},onClick:()=>u("edit"),readonly:!0},g=i===St,y=!(g&&s&&r||"view"===o)&&void 0,_=(0,f.useMemo)((()=>[...t.styles,{css:`.is-root-container{display:flow-root;${e?"min-height:0!important;":""}}body{position:relative; ${"view"===o?"cursor: pointer; min-height: 100vh;":""}}}`}]),[t.styles,e,o]);return(0,l.createElement)(Av,{className:v()("edit-site-editor-canvas__block-list",{"is-navigation-block":g}),renderAppender:y,styles:_,iframeProps:{expand:c,scale:c?.45:void 0,frameSize:c?100:void 0,className:v()("edit-site-visual-editor__editor-canvas",{"is-focused":m&&"view"===o}),...a,..."view"===o?h:{}}},n)};const{useHistory:Ov}=Ke(ft.privateApis);function Rv(){const e=Ov();return(t,n)=>bt(e,t,n)}const{useBlockEditorSettings:Fv}=Ke(g.privateApis);function Dv(){const e=Rv(),{templateSlug:t,canvasMode:n,settings:a,postWithTemplate:r}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n,getEditedPostContext:a,getCanvasMode:r,getSettings:s}=Ke(e(ta)),{getEditedEntityRecord:i}=e(ge.store),o=i("postType",t(),n()),l=a();return{templateSlug:o.slug,canvasMode:r(),settings:s(),postWithTemplate:l?.postId}}),[]),s=function(e){const t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let n,a,r,s=!1;if(t)t[1]?n=t[2]?t[2]:t[1]:t[3]&&(n=t[6]?t[6]:t[4],a=t[7]),n="tag"===n?"post_tag":n;else{const t=e?.match(/^(author)$|^author-(.+)$/);t&&(s=!0,t[2]&&(r=t[2]))}return(0,d.useSelect)((e=>{const{getEntityRecords:t,getTaxonomy:i,getAuthors:o}=e(ge.store);let l,c;if(n&&(l=i(n)?.labels?.singular_name),a){const e=t("taxonomy",n,{slug:a,per_page:1});e&&e[0]&&(c=e[0].name)}if(s&&(l="Author",r)){const e=o({slug:r});e&&e[0]&&(c=e[0].name)}return{archiveTypeLabel:l,archiveNameLabel:c}}),[r,s,n,a])}(t),i=r?"template-locked":"all";return(0,f.useMemo)((()=>({...a,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:"view"!==n,defaultRenderingMode:i,getPostLinkProps:e,__experimentalArchiveTitleTypeLabel:s.archiveTypeLabel,__experimentalArchiveTitleNameLabel:s.archiveNameLabel})),[a,n,i,e,s.archiveTypeLabel,s.archiveNameLabel])}function Bv(){const{templateType:e,isFocusMode:t,isViewMode:n}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getCanvasMode:n}=Ke(e(ta)),a=t();return{templateType:a,isFocusMode:Rt.includes(a),isViewMode:"view"===n()}}),[]),[a,r]=(0,se.useResizeObserver)(),s=function(){const e=Dv(),{postType:t,postId:n}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=Ke(e(ta));return{postType:t(),postId:n()}}),[]);return Fv(e,t,n)}(),i=(0,se.useViewportMatch)("small","<"),o=t&&!n&&!i,c=e===St&&t;return(0,l.createElement)($a.Slot,null,(([e])=>e?(0,l.createElement)("div",{className:"edit-site-visual-editor is-focus-mode"},e):(0,l.createElement)("div",{className:v()("edit-site-visual-editor",{"is-focus-mode":t||!!e,"is-view-mode":n})},(0,l.createElement)(Iv,null),(0,l.createElement)(Za,{enableResizing:o,height:r.height&&!c?r.height:"100%"},(0,l.createElement)(Nv,{enableResizing:o,settings:s},a)))))}function Vv({clientId:e,onClose:t}){const{getBlocks:n}=(0,d.useSelect)(he.store),{replaceBlocks:a}=(0,d.useDispatch)(he.store);return(0,d.useSelect)((t=>t(he.store).canRemoveBlock(e)),[e])?(0,l.createElement)(_.MenuItem,{onClick:()=>{a(e,n(e)),t()}},(0,b.__)("Detach")):null}function Lv({clientIds:e,blocks:t}){const[n,a]=(0,f.useState)(!1),{replaceBlocks:r}=(0,d.useDispatch)(he.store),{createSuccessNotice:s}=(0,d.useDispatch)(fe.store),{canCreate:i}=(0,d.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(ta).getSettings();return{canCreate:!t}}),[]);if(!i)return null;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{icon:Ks,onClick:()=>{a(!0)},"aria-expanded":n,"aria-haspopup":"dialog"},(0,b.__)("Create template part")),n&&(0,l.createElement)(ei,{closeModal:()=>{a(!1)},blocks:t,onCreate:async t=>{r(e,(0,c.createBlock)("core/template-part",{slug:t.slug,theme:t.theme})),s((0,b.__)("Template part created."),{type:"snackbar"})}}))}function zv(){return(0,l.createElement)(he.BlockSettingsMenuControls,null,(({selectedClientIds:e,onClose:t})=>(0,l.createElement)(Gv,{clientIds:e,onClose:t})))}function Gv({clientIds:e,onClose:t}){const n=(0,d.useSelect)((t=>t(he.store).getBlocksByClientId(e)),[e]);return 1===n.length&&"core/template-part"===n[0]?.name?(0,l.createElement)(Vv,{clientId:e[0],onClose:t}):(0,l.createElement)(Lv,{clientIds:e,blocks:n})}const{BlockRemovalWarningModal:Hv}=Ke(he.privateApis),{ExperimentalEditorProvider:Uv,InserterSidebar:Wv,ListViewSidebar:jv}=Ke(g.privateApis),Zv={body:(0,b.__)("Editor content"),sidebar:(0,b.__)("Editor settings"),actions:(0,b.__)("Editor publish"),footer:(0,b.__)("Editor footer")},qv={"core/query":(0,b.__)("Query Loop displays a list of posts or pages."),"core/post-content":(0,b.__)("Post Content displays the content of a post or page."),"core/post-template":(0,b.__)("Post Template displays each post or page in a Query Loop.")};function Yv({isLoading:e}){const{record:t,getTitle:n,isLoaded:a}=Ds(),{type:r}=t,s=(0,se.useViewportMatch)("medium"),{context:i,contextPost:o,editorMode:c,canvasMode:u,renderingMode:m,blockEditorMode:p,isRightSidebarOpen:h,isInserterOpen:y,isListViewOpen:E,showIconLabels:w,showBlockBreadcrumbs:x}=(0,d.useSelect)((e=>{const{get:t}=e(k.store),{getEditedPostContext:n,getEditorMode:a,getCanvasMode:r}=Ke(e(ta)),{__unstableGetEditorMode:s}=e(he.store),{getActiveComplementaryArea:i}=e(W),{getEntityRecord:o}=e(ge.store),{getRenderingMode:l,isInserterOpened:c,isListViewOpened:u}=e(g.store),d=n();return{context:d,contextPost:d?.postId?o("postType",d.postType,d.postId):void 0,editorMode:a(),canvasMode:r(),renderingMode:l(),blockEditorMode:s(),isInserterOpen:c(),isListViewOpen:u(),isRightSidebarOpen:i(ta.name),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),showIconLabels:t("core","showIconLabels")}}),[]),S="edit"===u,C="view"===u||"visual"===c,T=x&&S&&C&&"zoom-out"!==p,P=S&&C&&y,M=S&&C&&E,I=E?(0,b.__)("List View"):(0,b.__)("Block Library"),A=!!i?.postId;let N;var O;a&&(N=(0,b.sprintf)((0,b.__)("%1$s %2$s"),n(),null!==(O=Ft[r])&&void 0!==O?O:Ft[Ct]));!function(e){const t=wv(),n=(0,d.useSelect)((e=>e(ge.store).getEntityRecord("root","site")?.title),[]),a=(0,f.useRef)(!0);(0,f.useEffect)((()=>{a.current=!1}),[t]),(0,f.useEffect)((()=>{if(!a.current&&e&&n){const t=(0,b.sprintf)((0,b.__)("%1$s %2$s Editor — WordPress"),(0,en.decodeEntities)(e),(0,en.decodeEntities)(n));document.title=t,(0,Jt.speak)(e,"assertive")}}),[e,n,t])}(a&&N);const R=(0,se.useInstanceId)(kv,"edit-site-editor__loading-progress"),F=Dv(),D=!e&&(A&&!!o&&!!t||!A&&!!t);return(0,l.createElement)(l.Fragment,null,D?null:(0,l.createElement)(kv,{id:R}),S&&(0,l.createElement)(hv,null),a&&!t&&(0,l.createElement)(_.Notice,{status:"warning",isDismissible:!1},(0,b.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")),D&&(0,l.createElement)(Uv,{post:A?o:t,__unstableTemplate:A?t:void 0,settings:F,useSubRegistry:!1},(0,l.createElement)(sv,null),S&&(0,l.createElement)(_v,null),(0,l.createElement)(le,{isDistractionFree:!0,enableRegionNavigation:!1,className:v()("edit-site-editor__interface-skeleton",{"show-icon-labels":w}),notices:(0,l.createElement)(g.EditorSnackbars,null),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ev,null),S&&(0,l.createElement)(g.EditorNotices,null),C&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(zv,null),(0,l.createElement)(rv,null,(0,l.createElement)(he.BlockInspector,null)),!s&&(0,l.createElement)(he.BlockToolbar,{hideDragHandle:!0}),(0,l.createElement)(Bv,null),(0,l.createElement)(Hv,{rules:qv}),(0,l.createElement)(zu,null)),"text"===c&&S&&(0,l.createElement)(ov,null),S&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(lv,null),(0,l.createElement)(g.EditorKeyboardShortcutsRegister,null),(0,l.createElement)(g.EditorKeyboardShortcuts,null))),secondarySidebar:S&&(P&&(0,l.createElement)(Wv,null)||M&&(0,l.createElement)(jv,null)),sidebar:S&&h&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(re.Slot,{scope:"core/edit-site"})),footer:T&&(0,l.createElement)(he.BlockBreadcrumb,{rootLabelText:A&&"template-only"!==m?(0,b.__)("Page"):(0,b.__)("Template")}),labels:{...Zv,secondarySidebar:I}})))}const Kv=(0,f.memo)((function({view:e,onChangeView:t,paginationInfo:{totalItems:n=0,totalPages:a}}){return n&&a?!!n&&1!==a&&(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:6,justify:"end",className:"dataviews-pagination"},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:2},(0,f.createInterpolateElement)((0,b.sprintf)((0,b._x)("Page <CurrenPageControl /> of %s","paging"),a),{CurrenPageControl:(0,l.createElement)(_.SelectControl,{"aria-label":(0,b.__)("Current page"),value:e.page,options:Array.from(Array(a)).map(((e,t)=>{const n=t+1;return{value:n,label:n}})),onChange:n=>{t({...e,page:+n})},size:"compact",__nextHasNoMarginBottom:!0})})),(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(_.Button,{onClick:()=>t({...e,page:e.page-1}),disabled:1===e.page,__experimentalIsFocusable:!0,label:(0,b.__)("Previous page"),icon:da,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,l.createElement)(_.Button,{onClick:()=>t({...e,page:e.page+1}),disabled:e.page>=a,__experimentalIsFocusable:!0,label:(0,b.__)("Next page"),icon:ua,showTooltip:!0,size:"compact",tooltipPosition:"top"}))):null}));var Xv=Kv;var Jv=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.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,l.createElement)(E.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"}));const{DropdownMenuV2:Qv,DropdownMenuGroupV2:$v,DropdownMenuItemV2:e_,DropdownMenuRadioItemV2:t_,DropdownMenuCheckboxItemV2:n_,DropdownMenuItemLabelV2:a_}=Fo(_.privateApis);function r_({view:e,onChangeView:t,supportedLayouts:n}){let a=yl;if(n&&(a=a.filter((e=>n.includes(e.type)))),1===a.length)return null;const r=a.find((t=>e.type===t.type));return(0,l.createElement)(Qv,{trigger:(0,l.createElement)(e_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},r.label)},(0,l.createElement)(a_,null,(0,b.__)("Layout")))},a.map((n=>(0,l.createElement)(t_,{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,l.createElement)(a_,null,n.label)))))}const s_=[10,20,50,100];function i_({view:e,onChangeView:t}){return(0,l.createElement)(Qv,{trigger:(0,l.createElement)(e_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},e.perPage)},(0,l.createElement)(a_,null,(0,b.__)("Rows per page")))},s_.map((n=>(0,l.createElement)(t_,{key:n,value:n,name:"view-actions-page-size",checked:e.perPage===n,onChange:()=>{t({...e,perPage:n,page:1})}},(0,l.createElement)(a_,null,n)))))}function o_({view:e,onChangeView:t,fields:n}){const a=n.filter((t=>!1!==t.enableHiding&&t.id!==e.layout.mediaField));return a?.length?(0,l.createElement)(Qv,{trigger:(0,l.createElement)(e_,null,(0,l.createElement)(a_,null,(0,b.__)("Fields")))},a?.map((n=>(0,l.createElement)(n_,{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,l.createElement)(a_,null,n.header))))):null}function l_({fields:e,view:t,onChangeView:n}){const a=e.filter((e=>!1!==e.enableSorting));if(!a?.length)return null;const r=e.find((e=>e.id===t.sort?.field));return(0,l.createElement)(Qv,{trigger:(0,l.createElement)(e_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},r?.header)},(0,l.createElement)(a_,null,(0,b.__)("Sort by")))},a?.map((e=>{const a=t.sort?.direction;return(0,l.createElement)(Qv,{key:e.id,trigger:(0,l.createElement)(e_,null,(0,l.createElement)(a_,null,e.header)),style:{minWidth:"220px"}},Object.entries(hl).map((([s,i])=>{const o=void 0!==r&&a===s&&e.id===r.id,c=`${e.id}-${s}`;return(0,l.createElement)(t_,{key:c,name:"view-actions-sorting",value:c,checked:o,onChange:()=>{n({...t,sort:{field:e.id,direction:s}})}},(0,l.createElement)(a_,null,i.label))})))})))}var c_=(0,f.memo)((function({fields:e,view:t,onChangeView:n,supportedLayouts:a}){return(0,l.createElement)(Qv,{trigger:(0,l.createElement)(_.Button,{size:"compact",icon:Jv,label:(0,b.__)("View options")})},(0,l.createElement)($v,null,(0,l.createElement)(r_,{view:t,onChangeView:n,supportedLayouts:a}),(0,l.createElement)(l_,{fields:e,view:t,onChangeView:n}),(0,l.createElement)(o_,{fields:e,view:t,onChangeView:n}),(0,l.createElement)(i_,{view:t,onChangeView:n})))}));const{DropdownMenuV2:u_,DropdownMenuGroupV2:d_,DropdownMenuItemV2:m_,DropdownMenuSeparatorV2:p_,DropdownMenuItemLabelV2:h_,DropdownMenuItemHelpTextV2:f_}=Fo(_.privateApis),g_=({activeElement:e,filterInView:t,filter:n})=>void 0===e?n.name:void 0!==e&&t?.operator===dl?(0,b.sprintf)((0,b.__)("%1$s is %2$s"),n.name,e.label):void 0!==e&&t?.operator===ml?(0,b.sprintf)((0,b.__)("%1$s is not %2$s"),n.name,e.label):(0,b.sprintf)((0,b.__)("Unknown status for %1$s"),n.name);function y_({children:e}){return f.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,l.createElement)(f.Fragment,{key:t},t>0&&(0,l.createElement)(p_,null),e)))}function v_({filter:e,view:t,onChangeView:n}){const a=t.filters.find((t=>t.field===e.field)),r=t.filters.filter((t=>t.field!==e.field)),s=e.elements.find((e=>e.value===a?.value)),i=a?.operator||e.operators[0];return(0,l.createElement)(u_,{key:e.field,trigger:(0,l.createElement)(_.Button,{variant:"tertiary",size:"compact",label:e.name},(0,l.createElement)(g_,{activeElement:s,filterInView:a,filter:e}),(0,l.createElement)(_.Icon,{icon:Gi,style:{flexShrink:0}}))},(0,l.createElement)(y_,null,(0,l.createElement)(d_,null,e.elements.map((a=>{const o=s?.value===a.value;return(0,l.createElement)(Ko,{key:a.value,name:`filter-summary-${e.field}`,value:a.value,checked:o,onClick:()=>n({...t,page:1,filters:[...r,{field:e.field,operator:i,value:o?void 0:a.value}]})},(0,l.createElement)(h_,null,a.label),!!a.description&&(0,l.createElement)(f_,null,a.description))}))),e.operators.length>1&&(0,l.createElement)(u_,{trigger:(0,l.createElement)(m_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},pl[i]?.label)},(0,l.createElement)(h_,null,(0,b.__)("Conditions")))},Object.entries(pl).map((([s,{label:o,key:c}])=>(0,l.createElement)(Ko,{key:c,name:`filter-summary-${e.field}-conditions`,value:s,checked:i===s,onChange:s=>{n({...t,page:1,filters:[...r,{field:e.field,operator:s.target.value,value:a?.value}]})}},(0,l.createElement)(h_,null,o)))))))}const{DropdownMenuV2:__,DropdownMenuGroupV2:b_,DropdownMenuItemV2:E_,DropdownMenuRadioItemV2:w_,DropdownMenuSeparatorV2:x_,DropdownMenuItemLabelV2:S_,DropdownMenuItemHelpTextV2:C_}=Fo(_.privateApis);function k_({children:e}){return f.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,l.createElement)(f.Fragment,{key:t},t>0&&(0,l.createElement)(x_,null),e)))}function T_({filters:e,view:t,onChangeView:n}){if(0===e.length)return null;const a=t.filters.reduce(((e,t)=>void 0!==t.value?e+1:e),0);return(0,l.createElement)(__,{trigger:(0,l.createElement)(_.Button,{__experimentalIsFocusable:!0,label:(0,b.__)("Filters"),size:"compact",icon:Oo,className:"dataviews-filters-button"},t.type===gl&&a>0?(0,l.createElement)("span",{className:"dataviews-filters-count"},a):null),style:{minWidth:"230px"}},(0,l.createElement)(k_,null,(0,l.createElement)(b_,null,e.map((e=>{const a=t.filters.find((t=>t.field===e.field)),r=t.filters.filter((t=>t.field!==e.field)),s=e.elements.find((e=>e.value===a?.value)),i=a?.operator||e.operators[0];return(0,l.createElement)(__,{key:e.field,trigger:(0,l.createElement)(E_,{suffix:s&&(0,l.createElement)("span",{"aria-hidden":"true"},i in pl&&`${pl[i].label} `,s.label)},(0,l.createElement)(S_,null,e.name)),style:{minWidth:"200px"}},(0,l.createElement)(k_,null,(0,l.createElement)(b_,null,e.elements.map((a=>{const o=s?.value===a.value;return(0,l.createElement)(Ko,{key:a.value,name:`add-filter-${e.field}`,value:a.value,checked:o,onChange:a=>{n({...t,page:1,filters:[...r,{field:e.field,operator:i,value:o?void 0:a.target.value}]})}},(0,l.createElement)(S_,null,a.label),!!a.description&&(0,l.createElement)(C_,null,a.description))}))),e.operators.length>1&&(0,l.createElement)(__,{trigger:(0,l.createElement)(E_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},pl[i]?.label)},(0,l.createElement)(S_,null,(0,b.__)("Conditions")))},Object.entries(pl).map((([s,{label:o,key:c}])=>(0,l.createElement)(w_,{key:c,name:`add-filter-${e.field}-conditions`,value:s,checked:i===s,onChange:s=>{n({...t,page:1,filters:[...r,{field:e.field,operator:s.target.value,value:a?.value}]})}},(0,l.createElement)(S_,null,o))))),(0,l.createElement)(E_,{key:"reset-filter-"+e.name,disabled:!s,hideOnClick:!1,onClick:()=>{n({...t,page:1,filters:t.filters.filter((t=>t.field!==e.field))})}},(0,l.createElement)(S_,null,(0,b.sprintf)((0,b.__)("Reset %1$s"),e.name.toLowerCase())))))}))),(0,l.createElement)(E_,{disabled:""===t.search&&0===t.filters?.length,hideOnClick:!1,onClick:()=>{n({...t,page:1,filters:[]})}},(0,l.createElement)(S_,null,(0,b.__)("Reset filters")))))}function P_({view:e,onChangeView:t}){return(0,l.createElement)(_.Button,{disabled:""===e.search&&0===e.filters?.length,__experimentalIsFocusable:!0,size:"compact",variant:"tertiary",onClick:()=>{t({...e,page:1,search:"",filters:[]})}},(0,b.__)("Reset filters"))}const M_=(0,f.memo)((function({fields:e,view:t,onChangeView:n}){const a=[];e.forEach((e=>{if(!e.type)return;const n=(e=>{let t=e.filterBy?.operators;return t&&Array.isArray(t)||(t=[dl,ml]),t.filter((e=>[dl,ml].includes(e)))})(e);if(0!==n.length&&e.type===ul){if(!e.elements?.length)return;a.push({field:e.id,name:e.header,elements:e.elements,operators:n,isVisible:t.filters.some((t=>t.field===e.id&&[dl,ml].includes(t.operator)))})}}));const r=[(0,l.createElement)(T_,{key:"add-filter",filters:a,view:t,onChangeView:n}),...a.map((e=>e.isVisible&&t.type!==gl?(0,l.createElement)(v_,{key:e.field,filter:e,view:t,onChangeView:n}):null))];return r.length>1&&t.type!==gl&&r.push((0,l.createElement)(P_,{key:"reset-filters",view:t,onChangeView:n})),r}));var I_=M_;const A_=(0,f.memo)((function({label:e,view:t,onChangeView:n}){const[a,r,s]=(0,se.useDebouncedInput)(t.search);(0,f.useEffect)((()=>{r(t.search)}),[t]);const i=(0,f.useRef)(n);(0,f.useEffect)((()=>{i.current=n}),[n]),(0,f.useEffect)((()=>{i.current({...t,page:1,search:s})}),[s]);const o=e||(0,b.__)("Filter list");return(0,l.createElement)(_.SearchControl,{__nextHasNoMarginBottom:!0,onChange:r,value:a,label:o,placeholder:o,size:"compact"})}));var N_=A_;const{DropdownMenuV2:O_,DropdownMenuGroupV2:R_,DropdownMenuItemV2:F_,DropdownMenuSeparatorV2:D_}=Fo(_.privateApis);function B_({action:e,selectedItems:t,setActionWithModal:n,onMenuOpenChange:a}){const r=(0,f.useMemo)((()=>t.filter((t=>e.isEligible(t)))),[e,t]),{RenderModal:s,hideModalHeader:i}=e,o=(0,f.useCallback)((()=>{n(void 0)}),[n]);return(0,l.createElement)(_.Modal,{title:!i&&e.label,__experimentalHideHeader:!!i,onRequestClose:o,overlayClassName:"dataviews-action-modal"},(0,l.createElement)(s,{items:r,closeModal:o,onPerform:()=>a(!1)}))}function V_({action:e,selectedItems:t,setActionWithModal:n}){const a=(0,f.useMemo)((()=>t.filter((t=>e.isEligible(t)))),[e,t]),r=!!e.RenderModal;return(0,l.createElement)(F_,{key:e.id,disabled:0===a.length,hideOnClick:!r,onClick:async()=>{r?n(e):await e.callback(a)},suffix:a.length>0?a.length:void 0},e.label)}function L_({actions:e,selectedItems:t,setActionWithModal:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(R_,null,e.map((e=>(0,l.createElement)(V_,{key:e.id,action:e,selectedItems:t,setActionWithModal:n})))),(0,l.createElement)(D_,null))}function z_({data:e,actions:t,selection:n,onSelectionChange:a,getItemId:r}){const s=(0,f.useMemo)((()=>t.filter((e=>e.supportsBulk))),[t]),i=n&&n.length===e.length,[o,c]=(0,f.useState)(!1),[u,d]=(0,f.useState)(),m=(0,f.useMemo)((()=>e.filter((e=>n.includes(r(e))))),[n,e,r]);return 0===s.length?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(O_,{open:o,onOpenChange:c,label:(0,b.__)("Bulk actions"),style:{minWidth:"240px"},trigger:(0,l.createElement)(_.Button,{className:"dataviews-bulk-edit-button",__next40pxDefaultSize:!0,variant:"tertiary",size:"compact"},n.length?(0,b.sprintf)((0,b._n)("Edit %d item","Edit %d items",n.length),n.length):(0,b.__)("Bulk edit"))},(0,l.createElement)(L_,{actions:s,setActionWithModal:d,selectedItems:m}),(0,l.createElement)(R_,null,(0,l.createElement)(F_,{disabled:i,hideOnClick:!1,onClick:()=>{a(e)},suffix:e.length},(0,b.__)("Select all")),(0,l.createElement)(F_,{disabled:0===n.length,hideOnClick:!1,onClick:()=>{a([])}},(0,b.__)("Deselect")))),u&&(0,l.createElement)(B_,{action:u,selectedItems:m,setActionWithModal:d,onMenuOpenChange:c}))}const G_=e=>e.id,H_=()=>{};function U_({view:e,onChangeView:t,fields:n,search:a=!0,searchLabel:r,actions:s,data:i,getItemId:o=G_,isLoading:c=!1,paginationInfo:u,supportedLayouts:d,onSelectionChange:m=H_,onDetailsChange:p=null,deferredRendering:h=!1}){const[g,y]=(0,f.useState)([]);(0,f.useEffect)((()=>{if(g.length>0&&g.some((e=>!i.some((t=>t.id===e))))){const e=g.filter((e=>i.some((t=>t.id===e))));y(e),m(i.filter((t=>e.includes(t.id))))}}),[g,i,m]);const v=(0,f.useCallback)((e=>{y(e.map((e=>e.id))),m(e)}),[y,m]),b=yl.find((t=>t.type===e.type)).component,E=(0,f.useMemo)((()=>n.map((e=>({...e,render:e.render||e.getValue})))),[n]);return(0,l.createElement)("div",{className:"dataviews-wrapper"},(0,l.createElement)(_.__experimentalVStack,{spacing:0,justify:"flex-start"},(0,l.createElement)(_.__experimentalHStack,{alignment:"flex-start",className:"dataviews-filters__view-actions"},(0,l.createElement)(_.__experimentalHStack,{justify:"start",wrap:!0},a&&(0,l.createElement)(N_,{label:r,view:e,onChangeView:t}),(0,l.createElement)(I_,{fields:E,view:e,onChangeView:t})),e.type===fl&&(0,l.createElement)(z_,{actions:s,data:i,onSelectionChange:v,selection:g,getItemId:o}),(0,l.createElement)(c_,{fields:E,view:e,onChangeView:t,supportedLayouts:d})),(0,l.createElement)(b,{fields:E,view:e,onChangeView:t,actions:s,data:i,getItemId:o,isLoading:c,onSelectionChange:v,onDetailsChange:p,selection:g,deferredRendering:h}),(0,l.createElement)(Xv,{view:e,onChangeView:t,paginationInfo:u})))}function W_({title:e,subTitle:t,actions:n}){return(0,l.createElement)(_.__experimentalHStack,{as:"header",alignment:"left",className:"edit-site-page-header"},(0,l.createElement)(_.FlexBlock,{className:"edit-site-page-header__page-title"},(0,l.createElement)(_.__experimentalHeading,{as:"h2",level:3,weight:500,className:"edit-site-page-header__title"},e),t&&(0,l.createElement)(_.__experimentalText,{as:"p",className:"edit-site-page-header__sub-title"},t)),(0,l.createElement)(_.FlexItem,{className:"edit-site-page-header__actions"},n))}function j_({title:e,subTitle:t,actions:n,children:a,className:r,hideTitleFromUI:s=!1}){const i=v()("edit-site-page",r);return(0,l.createElement)(ie,{className:i,ariaLabel:e},(0,l.createElement)("div",{className:"edit-site-page-content"},!s&&e&&(0,l.createElement)(W_,{title:e,subTitle:t,actions:n}),a),(0,l.createElement)(g.EditorSnackbars,null))}const{useHistory:Z_}=Ke(ft.privateApis),q_={id:"move-to-trash",label:(0,b.__)("Move to Trash"),isPrimary:!0,icon:Rl,isEligible({status:e}){return"trash"!==e},supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onPerform:n})=>{const{createSuccessNotice:a,createErrorNotice:r}=(0,d.useDispatch)(fe.store),{deleteEntityRecord:s}=(0,d.useDispatch)(ge.store);return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,1===e.length?(0,b.sprintf)((0,b.__)('Are you sure you want to delete "%s"?'),(0,en.decodeEntities)(e[0].title.rendered)):(0,b.sprintf)((0,b.__)("Are you sure you want to delete %d pages?"),e.length)),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:async()=>{const i=await Promise.allSettled(e.map((e=>s("postType",e.type,e.id,{},{throwOnError:!0}))));if(i.every((({status:e})=>"fulfilled"===e))){let t;t=1===i.length?(0,b.sprintf)((0,b.__)('"%s" moved to the Trash.'),(0,en.decodeEntities)(e[0].title.rendered)):(0,b.__)("Pages moved to the Trash."),a(t,{type:"snackbar",id:"edit-site-page-trashed"})}else{let e;if(1===i.length)e=i[0].reason?.message?i[0].reason.message:(0,b.__)("An error occurred while moving the post to the trash.");else{const t=new Set,n=i.filter((({status:e})=>"rejected"===e));for(const e of n)e.reason?.message&&t.add(e.reason.message);e=0===t.size?(0,b.__)("An error occurred while moving the posts to the trash."):1===t.size?(0,b.sprintf)((0,b.__)("An error occurred while moving the posts to the trash: %s"),[...t][0]):(0,b.sprintf)((0,b.__)("Some errors occurred while moving the pages to the trash: %s"),[...t].join(",")),r(e,{type:"snackbar"})}}n&&n(),t()}},(0,b.__)("Delete"))))}};const Y_={id:"view-post",label:(0,b.__)("View"),isPrimary:!0,icon:vc,isEligible(e){return"trash"!==e.status},callback(e){const t=e[0];document.location.href=t.link}};const K_={id:"view-post-revisions",label:(0,b.__)("View revisions"),isPrimary:!1,isEligible:e=>{var t,n;if("trash"===e.status)return!1;const a=null!==(t=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null,r=null!==(n=e?._links?.["version-history"]?.[0]?.count)&&void 0!==n?n:0;return a&&r>1},callback(e){const t=e[0],n=(0,gt.addQueryArgs)("revision.php",{revision:t?._links?.["predecessor-version"]?.[0]?.id});document.location.href=n}};var X_=function({id:e,size:t=["large","medium","thumbnail"],...n}){const{record:a}=(0,ge.useEntityRecord)("root","media",e),r=t.find((e=>!!a?.media_details?.sizes[e])),s=a?.media_details?.sizes[r];return s?(0,l.createElement)("img",{...n,src:s.source_url,alt:a.alt_text}):null};const{useLocation:J_,useHistory:Q_}=Ke(ft.privateApis),$_=[],eb=window?.__experimentalAdminViews?[Dt,Bt,Vt]:[Dt,Bt];const tb=[{value:"draft",label:(0,b.__)("Draft")},{value:"future",label:(0,b.__)("Scheduled")},{value:"pending",label:(0,b.__)("Pending Review")},{value:"private",label:(0,b.__)("Private")},{value:"publish",label:(0,b.__)("Published")},{value:"trash",label:(0,b.__)("Trash")}],nb="draft,future,pending,private,publish";function ab({item:e,viewType:t}){const{onClick:n}=Et({postId:e.id,postType:e.type,canvas:"edit"}),a=!!e.featured_media;return(0,l.createElement)("span",{className:{"edit-site-page-pages__media-wrapper":t===Bt}},(0,l.createElement)("button",{className:"page-pages-preview-field__button",type:"button",onClick:n,"aria-label":e.title?.rendered||(0,b.__)("(no title)")},a&&(0,l.createElement)(X_,{className:"edit-site-page-pages__featured-image",id:e.featured_media,size:t===Dt?["large","full","medium","thumbnail"]:["thumbnail","medium","large","full"]})))}function rb(){const e="page",[t,n]=function(e){const{params:t}=J_(),{activeView:n="all",isCustom:a="false",layout:r}=t,s=Q_(),i=(0,f.useMemo)((()=>{const t="false"===a&&Bl[e].find((({slug:e})=>e===n))?.view;return"false"===a&&r?{...t,type:r}:t}),[a,n,r,e]),[o,l]=(0,f.useState)(i);(0,f.useEffect)((()=>{i&&l(i)}),[i]);const c=(0,d.useSelect)((e=>{if("true"!==a)return;const{getEditedEntityRecord:t}=e(ge.store);return t("postType","wp_dataviews",Number(n))}),[n,a]),{editEntityRecord:u}=(0,d.useDispatch)(ge.store),m=(0,f.useMemo)((()=>{const e=c?.content&&JSON.parse(c?.content);return e?{...e,layout:{...Fl[e?.type]||{}}}:e}),[c?.content]),p=(0,f.useCallback)((e=>{u("postType","wp_dataviews",c?.id,{content:JSON.stringify(e)})}),[u,c?.id]),h=(0,f.useCallback)((e=>{e.type!==o?.type&&s.push({...t,layout:e.type}),l(e)}),[t,o?.type,s]);return"false"===a?[o,h]:"true"===a&&m?[m,p]:[Bl[e][0].view,h]}(e),a=Q_(),{params:r}=J_(),{isCustom:s="false"}=r,i=(0,f.useCallback)((e=>{"false"===s&&t?.type===Vt&&a.push({...r,postId:1===e.length?e[0].id:void 0})}),[a,r,t?.type,s]),o=(0,f.useMemo)((()=>{const e={};return t.filters.forEach((t=>{"status"===t.field&&t.operator===zt&&(e.status=t.value),"author"===t.field&&t.operator===zt?e.author=t.value:"author"===t.field&&t.operator===Gt&&(e.author_exclude=t.value)})),e.status&&""!==e.status||(e.status=nb),{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:u,totalItems:m,totalPages:p}=(0,ge.useEntityRecords)("postType",e,o),{records:h,isResolving:g}=(0,ge.useEntityRecords)("root","user"),y=(0,f.useMemo)((()=>({totalItems:m,totalPages:p})),[m,p]),v=(0,f.useMemo)((()=>[{id:"featured-image",header:(0,b.__)("Featured Image"),getValue:({item:e})=>e.featured_media,render:({item:e})=>(0,l.createElement)(ab,{item:e,viewType:t.type}),enableSorting:!1},{header:(0,b.__)("Title"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>[Bt,Dt].includes(t.type)?(0,l.createElement)(wt,{params:{postId:e.id,postType:e.type,canvas:"edit"}},(0,en.decodeEntities)(e.title?.rendered)||(0,b.__)("(no title)")):(0,en.decodeEntities)(e.title?.rendered)||(0,b.__)("(no title)"),maxWidth:400,enableHiding:!1},{header:(0,b.__)("Author"),id:"author",getValue:({item:e})=>e._embedded?.author[0]?.name,type:Lt,elements:h?.map((({id:e,name:t})=>({value:e,label:t})))||[]},{header:(0,b.__)("Status"),id:"status",getValue:({item:e})=>{var t;return null!==(t=tb.find((({value:t})=>t===e.status))?.label)&&void 0!==t?t:e.status},type:Lt,elements:tb,enableSorting:!1,filterBy:{operators:[zt]}},{header:(0,b.__)("Date"),id:"date",getValue:({item:e})=>e.date,render:({item:e})=>{const t=(0,_r.dateI18n)((0,_r.getSettings)().formats.datetimeAbbreviated,(0,_r.getDate)(e.date));return(0,l.createElement)("time",null,t)}}]),[h,t.type]),E=function(){const{createSuccessNotice:e,createErrorNotice:t}=(0,d.useDispatch)(fe.store),{deleteEntityRecord:n}=(0,d.useDispatch)(ge.store);return(0,f.useMemo)((()=>({id:"permanently-delete",label:(0,b.__)("Permanently delete"),isPrimary:!0,icon:Rl,supportsBulk:!0,isEligible({status:e}){return"trash"===e},async callback(a){const r=await Promise.allSettled(a.map((e=>n("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(r.every((({status:e})=>"fulfilled"===e))){let t;t=1===r.length?(0,b.sprintf)((0,b.__)('"%s" permanently deleted.'),(0,en.decodeEntities)(a[0].title.rendered)):(0,b.__)("The posts were permanently deleted."),e(t,{type:"snackbar",id:"edit-site-post-permanently-deleted"})}else{let e;if(1===r.length)e=r[0].reason?.message?r[0].reason.message:(0,b.__)("An error occurred while permanently deleting the post.");else{const n=new Set,a=r.filter((({status:e})=>"rejected"===e));for(const e of a)e.reason?.message&&n.add(e.reason.message);e=0===n.size?(0,b.__)("An error occurred while permanently deleting the posts."):1===n.size?(0,b.sprintf)((0,b.__)("An error occurred while permanently deleting the posts: %s"),[...n][0]):(0,b.sprintf)((0,b.__)("Some errors occurred while permanently deleting the posts: %s"),[...n].join(",")),t(e,{type:"snackbar"})}}}})),[e,t,n])}(),w=function(){const{createSuccessNotice:e,createErrorNotice:t}=(0,d.useDispatch)(fe.store),{editEntityRecord:n,saveEditedEntityRecord:a}=(0,d.useDispatch)(ge.store);return(0,f.useMemo)((()=>({id:"restore",label:(0,b.__)("Restore"),isPrimary:!0,icon:br,supportsBulk:!0,isEligible({status:e}){return"trash"===e},async callback(r){try{for(const e of r)await n("postType",e.type,e.id,{status:"draft"}),await a("postType",e.type,e.id,{throwOnError:!0});e(r.length>1?(0,b.sprintf)((0,b.__)("%d posts have been restored."),r.length):(0,b.sprintf)((0,b.__)('"%s" has been restored.'),(0,en.decodeEntities)(r[0].title.rendered)),{type:"snackbar",id:"edit-site-post-restored"})}catch(e){let n;n=e.message&&"unknown_error"!==e.code&&e.message?e.message:r.length>1?(0,b.__)("An error occurred while restoring the posts."):(0,b.__)("An error occurred while restoring the post."),t(n,{type:"snackbar"})}}})),[e,t,n,a])}(),x=function(){const e=Z_();return(0,f.useMemo)((()=>({id:"edit-post",label:(0,b.__)("Edit"),isEligible({status:e}){return"trash"!==e},callback(t){const n=t[0];e.push({postId:n.id,postType:n.type,canvas:"edit"})}})),[e])}(),S=(0,f.useMemo)((()=>[Y_,q_,w,E,x,K_]),[E,w,x]),C=(0,f.useCallback)((e=>{e.type!==t.type&&(e={...e,layout:{...Fl[e.type]}}),n(e)}),[t.type,n]),[k,T]=(0,f.useState)(!1),P=(0,f.useCallback)((()=>{k||T(!0)}),[k]),M=(0,f.useCallback)((()=>{k&&T(!1)}),[k]),I=(0,f.useCallback)((({type:e,id:t})=>{a.push({postId:t,postType:e,canvas:"edit"}),M()}),[a]);return(0,l.createElement)(j_,{title:(0,b.__)("Pages"),actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.Button,{variant:"primary",onClick:P},(0,b.__)("Add new page")),k&&(0,l.createElement)(Il,{onSave:I,onClose:M}))},(0,l.createElement)(U_,{paginationInfo:y,fields:v,actions:S,data:c||$_,isLoading:u||g,view:t,onChangeView:C,onSelectionChange:i,supportedLayouts:eb}))}const sb=({data:e,view:t,fields:n,textFields:a})=>{const r=[...e],s=t.sort.field;if(a.includes(s)){const e=n.find((e=>e.id===s));r.sort(((n,a)=>{var r,s;const i=null!==(r=e.getValue({item:n}))&&void 0!==r?r:"",o=null!==(s=e.getValue({item:a}))&&void 0!==s?s:"";return"asc"===t.sort.direction?i.localeCompare(o):o.localeCompare(i)}))}return r};function ib({data:e,view:t}){const n=(t.page-1)*t.perPage,a=e?.length||0;return e=e?.slice(n,n+t.perPage),{data:e,paginationInfo:{totalItems:a,totalPages:Math.ceil(a/t.perPage)}}}var ob=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M18.5 10.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"}));var lb=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var cb=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.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"})),ub=window.wp.reusableBlocks;const{useHistory:db}=Ke(ft.privateApis),{CreatePatternModalContents:mb,useDuplicatePatternProps:pb}=Ke(xt.privateApis),hb={id:"export-pattern",label:(0,b.__)("Export as JSON"),isEligible:e=>e.type===Mt.user,callback:([e])=>{const t={__file:e.type,title:e.title||e.name,content:e.patternPost.content.raw,syncStatus:e.patternPost.wp_pattern_sync_status};return(0,Fc.downloadBlob)(`${bs(e.title||e.name)}.json`,JSON.stringify(t,null,2),"application/json")}},fb={id:"rename-pattern",label:(0,b.__)("Rename"),isEligible:e=>{const t=e.type===kt,n=e.type===Mt.user||t&&e.isCustom,a=t&&e.templatePart.has_theme_file;return n&&!a},RenderModal:({items:e,closeModal:t})=>{const[n]=e,[a,r]=(0,f.useState)((()=>n.title)),{editEntityRecord:s,saveEditedEntityRecord:i}=(0,d.useDispatch)(ge.store),{createSuccessNotice:o,createErrorNotice:c}=(0,d.useDispatch)(fe.store);return(0,l.createElement)("form",{onSubmit:async function(e){e.preventDefault();try{await s("postType",n.type,n.id,{title:a}),r(""),t(),await i("postType",n.type,n.id,{throwOnError:!0}),o(n.type===kt?(0,b.__)("Template part renamed."):(0,b.__)("Pattern renamed."),{type:"snackbar"})}catch(e){const t=n.type===kt?(0,b.__)("An error occurred while renaming the template part."):(0,b.__)("An error occurred while renaming the pattern."),a=e.message&&"unknown_error"!==e.code?e.message:t;c(a,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,b.__)("Name"),value:a,onChange:r,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t()}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,b.__)("Save")))))}},gb=e=>{const t=e.type===kt;return e.type===Mt.user||t&&e.isCustom},yb={id:"delete-pattern",label:(0,b.__)("Delete"),isEligible:e=>{const t=e.type===kt&&e.templatePart.has_theme_file;return gb(e)&&!t},hideModalHeader:!0,RenderModal:({items:e,closeModal:t})=>{const[n]=e,{__experimentalDeleteReusableBlock:a}=(0,d.useDispatch)(ub.store),{createErrorNotice:r,createSuccessNotice:s}=(0,d.useDispatch)(fe.store),{removeTemplate:i}=(0,d.useDispatch)(ta);return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,(0,b.sprintf)((0,b.__)('Are you sure you want to delete "%s"?'),(0,en.decodeEntities)(n.title||n.name))),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>n.type===kt?i(n):(async()=>{try{await a(n.id),s((0,b.sprintf)((0,b.__)('"%s" deleted.'),n.title),{type:"snackbar",id:"edit-site-patterns-success"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while deleting the pattern.");r(t,{type:"snackbar",id:"edit-site-patterns-error"})}})()},(0,b.__)("Delete"))))}},vb={id:"reset-action",label:(0,b.__)("Clear customizations"),isEligible:e=>{const t=e.type===kt&&e.templatePart.has_theme_file;return gb(e)&&t},hideModalHeader:!0,RenderModal:({items:e,closeModal:t})=>{const[n]=e,{removeTemplate:a}=(0,d.useDispatch)(ta);return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,(0,b.__)("Are you sure you want to clear these customizations?")),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>a(n)},(0,b.__)("Clear"))))}},_b={id:"duplicate-pattern",label:(0,b._x)("Duplicate","action label"),isEligible:e=>e.type!==kt,modalHeader:(0,b._x)("Duplicate pattern","action label"),RenderModal:({items:e,closeModal:t})=>{const[n]=e,{categoryId:a=It}=(0,gt.getQueryArgs)(window.location.href),r=n.type===Mt.theme,s=db();const i=pb({pattern:r?n:n.patternPost,onSuccess:function({pattern:e}){s.push({categoryType:Mt.theme,categoryId:a,postType:Mt.user,postId:e.id}),t()}});return(0,l.createElement)(mb,{onClose:t,confirmLabel:(0,b._x)("Duplicate","action label"),...i})}},bb={id:"duplicate-template-part",label:(0,b._x)("Duplicate","action label"),isEligible:e=>e.type===kt,modalHeader:(0,b._x)("Duplicate template part","action label"),RenderModal:({items:e,closeModal:t})=>{const[n]=e,{createSuccessNotice:a}=(0,d.useDispatch)(fe.store),{categoryId:r=It}=(0,gt.getQueryArgs)(window.location.href),s=db();return(0,l.createElement)(ti,{blocks:n.blocks,defaultArea:n.templatePart.area,defaultTitle:(0,b.sprintf)((0,b.__)("%s (Copy)"),n.title),onCreate:async function(e){a((0,b.sprintf)((0,b.__)('"%s" duplicated.'),n.title),{type:"snackbar",id:"edit-site-patterns-success"}),s.push({postType:kt,postId:e?.id,categoryType:kt,categoryId:r}),t()},onError:t,confirmLabel:(0,b._x)("Duplicate","action label")})}};function Eb(){var e;const t=(0,d.useSelect)((e=>{const{getSettings:t}=Ke(e(ta));return t()}),[]),n=null!==(e=t.__experimentalAdditionalBlockPatterns)&&void 0!==e?e:t.__experimentalBlockPatterns,a=(0,d.useSelect)((e=>e(ge.store).getBlockPatterns()),[]),r=(0,f.useMemo)((()=>[...n||[],...a||[]].filter(ni)),[n,a]);return(0,f.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:e,...n}=t;return{...n,__experimentalBlockPatterns:r,__unstableIsPreviewMode:!0}}),[t,r])}const{RenamePatternCategoryModal:wb}=Ke(xt.privateApis);function xb({category:e,onClose:t}){const[n,a]=(0,f.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>a(!0)},(0,b.__)("Rename")),n&&(0,l.createElement)(Sb,{category:e,onClose:()=>{a(!1),t()}}))}function Sb({category:e,onClose:t}){const n={id:e.id,slug:e.slug,name:e.label},a=ki();return(0,l.createElement)(wb,{category:n,existingCategories:a,onClose:t,overlayClassName:"edit-site-list__rename-modal"})}const{useHistory:Cb}=Ke(ft.privateApis);function kb({category:e,onClose:t}){const[n,a]=(0,f.useState)(!1),r=Cb(),{createSuccessNotice:s,createErrorNotice:i}=(0,d.useDispatch)(fe.store),{deleteEntityRecord:o,invalidateResolution:c}=(0,d.useDispatch)(ge.store);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{isDestructive:!0,onClick:()=>a(!0)},(0,b.__)("Delete")),(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{await o("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),c("getUserPatternCategories"),c("getEntityRecords",["postType",Mt.user,{per_page:-1}]),s((0,b.sprintf)((0,b.__)('"%s" deleted.'),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),r.push({path:"/patterns",categoryType:Mt.theme,categoryId:It})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while deleting the pattern category.");i(t,{type:"snackbar",id:"pattern-category-delete"})}},onCancel:()=>a(!1),confirmButtonText:(0,b.__)("Delete"),className:"edit-site-patterns__delete-modal"},(0,b.sprintf)((0,b.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,en.decodeEntities)(e.label))))}function Tb({categoryId:e,type:t,titleId:n,descriptionId:a}){const{patternCategories:r}=ki(),s=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas()),[]);let i,o,c;if(t===kt){const t=s.find((t=>t.area===e));i=t?.label,o=t?.description}else t===Mt.theme&&(c=r.find((t=>t.name===e)),i=c?.label,o=c?.description);return i?(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-patterns__section-header"},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.__experimentalHeading,{as:"h2",level:4,id:n},i),!!c?.id&&(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",describedBy:(0,b.sprintf)((0,b.__)("Action menu for %s pattern category"),i)}},(({onClose:e})=>(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(xb,{category:c,onClose:e}),(0,l.createElement)(kb,{category:c,onClose:e}))))),o?(0,l.createElement)(_.__experimentalText,{variant:"muted",as:"p",id:a},o):null):null}const{ExperimentalBlockEditorProvider:Pb,useGlobalStyle:Mb}=Ke(he.privateApis),Ib={header:ob,footer:lb,uncategorized:Ks},Ab=[],Nb={[Dt]:{mediaField:"preview",primaryField:"title"}},Ob={type:Dt,search:"",page:1,perPage:20,hiddenFields:["sync-status"],layout:{...Nb[Dt]},filters:[]},Rb=[{value:Ot.full,label:(0,b._x)("Synced","Option that shows all synchronized patterns"),description:(0,b.__)("Patterns that are kept in sync across the site.")},{value:Ot.unsynced,label:(0,b._x)("Not synced","Option that shows all patterns that are not synchronized"),description:(0,b.__)("Patterns that can be changed freely without affecting the site.")}];function Fb({item:e,onClick:t,ariaDescribedBy:n,children:a}){return e.type===Mt.theme?a:(0,l.createElement)("button",{className:"page-patterns-preview-field__button",type:"button",onClick:t,"aria-label":e.title,"aria-describedby":n},a)}function Db({item:e,categoryId:t,viewType:n}){const a=(0,f.useId)(),r=e.type===Mt.user,s=e.type===Mt.theme,i=e.type===kt,o=!e.blocks?.length,c=[];r||i&&e.isCustom?c.push((0,b.__)("Press Enter to edit, or Delete to delete the pattern.")):e.description&&c.push(e.description),s&&c.push((0,b.__)("Theme & plugin patterns cannot be edited."));const[u]=Mb("color.background"),{onClick:d}=Et({postType:e.type,postId:r?e.id:e.name,categoryId:t,categoryType:i?e.type:Mt.theme});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:`page-patterns-preview-field is-viewtype-${n}`,style:{backgroundColor:u}},(0,l.createElement)(Fb,{item:e,onClick:d,ariaDescribedBy:c.length?c.map(((e,t)=>`${a}-${t}`)).join(" "):void 0},o&&i&&(0,b.__)("Empty template part"),o&&!i&&(0,b.__)("Empty pattern"),!o&&(0,l.createElement)(he.BlockPreview,{blocks:e.blocks}))),c.map(((e,t)=>(0,l.createElement)("div",{key:t,hidden:!0,id:`${a}-${t}`},e))))}function Bb({item:e,categoryId:t}){const n=e.type===Mt.user,a=e.type===Mt.theme,r=e.type===kt;let s;const{onClick:i}=Et({postType:e.type,postId:n?e.id:e.name,categoryId:t,categoryType:r?e.type:Mt.theme});return s=!n&&Ib[t]?Ib[t]:e.syncStatus===Ot.full?ca:void 0,(0,l.createElement)(_.__experimentalHStack,{alignment:"center",justify:"flex-start",spacing:2},s&&!a&&(0,l.createElement)(_.Tooltip,{placement:"top",text:(0,b.__)("Editing this pattern will also update anywhere it is used")},(0,l.createElement)(fa,{className:"edit-site-patterns__pattern-icon",icon:s})),e.type===Mt.theme&&(0,l.createElement)(_.Tooltip,{placement:"top",text:(0,b.__)("This pattern cannot be edited.")},(0,l.createElement)(fa,{className:"edit-site-patterns__pattern-lock-icon",icon:cb,size:24})),(0,l.createElement)(_.Flex,{as:"div",gap:0,justify:"left",className:"edit-site-patterns__pattern-title"},e.type===Mt.theme?e.title:(0,l.createElement)(_.Button,{variant:"link",onClick:i,tabIndex:"-1"},e.title||e.name)))}function Vb(){const{categoryType:e,categoryId:t=It}=(0,gt.getQueryArgs)(window.location.href),n=e||Mt.theme,[a,r]=(0,f.useState)(Ob),s=n===Mt.theme&&"uncategorized"===t,i=(0,se.usePrevious)(t),o=a.filters?.find((({field:e})=>"sync-status"===e))?.value,{patterns:c,isResolving:u}=Ci(n,s?"":t,{search:a.search,syncStatus:o}),d=(0,f.useMemo)((()=>{const e=[{header:(0,b.__)("Preview"),id:"preview",render:({item:e})=>(0,l.createElement)(Db,{item:e,categoryId:t,viewType:a.type}),enableSorting:!1,enableHiding:!1},{header:(0,b.__)("Title"),id:"title",getValue:({item:e})=>e.title,render:({item:e})=>(0,l.createElement)(Bb,{item:e,categoryId:t}),enableHiding:!1}];return n===Mt.theme&&e.push({header:(0,b.__)("Sync Status"),id:"sync-status",render:({item:e})=>Rb.find((({value:t})=>t===e.syncStatus))?.label||Rb.find((({value:e})=>e===Ot.unsynced)).label,type:Lt,elements:Rb,filterBy:{operators:[zt]},enableSorting:!1}),e}),[a.type,t,n]);(0,f.useEffect)((()=>{i!==t&&r(Ob)}),[t,i]);const{data:m,paginationInfo:p}=(0,f.useMemo)((()=>{if(!c)return{data:Ab,paginationInfo:{totalItems:0,totalPages:0}};let e=[...c];return a.sort&&(e=sb({data:e,view:a,fields:d,textFields:["title","author"]})),ib({data:e,view:a})}),[c,a,d]),h=(0,f.useMemo)((()=>[fb,_b,bb,hb,vb,yb]),[]),g=(0,f.useCallback)((e=>{e.type!==a.type&&(e={...e,layout:{...Nb[e.type]}}),r(e)}),[a.type,r]),y=(0,f.useId)(),v=Eb();return(0,l.createElement)(Pb,{settings:v},(0,l.createElement)(j_,{title:(0,b.__)("Patterns content"),className:"edit-site-page-patterns-dataviews",hideTitleFromUI:!0},(0,l.createElement)(Tb,{categoryId:t,type:n,titleId:`${y}-title`,descriptionId:`${y}-description`}),(0,l.createElement)(U_,{paginationInfo:p,fields:d,actions:h,data:m||Ab,getItemId:e=>e.name,isLoading:u,view:a,onChangeView:g,deferredRendering:!0,supportedLayouts:[Dt]})))}const Lb={id:"delete-template",label:(0,b.__)("Delete"),isPrimary:!0,icon:Rl,isEligible:Gs,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onPerform:n})=>{const{removeTemplates:a}=Ke((0,d.useDispatch)(ta));return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,e.length>1?(0,b.sprintf)((0,b._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,b.sprintf)((0,b.__)('Delete "%s"?'),(0,en.decodeEntities)(e?.[0]?.title?.rendered))),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:async()=>{await a(e,{allowUndo:!1}),n&&n(),t()}},(0,b.__)("Delete"))))}},zb={id:"rename-template",label:(0,b.__)("Rename"),isEligible:e=>!(!Gs(e)||e.type===Ct&&!e.is_custom),RenderModal:({items:e,closeModal:t})=>{const n=e[0],a=(0,en.decodeEntities)(n.title.rendered),[r,s]=(0,f.useState)(a),{editEntityRecord:i,__experimentalSaveSpecifiedEntityEdits:o}=(0,d.useDispatch)(ge.store),{createSuccessNotice:c,createErrorNotice:u}=(0,d.useDispatch)(fe.store);return(0,l.createElement)("form",{onSubmit:async function(e){e.preventDefault();try{await i("postType",n.type,n.id,{title:r}),s(""),t(),await o("postType",n.type,n.id,["title"],{throwOnError:!0}),c(n.type===Ct?(0,b.__)("Template renamed."):(0,b.__)("Template part renamed."),{type:"snackbar"})}catch(e){const t=n.type===Ct?(0,b.__)("An error occurred while renaming the template."):(0,b.__)("An error occurred while renaming the template part."),a=e.message&&"unknown_error"!==e.code?e.message:t;u(a,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:r,onChange:s,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit"},(0,b.__)("Save")))))}},{useHistory:Gb}=Ke(ft.privateApis);function Hb(){const{canCreate:e,postType:t}=(0,d.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(ta).getSettings();return{canCreate:!t,postType:e(ge.store).getPostType(kt)}}),[]),[n,a]=(0,f.useState)(!1),r=Gb();return e&&t?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>a(!0)},t.labels.add_new_item),n&&(0,l.createElement)(ei,{closeModal:()=>a(!1),blocks:[],onCreate:e=>{a(!1),r.push({postId:e.id,postType:kt,canvas:"edit"})},onError:()=>a(!1)})):null}const{ExperimentalBlockEditorProvider:Ub,useGlobalStyle:Wb}=Ke(he.privateApis),{useHistory:jb,useLocation:Zb}=Ke(ft.privateApis),qb=[],Yb=window?.__experimentalAdminViews?[Bt,Dt,Vt]:[Bt,Dt],Kb={[Bt]:{primaryField:"title"},[Dt]:{mediaField:"preview",primaryField:"title"},[Vt]:{primaryField:"title",mediaField:"preview"}},Xb={type:Bt,search:"",page:1,perPage:20,sort:{field:"title",direction:"asc"},hiddenFields:["preview"],layout:Kb[Bt],filters:[]};function Jb(e=""){return li()(e.trim().toLowerCase())}function Qb({item:e,viewType:t}){if(t===Vt)return(0,en.decodeEntities)(e.title?.rendered)||(0,b.__)("(no title)");const n={params:{postId:e.id,postType:e.type,canvas:"edit"}};return e.type===kt&&(n.state={backPath:"/wp_template_part/all"}),(0,l.createElement)(wt,{...n},(0,en.decodeEntities)(e.title?.rendered)||(0,b.__)("(no title)"))}function $b({item:e,viewType:t}){const{text:n,icon:a,imageUrl:r}=Ls(e.type,e.id),s=t!==Vt;return(0,l.createElement)(_.__experimentalHStack,{alignment:"left",spacing:1},s&&r&&(0,l.createElement)(zs,{imageUrl:r}),s&&!r&&(0,l.createElement)("div",{className:"edit-site-list-added-by__icon"},(0,l.createElement)(_.Icon,{icon:a})),(0,l.createElement)("span",null,n))}function eE({item:e,viewType:t}){const n=Eb(),[a="white"]=Wb("color.background"),r=(0,f.useMemo)((()=>(0,c.parse)(e.content.raw)),[e.content.raw]),{onClick:s}=Et({postId:e.id,postType:e.type,canvas:"edit"}),i=!r?.length;return(0,l.createElement)(Ub,{settings:n},(0,l.createElement)("div",{className:`page-templates-preview-field is-viewtype-${t}`,style:{backgroundColor:a}},(0,l.createElement)("button",{className:"page-templates-preview-field__button",type:"button",onClick:s,"aria-label":e.title?.rendered||e.title},i&&(e.type===Ct?(0,b.__)("Empty template"):(0,b.__)("Empty template part")),!i&&(0,l.createElement)(he.BlockPreview,{blocks:r}))))}function tE({postType:e}){const{params:t}=Zb(),{activeView:n="all",layout:a}=t,r=(0,f.useMemo)((()=>({...Xb,type:window?.__experimentalAdminViews&&null!=a?a:Xb.type,filters:"all"!==n?[{field:"author",operator:"in",value:n}]:[]})),[a,n]),[s,i]=(0,f.useState)(r);(0,f.useEffect)((()=>{i((e=>({...e,filters:"all"!==n?[{field:"author",operator:"in",value:n}]:[]})))}),[n]);const{records:o,isResolving:c}=(0,ge.useEntityRecords)("postType",e,{per_page:-1}),u=jb(),m=(0,f.useCallback)((e=>{s?.type===Vt&&u.push({...t,postId:1===e.length?e[0].id:void 0})}),[u,t,s?.type]),p=(0,f.useMemo)((()=>{if(!o)return qb;const e=new Set;return o.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[o]),h=(0,f.useMemo)((()=>{const t=[{header:(0,b.__)("Preview"),id:"preview",render:({item:e})=>(0,l.createElement)(eE,{item:e,viewType:s.type}),minWidth:120,maxWidth:120,enableSorting:!1},{header:e===Ct?(0,b.__)("Template"):(0,b.__)("Template Part"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>(0,l.createElement)(Qb,{item:e,viewType:s.type}),maxWidth:400,enableHiding:!1}];return e===Ct&&t.push({header:(0,b.__)("Description"),id:"description",getValue:({item:e})=>e.description,render:({item:e})=>e.description?(0,l.createElement)("span",{className:"page-templates-description"},(0,en.decodeEntities)(e.description)):s.type===Bt&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{variant:"muted","aria-hidden":"true"},"—"),(0,l.createElement)(_.VisuallyHidden,null,(0,b.__)("No description."))),maxWidth:400,minWidth:320,enableSorting:!1}),t.push({header:(0,b.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:({item:e})=>(0,l.createElement)($b,{viewType:s.type,item:e}),enableHiding:!1,type:Lt,elements:p,width:"1%"}),t}),[e,p,s.type]),{data:g,paginationInfo:y}=(0,f.useMemo)((()=>{if(!o)return{data:qb,paginationInfo:{totalItems:0,totalPages:0}};let e=[...o];if(s.search){const t=Jb(s.search);e=e.filter((e=>Jb(e.title?.rendered||e.slug).includes(t)||Jb(e.description).includes(t)))}return s.filters.length>0&&s.filters.forEach((t=>{"author"===t.field&&t.operator===zt&&t.value?e=e.filter((e=>e.author_text===t.value)):"author"===t.field&&t.operator===Gt&&t.value&&(e=e.filter((e=>e.author_text!==t.value)))})),s.sort&&(e=sb({data:e,view:s,fields:h,textFields:["title","author"]})),ib({data:e,view:s})}),[o,s,h]),v=function(){const{revertTemplate:e}=(0,d.useDispatch)(ta),{saveEditedEntityRecord:t}=(0,d.useDispatch)(ge.store),{createSuccessNotice:n,createErrorNotice:a}=(0,d.useDispatch)(fe.store);return(0,f.useMemo)((()=>({id:"reset-template",label:(0,b.__)("Reset"),isPrimary:!0,icon:br,isEligible:$t,supportsBulk:!0,async callback(r){try{for(const n of r)await e(n,{allowUndo:!1}),await t("postType",n.type,n.id);n(r.length>1?(0,b.sprintf)((0,b.__)("%s items reverted."),r.length):(0,b.sprintf)((0,b.__)('"%s" reverted.'),(0,en.decodeEntities)(r[0].title.rendered)),{type:"snackbar",id:"edit-site-template-reverted"})}catch(e){let t;t=r[0].type===Ct?1===r.length?(0,b.__)("An error occurred while reverting the template."):(0,b.__)("An error occurred while reverting the templates."):1===r.length?(0,b.__)("An error occurred while reverting the template part."):(0,b.__)("An error occurred while reverting the template parts.");const n=e.message&&"unknown_error"!==e.code?e.message:t;a(n,{type:"snackbar"})}}})),[a,n,e,t])}(),E=(0,f.useMemo)((()=>[v,Lb,zb,K_]),[v]),w=(0,f.useCallback)((e=>{e.type!==s.type&&(e={...e,layout:{...Kb[e.type]}},u.push({...t,layout:e.type})),i(e)}),[s.type,i,u,t]);return(0,l.createElement)(j_,{title:e===Ct?(0,b.__)("Templates"):(0,b.__)("Template Parts"),actions:e===Ct?(0,l.createElement)(Ms,{templateType:e,showIcon:!1,toggleProps:{variant:"primary"}}):(0,l.createElement)(Hb,null)},(0,l.createElement)(U_,{paginationInfo:y,fields:h,actions:E,data:g,isLoading:c,view:s,onChangeView:w,onSelectionChange:m,deferredRendering:!s.hiddenFields?.includes("preview"),supportedLayouts:Yb}))}const{useLocation:nE}=Ke(ft.privateApis);const{useCommands:aE}=Ke(ra.privateApis),{useCommandContext:rE}=Ke(aa.privateApis),{useGlobalStyle:sE}=Ke(he.privateApis),iE=.5;function oE(){Vi(),function(){const e=iu(),{params:t}=su(),n=(0,d.useSelect)((e=>Ke(e(ta)).getCanvasMode()),[]),{setCanvasMode:a}=Ke((0,d.useDispatch)(ta)),r=(0,f.useRef)(n),{canvas:s}=t,i=(0,f.useRef)(s),o=(0,f.useRef)(t);(0,f.useEffect)((()=>{o.current=t}),[t]),(0,f.useEffect)((()=>{r.current=n,"init"!==n&&("edit"===n&&i.current!==n&&e.push({...o.current,canvas:"edit"}),"view"===n&&void 0!==i.current&&e.push({...o.current,canvas:void 0}))}),[n,e]),(0,f.useEffect)((()=>{i.current=s,"edit"!==s&&"view"!==r.current?a("view"):"edit"===s&&"edit"!==r.current&&a("edit")}),[s,a])}(),aE(),(0,aa.useCommandLoader)({name:"core/exit-code-editor",hook:Uu,context:"site-editor-edit"}),(0,aa.useCommandLoader)({name:"core/edit-site/page-content-focus",hook:Hu,context:"site-editor-edit"}),(0,aa.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:Wu}),(0,aa.useCommandLoader)({name:"core/edit-site/patterns",hook:Zu,context:"site-editor-edit"}),(0,aa.useCommandLoader)({name:"core/edit-site/edit-ui",hook:ju}),function(){const e=(0,d.useSelect)((e=>{const{getUnstableBase:t}=e(ge.store);return t()?.home}),[]);(0,aa.useCommand)({name:"core/edit-site/view-site",label:(0,b.__)("View site"),callback:({close:t})=>{t(),window.open(e,"_blank")},icon:vc}),(0,aa.useCommandLoader)({name:"core/edit-site/open-styles",hook:xu}),(0,aa.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:Su}),(0,aa.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:Cu}),(0,aa.useCommandLoader)({name:"core/edit-site/open-styles-css",hook:ku}),(0,aa.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:Tu})}(),(0,he.useBlockCommands)();const e=(0,se.useViewportMatch)("medium","<"),{isDistractionFree:t,hasFixedToolbar:n,hasBlockSelected:a,canvasMode:r,previousShortcut:s,nextShortcut:i}=(0,d.useSelect)((e=>{const{getAllShortcutKeyCombinations:t}=e(na.store),{getCanvasMode:n}=Ke(e(ta));return{canvasMode:n(),previousShortcut:t("core/edit-site/previous-region"),nextShortcut:t("core/edit-site/next-region"),hasFixedToolbar:e(k.store).get("core","fixedToolbar"),isDistractionFree:e(k.store).get("core","distractionFree"),hasBlockSelected:e(he.store).getBlockSelectionStart()}}),[]),o=(0,_.__unstableUseNavigateRegions)({previous:s,next:i}),c=(0,se.useReducedMotion)(),[u,m]=(0,se.useResizeObserver)(),[p]=(0,se.useResizeObserver)(),h=Yu(),[g,y]=(0,f.useState)(!1),{areas:E,widths:w}=function(){const e=Yu(),{params:t}=nE(),{postType:n,postId:a,path:r,layout:s,isCustom:i}=null!=t?t:{};if("/page"===r)return{areas:{content:void 0,preview:(0,l.createElement)(Yv,{isLoading:e})},widths:{content:void 0}};const o="true"!==i&&"list"===s&&window?.__experimentalAdminViews;return"/pages"===r?{areas:{content:(0,l.createElement)(rb,null),preview:o&&(0,l.createElement)(Yv,{isLoading:e})},widths:{content:o?380:void 0}}:n&&a?{areas:{preview:(0,l.createElement)(Yv,{isLoading:e})}}:"/wp_template/all"===r?{areas:{content:(0,l.createElement)(tE,{postType:Ct}),preview:o&&(0,l.createElement)(Yv,{isLoading:e})},widths:{content:o?380:void 0}}:"/wp_template_part/all"===r?{areas:{content:(0,l.createElement)(tE,{postType:kt}),preview:o&&(0,l.createElement)(Yv,{isLoading:e})},widths:{content:o?380:void 0}}:"/patterns"===r?{areas:{content:(0,l.createElement)(Vb,null)}}:{areas:{preview:(0,l.createElement)(Yv,{isLoading:e})}}}();let x;x="view"===r?"view":t?"isDistractionFree":r;let S="site-editor";"edit"===r&&(S="site-editor-edit"),a&&(S="block-selection-edit"),rE(S);const[C]=sE("color.background"),[T]=sE("color.gradient");return"init"===r?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(aa.CommandMenu,null),(0,l.createElement)(pu,null),(0,l.createElement)(hu,null),p,(0,l.createElement)("div",{...o,ref:o.ref,className:v()("edit-site-layout",o.className,{"is-distraction-free":t&&"edit"===r,"is-full-canvas":"edit"===r,"has-fixed-toolbar":n,"is-block-toolbar-visible":a})},(0,l.createElement)(_.__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:x},(0,l.createElement)(Jc,{isTransparent:g,className:"edit-site-layout__hub"}),(0,l.createElement)(_.__unstableAnimatePresence,{initial:!1},"edit"===r&&(0,l.createElement)(ie,{key:"header",className:"edit-site-layout__header",ariaLabel:(0,b.__)("Editor top bar"),as:_.__unstableMotion.div,variants:{isDistractionFree:{opacity:0,y:0},isDistractionFreeHovering:{opacity:1,y:0},view:{opacity:1,y:"-100%"},edit:{opacity:1,y:0}},exit:{y:"-100%"},initial:{opacity:t?1:0,y:t?0:"-100%"},transition:{type:"tween",duration:c?0:.2,ease:"easeOut"}},(0,l.createElement)(qc,null)))),(0,l.createElement)("div",{className:"edit-site-layout__content"},(0,l.createElement)(ie,{ariaLabel:(0,b.__)("Navigation"),className:"edit-site-layout__sidebar-region"},(0,l.createElement)(_.__unstableAnimatePresence,null,"view"===r&&(0,l.createElement)(_.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:c||e?0:iE,ease:"easeOut"},className:"edit-site-layout__sidebar"},(0,l.createElement)(mc,null)))),(0,l.createElement)(mu,null),E.content&&"edit"!==r&&(0,l.createElement)("div",{className:"edit-site-layout__area",style:{maxWidth:w?.content}},E.content),E.preview&&(0,l.createElement)("div",{className:"edit-site-layout__canvas-container"},u,!!m.width&&(0,l.createElement)(_.__unstableMotion.div,{whileHover:"view"===r?{scale:1.005,transition:{duration:c?0:.5,ease:"easeOut"}}:{},initial:!1,layout:"position",className:v()("edit-site-layout__canvas",{"is-right-aligned":g}),transition:{type:"tween",duration:c?0:iE,ease:"easeOut"}},(0,l.createElement)(fc,null,(0,l.createElement)(ru,{isReady:!h,isFullWidth:"edit"===r,defaultSize:{width:m.width-24,height:m.height},isOversized:g,setIsOversized:y,innerContentStyle:{background:null!=T?T:C}},E.preview)))))))}const{RouterProvider:lE}=Ke(ft.privateApis);function cE(){const{createErrorNotice:e}=(0,d.useDispatch)(fe.store);return(0,l.createElement)(_.SlotFillProvider,null,(0,l.createElement)(Aa,null,(0,l.createElement)(g.UnsavedChangesWarning,null),(0,l.createElement)(lE,null,(0,l.createElement)(oE,null),(0,l.createElement)(j.PluginArea,{onError:function(t){e((0,b.sprintf)((0,b.__)('The "%s" plugin has encountered an error and cannot be rendered.'),t))}}))))}function uE({className:e,...t}){return(0,l.createElement)(re,{panelClassName:e,className:"edit-site-sidebar-edit-mode",scope:"core/edit-site",...t})}function dE(e){return(0,l.createElement)($,{__unstableExplicitMenuItem:!0,scope:"core/edit-site",...e})}var mE=(0,se.compose)((0,j.withPluginContext)(((e,t)=>{var n;return{as:null!==(n=t.as)&&void 0!==n?n:_.MenuItem,icon:t.icon||e.icon,name:"core/edit-site/plugin-more-menu"}})))(J);function pE(e,t){const n=document.getElementById(e),a=(0,f.createRoot)(n);(0,d.dispatch)(c.store).reapplyBlockTypeFilters();const r=(0,u.__experimentalGetCoreBlocks)().filter((({name:e})=>"core/freeform"!==e));return(0,u.registerCoreBlocks)(r),(0,d.dispatch)(c.store).setFreeformFallbackBlockName("core/html"),(0,de.registerLegacyWidgetBlock)({inserter:!1}),(0,de.registerWidgetGroupBlock)({inserter:!1}),(0,d.dispatch)(k.store).setDefaults("core/edit-site",{welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,d.dispatch)(k.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,editorMode:"visual",fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1}),(0,d.dispatch)(W).setDefaultComplementaryArea("core/edit-site","edit-site/template"),(0,d.dispatch)(ta).updateSettings(t),(0,d.dispatch)(g.store).updateEditorSettings({defaultTemplateTypes:t.defaultTemplateTypes,defaultTemplatePartAreas:t.defaultTemplatePartAreas}),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),a.render((0,l.createElement)(cE,null)),a}function hE(){h()("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}}(),(window.wp=window.wp||{}).editSite=a}();