useblocks 1.0.95 → 1.0.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +1 -1
  2. package/asset-manifest.json +26 -26
  3. package/iframe/429.js +1 -1
  4. package/iframe/766.js +1 -1
  5. package/iframe/iframe-eblock.9ba2e4fe0d95678a9bad.html +1 -0
  6. package/iframe/iframe.9ba2e4fe0d95678a9bad.html +1 -0
  7. package/iframe/js/826.4326a843.js +1 -0
  8. package/iframe/sandbox-eblock.js +1 -1
  9. package/iframe/sandbox.js +1 -1
  10. package/package.json +1 -1
  11. package/plugin.html +1 -1
  12. package/plugin_blocks_test.html +1 -1
  13. package/plugin_default.html +1 -1
  14. package/plugin_idigital.html +1 -1
  15. package/plugin_nota.html +1 -1
  16. package/plugin_s.html +1 -1
  17. package/static/css/57.3f9e7de8.chunk.css +1 -0
  18. package/static/css/{101.94b6a519.chunk.css → 6798.4dd1ea5d.chunk.css} +1 -1
  19. package/static/js/{1538.f85eeb54.chunk.js → 1538.97b965ba.chunk.js} +2 -2
  20. package/static/js/251.5cce1b24.js +2 -0
  21. package/static/js/{2722.864e20c4.js → 2722.d7c999d9.js} +2 -2
  22. package/static/js/3017.fb727b48.chunk.js +1 -0
  23. package/static/js/{57.d3e5d606.chunk.js → 57.f116a039.chunk.js} +1 -1
  24. package/static/js/{6483.fd19e5b0.js → 6483.5ce4be3d.js} +2 -2
  25. package/static/js/6501.2d81fff4.chunk.js +1 -0
  26. package/static/js/6774.d6dae3aa.js +2 -0
  27. package/static/js/{101.bff71dea.chunk.js.LICENSE.txt → 6774.d6dae3aa.js.LICENSE.txt} +7 -0
  28. package/static/js/6798.3a0f09d3.chunk.js +2 -0
  29. package/static/js/{2557.b02142f0.js.LICENSE.txt → 6798.3a0f09d3.chunk.js.LICENSE.txt} +7 -0
  30. package/static/js/6819.85c72c79.chunk.js +2 -0
  31. package/static/js/7348.650581da.js +2 -0
  32. package/static/js/{7892.3eda5c19.js.LICENSE.txt → 7348.650581da.js.LICENSE.txt} +0 -7
  33. package/static/js/8473.54e12d36.chunk.js +2 -0
  34. package/static/js/9950.95a6b741.js +1 -0
  35. package/static/js/useblocks_core.b1163c8f.js +2 -0
  36. package/translations.pot +135 -135
  37. package/useblocks-esm.js +1 -1
  38. package/useblocks.d.ts +3 -2
  39. package/useblocks.js +1 -1
  40. package/iframe/iframe-eblock.9318762a0976402ba0ac.html +0 -1
  41. package/iframe/iframe.9318762a0976402ba0ac.html +0 -1
  42. package/iframe/js/826.c0f10153.js +0 -1
  43. package/static/css/57.f1674cba.chunk.css +0 -1
  44. package/static/js/101.bff71dea.chunk.js +0 -2
  45. package/static/js/251.bebdf7a4.js +0 -2
  46. package/static/js/2557.b02142f0.js +0 -2
  47. package/static/js/2903.02ab963c.js +0 -1
  48. package/static/js/3017.ac2bc53e.chunk.js +0 -1
  49. package/static/js/6501.8e4a427d.chunk.js +0 -1
  50. package/static/js/6819.efc5bf71.chunk.js +0 -2
  51. package/static/js/7892.3eda5c19.js +0 -2
  52. package/static/js/8473.6019be55.chunk.js +0 -2
  53. package/static/js/useblocks_core.ea844416.js +0 -2
  54. /package/iframe/js/{826.c0f10153.js.LICENSE.txt → 826.4326a843.js.LICENSE.txt} +0 -0
  55. /package/static/js/{1538.f85eeb54.chunk.js.LICENSE.txt → 1538.97b965ba.chunk.js.LICENSE.txt} +0 -0
  56. /package/static/js/{251.bebdf7a4.js.LICENSE.txt → 251.5cce1b24.js.LICENSE.txt} +0 -0
  57. /package/static/js/{2722.864e20c4.js.LICENSE.txt → 2722.d7c999d9.js.LICENSE.txt} +0 -0
  58. /package/static/js/{6483.fd19e5b0.js.LICENSE.txt → 6483.5ce4be3d.js.LICENSE.txt} +0 -0
  59. /package/static/js/{6819.efc5bf71.chunk.js.LICENSE.txt → 6819.85c72c79.chunk.js.LICENSE.txt} +0 -0
  60. /package/static/js/{8473.6019be55.chunk.js.LICENSE.txt → 8473.54e12d36.chunk.js.LICENSE.txt} +0 -0
  61. /package/static/js/{useblocks_core.ea844416.js.LICENSE.txt → useblocks_core.b1163c8f.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[3017],{39539:(e,t,s)=>{let a,o,i,r,n,d,p,l,h,m,_,c,u,E,y,T,v,f,P,b,g,D,A,U;s.d(t,{RQ:()=>C,cM:()=>U}),function(e){let t,s,a,o;t||(t=e.GetBdpwr||(e.GetBdpwr={})),s||(s=e.ResetPasswordCreate||(e.ResetPasswordCreate={})),a||(a=e.SetPasswordCreate||(e.SetPasswordCreate={})),o||(o=e.ValidateCodeCreate||(e.ValidateCodeCreate={}))}(a||(a={})),function(e){let t,s;t||(t=e.GetCorsProxy||(e.GetCorsProxy={})),s||(s=e.GetList||(e.GetList={}))}(o||(o={})),function(e){let t,s,a,o,i,r,n,d;t||(t=e.GetSaveFile||(e.GetSaveFile={})),s||(s=e.AiCreate||(e.AiCreate={})),a||(a=e.AiStatusList||(e.AiStatusList={})),o||(o=e.TestList||(e.TestList={})),i||(i=e.UploadCreate||(e.UploadCreate={})),r||(r=e.ShortenerCreate||(e.ShortenerCreate={})),n||(n=e.GetLinkCreate||(e.GetLinkCreate={})),d||(d=e.SendEmailCreate||(e.SendEmailCreate={}))}(i||(i={})),function(e){let t,s,a,o,i,r,n;t||(t=e.GetAiGenerator||(e.GetAiGenerator={})),s||(s=e.AiCreate||(e.AiCreate={})),a||(a=e.AiStatusList||(e.AiStatusList={})),o||(o=e.TestList||(e.TestList={})),i||(i=e.ClearHistoryList||(e.ClearHistoryList={})),r||(r=e.SaveTaskCreate||(e.SaveTaskCreate={})),n||(n=e.IdentificateBlocksCreate||(e.IdentificateBlocksCreate={}))}(r||(r={})),function(e){let t,s,a,o,i,r,n;t||(t=e.GetAuth||(e.GetAuth={})),s||(s=e.UsersRegisterCreate||(e.UsersRegisterCreate={})),a||(a=e.CheckAuthList||(e.CheckAuthList={})),o||(o=e.YandexCallbackCreate||(e.YandexCallbackCreate={})),i||(i=e.GoogleCallbackCreate||(e.GoogleCallbackCreate={})),r||(r=e.ElamaCallbackList||(e.ElamaCallbackList={})),n||(n=e.ElamaRefreshTokenList||(e.ElamaRefreshTokenList={}))}(n||(n={})),function(e){let t,s;t||(t=e.GetInbox||(e.GetInbox={})),s||(s=e.CheckInboxCreate||(e.CheckInboxCreate={}))}(d||(d={})),function(e){let t,s,a,o;t||(t=e.GetPromo||(e.GetPromo={})),s||(s=e.SetCodeCreate||(e.SetCodeCreate={})),a||(a=e.GetCodeInfoList||(e.GetCodeInfoList={})),o||(o=e.GetReferralDataList||(e.GetReferralDataList={}))}(p||(p={})),function(e){let t,s,a,o;t||(t=e.GetOptimization||(e.GetOptimization={})),s||(s=e.ValidateImagesCreate||(e.ValidateImagesCreate={})),a||(a=e.ValidateLinksCreate||(e.ValidateLinksCreate={})),o||(o=e.ValidateSpamassasinCreate||(e.ValidateSpamassasinCreate={}))}(l||(l={})),function(e){let t,s,a,o,i,r,n,d,p,l,h,m,_,c;t||(t=e.GetEmFiles||(e.GetEmFiles={})),s||(s=e.FoldersList||(e.FoldersList={})),a||(a=e.FoldersCreate||(e.FoldersCreate={})),o||(o=e.FoldersDelete||(e.FoldersDelete={})),i||(i=e.EmptyTrashCreate||(e.EmptyTrashCreate={})),r||(r=e.FilesList||(e.FilesList={})),n||(n=e.FilesCreate||(e.FilesCreate={})),d||(d=e.FilesDelete||(e.FilesDelete={})),p||(p=e.FilesPartialUpdate||(e.FilesPartialUpdate={})),l||(l=e.FilesUploadByUrlCreate||(e.FilesUploadByUrlCreate={})),h||(h=e.FilesRenamePartialUpdate||(e.FilesRenamePartialUpdate={})),m||(m=e.ItemsMovePartialUpdate||(e.ItemsMovePartialUpdate={})),_||(_=e.FileDimensionsList||(e.FileDimensionsList={})),c||(c=e.CacheClearCreate||(e.CacheClearCreate={}))}(h||(h={})),function(e){let t,s,a,o,i,r,n,d,p,l,h,m,_,c,u,E,y,T,v,f,P,b,g,D,A,U,q,C,L,w,O,j,S,I,G,k,N,$,M,R,B,F,x,H,W,K,V,Q,X,z,Y,J,Z,ee,te,se,ae,oe,ie,re,ne,de,pe,le,he,me,_e,ce,ue,Ee,ye,Te,ve,fe,Pe,be,ge,De,Ae,Ue,qe,Ce,Le,we,Oe,je,Se,Ie,Ge,ke,Ne,$e,Me,Re,Be,Fe,xe,He,We,Ke,Ve,Qe,Xe,ze,Ye,Je,Ze,et,tt,st,at,ot,it,rt,nt,dt,pt,lt,ht,mt,_t,ct,ut,Et,yt,Tt,vt,ft,Pt,bt,gt,Dt,At,Ut,qt,Ct,Lt,wt,Ot,jt,St,It,Gt,kt,Nt,$t,Mt,Rt,Bt,Ft,xt,Ht,Wt,Kt,Vt,Qt,Xt,zt,Yt,Jt,Zt,es,ts,ss,as,os,is,rs,ns,ds,ps,ls,hs,ms,_s,cs,us,Es,ys,Ts,vs,fs,Ps,bs,gs,Ds,As,Us,qs,Cs,Ls,ws,Os,js,Ss,Is,Gs,ks,Ns,$s,Ms,Rs,Bs,Fs,xs,Hs,Ws,Ks,Vs,Qs,Xs,zs,Ys,Js,Zs,ea,ta,sa,aa,oa,ia,ra,na,da,pa,la,ha,ma,_a,ca,ua,Ea,ya,Ta,va,fa,Pa,ba,ga,Da,Aa,Ua,qa,Ca,La,wa,Oa,ja,Sa,Ia,Ga,ka,Na,$a,Ma,Ra,Ba,Fa,xa,Ha,Wa,Ka,Va,Qa,Xa,za,Ya,Ja,Za,eo,to,so,ao,oo,io,ro,no,po,lo,ho,mo,_o,co,uo,Eo,yo,To,vo,fo,Po,bo,go,Do,Ao,Uo,qo,Co,Lo,wo,Oo,jo,So,Io,Go,ko,No,$o,Mo,Ro,Bo,Fo,xo,Ho,Wo,Ko,Vo,Qo,Xo,zo,Yo,Jo,Zo,ei,ti,si,ai,oi,ii,ri,ni;t||(t=e.GetWp||(e.GetWp={})),s||(s=e.ConfirmationList||(e.ConfirmationList={})),a||(a=e.UsersRegisterCreate||(e.UsersRegisterCreate={})),o||(o=e.UsersLostpasswordCreate||(e.UsersLostpasswordCreate={})),i||(i=e.UsersLostPasswordCreate||(e.UsersLostPasswordCreate={})),r||(r=e.PostsList||(e.PostsList={})),n||(n=e.PostsCreate||(e.PostsCreate={})),d||(d=e.PostsDetail||(e.PostsDetail={})),p||(p=e.PostsCreate2||(e.PostsCreate2={})),l||(l=e.PostsUpdate||(e.PostsUpdate={})),h||(h=e.PostsPartialUpdate||(e.PostsPartialUpdate={})),m||(m=e.PostsDelete||(e.PostsDelete={})),_||(_=e.PostsRevisionsList||(e.PostsRevisionsList={})),c||(c=e.PostsRevisionsDetail||(e.PostsRevisionsDetail={})),u||(u=e.PostsRevisionsDelete||(e.PostsRevisionsDelete={})),E||(E=e.PostsAutosavesList||(e.PostsAutosavesList={})),y||(y=e.PostsAutosavesCreate||(e.PostsAutosavesCreate={})),T||(T=e.PostsAutosavesDetail||(e.PostsAutosavesDetail={})),v||(v=e.PagesList||(e.PagesList={})),f||(f=e.PagesCreate||(e.PagesCreate={})),P||(P=e.PagesDetail||(e.PagesDetail={})),b||(b=e.PagesCreate2||(e.PagesCreate2={})),g||(g=e.PagesUpdate||(e.PagesUpdate={})),D||(D=e.PagesPartialUpdate||(e.PagesPartialUpdate={})),A||(A=e.PagesDelete||(e.PagesDelete={})),U||(U=e.PagesRevisionsList||(e.PagesRevisionsList={})),q||(q=e.PagesRevisionsDetail||(e.PagesRevisionsDetail={})),C||(C=e.PagesRevisionsDelete||(e.PagesRevisionsDelete={})),L||(L=e.PagesAutosavesList||(e.PagesAutosavesList={})),w||(w=e.PagesAutosavesCreate||(e.PagesAutosavesCreate={})),O||(O=e.PagesAutosavesDetail||(e.PagesAutosavesDetail={})),j||(j=e.MediaList||(e.MediaList={})),S||(S=e.MediaCreate||(e.MediaCreate={})),I||(I=e.MediaDetail||(e.MediaDetail={})),G||(G=e.MediaCreate2||(e.MediaCreate2={})),k||(k=e.MediaUpdate||(e.MediaUpdate={})),N||(N=e.MediaPartialUpdate||(e.MediaPartialUpdate={})),$||($=e.MediaDelete||(e.MediaDelete={})),M||(M=e.MediaPostProcessCreate||(e.MediaPostProcessCreate={})),R||(R=e.MediaEditCreate||(e.MediaEditCreate={})),B||(B=e.MenuItemsList||(e.MenuItemsList={})),F||(F=e.MenuItemsCreate||(e.MenuItemsCreate={})),x||(x=e.MenuItemsDetail||(e.MenuItemsDetail={})),H||(H=e.MenuItemsCreate2||(e.MenuItemsCreate2={})),W||(W=e.MenuItemsUpdate||(e.MenuItemsUpdate={})),K||(K=e.MenuItemsPartialUpdate||(e.MenuItemsPartialUpdate={})),V||(V=e.MenuItemsDelete||(e.MenuItemsDelete={})),Q||(Q=e.MenuItemsAutosavesList||(e.MenuItemsAutosavesList={})),X||(X=e.MenuItemsAutosavesCreate||(e.MenuItemsAutosavesCreate={})),z||(z=e.MenuItemsAutosavesDetail||(e.MenuItemsAutosavesDetail={})),Y||(Y=e.BlocksList||(e.BlocksList={})),J||(J=e.BlocksCreate||(e.BlocksCreate={})),Z||(Z=e.BlocksDetail||(e.BlocksDetail={})),ee||(ee=e.BlocksCreate2||(e.BlocksCreate2={})),te||(te=e.BlocksUpdate||(e.BlocksUpdate={})),se||(se=e.BlocksPartialUpdate||(e.BlocksPartialUpdate={})),ae||(ae=e.BlocksDelete||(e.BlocksDelete={})),oe||(oe=e.BlocksRevisionsList||(e.BlocksRevisionsList={})),ie||(ie=e.BlocksRevisionsDetail||(e.BlocksRevisionsDetail={})),re||(re=e.BlocksRevisionsDelete||(e.BlocksRevisionsDelete={})),ne||(ne=e.BlocksAutosavesList||(e.BlocksAutosavesList={})),de||(de=e.BlocksAutosavesCreate||(e.BlocksAutosavesCreate={})),pe||(pe=e.BlocksAutosavesDetail||(e.BlocksAutosavesDetail={})),le||(le=e.TemplatesRevisionsList||(e.TemplatesRevisionsList={})),he||(he=e.TemplatesRevisionsDetail||(e.TemplatesRevisionsDetail={})),me||(me=e.TemplatesRevisionsDelete||(e.TemplatesRevisionsDelete={})),_e||(_e=e.TemplatesAutosavesList||(e.TemplatesAutosavesList={})),ce||(ce=e.TemplatesAutosavesCreate||(e.TemplatesAutosavesCreate={})),ue||(ue=e.TemplatesAutosavesDetail||(e.TemplatesAutosavesDetail={})),Ee||(Ee=e.TemplatesList||(e.TemplatesList={})),ye||(ye=e.TemplatesCreate||(e.TemplatesCreate={})),Te||(Te=e.TemplatesLookupList||(e.TemplatesLookupList={})),ve||(ve=e.TemplatesDetail||(e.TemplatesDetail={})),fe||(fe=e.TemplatesCreate2||(e.TemplatesCreate2={})),Pe||(Pe=e.TemplatesUpdate||(e.TemplatesUpdate={})),be||(be=e.TemplatesPartialUpdate||(e.TemplatesPartialUpdate={})),ge||(ge=e.TemplatesDelete||(e.TemplatesDelete={})),De||(De=e.TemplatePartsRevisionsList||(e.TemplatePartsRevisionsList={})),Ae||(Ae=e.TemplatePartsRevisionsDetail||(e.TemplatePartsRevisionsDetail={})),Ue||(Ue=e.TemplatePartsRevisionsDelete||(e.TemplatePartsRevisionsDelete={})),qe||(qe=e.TemplatePartsAutosavesList||(e.TemplatePartsAutosavesList={})),Ce||(Ce=e.TemplatePartsAutosavesCreate||(e.TemplatePartsAutosavesCreate={})),Le||(Le=e.TemplatePartsAutosavesDetail||(e.TemplatePartsAutosavesDetail={})),we||(we=e.TemplatePartsList||(e.TemplatePartsList={})),Oe||(Oe=e.TemplatePartsCreate||(e.TemplatePartsCreate={})),je||(je=e.TemplatePartsLookupList||(e.TemplatePartsLookupList={})),Se||(Se=e.TemplatePartsDetail||(e.TemplatePartsDetail={})),Ie||(Ie=e.TemplatePartsCreate2||(e.TemplatePartsCreate2={})),Ge||(Ge=e.TemplatePartsUpdate||(e.TemplatePartsUpdate={})),ke||(ke=e.TemplatePartsPartialUpdate||(e.TemplatePartsPartialUpdate={})),Ne||(Ne=e.TemplatePartsDelete||(e.TemplatePartsDelete={})),$e||($e=e.GlobalStylesRevisionsList||(e.GlobalStylesRevisionsList={})),Me||(Me=e.GlobalStylesRevisionsDetail||(e.GlobalStylesRevisionsDetail={})),Re||(Re=e.GlobalStylesThemesVariationsList||(e.GlobalStylesThemesVariationsList={})),Be||(Be=e.GlobalStylesThemesDetail||(e.GlobalStylesThemesDetail={})),Fe||(Fe=e.GlobalStylesDetail||(e.GlobalStylesDetail={})),xe||(xe=e.GlobalStylesCreate||(e.GlobalStylesCreate={})),He||(He=e.GlobalStylesUpdate||(e.GlobalStylesUpdate={})),We||(We=e.GlobalStylesPartialUpdate||(e.GlobalStylesPartialUpdate={})),Ke||(Ke=e.NavigationList||(e.NavigationList={})),Ve||(Ve=e.NavigationCreate||(e.NavigationCreate={})),Qe||(Qe=e.NavigationDetail||(e.NavigationDetail={})),Xe||(Xe=e.NavigationCreate2||(e.NavigationCreate2={})),ze||(ze=e.NavigationUpdate||(e.NavigationUpdate={})),Ye||(Ye=e.NavigationPartialUpdate||(e.NavigationPartialUpdate={})),Je||(Je=e.NavigationDelete||(e.NavigationDelete={})),Ze||(Ze=e.NavigationRevisionsList||(e.NavigationRevisionsList={})),et||(et=e.NavigationRevisionsDetail||(e.NavigationRevisionsDetail={})),tt||(tt=e.NavigationRevisionsDelete||(e.NavigationRevisionsDelete={})),st||(st=e.NavigationAutosavesList||(e.NavigationAutosavesList={})),at||(at=e.NavigationAutosavesCreate||(e.NavigationAutosavesCreate={})),ot||(ot=e.NavigationAutosavesDetail||(e.NavigationAutosavesDetail={})),it||(it=e.FontFamiliesList||(e.FontFamiliesList={})),rt||(rt=e.FontFamiliesCreate||(e.FontFamiliesCreate={})),nt||(nt=e.FontFamiliesDetail||(e.FontFamiliesDetail={})),dt||(dt=e.FontFamiliesCreate2||(e.FontFamiliesCreate2={})),pt||(pt=e.FontFamiliesUpdate||(e.FontFamiliesUpdate={})),lt||(lt=e.FontFamiliesPartialUpdate||(e.FontFamiliesPartialUpdate={})),ht||(ht=e.FontFamiliesDelete||(e.FontFamiliesDelete={})),mt||(mt=e.FontFamiliesFontFacesList||(e.FontFamiliesFontFacesList={})),_t||(_t=e.FontFamiliesFontFacesCreate||(e.FontFamiliesFontFacesCreate={})),ct||(ct=e.FontFamiliesFontFacesDetail||(e.FontFamiliesFontFacesDetail={})),ut||(ut=e.FontFamiliesFontFacesDelete||(e.FontFamiliesFontFacesDelete={})),Et||(Et=e.EblockList||(e.EblockList={})),yt||(yt=e.EblockCreate||(e.EblockCreate={})),Tt||(Tt=e.EblockDetail||(e.EblockDetail={})),vt||(vt=e.EblockCreate2||(e.EblockCreate2={})),ft||(ft=e.EblockUpdate||(e.EblockUpdate={})),Pt||(Pt=e.EblockPartialUpdate||(e.EblockPartialUpdate={})),bt||(bt=e.EblockDelete||(e.EblockDelete={})),gt||(gt=e.EblockRevisionsList||(e.EblockRevisionsList={})),Dt||(Dt=e.EblockRevisionsDetail||(e.EblockRevisionsDetail={})),At||(At=e.EblockRevisionsDelete||(e.EblockRevisionsDelete={})),Ut||(Ut=e.EblockAutosavesList||(e.EblockAutosavesList={})),qt||(qt=e.EblockAutosavesCreate||(e.EblockAutosavesCreate={})),Ct||(Ct=e.EblockAutosavesDetail||(e.EblockAutosavesDetail={})),Lt||(Lt=e.EmailList||(e.EmailList={})),wt||(wt=e.EmailCreate||(e.EmailCreate={})),Ot||(Ot=e.EmailDetail||(e.EmailDetail={})),jt||(jt=e.EmailCreate2||(e.EmailCreate2={})),St||(St=e.EmailUpdate||(e.EmailUpdate={})),It||(It=e.EmailPartialUpdate||(e.EmailPartialUpdate={})),Gt||(Gt=e.EmailDelete||(e.EmailDelete={})),kt||(kt=e.EmailRevisionsList||(e.EmailRevisionsList={})),Nt||(Nt=e.EmailRevisionsDetail||(e.EmailRevisionsDetail={})),$t||($t=e.EmailRevisionsDelete||(e.EmailRevisionsDelete={})),Mt||(Mt=e.EmailAutosavesList||(e.EmailAutosavesList={})),Rt||(Rt=e.EmailAutosavesCreate||(e.EmailAutosavesCreate={})),Bt||(Bt=e.EmailAutosavesDetail||(e.EmailAutosavesDetail={})),Ft||(Ft=e.NotificationList||(e.NotificationList={})),xt||(xt=e.NotificationCreate||(e.NotificationCreate={})),Ht||(Ht=e.NotificationDetail||(e.NotificationDetail={})),Wt||(Wt=e.NotificationCreate2||(e.NotificationCreate2={})),Kt||(Kt=e.NotificationUpdate||(e.NotificationUpdate={})),Vt||(Vt=e.NotificationPartialUpdate||(e.NotificationPartialUpdate={})),Qt||(Qt=e.NotificationDelete||(e.NotificationDelete={})),Xt||(Xt=e.NotificationAutosavesList||(e.NotificationAutosavesList={})),zt||(zt=e.NotificationAutosavesCreate||(e.NotificationAutosavesCreate={})),Yt||(Yt=e.NotificationAutosavesDetail||(e.NotificationAutosavesDetail={})),Jt||(Jt=e.PaymentList||(e.PaymentList={})),Zt||(Zt=e.PaymentCreate||(e.PaymentCreate={})),es||(es=e.PaymentDetail||(e.PaymentDetail={})),ts||(ts=e.PaymentCreate2||(e.PaymentCreate2={})),ss||(ss=e.PaymentUpdate||(e.PaymentUpdate={})),as||(as=e.PaymentPartialUpdate||(e.PaymentPartialUpdate={})),os||(os=e.PaymentDelete||(e.PaymentDelete={})),is||(is=e.ProjectList||(e.ProjectList={})),rs||(rs=e.ProjectCreate||(e.ProjectCreate={})),ns||(ns=e.ProjectDetail||(e.ProjectDetail={})),ds||(ds=e.ProjectCreate2||(e.ProjectCreate2={})),ps||(ps=e.ProjectUpdate||(e.ProjectUpdate={})),ls||(ls=e.ProjectPartialUpdate||(e.ProjectPartialUpdate={})),hs||(hs=e.ProjectDelete||(e.ProjectDelete={})),ms||(ms=e.ProjectRevisionsList||(e.ProjectRevisionsList={})),_s||(_s=e.ProjectRevisionsDetail||(e.ProjectRevisionsDetail={})),cs||(cs=e.ProjectRevisionsDelete||(e.ProjectRevisionsDelete={})),us||(us=e.SubscriptionList||(e.SubscriptionList={})),Es||(Es=e.SubscriptionCreate||(e.SubscriptionCreate={})),ys||(ys=e.SubscriptionDetail||(e.SubscriptionDetail={})),Ts||(Ts=e.SubscriptionCreate2||(e.SubscriptionCreate2={})),vs||(vs=e.SubscriptionUpdate||(e.SubscriptionUpdate={})),fs||(fs=e.SubscriptionPartialUpdate||(e.SubscriptionPartialUpdate={})),Ps||(Ps=e.SubscriptionDelete||(e.SubscriptionDelete={})),bs||(bs=e.UserPromocodesList||(e.UserPromocodesList={})),gs||(gs=e.UserPromocodesCreate||(e.UserPromocodesCreate={})),Ds||(Ds=e.UserPromocodesDetail||(e.UserPromocodesDetail={})),As||(As=e.UserPromocodesCreate2||(e.UserPromocodesCreate2={})),Us||(Us=e.UserPromocodesUpdate||(e.UserPromocodesUpdate={})),qs||(qs=e.UserPromocodesPartialUpdate||(e.UserPromocodesPartialUpdate={})),Cs||(Cs=e.UserPromocodesDelete||(e.UserPromocodesDelete={})),Ls||(Ls=e.TypesList||(e.TypesList={})),ws||(ws=e.TypesDetail||(e.TypesDetail={})),Os||(Os=e.StatusesList||(e.StatusesList={})),js||(js=e.StatusesDetail||(e.StatusesDetail={})),Ss||(Ss=e.TaxonomiesList||(e.TaxonomiesList={})),Is||(Is=e.TaxonomiesDetail||(e.TaxonomiesDetail={})),Gs||(Gs=e.CategoriesList||(e.CategoriesList={})),ks||(ks=e.CategoriesCreate||(e.CategoriesCreate={})),Ns||(Ns=e.CategoriesDetail||(e.CategoriesDetail={})),$s||($s=e.CategoriesCreate2||(e.CategoriesCreate2={})),Ms||(Ms=e.CategoriesUpdate||(e.CategoriesUpdate={})),Rs||(Rs=e.CategoriesPartialUpdate||(e.CategoriesPartialUpdate={})),Bs||(Bs=e.CategoriesDelete||(e.CategoriesDelete={})),Fs||(Fs=e.TagsList||(e.TagsList={})),xs||(xs=e.TagsCreate||(e.TagsCreate={})),Hs||(Hs=e.TagsDetail||(e.TagsDetail={})),Ws||(Ws=e.TagsCreate2||(e.TagsCreate2={})),Ks||(Ks=e.TagsUpdate||(e.TagsUpdate={})),Vs||(Vs=e.TagsPartialUpdate||(e.TagsPartialUpdate={})),Qs||(Qs=e.TagsDelete||(e.TagsDelete={})),Xs||(Xs=e.MenusList||(e.MenusList={})),zs||(zs=e.MenusCreate||(e.MenusCreate={})),Ys||(Ys=e.MenusDetail||(e.MenusDetail={})),Js||(Js=e.MenusCreate2||(e.MenusCreate2={})),Zs||(Zs=e.MenusUpdate||(e.MenusUpdate={})),ea||(ea=e.MenusPartialUpdate||(e.MenusPartialUpdate={})),ta||(ta=e.MenusDelete||(e.MenusDelete={})),sa||(sa=e.WpPatternCategoryList||(e.WpPatternCategoryList={})),aa||(aa=e.WpPatternCategoryCreate||(e.WpPatternCategoryCreate={})),oa||(oa=e.WpPatternCategoryDetail||(e.WpPatternCategoryDetail={})),ia||(ia=e.WpPatternCategoryCreate2||(e.WpPatternCategoryCreate2={})),ra||(ra=e.WpPatternCategoryUpdate||(e.WpPatternCategoryUpdate={})),na||(na=e.WpPatternCategoryPartialUpdate||(e.WpPatternCategoryPartialUpdate={})),da||(da=e.WpPatternCategoryDelete||(e.WpPatternCategoryDelete={})),pa||(pa=e.GroupList||(e.GroupList={})),la||(la=e.GroupCreate||(e.GroupCreate={})),ha||(ha=e.GroupDetail||(e.GroupDetail={})),ma||(ma=e.GroupCreate2||(e.GroupCreate2={})),_a||(_a=e.GroupUpdate||(e.GroupUpdate={})),ca||(ca=e.GroupPartialUpdate||(e.GroupPartialUpdate={})),ua||(ua=e.GroupDelete||(e.GroupDelete={})),Ea||(Ea=e.BlockfolderList||(e.BlockfolderList={})),ya||(ya=e.BlockfolderCreate||(e.BlockfolderCreate={})),Ta||(Ta=e.BlockfolderDetail||(e.BlockfolderDetail={})),va||(va=e.BlockfolderCreate2||(e.BlockfolderCreate2={})),fa||(fa=e.BlockfolderUpdate||(e.BlockfolderUpdate={})),Pa||(Pa=e.BlockfolderPartialUpdate||(e.BlockfolderPartialUpdate={})),ba||(ba=e.BlockfolderDelete||(e.BlockfolderDelete={})),ga||(ga=e.BlocktagsList||(e.BlocktagsList={})),Da||(Da=e.BlocktagsCreate||(e.BlocktagsCreate={})),Aa||(Aa=e.BlocktagsDetail||(e.BlocktagsDetail={})),Ua||(Ua=e.BlocktagsCreate2||(e.BlocktagsCreate2={})),qa||(qa=e.BlocktagsUpdate||(e.BlocktagsUpdate={})),Ca||(Ca=e.BlocktagsPartialUpdate||(e.BlocktagsPartialUpdate={})),La||(La=e.BlocktagsDelete||(e.BlocktagsDelete={})),wa||(wa=e.EmailtagsList||(e.EmailtagsList={})),Oa||(Oa=e.EmailtagsCreate||(e.EmailtagsCreate={})),ja||(ja=e.EmailtagsDetail||(e.EmailtagsDetail={})),Sa||(Sa=e.EmailtagsCreate2||(e.EmailtagsCreate2={})),Ia||(Ia=e.EmailtagsUpdate||(e.EmailtagsUpdate={})),Ga||(Ga=e.EmailtagsPartialUpdate||(e.EmailtagsPartialUpdate={})),ka||(ka=e.EmailtagsDelete||(e.EmailtagsDelete={})),Na||(Na=e.FolderList||(e.FolderList={})),$a||($a=e.FolderCreate||(e.FolderCreate={})),Ma||(Ma=e.FolderDetail||(e.FolderDetail={})),Ra||(Ra=e.FolderCreate2||(e.FolderCreate2={})),Ba||(Ba=e.FolderUpdate||(e.FolderUpdate={})),Fa||(Fa=e.FolderPartialUpdate||(e.FolderPartialUpdate={})),xa||(xa=e.FolderDelete||(e.FolderDelete={})),Ha||(Ha=e.UsersList||(e.UsersList={})),Wa||(Wa=e.UsersCreate||(e.UsersCreate={})),Ka||(Ka=e.UsersDetail||(e.UsersDetail={})),Va||(Va=e.UsersCreate2||(e.UsersCreate2={})),Qa||(Qa=e.UsersUpdate||(e.UsersUpdate={})),Xa||(Xa=e.UsersPartialUpdate||(e.UsersPartialUpdate={})),za||(za=e.UsersDelete||(e.UsersDelete={})),Ya||(Ya=e.UsersMeList||(e.UsersMeList={})),Ja||(Ja=e.UsersMeCreate||(e.UsersMeCreate={})),Za||(Za=e.UsersMeUpdate||(e.UsersMeUpdate={})),eo||(eo=e.UsersMePartialUpdate||(e.UsersMePartialUpdate={})),to||(to=e.UsersMeDelete||(e.UsersMeDelete={})),so||(so=e.UsersApplicationPasswordsList||(e.UsersApplicationPasswordsList={})),ao||(ao=e.UsersApplicationPasswordsCreate||(e.UsersApplicationPasswordsCreate={})),oo||(oo=e.UsersApplicationPasswordsDelete||(e.UsersApplicationPasswordsDelete={})),io||(io=e.UsersApplicationPasswordsIntrospectList||(e.UsersApplicationPasswordsIntrospectList={})),ro||(ro=e.UsersApplicationPasswordsDetail||(e.UsersApplicationPasswordsDetail={})),no||(no=e.UsersApplicationPasswordsCreate2||(e.UsersApplicationPasswordsCreate2={})),po||(po=e.UsersApplicationPasswordsUpdate||(e.UsersApplicationPasswordsUpdate={})),lo||(lo=e.UsersApplicationPasswordsPartialUpdate||(e.UsersApplicationPasswordsPartialUpdate={})),ho||(ho=e.UsersApplicationPasswordsDelete2||(e.UsersApplicationPasswordsDelete2={})),mo||(mo=e.CommentsList||(e.CommentsList={})),_o||(_o=e.CommentsCreate||(e.CommentsCreate={})),co||(co=e.CommentsDetail||(e.CommentsDetail={})),uo||(uo=e.CommentsCreate2||(e.CommentsCreate2={})),Eo||(Eo=e.CommentsUpdate||(e.CommentsUpdate={})),yo||(yo=e.CommentsPartialUpdate||(e.CommentsPartialUpdate={})),To||(To=e.CommentsDelete||(e.CommentsDelete={})),vo||(vo=e.SearchList||(e.SearchList={})),fo||(fo=e.BlockRendererDetail||(e.BlockRendererDetail={})),Po||(Po=e.BlockRendererCreate||(e.BlockRendererCreate={})),bo||(bo=e.BlockTypesList||(e.BlockTypesList={})),go||(go=e.BlockTypesDetail||(e.BlockTypesDetail={})),Do||(Do=e.BlockTypesDetail2||(e.BlockTypesDetail2={})),Ao||(Ao=e.SettingsList||(e.SettingsList={})),Uo||(Uo=e.SettingsCreate||(e.SettingsCreate={})),qo||(qo=e.SettingsUpdate||(e.SettingsUpdate={})),Co||(Co=e.SettingsPartialUpdate||(e.SettingsPartialUpdate={})),Lo||(Lo=e.ThemesList||(e.ThemesList={})),wo||(wo=e.ThemesDetail||(e.ThemesDetail={})),Oo||(Oo=e.PluginsList||(e.PluginsList={})),jo||(jo=e.PluginsCreate||(e.PluginsCreate={})),So||(So=e.PluginsDetail||(e.PluginsDetail={})),Io||(Io=e.PluginsCreate2||(e.PluginsCreate2={})),Go||(Go=e.PluginsUpdate||(e.PluginsUpdate={})),ko||(ko=e.PluginsPartialUpdate||(e.PluginsPartialUpdate={})),No||(No=e.PluginsDelete||(e.PluginsDelete={})),$o||($o=e.SidebarsList||(e.SidebarsList={})),Mo||(Mo=e.SidebarsDetail||(e.SidebarsDetail={})),Ro||(Ro=e.SidebarsCreate||(e.SidebarsCreate={})),Bo||(Bo=e.SidebarsUpdate||(e.SidebarsUpdate={})),Fo||(Fo=e.SidebarsPartialUpdate||(e.SidebarsPartialUpdate={})),xo||(xo=e.WidgetTypesList||(e.WidgetTypesList={})),Ho||(Ho=e.WidgetTypesDetail||(e.WidgetTypesDetail={})),Wo||(Wo=e.WidgetTypesEncodeCreate||(e.WidgetTypesEncodeCreate={})),Ko||(Ko=e.WidgetTypesRenderCreate||(e.WidgetTypesRenderCreate={})),Vo||(Vo=e.WidgetsList||(e.WidgetsList={})),Qo||(Qo=e.WidgetsCreate||(e.WidgetsCreate={})),Xo||(Xo=e.WidgetsDetail||(e.WidgetsDetail={})),zo||(zo=e.WidgetsCreate2||(e.WidgetsCreate2={})),Yo||(Yo=e.WidgetsUpdate||(e.WidgetsUpdate={})),Jo||(Jo=e.WidgetsPartialUpdate||(e.WidgetsPartialUpdate={})),Zo||(Zo=e.WidgetsDelete||(e.WidgetsDelete={})),ei||(ei=e.BlockDirectorySearchList||(e.BlockDirectorySearchList={})),ti||(ti=e.PatternDirectoryPatternsList||(e.PatternDirectoryPatternsList={})),si||(si=e.BlockPatternsPatternsList||(e.BlockPatternsPatternsList={})),ai||(ai=e.BlockPatternsCategoriesList||(e.BlockPatternsCategoriesList={})),oi||(oi=e.MenuLocationsList||(e.MenuLocationsList={})),ii||(ii=e.MenuLocationsDetail||(e.MenuLocationsDetail={})),ri||(ri=e.FontCollectionsList||(e.FontCollectionsList={})),ni||(ni=e.FontCollectionsDetail||(e.FontCollectionsDetail={}))}(m||(m={})),function(e){let t,s;t||(t=e.GetUserToProject||(e.GetUserToProject={})),s||(s=e.AddUserCreate||(e.AddUserCreate={}))}(_||(_={})),function(e){let t,s;t||(t=e.GetCounters||(e.GetCounters={})),s||(s=e.IncrementCounterPartialUpdate||(e.IncrementCounterPartialUpdate={}))}(c||(c={})),function(e){let t,s;t||(t=e.GetUsers||(e.GetUsers={})),s||(s=e.IsPayingUserList||(e.IsPayingUserList={}))}(u||(u={})),function(e){let t,s;t||(t=e.GetPayment||(e.GetPayment={})),s||(s=e.SubscriptionPaymentCreate||(e.SubscriptionPaymentCreate={}))}(E||(E={})),function(e){let t,s,a,o;t||(t=e.WpOpenapiList||(e.WpOpenapiList={})),s||(s=e.StoplightUiList||(e.StoplightUiList={})),a||(a=e.GetWpOpenapi||(e.GetWpOpenapi={})),o||(o=e.SchemaList||(e.SchemaList={}))}(y||(y={})),function(e){let t,s;t||(t=e.GetEmail||(e.GetEmail={})),s||(s=e.TemplatesList||(e.TemplatesList={}))}(T||(T={})),function(e){let t,s;t||(t=e.GetSubscription||(e.GetSubscription={})),s||(s=e.ActivateTrialList||(e.ActivateTrialList={}))}(v||(v={})),function(e){let t,s;t||(t=e.GetApp||(e.GetApp={})),s||(s=e.AppInitCreate||(e.AppInitCreate={}))}(f||(f={})),function(e){let t,s,a;t||(t=e.GetJwtAuth||(e.GetJwtAuth={})),s||(s=e.TokenCreate||(e.TokenCreate={})),a||(a=e.TokenValidateCreate||(e.TokenValidateCreate={}))}(P||(P={})),function(e){let t,s,a,o,i;t||(t=e.TranslationsList||(e.TranslationsList={})),s||(s=e.PostTranslations||(e.PostTranslations={})),a||(a=e.GetTranslations||(e.GetTranslations={})),o||(o=e.GetTranslations2||(e.GetTranslations2={})),i||(i=e.GetTranslations3||(e.GetTranslations3={}))}(b||(b={})),function(e){let t,s;t||(t=e.GetWpMailSmtp||(e.GetWpMailSmtp={})),s||(s=e.EDetail||(e.EDetail={}))}(g||(g={})),function(e){let t,s,a,o,i,r,n,d;t||(t=e.GetWpSiteHealth||(e.GetWpSiteHealth={})),s||(s=e.TestsBackgroundUpdatesList||(e.TestsBackgroundUpdatesList={})),a||(a=e.TestsLoopbackRequestsList||(e.TestsLoopbackRequestsList={})),o||(o=e.TestsHttpsStatusList||(e.TestsHttpsStatusList={})),i||(i=e.TestsDotorgCommunicationList||(e.TestsDotorgCommunicationList={})),r||(r=e.TestsAuthorizationHeaderList||(e.TestsAuthorizationHeaderList={})),n||(n=e.DirectorySizesList||(e.DirectorySizesList={})),d||(d=e.TestsPageCacheList||(e.TestsPageCacheList={}))}(D||(D={})),function(e){let t,s,a,o;t||(t=e.GetWpBlockEditor||(e.GetWpBlockEditor={})),s||(s=e.UrlDetailsList||(e.UrlDetailsList={})),a||(a=e.ExportList||(e.ExportList={})),o||(o=e.NavigationFallbackList||(e.NavigationFallbackList={}))}(A||(A={})),function(e){e.Json="application/json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(U||(U={}));class q{constructor(e={}){this.baseUrl="https://api.emailmaker.ru/wp-json",this.securityData=null,this.securityWorker=void 0,this.abortControllers=new Map,this.customFetch=(...e)=>fetch(...e),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=e=>{this.securityData=e},this.contentFormatters={[U.Json]:e=>null===e||"object"!==typeof e&&"string"!==typeof e?e:JSON.stringify(e),[U.Text]:e=>null!==e&&"string"!==typeof e?JSON.stringify(e):e,[U.FormData]:e=>Object.keys(e||{}).reduce(((t,s)=>{const a=e[s];return t.append(s,a instanceof Blob?a:"object"===typeof a&&null!==a?JSON.stringify(a):`${a}`),t}),new FormData),[U.UrlEncoded]:e=>this.toQueryString(e)},this.createAbortSignal=e=>{if(this.abortControllers.has(e)){const t=this.abortControllers.get(e);return t?t.signal:void 0}const t=new AbortController;return this.abortControllers.set(e,t),t.signal},this.abortRequest=e=>{const t=this.abortControllers.get(e);t&&(t.abort(),this.abortControllers.delete(e))},this.request=async({body:e,secure:t,path:s,type:a,query:o,format:i,baseUrl:r,cancelToken:n,extraQuery:d,...p})=>{const l=("boolean"===typeof t?t:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},h=this.mergeRequestParams(p,l);d&&(o=o?{...o,...d}:d);const m=o&&this.toQueryString(o),_=this.contentFormatters[a||U.Json],c=i||h.format,u=new Request(`${r||this.baseUrl||""}${s}${m?`?${m}`:""}`,{...h,headers:{...h.headers||{},...a&&a!==U.FormData?{"Content-Type":a}:{}},signal:(n?this.createAbortSignal(n):h.signal)||null,body:"undefined"===typeof e||null===e?null:_(e)});return this.customFetch(u).then((async e=>{const t=e;t.data=null,t.error=null,t.meta={request:u,response:t};const s=c?await e[c]().then((e=>(t.ok?t.data=e:t.error={data:e},t))).catch((e=>(t.error=e,t))):t;return n&&this.abortControllers.delete(n),s}))},Object.assign(this,e)}encodeQueryParam(e,t){return`${encodeURIComponent(e)}=${encodeURIComponent("number"===typeof t?t:`${t}`)}`}addQueryParam(e,t){return this.encodeQueryParam(t,e[t])}addArrayQueryParam(e,t){return e[t].map((e=>this.encodeQueryParam(t,e))).join("&")}toQueryString(e){const t=e||{};return Object.keys(t).filter((e=>"undefined"!==typeof t[e])).map((e=>Array.isArray(t[e])?this.addArrayQueryParam(t,e):this.addQueryParam(t,e))).join("&")}addQueryParams(e){const t=this.toQueryString(e);return t?`?${t}`:""}mergeRequestParams(e,t){return{...this.baseApiParams,...e,...t||{},headers:{...this.baseApiParams.headers||{},...e.headers||{},...t&&t.headers||{}}}}}class C extends q{constructor(...e){super(...e),this.bdpwr={get_bdpwr:(e,t={})=>this.request({path:"/bdpwr/v1",method:"GET",query:e,...t}),reset_password_create:(e={})=>this.request({path:"/bdpwr/v1/reset-password",method:"POST",...e}),set_password_create:(e={})=>this.request({path:"/bdpwr/v1/set-password",method:"POST",...e}),validate_code_create:(e={})=>this.request({path:"/bdpwr/v1/validate-code",method:"POST",...e})},this.corsProxy={get_cors_proxy:(e,t={})=>this.request({path:"/cors-proxy/V1",method:"GET",query:e,...t}),get_list:(e,t={})=>this.request({path:"/cors-proxy/V1/get",method:"GET",query:e,...t})},this.saveFile={get_save_file:(e,t={})=>this.request({path:"/save-file/v1",method:"GET",query:e,...t}),ai_create:(e,t={})=>this.request({path:"/save-file/v1/ai",method:"POST",body:e,type:U.UrlEncoded,...t}),ai_status_list:(e,t={})=>this.request({path:"/save-file/v1/ai-status",method:"GET",query:e,...t}),test_list:(e={})=>this.request({path:"/save-file/v1/test",method:"GET",...e}),upload_create:(e,t={})=>this.request({path:"/save-file/v1/upload",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),shortener_create:(e,t={})=>this.request({path:"/save-file/v1/shortener",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),get_link_create:(e,t={})=>this.request({path:"/save-file/v1/get-link",method:"POST",body:e,type:U.UrlEncoded,...t}),send_email_create:(e,t={})=>this.request({path:"/save-file/v1/send-email",method:"POST",body:e,type:U.UrlEncoded,...t})},this.aiGenerator={get_ai_generator:(e,t={})=>this.request({path:"/ai-generator/v1",method:"GET",query:e,...t}),ai_create:(e,t={})=>this.request({path:"/ai-generator/v1/ai",method:"POST",body:e,type:U.UrlEncoded,...t}),ai_status_list:(e,t={})=>this.request({path:"/ai-generator/v1/ai-status",method:"GET",query:e,...t}),test_list:(e={})=>this.request({path:"/ai-generator/v1/test",method:"GET",...e}),clear_history_list:(e,t={})=>this.request({path:"/ai-generator/v1/clear-history",method:"GET",query:e,...t}),save_task_create:(e,t={})=>this.request({path:"/ai-generator/v1/save-task",method:"POST",body:e,type:U.UrlEncoded,...t}),identificate_blocks_create:(e,t={})=>this.request({path:"/ai-generator/v1/identificate_blocks",method:"POST",body:e,type:U.UrlEncoded,...t})},this.auth={get_auth:(e,t={})=>this.request({path:"/auth/v1",method:"GET",query:e,...t}),users_register_create:(e,t={})=>this.request({path:"/auth/v1/users/register",method:"POST",body:e,type:U.UrlEncoded,...t}),check_auth_list:(e={})=>this.request({path:"/auth/v1/check_auth",method:"GET",...e}),yandex_callback_create:(e,t={})=>this.request({path:"/auth/v1/yandex/callback",method:"POST",body:e,type:U.UrlEncoded,...t}),google_callback_create:(e,t={})=>this.request({path:"/auth/v1/google/callback",method:"POST",body:e,type:U.UrlEncoded,...t}),elama_callback_list:(e,t={})=>this.request({path:"/auth/v1/elama/callback",method:"GET",query:e,...t}),elama_refresh_token_list:(e,t={})=>this.request({path:"/auth/v1/elama/refresh_token",method:"GET",query:e,...t})},this.inbox={get_inbox:(e,t={})=>this.request({path:"/inbox/v1",method:"GET",query:e,...t}),check_inbox_create:(e,t={})=>this.request({path:"/inbox/v1/check-inbox",method:"POST",body:e,type:U.UrlEncoded,...t})},this.promo={get_promo:(e,t={})=>this.request({path:"/promo/v1",method:"GET",query:e,...t}),set_code_create:(e,t={})=>this.request({path:"/promo/v1/set_code",method:"POST",body:e,type:U.UrlEncoded,...t}),get_code_info_list:(e,t={})=>this.request({path:"/promo/v1/get_code_info",method:"GET",query:e,...t}),get_referral_data_list:(e={})=>this.request({path:"/promo/v1/get_referral_data",method:"GET",...e})},this.optimization={get_optimization:(e,t={})=>this.request({path:"/optimization/v1",method:"GET",query:e,...t}),validate_images_create:(e,t={})=>this.request({path:"/optimization/v1/validate/images",method:"POST",body:e,type:U.UrlEncoded,...t}),validate_links_create:(e,t={})=>this.request({path:"/optimization/v1/validate/links",method:"POST",body:e,type:U.UrlEncoded,...t}),validate_spamassasin_create:(e,t={})=>this.request({path:"/optimization/v1/validate/spamassasin",method:"POST",body:e,type:U.UrlEncoded,...t})},this.emFiles={get_em_files:(e,t={})=>this.request({path:"/em-files/v1",method:"GET",query:e,...t}),folders_list:(e,t={})=>this.request({path:"/em-files/v1/folders",method:"GET",query:e,format:"json",...t}),folders_create:(e,t={})=>this.request({path:"/em-files/v1/folders",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),folders_delete:(e,t={})=>this.request({path:"/em-files/v1/folders",method:"DELETE",body:e,type:U.UrlEncoded,format:"json",...t}),empty_trash_create:(e,t={})=>this.request({path:"/em-files/v1/empty-trash",method:"POST",body:e,type:U.UrlEncoded,...t}),files_list:(e,t={})=>this.request({path:"/em-files/v1/files",method:"GET",query:e,format:"json",...t}),files_create:(e,t={})=>this.request({path:"/em-files/v1/files",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),files_delete:(e,t={})=>this.request({path:"/em-files/v1/files",method:"DELETE",body:e,type:U.UrlEncoded,format:"json",...t}),files_partial_update:(e,t={})=>this.request({path:"/em-files/v1/files",method:"PATCH",body:e,type:U.UrlEncoded,format:"json",...t}),files_upload_by_url_create:(e,t={})=>this.request({path:"/em-files/v1/files/upload-by-url",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),files_rename_partial_update:(e,t={})=>this.request({path:"/em-files/v1/files/rename",method:"PATCH",body:e,type:U.UrlEncoded,format:"json",...t}),items_move_partial_update:(e,t={})=>this.request({path:"/em-files/v1/items/move",method:"PATCH",body:e,type:U.UrlEncoded,format:"json",...t}),file_dimensions_list:(e,t={})=>this.request({path:"/em-files/v1/file/dimensions",method:"GET",query:e,format:"json",...t}),cache_clear_create:(e,t={})=>this.request({path:"/em-files/v1/cache/clear",method:"POST",body:e,type:U.UrlEncoded,...t})},this.wp={get_wp:(e,t={})=>this.request({path:"/wp/v2",method:"GET",query:e,...t}),confirmation_list:(e,t={})=>this.request({path:"/wp/v2/confirmation",method:"GET",query:e,...t}),users_register_create:(e={})=>this.request({path:"/wp/v2/users/register",method:"POST",...e}),users_lostpassword_create:(e={})=>this.request({path:"/wp/v2/users/lostpassword",method:"POST",...e}),users_lost_password_create:(e={})=>this.request({path:"/wp/v2/users/lost-password",method:"POST",...e}),posts_list:(e,t={})=>this.request({path:"/wp/v2/posts",method:"GET",query:e,format:"json",...t}),posts_create:(e,t={})=>this.request({path:"/wp/v2/posts",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),posts_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/posts/${e}`,method:"GET",query:t,format:"json",...s}),posts_create2:(e,t,s={})=>this.request({path:`/wp/v2/posts/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),posts_update:(e,t,s={})=>this.request({path:`/wp/v2/posts/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),posts_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/posts/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),posts_delete:(e,t,s={})=>this.request({path:`/wp/v2/posts/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),posts_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/posts/${e}/revisions`,method:"GET",query:t,format:"json",...s}),posts_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/posts/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),posts_revisions_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/posts/${e}/revisions/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),posts_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/posts/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),posts_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/posts/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),posts_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/posts/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),pages_list:(e,t={})=>this.request({path:"/wp/v2/pages",method:"GET",query:e,format:"json",...t}),pages_create:(e,t={})=>this.request({path:"/wp/v2/pages",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),pages_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/pages/${e}`,method:"GET",query:t,format:"json",...s}),pages_create2:(e,t,s={})=>this.request({path:`/wp/v2/pages/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),pages_update:(e,t,s={})=>this.request({path:`/wp/v2/pages/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),pages_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/pages/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),pages_delete:(e,t,s={})=>this.request({path:`/wp/v2/pages/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),pages_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/pages/${e}/revisions`,method:"GET",query:t,format:"json",...s}),pages_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/pages/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),pages_revisions_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/pages/${e}/revisions/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),pages_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/pages/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),pages_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/pages/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),pages_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/pages/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),media_list:(e,t={})=>this.request({path:"/wp/v2/media",method:"GET",query:e,format:"json",...t}),media_create:(e,t={})=>this.request({path:"/wp/v2/media",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),media_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/media/${e}`,method:"GET",query:t,format:"json",...s}),media_create2:(e,t,s={})=>this.request({path:`/wp/v2/media/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),media_update:(e,t,s={})=>this.request({path:`/wp/v2/media/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),media_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/media/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),media_delete:(e,t,s={})=>this.request({path:`/wp/v2/media/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),media_post_process_create:(e,t,s={})=>this.request({path:`/wp/v2/media/${e}/post-process`,method:"POST",body:t,type:U.UrlEncoded,...s}),media_edit_create:(e,t,s={})=>this.request({path:`/wp/v2/media/${e}/edit`,method:"POST",body:t,type:U.UrlEncoded,...s}),menu_items_list:(e,t={})=>this.request({path:"/wp/v2/menu-items",method:"GET",query:e,format:"json",...t}),menu_items_create:(e,t={})=>this.request({path:"/wp/v2/menu-items",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),menu_items_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/menu-items/${e}`,method:"GET",query:t,format:"json",...s}),menu_items_create2:(e,t,s={})=>this.request({path:`/wp/v2/menu-items/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),menu_items_update:(e,t,s={})=>this.request({path:`/wp/v2/menu-items/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),menu_items_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/menu-items/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),menu_items_delete:(e,t,s={})=>this.request({path:`/wp/v2/menu-items/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),menu_items_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/menu-items/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),menu_items_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/menu-items/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),menu_items_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/menu-items/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),blocks_list:(e,t={})=>this.request({path:"/wp/v2/blocks",method:"GET",query:e,format:"json",...t}),blocks_create:(e,t={})=>this.request({path:"/wp/v2/blocks",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),blocks_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/blocks/${e}`,method:"GET",query:t,format:"json",...s}),blocks_create2:(e,t,s={})=>this.request({path:`/wp/v2/blocks/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),blocks_update:(e,t,s={})=>this.request({path:`/wp/v2/blocks/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),blocks_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/blocks/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),blocks_delete:(e,t,s={})=>this.request({path:`/wp/v2/blocks/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),blocks_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/blocks/${e}/revisions`,method:"GET",query:t,format:"json",...s}),blocks_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/blocks/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),blocks_revisions_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/blocks/${e}/revisions/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),blocks_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/blocks/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),blocks_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/blocks/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),blocks_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/blocks/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),templates_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/templates/${e}/revisions`,method:"GET",query:t,format:"json",...s}),templates_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/templates/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),templates_revisions_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/templates/${e}/revisions/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),templates_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/templates/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),templates_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/templates/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),templates_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/templates/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),templates_list:(e,t={})=>this.request({path:"/wp/v2/templates",method:"GET",query:e,format:"json",...t}),templates_create:(e,t={})=>this.request({path:"/wp/v2/templates",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),templates_lookup_list:(e,t={})=>this.request({path:"/wp/v2/templates/lookup",method:"GET",query:e,...t}),templates_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/templates/${e}`,method:"GET",query:t,format:"json",...s}),templates_create2:(e,t,s={})=>this.request({path:`/wp/v2/templates/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),templates_update:(e,t,s={})=>this.request({path:`/wp/v2/templates/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),templates_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/templates/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),templates_delete:(e,t,s={})=>this.request({path:`/wp/v2/templates/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),template_parts_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/template-parts/${e}/revisions`,method:"GET",query:t,format:"json",...s}),template_parts_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/template-parts/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),template_parts_revisions_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/template-parts/${e}/revisions/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),template_parts_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/template-parts/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),template_parts_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/template-parts/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),template_parts_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/template-parts/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),template_parts_list:(e,t={})=>this.request({path:"/wp/v2/template-parts",method:"GET",query:e,format:"json",...t}),template_parts_create:(e,t={})=>this.request({path:"/wp/v2/template-parts",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),template_parts_lookup_list:(e,t={})=>this.request({path:"/wp/v2/template-parts/lookup",method:"GET",query:e,...t}),template_parts_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/template-parts/${e}`,method:"GET",query:t,format:"json",...s}),template_parts_create2:(e,t,s={})=>this.request({path:`/wp/v2/template-parts/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),template_parts_update:(e,t,s={})=>this.request({path:`/wp/v2/template-parts/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),template_parts_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/template-parts/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),template_parts_delete:(e,t,s={})=>this.request({path:`/wp/v2/template-parts/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),global_styles_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/global-styles/${e}/revisions`,method:"GET",query:t,format:"json",...s}),global_styles_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/global-styles/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),global_styles_themes_variations_list:(e,t={})=>this.request({path:`/wp/v2/global-styles/themes/${e}/variations`,method:"GET",...t}),global_styles_themes_detail:(e,t={})=>this.request({path:`/wp/v2/global-styles/themes/${e}`,method:"GET",...t}),global_styles_detail:(e,t={})=>this.request({path:`/wp/v2/global-styles/${e}`,method:"GET",format:"json",...t}),global_styles_create:(e,t,s={})=>this.request({path:`/wp/v2/global-styles/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),global_styles_update:(e,t,s={})=>this.request({path:`/wp/v2/global-styles/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),global_styles_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/global-styles/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),navigation_list:(e,t={})=>this.request({path:"/wp/v2/navigation",method:"GET",query:e,format:"json",...t}),navigation_create:(e,t={})=>this.request({path:"/wp/v2/navigation",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),navigation_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/navigation/${e}`,method:"GET",query:t,format:"json",...s}),navigation_create2:(e,t,s={})=>this.request({path:`/wp/v2/navigation/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),navigation_update:(e,t,s={})=>this.request({path:`/wp/v2/navigation/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),navigation_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/navigation/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),navigation_delete:(e,t,s={})=>this.request({path:`/wp/v2/navigation/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),navigation_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/navigation/${e}/revisions`,method:"GET",query:t,format:"json",...s}),navigation_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/navigation/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),navigation_revisions_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/navigation/${e}/revisions/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),navigation_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/navigation/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),navigation_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/navigation/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),navigation_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/navigation/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),font_families_list:(e,t={})=>this.request({path:"/wp/v2/font-families",method:"GET",query:e,format:"json",...t}),font_families_create:(e,t={})=>this.request({path:"/wp/v2/font-families",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),font_families_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/font-families/${e}`,method:"GET",query:t,format:"json",...s}),font_families_create2:(e,t,s={})=>this.request({path:`/wp/v2/font-families/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),font_families_update:(e,t,s={})=>this.request({path:`/wp/v2/font-families/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),font_families_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/font-families/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),font_families_delete:(e,t,s={})=>this.request({path:`/wp/v2/font-families/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),font_families_font_faces_list:({fontFamilyId:e,...t},s={})=>this.request({path:`/wp/v2/font-families/${e}/font-faces`,method:"GET",query:t,format:"json",...s}),font_families_font_faces_create:(e,t,s={})=>this.request({path:`/wp/v2/font-families/${e}/font-faces`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),font_families_font_faces_detail:({fontFamilyId:e,id:t,...s},a={})=>this.request({path:`/wp/v2/font-families/${e}/font-faces/${t}`,method:"GET",query:s,format:"json",...a}),font_families_font_faces_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/font-families/${e}/font-faces/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),eblock_list:(e,t={})=>this.request({path:"/wp/v2/eblock",method:"GET",query:e,format:"json",...t}),eblock_create:(e,t={})=>this.request({path:"/wp/v2/eblock",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),eblock_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/eblock/${e}`,method:"GET",query:t,format:"json",...s}),eblock_create2:(e,t,s={})=>this.request({path:`/wp/v2/eblock/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),eblock_update:(e,t,s={})=>this.request({path:`/wp/v2/eblock/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),eblock_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/eblock/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),eblock_delete:(e,t,s={})=>this.request({path:`/wp/v2/eblock/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),eblock_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/eblock/${e}/revisions`,method:"GET",query:t,format:"json",...s}),eblock_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/eblock/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),eblock_revisions_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/eblock/${e}/revisions/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),eblock_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/eblock/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),eblock_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/eblock/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),eblock_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/eblock/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),email_list:(e,t={})=>this.request({path:"/wp/v2/email",method:"GET",query:e,format:"json",...t}),email_create:(e,t={})=>this.request({path:"/wp/v2/email",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),email_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/email/${e}`,method:"GET",query:t,format:"json",...s}),email_create2:(e,t,s={})=>this.request({path:`/wp/v2/email/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),email_update:(e,t,s={})=>this.request({path:`/wp/v2/email/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),email_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/email/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),email_delete:(e,t,s={})=>this.request({path:`/wp/v2/email/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),email_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/email/${e}/revisions`,method:"GET",query:t,format:"json",...s}),email_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/email/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),email_revisions_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/email/${e}/revisions/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),email_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/email/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),email_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/email/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),email_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/email/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),notification_list:(e,t={})=>this.request({path:"/wp/v2/notification",method:"GET",query:e,format:"json",...t}),notification_create:(e,t={})=>this.request({path:"/wp/v2/notification",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),notification_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/notification/${e}`,method:"GET",query:t,format:"json",...s}),notification_create2:(e,t,s={})=>this.request({path:`/wp/v2/notification/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),notification_update:(e,t,s={})=>this.request({path:`/wp/v2/notification/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),notification_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/notification/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),notification_delete:(e,t,s={})=>this.request({path:`/wp/v2/notification/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),notification_autosaves_list:({id:e,...t},s={})=>this.request({path:`/wp/v2/notification/${e}/autosaves`,method:"GET",query:t,format:"json",...s}),notification_autosaves_create:(e,t,s={})=>this.request({path:`/wp/v2/notification/${e}/autosaves`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),notification_autosaves_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/notification/${e}/autosaves/${t}`,method:"GET",query:s,format:"json",...a}),payment_list:(e,t={})=>this.request({path:"/wp/v2/payment",method:"GET",query:e,format:"json",...t}),payment_create:(e,t={})=>this.request({path:"/wp/v2/payment",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),payment_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/payment/${e}`,method:"GET",query:t,format:"json",...s}),payment_create2:(e,t,s={})=>this.request({path:`/wp/v2/payment/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),payment_update:(e,t,s={})=>this.request({path:`/wp/v2/payment/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),payment_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/payment/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),payment_delete:(e,t,s={})=>this.request({path:`/wp/v2/payment/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),project_list:(e,t={})=>this.request({path:"/wp/v2/project",method:"GET",query:e,format:"json",...t}),project_create:(e,t={})=>this.request({path:"/wp/v2/project",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),project_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/project/${e}`,method:"GET",query:t,format:"json",...s}),project_create2:(e,t,s={})=>this.request({path:`/wp/v2/project/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),project_update:(e,t,s={})=>this.request({path:`/wp/v2/project/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),project_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/project/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),project_delete:(e,t,s={})=>this.request({path:`/wp/v2/project/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),project_revisions_list:({parent:e,...t},s={})=>this.request({path:`/wp/v2/project/${e}/revisions`,method:"GET",query:t,format:"json",...s}),project_revisions_detail:({parent:e,id:t,...s},a={})=>this.request({path:`/wp/v2/project/${e}/revisions/${t}`,method:"GET",query:s,format:"json",...a}),project_revisions_delete:(e,t,s,a={})=>this.request({path:`/wp/v2/project/${e}/revisions/${t}`,method:"DELETE",body:s,type:U.UrlEncoded,format:"json",...a}),subscription_list:(e,t={})=>this.request({path:"/wp/v2/subscription",method:"GET",query:e,format:"json",...t}),subscription_create:(e,t={})=>this.request({path:"/wp/v2/subscription",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),subscription_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/subscription/${e}`,method:"GET",query:t,format:"json",...s}),subscription_create2:(e,t,s={})=>this.request({path:`/wp/v2/subscription/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),subscription_update:(e,t,s={})=>this.request({path:`/wp/v2/subscription/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),subscription_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/subscription/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),subscription_delete:(e,t,s={})=>this.request({path:`/wp/v2/subscription/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),user_promocodes_list:(e,t={})=>this.request({path:"/wp/v2/user_promocodes",method:"GET",query:e,format:"json",...t}),user_promocodes_create:(e,t={})=>this.request({path:"/wp/v2/user_promocodes",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),user_promocodes_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/user_promocodes/${e}`,method:"GET",query:t,format:"json",...s}),user_promocodes_create2:(e,t,s={})=>this.request({path:`/wp/v2/user_promocodes/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),user_promocodes_update:(e,t,s={})=>this.request({path:`/wp/v2/user_promocodes/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),user_promocodes_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/user_promocodes/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),user_promocodes_delete:(e,t,s={})=>this.request({path:`/wp/v2/user_promocodes/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),types_list:(e,t={})=>this.request({path:"/wp/v2/types",method:"GET",query:e,format:"json",...t}),types_detail:({type:e,...t},s={})=>this.request({path:`/wp/v2/types/${e}`,method:"GET",query:t,format:"json",...s}),statuses_list:(e,t={})=>this.request({path:"/wp/v2/statuses",method:"GET",query:e,format:"json",...t}),statuses_detail:({status:e,...t},s={})=>this.request({path:`/wp/v2/statuses/${e}`,method:"GET",query:t,format:"json",...s}),taxonomies_list:(e,t={})=>this.request({path:"/wp/v2/taxonomies",method:"GET",query:e,format:"json",...t}),taxonomies_detail:({taxonomy:e,...t},s={})=>this.request({path:`/wp/v2/taxonomies/${e}`,method:"GET",query:t,format:"json",...s}),categories_list:(e,t={})=>this.request({path:"/wp/v2/categories",method:"GET",query:e,format:"json",...t}),categories_create:(e,t={})=>this.request({path:"/wp/v2/categories",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),categories_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/categories/${e}`,method:"GET",query:t,format:"json",...s}),categories_create2:(e,t,s={})=>this.request({path:`/wp/v2/categories/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),categories_update:(e,t,s={})=>this.request({path:`/wp/v2/categories/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),categories_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/categories/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),categories_delete:(e,t,s={})=>this.request({path:`/wp/v2/categories/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),tags_list:(e,t={})=>this.request({path:"/wp/v2/tags",method:"GET",query:e,format:"json",...t}),tags_create:(e,t={})=>this.request({path:"/wp/v2/tags",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),tags_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/tags/${e}`,method:"GET",query:t,format:"json",...s}),tags_create2:(e,t,s={})=>this.request({path:`/wp/v2/tags/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),tags_update:(e,t,s={})=>this.request({path:`/wp/v2/tags/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),tags_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/tags/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),tags_delete:(e,t,s={})=>this.request({path:`/wp/v2/tags/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),menus_list:(e,t={})=>this.request({path:"/wp/v2/menus",method:"GET",query:e,format:"json",...t}),menus_create:(e,t={})=>this.request({path:"/wp/v2/menus",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),menus_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/menus/${e}`,method:"GET",query:t,format:"json",...s}),menus_create2:(e,t,s={})=>this.request({path:`/wp/v2/menus/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),menus_update:(e,t,s={})=>this.request({path:`/wp/v2/menus/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),menus_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/menus/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),menus_delete:(e,t,s={})=>this.request({path:`/wp/v2/menus/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),wp_pattern_category_list:(e,t={})=>this.request({path:"/wp/v2/wp_pattern_category",method:"GET",query:e,format:"json",...t}),wp_pattern_category_create:(e,t={})=>this.request({path:"/wp/v2/wp_pattern_category",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),wp_pattern_category_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/wp_pattern_category/${e}`,method:"GET",query:t,format:"json",...s}),wp_pattern_category_create2:(e,t,s={})=>this.request({path:`/wp/v2/wp_pattern_category/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),wp_pattern_category_update:(e,t,s={})=>this.request({path:`/wp/v2/wp_pattern_category/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),wp_pattern_category_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/wp_pattern_category/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),wp_pattern_category_delete:(e,t,s={})=>this.request({path:`/wp/v2/wp_pattern_category/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),group_list:(e,t={})=>this.request({path:"/wp/v2/group",method:"GET",query:e,format:"json",...t}),group_create:(e,t={})=>this.request({path:"/wp/v2/group",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),group_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/group/${e}`,method:"GET",query:t,format:"json",...s}),group_create2:(e,t,s={})=>this.request({path:`/wp/v2/group/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),group_update:(e,t,s={})=>this.request({path:`/wp/v2/group/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),group_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/group/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),group_delete:(e,t,s={})=>this.request({path:`/wp/v2/group/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),blockfolder_list:(e,t={})=>this.request({path:"/wp/v2/blockfolder",method:"GET",query:e,format:"json",...t}),blockfolder_create:(e,t={})=>this.request({path:"/wp/v2/blockfolder",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),blockfolder_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/blockfolder/${e}`,method:"GET",query:t,format:"json",...s}),blockfolder_create2:(e,t,s={})=>this.request({path:`/wp/v2/blockfolder/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),blockfolder_update:(e,t,s={})=>this.request({path:`/wp/v2/blockfolder/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),blockfolder_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/blockfolder/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),blockfolder_delete:(e,t,s={})=>this.request({path:`/wp/v2/blockfolder/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),blocktags_list:(e,t={})=>this.request({path:"/wp/v2/blocktags",method:"GET",query:e,format:"json",...t}),blocktags_create:(e,t={})=>this.request({path:"/wp/v2/blocktags",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),blocktags_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/blocktags/${e}`,method:"GET",query:t,format:"json",...s}),blocktags_create2:(e,t,s={})=>this.request({path:`/wp/v2/blocktags/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),blocktags_update:(e,t,s={})=>this.request({path:`/wp/v2/blocktags/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),blocktags_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/blocktags/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),blocktags_delete:(e,t,s={})=>this.request({path:`/wp/v2/blocktags/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),emailtags_list:(e,t={})=>this.request({path:"/wp/v2/emailtags",method:"GET",query:e,format:"json",...t}),emailtags_create:(e,t={})=>this.request({path:"/wp/v2/emailtags",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),emailtags_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/emailtags/${e}`,method:"GET",query:t,format:"json",...s}),emailtags_create2:(e,t,s={})=>this.request({path:`/wp/v2/emailtags/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),emailtags_update:(e,t,s={})=>this.request({path:`/wp/v2/emailtags/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),emailtags_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/emailtags/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),emailtags_delete:(e,t,s={})=>this.request({path:`/wp/v2/emailtags/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),folder_list:(e,t={})=>this.request({path:"/wp/v2/folder",method:"GET",query:e,format:"json",...t}),folder_create:(e,t={})=>this.request({path:"/wp/v2/folder",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),folder_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/folder/${e}`,method:"GET",query:t,format:"json",...s}),folder_create2:(e,t,s={})=>this.request({path:`/wp/v2/folder/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),folder_update:(e,t,s={})=>this.request({path:`/wp/v2/folder/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),folder_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/folder/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),folder_delete:(e,t,s={})=>this.request({path:`/wp/v2/folder/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),users_list:(e,t={})=>this.request({path:"/wp/v2/users",method:"GET",query:e,format:"json",...t}),users_create:(e,t={})=>this.request({path:"/wp/v2/users",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),users_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/users/${e}`,method:"GET",query:t,format:"json",...s}),users_create2:(e,t,s={})=>this.request({path:`/wp/v2/users/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),users_update:(e,t,s={})=>this.request({path:`/wp/v2/users/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),users_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/users/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),users_delete:(e,t,s={})=>this.request({path:`/wp/v2/users/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),users_me_list:(e,t={})=>this.request({path:"/wp/v2/users/me",method:"GET",query:e,format:"json",...t}),users_me_create:(e,t={})=>this.request({path:"/wp/v2/users/me",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),users_me_update:(e,t={})=>this.request({path:"/wp/v2/users/me",method:"PUT",body:e,type:U.UrlEncoded,format:"json",...t}),users_me_partial_update:(e,t={})=>this.request({path:"/wp/v2/users/me",method:"PATCH",body:e,type:U.UrlEncoded,format:"json",...t}),users_me_delete:(e,t={})=>this.request({path:"/wp/v2/users/me",method:"DELETE",body:e,type:U.UrlEncoded,format:"json",...t}),users_application_passwords_list:({userId:e,...t},s={})=>this.request({path:`/wp/v2/users/${e}/application-passwords`,method:"GET",query:t,format:"json",...s}),users_application_passwords_create:(e,t,s={})=>this.request({path:`/wp/v2/users/${e}/application-passwords`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),users_application_passwords_delete:(e,t={})=>this.request({path:`/wp/v2/users/${e}/application-passwords`,method:"DELETE",format:"json",...t}),users_application_passwords_introspect_list:({userId:e,...t},s={})=>this.request({path:`/wp/v2/users/${e}/application-passwords/introspect`,method:"GET",query:t,format:"json",...s}),users_application_passwords_detail:({userId:e,uuid:t,...s},a={})=>this.request({path:`/wp/v2/users/${e}/application-passwords/${t}`,method:"GET",query:s,format:"json",...a}),users_application_passwords_create2:(e,t,s,a={})=>this.request({path:`/wp/v2/users/${e}/application-passwords/${t}`,method:"POST",body:s,type:U.UrlEncoded,format:"json",...a}),users_application_passwords_update:(e,t,s,a={})=>this.request({path:`/wp/v2/users/${e}/application-passwords/${t}`,method:"PUT",body:s,type:U.UrlEncoded,format:"json",...a}),users_application_passwords_partial_update:(e,t,s,a={})=>this.request({path:`/wp/v2/users/${e}/application-passwords/${t}`,method:"PATCH",body:s,type:U.UrlEncoded,format:"json",...a}),users_application_passwords_delete2:(e,t,s={})=>this.request({path:`/wp/v2/users/${e}/application-passwords/${t}`,method:"DELETE",format:"json",...s}),comments_list:(e,t={})=>this.request({path:"/wp/v2/comments",method:"GET",query:e,format:"json",...t}),comments_create:(e,t={})=>this.request({path:"/wp/v2/comments",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),comments_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/comments/${e}`,method:"GET",query:t,format:"json",...s}),comments_create2:(e,t,s={})=>this.request({path:`/wp/v2/comments/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),comments_update:(e,t,s={})=>this.request({path:`/wp/v2/comments/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),comments_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/comments/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),comments_delete:(e,t,s={})=>this.request({path:`/wp/v2/comments/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),search_list:(e,t={})=>this.request({path:"/wp/v2/search",method:"GET",query:e,format:"json",...t}),block_renderer_detail:({name:e,...t},s={})=>this.request({path:`/wp/v2/block-renderer/${e}`,method:"GET",query:t,format:"json",...s}),block_renderer_create:(e,t,s={})=>this.request({path:`/wp/v2/block-renderer/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),block_types_list:(e,t={})=>this.request({path:"/wp/v2/block-types",method:"GET",query:e,format:"json",...t}),block_types_detail:({namespace:e,...t},s={})=>this.request({path:`/wp/v2/block-types/${e}`,method:"GET",query:t,format:"json",...s}),block_types_detail2:({name:e,namespace:t,...s},a={})=>this.request({path:`/wp/v2/block-types/${t}/${e}`,method:"GET",query:s,format:"json",...a}),settings_list:(e={})=>this.request({path:"/wp/v2/settings",method:"GET",format:"json",...e}),settings_create:(e,t={})=>this.request({path:"/wp/v2/settings",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),settings_update:(e,t={})=>this.request({path:"/wp/v2/settings",method:"PUT",body:e,type:U.UrlEncoded,format:"json",...t}),settings_partial_update:(e,t={})=>this.request({path:"/wp/v2/settings",method:"PATCH",body:e,type:U.UrlEncoded,format:"json",...t}),themes_list:(e,t={})=>this.request({path:"/wp/v2/themes",method:"GET",query:e,format:"json",...t}),themes_detail:(e,t={})=>this.request({path:`/wp/v2/themes/${e}`,method:"GET",format:"json",...t}),plugins_list:(e,t={})=>this.request({path:"/wp/v2/plugins",method:"GET",query:e,format:"json",...t}),plugins_create:(e,t={})=>this.request({path:"/wp/v2/plugins",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),plugins_detail:({plugin:e,...t},s={})=>this.request({path:`/wp/v2/plugins/${e}`,method:"GET",query:t,format:"json",...s}),plugins_create2:(e,t,s={})=>this.request({path:`/wp/v2/plugins/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),plugins_update:(e,t,s={})=>this.request({path:`/wp/v2/plugins/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),plugins_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/plugins/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),plugins_delete:(e,t,s={})=>this.request({path:`/wp/v2/plugins/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),sidebars_list:(e,t={})=>this.request({path:"/wp/v2/sidebars",method:"GET",query:e,format:"json",...t}),sidebars_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/sidebars/${e}`,method:"GET",query:t,format:"json",...s}),sidebars_create:(e,t,s={})=>this.request({path:`/wp/v2/sidebars/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),sidebars_update:(e,t,s={})=>this.request({path:`/wp/v2/sidebars/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),sidebars_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/sidebars/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),widget_types_list:(e,t={})=>this.request({path:"/wp/v2/widget-types",method:"GET",query:e,format:"json",...t}),widget_types_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/widget-types/${e}`,method:"GET",query:t,format:"json",...s}),widget_types_encode_create:(e,t,s={})=>this.request({path:`/wp/v2/widget-types/${e}/encode`,method:"POST",body:t,type:U.UrlEncoded,...s}),widget_types_render_create:(e,t,s={})=>this.request({path:`/wp/v2/widget-types/${e}/render`,method:"POST",body:t,type:U.UrlEncoded,...s}),widgets_list:(e,t={})=>this.request({path:"/wp/v2/widgets",method:"GET",query:e,format:"json",...t}),widgets_create:(e,t={})=>this.request({path:"/wp/v2/widgets",method:"POST",body:e,type:U.UrlEncoded,format:"json",...t}),widgets_detail:({id:e,...t},s={})=>this.request({path:`/wp/v2/widgets/${e}`,method:"GET",query:t,format:"json",...s}),widgets_create2:(e,t,s={})=>this.request({path:`/wp/v2/widgets/${e}`,method:"POST",body:t,type:U.UrlEncoded,format:"json",...s}),widgets_update:(e,t,s={})=>this.request({path:`/wp/v2/widgets/${e}`,method:"PUT",body:t,type:U.UrlEncoded,format:"json",...s}),widgets_partial_update:(e,t,s={})=>this.request({path:`/wp/v2/widgets/${e}`,method:"PATCH",body:t,type:U.UrlEncoded,format:"json",...s}),widgets_delete:(e,t,s={})=>this.request({path:`/wp/v2/widgets/${e}`,method:"DELETE",body:t,type:U.UrlEncoded,format:"json",...s}),block_directory_search_list:(e,t={})=>this.request({path:"/wp/v2/block-directory/search",method:"GET",query:e,format:"json",...t}),pattern_directory_patterns_list:(e,t={})=>this.request({path:"/wp/v2/pattern-directory/patterns",method:"GET",query:e,format:"json",...t}),block_patterns_patterns_list:(e={})=>this.request({path:"/wp/v2/block-patterns/patterns",method:"GET",format:"json",...e}),block_patterns_categories_list:(e={})=>this.request({path:"/wp/v2/block-patterns/categories",method:"GET",format:"json",...e}),menu_locations_list:(e,t={})=>this.request({path:"/wp/v2/menu-locations",method:"GET",query:e,format:"json",...t}),menu_locations_detail:({location:e,...t},s={})=>this.request({path:`/wp/v2/menu-locations/${e}`,method:"GET",query:t,format:"json",...s}),font_collections_list:(e,t={})=>this.request({path:"/wp/v2/font-collections",method:"GET",query:e,format:"json",...t}),font_collections_detail:({slug:e,...t},s={})=>this.request({path:`/wp/v2/font-collections/${e}`,method:"GET",query:t,format:"json",...s})},this.userToProject={get_user_to_project:(e,t={})=>this.request({path:"/user_to_project/v1",method:"GET",query:e,...t}),add_user_create:(e,t={})=>this.request({path:"/user_to_project/v1/add_user",method:"POST",body:e,type:U.UrlEncoded,...t})},this.counters={get_counters:(e,t={})=>this.request({path:"/counters/v1",method:"GET",query:e,...t}),increment_counter_partial_update:(e={})=>this.request({path:"/counters/v1/increment_counter",method:"PATCH",...e})},this.users={get_users:(e,t={})=>this.request({path:"/users/v1",method:"GET",query:e,...t}),is_paying_user_list:(e={})=>this.request({path:"/users/v1/is_paying_user",method:"GET",...e})},this.payment={get_payment:(e,t={})=>this.request({path:"/payment/v1",method:"GET",query:e,...t}),subscription_payment_create:(e,t={})=>this.request({path:"/payment/v1/subscription_payment",method:"POST",body:e,type:U.UrlEncoded,...t})},this.wpOpenapi={wp_openapi_list:(e,t={})=>this.request({path:"/wp-openapi",method:"GET",query:e,...t}),stoplight_ui_list:(e={})=>this.request({path:"/wp-openapi/stoplight-ui",method:"GET",...e}),get_wp_openapi:(e,t={})=>this.request({path:"/wp-openapi/v1",method:"GET",query:e,...t}),schema_list:(e,t={})=>this.request({path:"/wp-openapi/v1/schema",method:"GET",query:e,...t})},this.email={get_email:(e,t={})=>this.request({path:"/email/v2",method:"GET",query:e,...t}),templates_list:(e,t={})=>this.request({path:"/email/v2/templates",method:"GET",query:e,...t})},this.subscription={get_subscription:(e,t={})=>this.request({path:"/subscription/v2",method:"GET",query:e,...t}),activate_trial_list:(e={})=>this.request({path:"/subscription/v2/activate_trial",method:"GET",...e})},this.app={get_app:(e,t={})=>this.request({path:"/app/v1",method:"GET",query:e,...t}),app_init_create:(e,t={})=>this.request({path:"/app/v1/app_init",method:"POST",body:e,type:U.UrlEncoded,...t})},this.jwtAuth={get_jwt_auth:(e,t={})=>this.request({path:"/jwt-auth/v1",method:"GET",query:e,...t}),token_create:(e={})=>this.request({path:"/jwt-auth/v1/token",method:"POST",...e}),token_validate_create:(e={})=>this.request({path:"/jwt-auth/v1/token/validate",method:"POST",...e})},this.translations={translations_list:(e,t={})=>this.request({path:"/translations",method:"GET",query:e,...t}),post_translations:(e={})=>this.request({path:"/translations/v1",method:"POST",...e}),get_translations:(e,t={})=>this.request({path:"/translations/v1",method:"GET",query:e,...t}),get_translations2:(e,t={})=>this.request({path:`/translations/v1/${e}`,method:"GET",...t}),get_translations3:(e,t,s={})=>this.request({path:`/translations/v1/${t}/${e}`,method:"GET",...s})},this.wpMailSmtp={get_wp_mail_smtp:(e,t={})=>this.request({path:"/wp-mail-smtp/v1",method:"GET",query:e,...t}),e_detail:(e,t={})=>this.request({path:`/wp-mail-smtp/v1/e/${e}`,method:"GET",...t})},this.wpSiteHealth={get_wp_site_health:(e,t={})=>this.request({path:"/wp-site-health/v1",method:"GET",query:e,...t}),tests_background_updates_list:(e={})=>this.request({path:"/wp-site-health/v1/tests/background-updates",method:"GET",format:"json",...e}),tests_loopback_requests_list:(e={})=>this.request({path:"/wp-site-health/v1/tests/loopback-requests",method:"GET",format:"json",...e}),tests_https_status_list:(e={})=>this.request({path:"/wp-site-health/v1/tests/https-status",method:"GET",format:"json",...e}),tests_dotorg_communication_list:(e={})=>this.request({path:"/wp-site-health/v1/tests/dotorg-communication",method:"GET",format:"json",...e}),tests_authorization_header_list:(e={})=>this.request({path:"/wp-site-health/v1/tests/authorization-header",method:"GET",format:"json",...e}),directory_sizes_list:(e={})=>this.request({path:"/wp-site-health/v1/directory-sizes",method:"GET",...e}),tests_page_cache_list:(e={})=>this.request({path:"/wp-site-health/v1/tests/page-cache",method:"GET",...e})},this.wpBlockEditor={get_wp_block_editor:(e,t={})=>this.request({path:"/wp-block-editor/v1",method:"GET",query:e,...t}),url_details_list:(e,t={})=>this.request({path:"/wp-block-editor/v1/url-details",method:"GET",query:e,...t}),export_list:(e={})=>this.request({path:"/wp-block-editor/v1/export",method:"GET",...e}),navigation_fallback_list:(e={})=>this.request({path:"/wp-block-editor/v1/navigation-fallback",method:"GET",format:"json",...e})}}}},74029:(e,t,s)=>{s.d(t,{Bl:()=>i,M4:()=>n,Pz:()=>o,Zw:()=>r});var a=s(88296);const o=(0,a.Q)("client"),i=(0,a.Q)("ai_client"),r=(0,a.Q)(),n=(0,a.Q)()},15626:(e,t,s)=>{s.d(t,{AZ:()=>r,Zc:()=>d,cZ:()=>i,dB:()=>p});var a=s(88296),o=s(65470);function i(e){return(0,a.Q)(e)}let r;var n;function d(e,t){return e.getOrCreateInstance(t,(()=>new o.lt)).event}function p(e,t){return e.getOrCreateInstance(t,(()=>new o.lt))}(n=r||(r={})).BEFORE_SAVE_EMAIL=i(),n.ON_SAVEBUTTON_CLICK_ID=i(),n.ON_NEXTBUTTON_CLICK_ID=i(),n.ON_PREVIOUSBUTTON_CLICK_ID=i(),n.ON_MODEL_CHANGE=i(),n.WILL_EMAIL_INIT_ID=i(),n.ON_EMAIL_INIT_ID=i(),n.ON_BLOCK_INIT_ID=i(),n.ON_CONTENT_CHANGED_ID=i(),n.ON_PREHEADER_CHANGED_ID=i(),n.ON_SUBJECT_CHANGED_ID=i(),n.ON_EMAIL_CHANGED_ID=i(),n.ON_BLOCK_CHANGED_ID=i(),n.ON_CHUNKS_LOADED=i(),n.ON_SEND_TESTEMAIL_ID=i(),n.ON_SEND_LIVEPREVIEW_ID=i(),n.ON_SHARE_ID=i(),n.ON_SHOW_PREVIEW_ID=i(),n.ON_EMAIL_CLONE_ID=i(),n.ON_SEND_EMAIL_MODAL_ID=i(),n.ON_NOTIFICATION=i(),n.READ_LOCALE=i(),n.ON_CODE_VALIDATE_ID=i(),n.UPLOAD_EVENT_ID=i(),n.FILE_PROXY_EVENT_ID=i(),n.ON_LIMIT_ID=i()},32947:(e,t,s)=>{s.d(t,{A9:()=>n,BD:()=>Z,Bv:()=>S,CJ:()=>h,EW:()=>i,F3:()=>E,IE:()=>R,IJ:()=>c,Jy:()=>N,KI:()=>W,N7:()=>$,ND:()=>z,QV:()=>ee,Rn:()=>ae,Ru:()=>v,T:()=>m,Tm:()=>B,UW:()=>p,V0:()=>d,Vp:()=>X,Vv:()=>q,WU:()=>L,Y$:()=>F,YY:()=>J,_P:()=>r,bV:()=>P,e3:()=>se,eG:()=>H,ff:()=>o,hc:()=>G,iU:()=>V,iV:()=>M,iW:()=>w,jg:()=>te,lx:()=>y,mU:()=>Q,mX:()=>D,nA:()=>k,nd:()=>_,p5:()=>K,rW:()=>f,rY:()=>I,rb:()=>C,rl:()=>x,ti:()=>b,vd:()=>u,xz:()=>g,y2:()=>l,yI:()=>U,yy:()=>A,z$:()=>j,zh:()=>Y,zx:()=>O});var a=s(35306);const o="ERROR",i={isPlugin:!1},r={isEditor:!1},n={em_token:"em_token",em_elements_view:"em_elements_view",em_new_block:"em_new_block",em_new_email:"em_new_email",em_id:"em_id",em_name:"em_name",em_email:"em_email",em_locale:"em_locale",em_carrotquest_hash:"em_carrotquest_hash",em_ducalis_hash:"em_ducalis_hash",em_email_subscription_consent:"em_email_subscription_consent",em_folder:"em_folder",promocode:"promocode",em_active_tab:"em_active_tab"},d={em_color_scheme:"em_color_scheme",em_code_mode_pane_sizes:"em_code_mode_pane_sizes",em_preview_pane_sizes:"em_preview_pane_sizes",em_default_sizes:"em_default_sizes",em_pane_sizes:"em_pane_sizes",em_test_emails:"em_test_emails",em_menu_is_locked:"em_menu_is_locked",em_code_mode_settings:"em_code_mode_settings",em_folder_is_open:"em_folder_is_open",em_active_tab:"em_active_tab",em_ai_settings:"em_ai_settings"},p="deleted",l="all",h="not all",m="light",_="dark",c="system",u="(prefers-color-scheme: light)",E="(prefers-color-scheme: dark)",y={ADD_NEW_PROJECT_MODAL:"ADD_NEW_PROJECT_MODAL",EDIT_PROJECT_MODAL:"EDIT_PROJECT_MODAL",BLOCKS_MODAL:"BLOCKS_MODAL",EDIT_PROFILE_MODAL:"EDIT_PROFILE_MODAL",SEND_TEST_EMAIL:"SEND_TEST_EMAIL",ADD_NEW_EBLOCK_MODAL:"ADD_NEW_EBLOCK_MODAL",ADD_NEW_EMAIL_MODAL:"ADD_NEW_EMAIL_MODAL",ADD_NEW_AI_EMAIL:"ADD_NEW_AI_EMAIL",SWITCH_TO_PLAN_MODAL:"SWITCH_TO_PLAN_MODAL",IMAGE_EDITOR_MODAL:"IMAGE_EDITOR_MODAL",ADD_NEW_FOLDER_MODAL:"ADD_NEW_FOLDER_MODAL",EDIT_FOLDER_NAME_MODAL:"EDIT_FOLDER_NAME_MODAL",ADD_NEW_GROUP_MODAL:"ADD_NEW_GROUP_MODAL",EDIT_GROUP_NAME_MODAL:"EDIT_GROUP_NAME_MODAL",UPLOAD_IMAGE_MODAL:"UPLOAD_IMAGE_MODAL",UPLOAD_BACKGROUND_MODAL:"UPLOAD_BACKGROUND_MODAL",UPLOAD_IMAGE_MODAL_AI:"UPLOAD_IMAGE_MODAL_AI",UPLOAD_BACKGROUND_MODAL_AI:"UPLOAD_BACKGROUND_MODAL_AI",UPLOAD_IMAGE_MODAL_STOCK:"UPLOAD_IMAGE_MODAL_STOCK",UPLOAD_BACKGROUND_MODAL_STOCK:"UPLOAD_BACKGROUND_MODAL_STOCK",UPLOAD_IMAGE_MODAL_GIF:"UPLOAD_IMAGE_MODAL_GIF",UPLOAD_BACKGROUND_MODAL_GIF:"UPLOAD_BACKGROUND_MODAL_GIF",UPLOAD_IMAGE_MODAL_EDIT:"UPLOAD_IMAGE_MODAL_EDIT",UPLOAD_BACKGROUND_MODAL_EDIT:"UPLOAD_BACKGROUND_MODAL_EDIT",UPLOAD_IMAGE_MODAL_UPLOAD:"UPLOAD_IMAGE_MODAL_UPLOAD",UPLOAD_BACKGROUND_MODAL_UPLOAD:"UPLOAD_BACKGROUND_MODAL_UPLOAD"};let T;!function(e){e[e.Amp=0]="Amp",e[e.HTML=1]="HTML",e[e.Everywhere=2]="Everywhere"}(T||(T={}));const v={MESSAGE:"message",INIT_PREVIEW:"init_preview",UPDATE_PREVIEW:"update_preview",UPDATE_EDITOR:"update_editor",UPDATE_EDITOR_POSITION:"update_editor_position",UPDATE_SIDE_MENU_EDITOR:"update_side_menu_editor",SAVE_EMAIL:"saveEmail",SANDBOX_ELEMENT_SETTINGS_SET:"sandbox_element_settings_set",SANDBOX_EMAIL_SETTINGS_SET:"sandbox_email_settings_set",SANDBOX_BLOCK_SETTINGS_SET:"sandbox_block_settings_set",SANDBOX_ELEMENT_PARENT_GET:"sandbox_element_parent_get",SANDBOX_ELEMENT_PARENT_TABLE_GET:"sandbox_element_parent_table_get",SANDBOX_ELEMENT_PREV_GET:"sandbox_element_prev_get",SANDBOX_ELEMENT_NEXT_GET:"sandbox_element_next_get",SANDBOX_ELEMENT_REMOVE:"sandbox_element_remove",SANDBOX_ELEMENT_ACTIVE_RESET:"sandbox_element_active_reset",SANDBOX_ELEMENT_ACTIVE_SET:"sandbox_element_active_set",SANDBOX_ELEMENT_HOVER_SET:"sandbox_element_hover_set",SANDBOX_ELEMENT_IMG_LINK:"sandbox_element_img_link",SANDBOX_ELEMENT_TEXT:"sandbox_element_text",SANDBOX_EMAIL_CONTENT_GET:"sandbox_email_content_get",SANDBOX_SET_POSITION_TO_IMG:"sandbox_set_position_to_img",SANDBOX_SET_POSITION_TO_LINK:"sandbox_set_position_to_link",SANDBOX_ACCORDION_ADD_SECTION:"sandbox_accordion_add_section",SANDBOX_ACCORDION_REMOVE_SECTION:"sandbox_accordion_remove_section",APPLICATION_FOCUS_IN_IFRAME:"application_focus_in_iframe",APPLICATION_EMAIL_SETTINGS_SET:"application_email_settings_set",APPLICATION_BLOCK_SETTINGS_SET:"application_block_settings_set",APPLICATION_ELEMENT_SETTINGS_SET:"application_element_settings_set",APPLICATION_ELEMENT_SETTINGS_CLOSE:"application_element_settings_close",APPLICATION_ACTION:"application_action",APPLICATION_EBLOCK_ADD:"application_eblock_add",APPLICATION_SCROLL_TO:"application_scroll-to",APPLICATION_SCROLL_BLOCK_SHOW:"application_scroll-block-show",APPLICATION_SCROLL_BLOCK_HIDE:"application_scroll-block-hide",APPLICATION_DISCUSS_SET_ID:"application_discuss_set_id",APPLICATION_DISCUSS_GET_COMMENT:"application_discuss_get_comment",APPLICATION_DISCUSS_NO_COMMENT:"application_discuss_no_comment",APPLICATION_DISCUSS_SAVE_TARGET:"application_discuss_save_target",APPLICATION_IFRAME_SET_HEIGHT:"application_iframe_set_height",APPLICATION_COMMON_STYLES_UPDATE:"application_commonStyles_update",APPLICATION_EMAIL_CONTENT_GET:"application_email_content_get",APPLICATION_OPEN_IMAGE_AI_POPUP:"application_open-image-ai-popup",APPLICATION_OPEN_IMAGE_UPLOAD_POPUP:"application_open-image-upload-popup",APPLICATION_OPEN_IMAGE_EDIT_POPUP:"application_open-image-edit-popup",APPLICATION_OPEN_IMAGE_GIF_POPUP:"application_open-image-gif-popup",APPLICATION_OPEN_IMAGE_STOCK_POPUP:"application_open-image-stock-popup",APPLICATION_CLOSE_IMAGE_EDIT_POPUP:"application_close-image-edit-popup",APPLICATION_SUBJECT_UPDATE:(0,a.Qm)("application_subject_update"),APPLICATION_PREHEADER_UPDATE:(0,a.Qm)("application_preheader_update"),APPLICATION_DOMPARSER_ERROR:(0,a.Qm)("application_domparser_error"),APPLICATION_UPDATE_ENTITY:(0,a.Qm)("application_update_entity"),APPLICATION_IFRAME_DRAG_EVENT:(0,a.Qm)("application_iframe_drag_event"),APPLICATION_HAS_AMP:(0,a.Qm)("application_has_amp"),APPLICATION_PREVIEW_ALERT_SHOW:"application_preview_alert_show",SANDBOX_WINDOW_CHARACTERISTIC:"sandbox_window-characteristic",SANDBOX_IFRAME_SETSIZE:"sandbox_iframe-setsize",SANDBOX_BLOCK_INSERT:"sandbox_block-insert",SANDBOX_ATOM_INSERT:"sandbox_atom-insert",SANDBOX_DRAG_CANCEL:"sandbox_drag-cancel",UPDATE_EDITOR_POSITION_FROM_EDITOR:"update_position_from_editor",UPDATE_EDITOR_POSITION_FROM_IFRAME:"update_position_from_iframe",SANDBOX_CHANGE_PREVIEW:"sandbox_change_preview",APPLICATION_CHANGE_PREVIEW:"application_change_preview",SANDBOX_LOCK_EDIT:"sandbox_lock_edit",SANDBOX_FLOATBLOCK_ADD:"sandbox_floatBlock_add",SANDBOX_FLOATBLOCK_REMOVE:"sandbox_floatBlock_remove",EDITOR_CHANGE_FOCUS:"editor_change_focus",SANDBOX_RESIZED:"sandbox_resized",SANDBOX_LOCK_DISCUSS:"sandbox_lock_discuss",SANDBOX_DISCUSS_SET_TARGET:"sandbox_discuss_set_target",SANDBOX_DISCUSS_REMOVE_TARGET:"sandbox_discuss_remove_target",SANDBOX_DISCUSS_RESET:"sandbox_discuss_reset",SANDBOX_DISCUSS_GET_TARGET:"sandbox_discuss_get_target",SANDBOX_READY:(0,a.Qm)("SANDBOX_READY"),SANDBOX_FLOATBLOCK_WRAP:"sandbox_floatblock_wrap",SANDBOX_FLOATBLOCK_DIR:"sandbox_floatblock_dir",SANDBOX_SUBJECT_UPDATE:(0,a.Qm)("sandbox_subject_update"),SANDBOX_PREHEADER_UPDATE:(0,a.Qm)("sandbox_preheader_update"),SANDBOX_DRAG_EVENT:(0,a.Qm)("sandbox_drag_event"),SANDBOX_ADD_MERGETAG:(0,a.Qm)("sandbox_add_mergetag"),SANDBOX_TRANSLATIONS:(0,a.Qm)("sandbox_send_translations"),SANDBOX_SET_THEME_VARIABLES:(0,a.Qm)("sandbox_send_theme_variables"),SANDBOX_SET_ENTITY:(0,a.Qm)("sandbox_set_entity"),SANDBOX_INIT_START:(0,a.Qm)("sandbox_init_start"),SANDBOX_INITED:(0,a.Qm)("sandbox_inited"),SANDBOX_UPDATE_ENTITY:(0,a.Qm)("sandbox_update_entity"),RELOAD:(0,a.Qm)("reload"),SANDBOX_IS_EMAIL_EMPTY:(0,a.Qm)("sandbox_is_email_empty")},f={language:"html",detectIndentation:!1,wordWrap:"on",wrappingIndent:"same",smoothScrolling:!0,automaticLayout:!0,tabSize:2,indentSize:2};let P;!function(e){e.IMG="img",e.TEXT="text",e.LINK="a",e.TABLE="table",e.VINDENT="vindent",e.TD="td",e.STRUCTURE="structure",e.GROUP="group",e.BUTTON="button",e.DIV="div",e.FLOAT_BLOCK="floatBlock",e.VAR="var",e.EMPTY_TABLE="emptyTable",e.EMPTY_TD="emptyTd",e.COUNTDOWN="countdown",e.VIDEO="video",e.COLUMN="column",e.CAROUSEL="carousel",e.ACCORDION="accordion"}(P||(P={}));const b={ALL:"All",STANDARD:"Standard",PROJECT:"Project"},g="Appearance",D="Structure",A="Settings",U="Properties",q="History",C="Disabled_tab",L="Edit selected element",w="UTM parameters",O="Edit",j="AiChat",S="Build",I="Styles",G="Discuss",k="Blocks",N="Atoms",$="Optimise",M={top:{width:null,style:null,color:null},right:{width:null,style:null,color:null},bottom:{width:null,style:null,color:null},left:{width:null,style:null,color:null}},R="block",B="email",F="cards",x="list",H="pending",W="d41d8",K="1865",V=6892,Q=24,X="desktop",z="mobile",Y="emailtags",J="blocktags",Z={text:{fontFamily:["Google Fonts","Sans Serif","Mulish","Regular"],fontSize:16,fontSizeDim:"px",lineHeight:24,lineHeightDim:"px",color:"#595959",contrastColor:"#FFFFFF",textAlign:"left",paddingBottom:10,paddingBottomDim:"px"},headings:{fontFamily:["Google Fonts","Sans Serif","Mulish","Bold"],fontSize:28,fontSizeDim:"px",lineHeight:34,lineHeightDim:"px",color:"#000000",contrastColor:"#FFFFFF",textAlign:"left",paddingTop:20,paddingTopDim:"px",paddingBottom:20,paddingBottomDim:"px",letterSpacing:0,letterSpacingDim:"px",bold:!0,italic:!1},links:{color:"#1890ff",contrastColor:"#FFFFFF",underline:!0},buttons:{fontFamily:["Google Fonts","Sans Serif","Mulish","Medium"],fontSize:16,fontSizeDim:"px",letterSpacing:0,letterSpacingDim:"px",color:"#FFFFFF",contrastColor:"#1890ff",bold:!1,italic:!1,backgroundColor:"#1890ff",contrastBackgroundColor:"#FFFFFF",marginTop:10,marginTopDim:"px",marginBottom:10,marginBottomDim:"px",border:{all:null,top:null,right:null,bottom:null,left:null},borderRadius:{all:6,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null},textAlign:"center",padding:{all:null,top:null,right:null,bottom:null,left:null}},block:{backgroundColor:"#FFFFFF",contrastBackgroundColor:"#1890ff",padding:{all:null,top:null,right:null,bottom:null,left:null}},cards:{contrastBackgroundColor:"#1890ff",contrastTextColor:"#ffffff",baseBackgroundColor:"#f8f8f8",baseTextColor:"#333333",border:{all:null,top:null,right:null,bottom:null,left:null},borderRadius:{all:10,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null}}},ee=e=>({REORDER_ATOM:e("Reorder element"),CLONE_ATOM:e("Clone element"),REMOVE_ATOM:e("Remove element"),EDIT_ATOM:e("Edit element"),CHANGE_IMAGE:e("Change image"),REORDER_BLOCK:e("Reorder block"),REORDER_BLOCK_UP:e("Move up"),REORDER_BLOCK_DOWN:e("Move down"),EDIT_BLOCK:e("Edit block"),CLONE_BLOCK:e("Clone block"),MERGE_BLOCK:e("Merge with the chosen block"),UNMERGE_BLOCK:e("Split blocks"),COPY_BLOCK_TO_CLIPBOARD:e("Copy block to clipboard"),PASTE_BLOCK_FROM_CLIPBOARD:e("Paste block from clipboard"),REMOVE_BLOCK:e("Remove block"),SAVE_TO_BLOCKS:e("Save to Blocks"),ADD_BLOCK:e("Add block"),ADD_EMPTY_BLOCK:e("Add an empty block"),ADD_SAVED_BLOCK:e("Add a saved block"),ADD_COMMON_BLOCK:e("Add a common block"),ADD_TEMPLATE_BLOCK:e("Add a template block"),ADD_SEARCH_BLOCK:e("Search a block"),REORDER_GROUP:e("Reorder group"),EDIT_GROUP:e("Edit group"),CLONE_GROUP:e("Clone group"),REMOVE_GROUP:e("Remove group"),ADD_GROUP:e("Add group"),LINK:e("link"),TABLE_COLUMN:e("cell"),TABLE:e("table"),FLOAT_BLOCK:e("column"),CONTAINER:e("container"),PICTURE:e("picture"),CAROUSEL:e("carousel"),ACCORDION:e("accordion"),VERTICAL_INDENT:e("indent"),TEXT:e("text"),BUTTON:e("button"),VAR:e("variable"),STRUCTURE:e("block"),EMAIL:e("email"),GROUP:e("group"),TYPOGRAF:e("Typograf"),COUNTDOWN:e("countdown"),ELEMENT:e("element"),VIDEO:e("video"),ELEMENT_PATH_LINK:e("Link"),ELEMENT_PATH_BLOCK:e("Block"),ELEMENT_PATH_ATOM:e("Element"),ELEMENT_PATH_TD:e("Cell"),ELEMENT_PATH_TABLE:e("Table"),ELEMENT_PATH_FLOATBLOCK:e("Column"),ELEMENT_PATH_TEXT:e("Text"),ELEMENT_PATH_DIV:e("Container"),ELEMENT_PATH_GROUP:e("Group"),ELEMENT_PATH_EMAIL:e("Email"),ELEMENT_PATH_IMG:e("Picture"),ELEMENT_PATH_VINDENT:e("Indent"),ELEMENT_PATH_BUTTON:e("Button"),ELEMENT_PATH_CAROUSEL:e("Carousel"),ELEMENT_PATH_ACCORDION:e("Accordion"),ELEMENT_PATH_SECTION:e("Section"),TINYMCE_CHANGECASE:e("Case Change"),TINYMCE_UPPERCASE:e("Uppercase"),TINYMCE_LOWERCASE:e("Lowercase"),PASTE_HERE:e("Drop here")}),te={Applications:"Apps",Articles:"Article",Banners:"Banners",Buttons:"Buttons","Call to Action":"Call to Action",Contacts:"Contacts",Content:"Content","E-Commerce":"E-Commerce",Feature:"Features",Footer:"Footers",Header:"Headers",Lists:"Lists",Menu:"Menus",Other:"Others",Polls:"Polls",Promocodes:"Promocodes",Separators:"Separators"},se={maker:"https://ai-mail.emcdn.ru",blocks:"https://ai-mail.useblocks.io"},ae={maker:"https://app.emailmaker.ru/api",blocks:"https://app.useblocks.io/api"}},35306:(e,t,s)=>{function a(e){return e}s.d(t,{Qm:()=>a,bg:()=>d});const o="INIT_MESSAGE";function i(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}class r{constructor(){this._children=[],this._isDisposed=!1}isDisposed(){return this._isDisposed}addDisposable(e){return this._children.push(e),e.hasOwnProperty("addDisposable")&&e.addDisposable({dispose:()=>{const t=this._children.indexOf(e);t>=0&&this._children.splice(t,1)}}),e}removeDisposable(e){const t=this._children.indexOf(e);t>=0&&this._children.splice(t,1)}dispose(){this._isDisposed=!0;for(const e of this._children)e.dispose()}}class n extends r{constructor(...e){super(...e),this._listeners=Object.create(null),this.addListenerAsync=(e,t,s=0,a)=>{const o=this._listeners[e]||(this._listeners[e]=[]);a&&"function"===typeof t&&(t=t.bind(a));const i=o.findIndex((([e,t])=>s<=t)),r=[t,s];return this.isDisposed()||o.splice(i>=0?i:o.length,0,r),{dispose(){const e=o.indexOf(r);e>=0&&o.splice(e,1)}}},this.fireAsync=(e,t)=>{if(!this.isDisposed()){const s=this._listeners[e]||(this._listeners[e]=[]);let a;for(let e=0;e<s.length;e++){const t=s[e][0],o=a;a=e=>t(e,o)}if(a)return a(t)}},this.addListener=(e,t,s=0)=>this.addListenerAsync(e,((e,s)=>{try{t(e)}catch(a){}return s&&s(e)}),s)}}class d extends r{constructor(e,t){super(),this._singleton=t,this._target=void 0,this._inited=!1,this._emitter=this.addDisposable(new n),this._onReceiveMessage=e=>{const t=e.data;if((s=t)&&"object"===typeof s&&e.source==this.target||this._singleton&&function(e,t){return e&&"object"===typeof e&&e.operationId===t}(t,o)){const s=this._emitter.fireAsync(t.operationId||"",void 0===t.operationId?e:t.data),a=t.result,o=t.error;a&&o&&Promise.resolve(s).then((e=>this._sendMessage(a,e)),(e=>this._sendMessage(o,e)))}var s},window.addEventListener("message",this._onReceiveMessage),this.addListener(o,(()=>{this._inited||(this._inited=!0,this.send(o))})),e&&this.setTarget(e)}setTarget(e){this._target!==e&&(this._target=e,e&&e.postMessage({operationId:o,data:{}},"*"))}getTarget(){return this._target}get target(){return this._target}_sendMessage(e,t,s=!0){if(!s&&!this.isInited())return;const a=this.addDisposable(this.onInit((s=>{const o=e?{operationId:e,data:t}:t;s.postMessage({...o},"*"),a.dispose()})))}send(e,t,s){return"string"===typeof e?this._sendMessage(e,t,s):this._sendMessage("",e,t)}sendAsync(e,t,s=!0){if(!s&&!this.isInited())return Promise.resolve();const a=i(),o=i();return new Promise(((s,i)=>{const n=this.addDisposable(new r);n.addDisposable(this.onInit((r=>{r.postMessage({operationId:e,data:t,result:a,error:o},"*"),n.addDisposable(this._onMessage(a,(e=>{s(e),n.dispose()}))),n.addDisposable(this._onMessage(o,(e=>{i(e),n.dispose()})))})))}))}_onMessage(e,t,s=0){return this._emitter.addListener(e,t,s)}addListener(e,t,s){return t?this._onMessage(e,t,s):this._onMessage("",e)}addListenerAsyncPipe(e,t,s=0){return this._emitter.addListenerAsync(e,t,s)}addListenerAsync(e,t,s=0){return this._emitter.addListenerAsync(e,(async(e,s)=>{const a=await t(e);return s?s(e):a}),s)}isInited(){return this._inited}get inited(){return this._inited}onInit(e,t=!0,s=0){const a=this.addDisposable(new r);return this._inited&&this._target?t&&Promise.resolve().then((()=>{this._inited&&this._target?e(this._target):a.addDisposable(this.onInit(e,t,s))})):a.addDisposable(this._onMessage(o,(()=>{e(this._target)}),s)),a}dispose(){window.removeEventListener("message",this._onReceiveMessage),super.dispose()}}},74568:(e,t,s)=>{s.d(t,{Q:()=>n,m:()=>r});var a=s(81197),o=s(37357);function i(e){return`service_container_${e}`}class r extends o.j{constructor(e){super(),this._parent=e,this._injections=Object.create(null),this._emitter=this.addDisposable(new a.v)}inject(e,t,s){if("function"===typeof t){const a=this._injections[e];let o="function"===typeof a?a():a;const i=this._injections[e]=()=>(o=t(this,o),o);s&&i()}else this._injections[e]=()=>t;this._emitter.fire(e)}_find(e){var t;return this._injections[e]||(null===(t=this._parent)||void 0===t?void 0:t._find(e))}_onInject(e,t,s=new o.j){return s.addDisposable(this._emitter.addEventListener((a=>{e===a&&(s.dispose(),t(this.getInstance(a)))}))),this._parent&&s.addDisposable(this._parent._onInject(e,t,s)),this.addDisposable(s),s}getInstance(e){const t=this._find(e);if("function"===typeof t)return t()}getOrCreateInstance(e,t){const s=this._find(e);if("function"===typeof s)return s();{const s=t(this);return this.inject(e,s),s}}getInstanceAsync(e){const t=this._find(e);return"function"===typeof t?Promise.resolve(t()):new Promise((t=>this._onInject(e,(()=>t(this.getInstance(e))))))}addService(e,t){const s=i(e);this.inject(s,((e,s=[])=>s.indexOf(t)<0?[...s,t]:s));const a=new o.j;return a.addDispose((()=>{this.inject(s,((e,s=[])=>s.filter((e=>e!==t))))})),a}getServices(e){var t;const s=i(e);return[...this.getInstance(s)||[],...(null===(t=this._parent)||void 0===t?void 0:t.getServices(e))||[]]}createChild(){return new r(this)}dispose(){this._injections=Object.create(null)}}const n=new r},88296:(e,t,s)=>{s.d(t,{Q:()=>o});var a=s(39218);function o(e=(0,a.l)()){return e}},73942:(e,t,s)=>{s.d(t,{My:()=>r,dY:()=>i,if:()=>o});var a=s(74568);const o="INJECTION";function i(e){return e.getState}function r(e){if(i(e)){const t=e.getState()[o];return t&&a.Q.getInstance(t)}return e}},37357:(e,t,s)=>{s.d(t,{j:()=>a});class a{constructor(e=[]){this._inner=e,this._isDisposed=!1}addDisposable(e){return this._inner.push(e),e instanceof a&&e.addDispose((()=>{this.removeDisposable(e)})),e}addDispose(e){this.addDisposable({dispose:e})}removeDisposable(e){const t=this._inner.indexOf(e);t>=0&&this._inner.splice(t,1)}isDisposed(){return this._isDisposed}dispose(){if(!this._isDisposed){this._isDisposed=!0;for(const e of[...this._inner])e.dispose()}}}},81197:(e,t,s)=>{s.d(t,{v:()=>o});var a=s(37357);class o extends a.j{constructor(e){super(),this._options=e,this._listeners=[],this.fire=e=>{if(!this.isDisposed()){let t;const s=[...this._listeners];for(const a of s){if(!1===t)return!1;t=t instanceof Promise?t.then((e=>!1!==e&&!this.isDisposed()&&a(e))).catch((e=>{})):a(e)}return t}},this.addEventListener=e=>{const t=this._listeners,s=this._options;var a;(t.push(e),1===t.length)&&((null===(a=this._options)||void 0===a?void 0:a.onFirstListenerAdd)&&this._options.onFirstListenerAdd());return{dispose:()=>{const a=t.indexOf(e);a>=0&&(t.splice(a),t.length||(null===s||void 0===s?void 0:s.onFirstListenerAdd)&&s.onLastListenerRemove())}}},this.event=this.addEventListener}}let i;!function(e){function t(e){let t;const s=new o({onFirstListenerAdd(){t=e(s.fire)},onLastListenerRemove(){t.dispose()}});return s.event}e.snapshot=t,e.filter=function(e,s){return t((t=>e((e=>s(e)&&t(e)))))},e.map=function(e,s){return t((t=>e((e=>t(s(e))))))}}(i||(i={}))},39218:(e,t,s)=>{function a(){var e=(new Date).getTime(),t="undefined"!==typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(s){var a=16*Math.random();return e>0?(a=(e+a)%16|0,e=Math.floor(e/16)):(a=(t+a)%16|0,t=Math.floor(t/16)),("x"===s?a:3&a|8).toString(16)}))}s.d(t,{l:()=>a})},76233:(e,t,s)=>{s.d(t,{CJ:()=>E,eT:()=>p,ft:()=>u,jY:()=>m,mg:()=>h,no:()=>c,qT:()=>n});var a=s(39539),o=s(74029),i=s(88296),r=s(73942);function n(e){for(;e.endsWith("/");)e=e.slice(0,e.length-1);return`${e}/wp-json`}const d={baseUrl:"https://app.useblocks.io/api/wp-json",baseApiParams:{secure:!0,credentials:"same-origin",format:"json"},securityWorker:()=>({credentials:"same-origin"})};d.baseUrl=n("https://app.useblocks.io/api");const p=(0,i.Q)();function l(e){return e.getOrCreateInstance(p,(()=>function(e=d){const t=new Map;return{create(s){const o=new a.RQ({...e,...s});return t.set(o,s),o},getOptions:()=>e,setOptions(s){e=s;for(const[a,o]of t)Object.assign(a,{...e,...o})}}}()))}function h(e,t={}){return l(e=(0,r.dY)(e)?(0,r.My)(e):e).create(t)}const m=(0,i.Q)(),_=(0,i.Q)(),c=(0,i.Q)(),u=e=>{(e=>{e.inject(c,{execute:async(t,s={})=>{const a=e.getServices(m),o=new Request(t,s);for(const e of a)await e.execute(o);let i=await fetch(o);const r=e.getServices(_);for(const e of r)i=await e.execute(i);return i}})})(e);const t=e.getInstance(c);e.inject(o.Pz,h(e,{customFetch:(null===t||void 0===t?void 0:t.execute)||fetch}))};let E;!function(e){const t="https://racs.rest/v3";e.post=function(e,s){const a={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(s)};return fetch(`${t}?resource=${e}&dataset=${document.location.hostname}`,a)},e.getAll=async function(e,s=0){const a={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:`{"filter":{},"limit":${s}}`},o=await fetch(`${t}/get?resource=${e}&dataset=${document.location.hostname}`,a);return await o.json()}}(E||(E={}))},76550:(e,t,s)=>{s.d(t,{Cd:()=>n,Ef:()=>p,Lz:()=>r,ax:()=>d,f5:()=>o,sZ:()=>i});var a=s(88296);const o="Not implemented in plugin",i=(0,a.Q)(),r=(0,a.Q)(),n=(0,a.Q)(),d=(0,a.Q)(),p=((0,a.Q)(),(0,a.Q)(),(0,a.Q)())},63017:(e,t,s)=>{s.r(t),s.d(t,{init:()=>P});var a=s(76233),o=s(37357),i=s(76550),r=s(84362),n=s(27319),d=s(94885),p=s(86161),l=s(6378),h=s(12352),m=s(32947),_=s(15626),c=s(60739),u=s(74568),E=s(74029),y=s(17095),T=s(88195),v=s(13781);m.EW.isPlugin=!0,m._P.isEditor=!1;const f=(0,r.E)([n.e,v.Q,d.E,p.F,h.h,l.F,(0,T.X)((()=>Promise.all([s.e(6419),s.e(4972),s.e(251),s.e(2722),s.e(7348),s.e(6483),s.e(9950),s.e(6798)]).then(s.bind(s,64351)).then((e=>e.default))))]);async function P(e){const t=new o.j,s=await(0,c.x)(e.element,t),r=c.s.get(s);if(r){const t=await r;if(t.getElement()===s)return await t.reset(e)}const n=await async function(){const s=u.Q.createChild();if(e.standaloneKey){s.inject(i.Ef,e.standaloneKey);const a=(0,_.Zc)(s,_.AZ.FILE_PROXY_EVENT_ID);t.addDisposable(a((async({url:e})=>(await fetch(e)).blob()),Number.MIN_VALUE))}s.inject(i.Lz,t),s.inject(E.Zw,new y.Z),(0,a.ft)(s);const o=f(s);return s.inject(i.Cd,o),await o.setOptions(e),(0,_.dB)(s,d.e).fire(o.instance),o.instance}();return s&&c.s.set(s,n),n}},6378:(e,t,s)=>{s.d(t,{F:()=>n});var a=s(74029),o=s(76550),i=s(84362),r=s(76233);const n=(0,i.l)((e=>{let t=!0;return{setOptions(s){if(s.hasOwnProperty("baseUrl")){const a=e.getInstance(r.eT),o=a.getOptions(),i=(0,r.qT)(s.baseUrl);o.baseUrl!==i&&(a.setOptions({baseUrl:i}),t=!0)}if(t){if(!e.getInstance(o.Ef)){const t=e.getInstance(a.Pz);e.inject(o.sZ,(async(e,s)=>s||t.app.app_init_create({}).then((({data:e})=>e))),!0)}t=!1}}}}))},86161:(e,t,s)=>{s.d(t,{F:()=>h});var a=s(84362),o=s(39539),i=s(88296),r=s(76233),n=s(14604),d=s(32947);const p=(0,i.Q)(),l=(0,i.Q)(),h=(0,a.l)((e=>({setOptions(t){const s=(0,n.y)(),a=(0,r.mg)(e);e.addService(r.jY,{execute:s.decorate((async s=>{if(t.jwtAuth){let i=e.getInstance(p),r=e.getInstance(l);if(!r&&!i){const s=await a.jwtAuth.token_create({body:t.jwtAuth,type:o.cM.Json});if(s.error)throw r=d.ff,e.inject(l,d.ff),new Error(d.ff);i=s.data.token,e.inject(p,i)}r||s.headers.append("authorization",`Bearer ${i}`)}}))})}})))},12352:(e,t,s)=>{s.d(t,{h:()=>d,Y:()=>n});var a=s(84362),o=s(88296),i=s(76233);var r=s(45840);const n=(0,o.Q)(),d=(0,a.l)((e=>{let t;return e.addService(i.jY,{execute:async s=>{if(t){const t=await e.getInstanceAsync(n);t&&s.headers.append("authorization",`Bearer ${t}`)}}}),{setOptions(s){t!==s.getAuthToken&&(t=s.getAuthToken,e.inject(n,void 0),e.inject(n,(async(e,s)=>{try{let e;var a;return s&&(e=await s),t?!e||1e3*(null===(a=(0,r.A)(e))||void 0===a?void 0:a.exp)<=function(){const e=new Date;return e.valueOf()-60*e.getTimezoneOffset()*1e3}()?await t(e):e:""}catch(o){return""}}),!0))}}}))},84362:(e,t,s)=>{function a(e){return function(t){return{setOptions:()=>{},instance:{},dispose:()=>{},...e(t)||{}}}}function o(e){return t=>{const s={},a=[];for(const o of e)a.push(o(t));for(const e of a)Object.assign(s,e.instance);return{instance:s,setOptions:async e=>{for(const t of a)await t.setOptions(e)},dispose:()=>{for(const e of a)e.dispose()}}}}s.d(t,{E:()=>o,l:()=>a})},88195:(e,t,s)=>{s.d(t,{X:()=>i,y:()=>o});var a=s(76550);function o(e){return t=>{let s=null,o=!1;return{async setOptions(i){if(!s&&!o){s=await e(t);const o=await t.getInstanceAsync(a.Cd);Object.assign(o.instance,s.instance||{})}s.setOptions&&await s.setOptions(i)},instance:{},dispose(){var e,t;null!==(e=s)&&void 0!==e&&e.dispose&&(null===(t=s)||void 0===t||t.dispose());o=!0}}}}function i(e){return o((async t=>(await e(t))(t)))}},27319:(e,t,s)=>{s.d(t,{e:()=>n});var a=s(84362),o=s(76550),i=s(65470),r=s(54010);const n=(0,a.l)((e=>{const t=e.getInstance(o.Lz),s=new i.vl,a=(0,r.m)(s.event);t.addDispose((()=>{const t=e.getInstance(o.Cd);s.fire(t.instance)}));const n=t.addDisposable(new r.U(a));return t.addDisposable(s),{setOptions({handleDestroy:e}){n.setListener(e)},instance:{handleDestroy:a,destroy:()=>t.dispose()}}}))},94885:(e,t,s)=>{s.d(t,{E:()=>d,e:()=>n});var a=s(15626),o=s(84362),i=s(76550),r=s(54010);const n=(0,a.cZ)("APP_LOAD_EVENT"),d=(0,o.l)((e=>{const t=e.getInstance(i.Lz),s=(0,a.Zc)(e,n),o=(0,r.m)(s),d=new Promise(((e,a)=>{const o=t.addDisposable(s((t=>{o.dispose(),e(t)})))})),p=t.addDisposable(new r.U(o));return{setOptions({handleLoad:e}){p.setListener(e)},instance:{handleLoad:o,reset:e=>d.then((({instance:t,setOptions:s})=>Promise.resolve(s(e)).then((()=>t))))},destroy:()=>t.dispose()}}))},13781:(e,t,s)=>{s.d(t,{Q:()=>d});var a=s(84362),o=s(76550),i=s(60739),r=s(15626),n=s(37357);const d=(0,a.l)((e=>{const t=e.getInstance(o.Lz),s=(0,r.Zc)(e,r.AZ.ON_CHUNKS_LOADED);let a=t.addDisposable(new n.j);return s((()=>{a.dispose()})),{setOptions({initialSpinner:e,element:s}){if(!a.isDisposed()&&!1!==e){const e=e=>{if(!a.isDisposed()&&e){var t;const s=document.createElement("div");s.classList.add("blocks-app-initial-spinner-wrapper");const o=document.createElement("div");o.classList.add("blocks-app-initial-spinner"),s.appendChild(o);const i=document.createElement("style");i.setAttribute("data-useblocks","true"),i.textContent="\n.blocks-app-initial-spinner-wrapper {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.blocks-app-initial-spinner {\n width: 28px;\n height: 28px;\n border: 4px solid rgb(231 212 228 / 100%);\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation_loader 1s linear infinite;\n will-change: transform;\n border-bottom-color: transparent;\n}\n\n@keyframes rotation_loader {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}",null===(t=document.head)||void 0===t||t.appendChild(i),e.appendChild(s),a.addDispose((()=>{s.remove(),i.remove()}))}},o=(0,i.x)(s,t);o instanceof Promise?o.then(e).catch((e=>{})):e(o)}},instance:{}}}))},45840:(e,t,s)=>{function a(e){const[t,s,a]=e.split("."),o=JSON.parse(function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/").padEnd(e.length+(4-e.length%4)%4,"="),s=atob(t),a=new Uint8Array(s.length);for(let o=0;o<s.length;o++)a[o]=s.charCodeAt(o);return(new TextDecoder).decode(a)}(s));return{exp:o.exp,createdAt:o.iat,data:o}}s.d(t,{A:()=>a})},65470:(e,t,s)=>{s.d(t,{HN:()=>l,IO:()=>i,P9:()=>r,lt:()=>m,pb:()=>d,sg:()=>p,vl:()=>h});var a=s(37357);class o extends a.j{constructor(...e){super(...e),this._listeners=[],this.event=this._addListener.bind(this)}getListeners(e){return this._listeners.flatMap((([t])=>"function"===typeof t?t:t.getListeners(e)))}hasListeners(){return this._listeners.length>0}_addListener(e,t=0,s){if(!this.isDisposed()){const a=this._listeners;s&&"function"===typeof e&&(e=e.bind(s));const o=a.findIndex((([e,s])=>t<s)),i=[e,t];return a.splice(o>=0?o:a.length,0,i),{dispose(){const e=a.indexOf(i);e>=0&&a.splice(e,1)}}}}dispose(){this._listeners.splice(0,this._listeners.length),super.dispose()}}class i extends o{constructor(...e){super(...e),this.fire=this._fire.bind(this)}execute(e,t){for(const a of t)try{a(...e)}catch(s){}}_fire(...e){if(!this.isDisposed()){const t=this.execute(e,this.getListeners(e));return"undefined"===typeof t?void 0:t}}}function r(e,t=0){const s=new o;return s.addDisposable(e(s,t)),s.event}class n extends o{constructor(e){super(),this._filter=e}getListeners(e){return this._filter(...e)?super.getListeners(e):[]}}function d(e,t,s=0){const a=new n(t);return a.addDisposable(e(a,s)),a.event}function p(e,t=0,s=0){const a=new i;let o,r=0;return a.addDisposable(e(((...e)=>{o=e,r||(r=setTimeout((()=>{a.fire(...o),r=0}),t))}),s)),a.event}class l extends i{constructor(...e){super(...e),this._suspendCounter=0,this._wasFired=!1}proccessResult(){}execute([e],t){if(this._suspendCounter)this._wasFired=!0;else for(const a of t)try{a(e)}catch(s){}}suspend(){this._suspendCounter++}resume(){0===--this._suspendCounter&&(this._wasFired&&this.fire(),this._wasFired=!1)}}class h extends i{execute([e],t){for(const a of t)try{a(e)}catch(s){}}}class m extends i{async execute([e],t){const s=[];for(const a of t){const t=await a(e);s.push(t)}return s}}},17095:(e,t,s)=>{s.d(t,{Z:()=>a});class a{constructor(){this._storage=Object.create(null)}get(e){const t=this._storage[e];return t&&(!t.expires||t.expires<Date.now())?t.value:""}set(e,t,s){this._storage[e]={value:t,expires:s.expires?1e3*s.expires+Date.now():void 0}}remove(e){delete this._storage[e]}}},54010:(e,t,s)=>{s.d(t,{U:()=>i,m:()=>r});var a=s(37357),o=s(65470);class i extends a.j{constructor(e){super(),this._event=e,this._listener=void 0,this._disposeEvent=void 0}setListener(e){this._listener!==e&&(this._listener=e,this._disposeEvent&&this._disposeEvent(),this._disposeEvent=e?this._event(e):void 0)}dispose(){this._disposeEvent&&this._disposeEvent(),super.dispose()}}function r(e,t,s){const a=(0,o.P9)(e);return(e,o,i)=>{const r=a((async a=>{const o=t?t(a):a;i&&e.bind(i);const r=await e(o);return s?s(r):r}),o,i);return()=>r.dispose()}}},14604:(e,t,s)=>{s.d(t,{y:()=>a});const a=e=>{let t={current:Promise.resolve(),state:e,decorate:(e,s)=>(s&&(e=e.bind(s)),function(...s){const a=t.current.then((()=>e(...s)));return t.current=a.then((e=>{t.state=e}),(e=>{})),a})};return t}},60739:(e,t,s)=>{s.d(t,{s:()=>i,x:()=>o});var a=s(37357);function o(e,t){if("undefined"!==typeof e){if("string"===typeof e){if(e=document.querySelector(e))return e;const s=t.addDisposable(new a.j);return new Promise(((t,a)=>{const o=new MutationObserver((()=>{(e=document.querySelector(e))&&(s.dispose(),t(e))}));o.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),s.addDisposable({dispose:()=>o.disconnect()})}))}return e}return e}const i=new Map}}]);
@@ -1 +1 @@
1
- "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[57],{10653:(e,t,i)=>{i.r(t),i.d(t,{default:()=>$});var r=i(98173),s=i(2604),n=i(62272),o=i(40120),a=i(48753),l=i(98447),d=i(38826),h=i(871),c=i(47014),u=i(23424),v=i(80772),f=i(84572),m=i(48956),p=i(27941),I=i(5558),y=i(90614),g=i(73180);let w;var _;(_=w||(w={})).isEqual=function(e,t,i=(e,t)=>e===t){if(e===t)return!0;const r=e.length;if(r!==t.length)return!1;for(let s=0;s<r;s++)if(!i(e[s],t[s]))return!1;return!0},_.unique=function(e,t){t||(t=e=>e);const i=new Set;return e.filter((e=>{const r=t(e),s=!i.has(r);return i.add(r),s}))};var F=i(12543),P=i(15626),C=i(51213);function E(e){return null==e||""===e?"":e}function S(e){if(null==e)return 1/0;const t=Number(e);return Number.isFinite(t)&&t>=0?t:1/0}function b(e){if(!e)return null;const t=e.folderId;return null==t?null:String(t)}function A(e){return!!e&&e.isFolder}function O(){var e;if("function"===typeof(null===globalThis||void 0===globalThis||null===(e=globalThis.crypto)||void 0===e?void 0:e.randomUUID))return globalThis.crypto.randomUUID();try{const e=globalThis.crypto||globalThis.msCrypto;if(e&&"function"===typeof e.getRandomValues){const t=new Uint8Array(16);e.getRandomValues(t);let i="";for(let e=0;e<t.length;e++)i+=t[e].toString(16).padStart(2,"0");return`id_${i}`}}catch{}return`id_fallback_${Date.now().toString(36)}_${Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(36).slice(0,8)}`}function T(e){const t=new WeakSet;try{return function e(i){if(null===i)return"null";if("boolean"===typeof i)return i?"true":"false";if("number"===typeof i)return Number.isNaN(i)?"NaN":i===1/0?"Infinity":i===-1/0?"-Infinity":Object.is(i,-0)?"-0":String(i);if("string"===typeof i)return JSON.stringify(i);if("undefined"===typeof i)return"undefined";if("symbol"===typeof i)return String(i.toString());if("function"===typeof i)return'"[function]"';if(i instanceof Date)return`"Date(${i.toISOString()})"`;if(i instanceof RegExp)return`"RegExp(${i.toString()})"`;if("object"===typeof i)return t.has(i)?'"[Circular]"':(t.add(i),i instanceof Map?`{Map:${Array.from(i.entries()).sort((([e],[t])=>T(e).localeCompare(T(t)))).map((([t,i])=>`[${e(t)}:${e(i)}]`)).join(",")}}`:i instanceof Set?`{Set:[${Array.from(i.values()).map((t=>e(t))).sort().join(",")}]}`:Array.isArray(i)?`[${i.map((t=>e(t))).join(",")}]`:`{${Object.entries(i).sort((([e],[t])=>e.localeCompare(t))).map((([t,i])=>`${JSON.stringify(t)}:${e(i)}`)).join(",")}}`);return JSON.stringify(String(i))}(e)}catch(i){try{return JSON.stringify(e)}catch{return String(e)}}}class M{constructor(){this.entities=new Map,this.childrenByParent=new Map}now(){return Date.now()}getEntity(e){var t;return null===(t=this.entities.get(e))||void 0===t?void 0:t.value}getRecord(e){return this.entities.get(e)}getFileSystemItem(e){const t=this.getEntity(e);return t&&!A(t)?t:void 0}getFolder(e){const t=this.getEntity(e);return t&&A(t)?t:void 0}getChildrenIds(e,t={}){const i=E(e),r=this.childrenByParent.get(i);return r?t.onlyFileSystemItems?Array.from(r.files):t.onlyFolders?Array.from(r.folders):[...Array.from(r.folders),...Array.from(r.files)]:[]}upsertEntity(e){var t;const i=null!==(t=this.entities.get(e.id))&&void 0!==t?t:null,r=i?i.value:null,s=r?b(r):null,n=b(e),o=!!r&&A(r),a=A(e);let l;if(r&&A(r)&&a){const t=r.childrenCount,i=e.childrenCount;void 0!==t&&void 0===i&&(l=t)}if(r&&(s!==n||o!==a)){const t=E(s),i=this.childrenByParent.get(t);i&&(o?i.folders.delete(e.id):i.files.delete(e.id),0===i.files.size&&0===i.folders.size&&this.childrenByParent.delete(t))}let d=e;void 0!==l&&(d={...e,childrenCount:l}),this.entities.set(e.id,{value:{...d},updatedAt:this.now()});const h=E(n);let c=this.childrenByParent.get(h);c||(c={files:new Set,folders:new Set},this.childrenByParent.set(h,c)),a?c.folders.add(e.id):c.files.add(e.id)}updateServerChildrenCount(e,t){if(null==e||null==t||Number.isNaN(t))return;const i=this.entities.get(e);if(!i||!A(i.value))return;const r={...i.value,childrenCount:t};this.entities.set(e,{value:r,updatedAt:this.now()})}deleteEntityById(e){var t;const i=null!==(t=this.entities.get(e))&&void 0!==t?t:null;if(!i)return{entity:null,parentId:null};const r=i.value,s=b(r),n=E(s),o=this.childrenByParent.get(n);return o&&(A(r)?o.folders.delete(e):o.files.delete(e),0===o.files.size&&0===o.folders.size&&this.childrenByParent.delete(n)),this.entities.delete(e),{entity:{...r},parentId:s}}deleteFolderRecursive(e){const t=this.entities.get(e);if(!t||!A(t.value))return{deletedFolderRecords:[],deletedFileSystemItemRecords:[]};const i=[{id:e,parentId:b(t.value)}],r=[],s=[];for(;i.length;){const e=i.shift();r.push(e);const t=this.childrenByParent.get(E(e.id));if(t){for(const e of Array.from(t.folders)){const t=this.entities.get(e);t&&i.push({id:e,parentId:b(t.value)})}for(const e of Array.from(t.files))s.push(e)}}const n=[];for(const a of s){const e=this.entities.get(a);if(!e)continue;const t=e.value,i=E(b(t)),r=this.childrenByParent.get(i);r&&(r.files.delete(a),0===r.files.size&&0===r.folders.size&&this.childrenByParent.delete(i)),this.entities.delete(a),n.push({...t})}const o=[];for(let a=r.length-1;a>=0;a--){const{id:e,parentId:t}=r[a],i=this.entities.get(e);if(!i)continue;const s=i.value,n=E(s.id);this.childrenByParent.delete(n);const l=E(t),d=this.childrenByParent.get(l);d&&(d.folders.delete(e),0===d.files.size&&0===d.folders.size&&this.childrenByParent.delete(l)),this.entities.delete(e),o.push({...s})}return{deletedFolderRecords:o,deletedFileSystemItemRecords:n}}moveEntityById(e,t){var i;const r=null!==(i=this.entities.get(e))&&void 0!==i?i:null;if(!r)return null;const s=r.value,n=E(b(s)),o=this.childrenByParent.get(n);o&&(A(s)?o.folders.delete(e):o.files.delete(e),0===o.files.size&&0===o.folders.size&&this.childrenByParent.delete(n));const a={...s,folderId:t};if(A(s)&&A(a)){const e=s.childrenCount;void 0!==e&&(a.childrenCount=e)}this.entities.set(e,{value:a,updatedAt:this.now()});const l=E(t);let d=this.childrenByParent.get(l);return d||(d={files:new Set,folders:new Set},this.childrenByParent.set(l,d)),A(a)?d.folders.add(e):d.files.add(e),{...a}}copyFileSystemItem(e,t,i){var r;const s=null!==(r=this.entities.get(e))&&void 0!==r?r:null;if(!s||A(s.value))return null;const n={...s.value,id:t,folderId:i};return this.upsertEntity(n),{...n}}copyFolderShallow(e,t,i){var r;const s=null!==(r=this.entities.get(e))&&void 0!==r?r:null;if(!s||!A(s.value))return null;const n={...s.value,id:t,folderId:i};return this.upsertEntity(n),{...n}}isEntityStale(e,t){var i;const r=null!==(i=this.entities.get(e))&&void 0!==i?i:null;return!r||t!==1/0&&this.now()-r.updatedAt>t}touch(e,t){const i=this.entities.get(e);i&&(i.updatedAt=null!==t&&void 0!==t?t:this.now())}getEntitiesByIds(e){return e.map((e=>{var t,i;return null!==(t=null===(i=this.entities.get(e))||void 0===i?void 0:i.value)&&void 0!==t?t:null}))}toJSON(){return{entities:Array.from(this.entities.entries()),childrenByParent:Array.from(this.childrenByParent.entries()).map((([e,t])=>[e,{files:Array.from(t.files),folders:Array.from(t.folders)}]))}}static fromJSON(e){const t=new M;for(const[s,n]of null!==(i=e.entities)&&void 0!==i?i:[]){var i;t.entities.set(s,{value:n.value,updatedAt:n.updatedAt})}for(const[s,n]of null!==(r=e.childrenByParent)&&void 0!==r?r:[]){var r;t.childrenByParent.set(s,{files:new Set(n.files),folders:new Set(n.folders)})}return t}}class D{constructor(e={},t=3e5,i=3e4,r){var s,n,o;this.views=new Map,this.strategy=void 0,this.ttl=void 0,this.errorTtl=void 0,this.entityTtl=void 0,this.strategy={allowSortedInsert:null===(s=e.allowSortedInsert)||void 0===s||s,allowSearchInsert:null===(n=e.allowSearchInsert)||void 0===n||n,invalidateOnPaginationFull:null===(o=e.invalidateOnPaginationFull)||void 0===o||o,comparator:e.comparator,filterMatch:e.filterMatch},this.ttl=t,this.errorTtl=i,this.entityTtl=null!==r&&void 0!==r?r:t}now(){return Date.now()}parentKey(e){return E(null!==e&&void 0!==e?e:null)}isExpired(e){return null==e||this.ttl!==1/0&&this.now()-e>this.ttl}isErrorExpired(e){return null==e||this.errorTtl!==1/0&&this.now()-e>this.errorTtl}areEntitiesStale(e,t){if(!e)return!0;for(const i of e)if(t.isEntityStale(i,this.entityTtl))return!0;return!1}isEntityTypeCompatible(e,t){return!t||"all"===t||("file"===t&&!A(e)||!("folder"!==t||!A(e)))}async getOrCreateChildren(e,t,i,r){var s;const n=this.parentKey(e),o=T(null!==t&&void 0!==t?t:{});let a=this.views.get(n);a||(a=new Map,this.views.set(n,a));let l=a.get(o);if(!l){l={params:t,view:{promise:null,value:void 0,meta:void 0,error:void 0,updatedAt:0}},a.set(o,l)}if(l.view.error&&!this.isErrorExpired(l.view.updatedAt))throw l.view.error;if(l.view.value&&!this.isExpired(l.view.updatedAt)&&!this.areEntitiesStale(l.view.value,r)&&(null===(s=l.view.meta)||void 0===s||!s.stale)){var d;return{items:l.view.value.map((e=>r.getEntity(e))).filter(Boolean),...null!==(d=l.view.meta)&&void 0!==d?d:{}}}if(l.view.promise)return l.view.promise;const h=(async()=>{try{const s=await i(e,t);for(const e of s.items)r.upsertEntity(e);l.view.value=s.items.map((e=>e.id));const{items:n,...o}=s,a={...o};return"number"!==typeof a.total&&(a.total=a.total),l.view.meta=a,l.view.meta.stale=!1,l.view.error=null,l.view.updatedAt=this.now(),"number"===typeof a.total&&r.updateServerChildrenCount(e,a.total),s}catch(s){throw l.view.error=s,l.view.value=void 0,l.view.updatedAt=this.now(),s}finally{l.view.promise=null}})();return l.view.promise=h,h}tryInsertSorted(e,t,i){const r=this.strategy.comparator;if(!r)return!1;if(!e.view.value)return!1;const s=e.view.value.map((e=>i.getEntity(e)));if(s.some((e=>!e)))return!1;let n=0,o=s.length;for(;n<o;){const i=Math.floor((n+o)/2),a=r(t,s[i],e.params);if("number"!==typeof a||Number.isNaN(a))return!1;a>=0?n=i+1:o=i}return e.view.value.includes(t.id)?(e.view.updatedAt=this.now(),!0):(e.view.value=[...e.view.value.slice(0,n),t.id,...e.view.value.slice(n)],e.view.updatedAt=this.now(),e.view.meta&&"number"===typeof e.view.meta.total&&(e.view.meta.total=Number(e.view.meta.total)+1),!0)}updateChildrenCountForOperation(e,t,i,r){const s=b(t);switch(e){case"delete":this.adjustChildrenCount(r,s,-1);break;case"insert":case"copy":this.adjustChildrenCount(r,s,1);break;case"move":this.adjustChildrenCount(r,i,-1),this.adjustChildrenCount(r,s,1)}}adjustChildrenCount(e,t,i){if(!t)return;const r=e.getFolder(t);if(r&&"number"===typeof r.childrenCount){const s=Math.max(0,r.childrenCount+i);e.updateServerChildrenCount(t,s)}}smartInvalidateChildrenViews(e,t,i,r,s,n){if(!t)return;r&&this.updateChildrenCountForOperation(i,t,s,r);const o=this.parentKey(e),a=this.views.get(o);if(a)for(const[,f]of a){var l,d;const e=null!==(l=f.params)&&void 0!==l?l:{},n=null!==(d=null===e||void 0===e?void 0:e.page)&&void 0!==d?d:1,a=S(null===e||void 0===e?void 0:e.pageSize),m=Number.isFinite(a),p=!!(null!==e&&void 0!==e&&e.sortBy||null!==e&&void 0!==e&&e.sortOrder),I=!(null===e||void 0===e||!e.search),y=(null===e||void 0===e?void 0:e.itemType)||"all";if(!this.isEntityTypeCompatible(t,y))continue;if(I&&this.strategy.filterMatch&&!this.strategy.filterMatch(t,f.params)){var h;null!==(h=f.view.value)&&void 0!==h&&h.includes(t.id)&&(f.view.value=f.view.value.filter((e=>e!==t.id)),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1)),f.view.updatedAt=Date.now());continue}if(!f.view.value){f.view.meta&&(f.view.meta.stale=!0);continue}const g=f.view.value.includes(t.id);var c;if(this.shouldInvalidateCompletely(f,i,t,p,m,n))f.view.meta={...null!==(c=f.view.meta)&&void 0!==c?c:{},stale:!0};else switch(i){case"delete":g&&(f.view.value=f.view.value.filter((e=>e!==t.id)),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1)),f.view.updatedAt=Date.now());break;case"insert":case"copy":if(!g)if(p&&this.strategy.allowSortedInsert&&this.strategy.comparator&&r){this.tryInsertSorted(f,t,r)&&f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1)}else if(!m||f.view.value.length<a)f.view.value.push(t.id),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1),f.view.updatedAt=Date.now();else{var u;f.view.meta={...null!==(u=f.view.meta)&&void 0!==u?u:{},stale:!0}}break;case"update":if(g){if(p||I){f.view.value=f.view.value.filter((e=>e!==t.id));this.tryReinsertEntity(f,t,r,m,a)||f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1))}f.view.updatedAt=Date.now()}break;case"move":const e=o===this.parentKey(s),i=o===this.parentKey(t.folderId);if(e&&g&&(f.view.value=f.view.value.filter((e=>e!==t.id)),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1)),f.view.updatedAt=Date.now()),i&&!g)if(p&&this.strategy.allowSortedInsert&&this.strategy.comparator&&r){this.tryInsertSorted(f,t,r)&&f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1)}else if(!m||f.view.value.length<a)f.view.value.push(t.id),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1),f.view.updatedAt=Date.now();else{var v;f.view.meta={...null!==(v=f.view.meta)&&void 0!==v?v:{},stale:!0}}}}}shouldInvalidateCompletely(e,t,i,r,s,n){return!(!(s&&n>1)||"insert"!==t&&"delete"!==t&&"move"!==t)||(!(!r||this.strategy.comparator||"insert"!==t&&"move"!==t)||!!this.isExpired(e.view.updatedAt))}tryReinsertEntity(e,t,i,r,s){if(this.strategy.comparator&&this.strategy.filterMatch){if(!this.strategy.filterMatch(t,e.params))return!1;if(this.tryInsertSorted(e,t,i))return!0}return(!r||e.view.value.length<s)&&(e.view.value.push(t.id),!0)}forceInvalidateChildrenViews(e){const t=this.parentKey(null!==e&&void 0!==e?e:null),i=this.views.get(t);if(i)for(const[,r]of i)r.view.value=void 0,r.view.error=null,r.view.meta=void 0,r.view.promise=null,r.view.updatedAt=0}getKnownTotal(e){const t=this.parentKey(null!==e&&void 0!==e?e:null),i=this.views.get(t);if(!i)return;let r=null;for(const[,o]of i){const e=o.view.meta;var s,n;if(e&&"number"===typeof e.total)if(!r||(null!==(s=o.view.updatedAt)&&void 0!==s?s:0)>r.updatedAt)r={total:Number(e.total),updatedAt:null!==(n=o.view.updatedAt)&&void 0!==n?n:0}}return r?r.total:void 0}toJSON(){return{views:Array.from(this.views.entries()).map((([e,t])=>[e,Array.from(t.entries())])),ttl:this.ttl,errorTtl:this.errorTtl,entityTtl:this.entityTtl,strategy:{allowSortedInsert:this.strategy.allowSortedInsert,allowSearchInsert:this.strategy.allowSearchInsert,invalidateOnPaginationFull:this.strategy.invalidateOnPaginationFull}}}static fromJSON(e,t){var i,r,s;const n=new D(null!==t&&void 0!==t?t:{},null!==(i=null===e||void 0===e?void 0:e.ttl)&&void 0!==i?i:3e5,null!==(r=null===e||void 0===e?void 0:e.errorTtl)&&void 0!==r?r:3e4,null!==(s=null===e||void 0===e?void 0:e.entityTtl)&&void 0!==s?s:void 0);for(const[v,f]of null!==(o=null===e||void 0===e?void 0:e.views)&&void 0!==o?o:[]){var o;const e=new Map;for(const[t,i]of f){var a,l,d,h,c,u;const r=null!==(a=i.params)&&void 0!==a?a:{},s=null!==(l=i.view)&&void 0!==l?l:{},n={promise:null,value:null!==(d=s.value)&&void 0!==d?d:void 0,meta:null!==(h=s.meta)&&void 0!==h?h:void 0,error:null!==(c=s.error)&&void 0!==c?c:null,updatedAt:null!==(u=s.updatedAt)&&void 0!==u?u:0};e.set(t,{params:r,view:n})}n.views.set(v,e)}return n}}class U{constructor(e={},t=3e5,i=3e4){this.entities=void 0,this.views=void 0,this.ttl=void 0,this.errorTtl=void 0,this.childrenCountPromises=new Map,this.ttl=t,this.errorTtl=i,this.entities=new M,this.views=new D(e,t,i)}getEntity(e){var t;return null!==(t=this.entities.getEntity(e))&&void 0!==t?t:null}getFileSystemItem(e){var t;return null!==(t=this.entities.getFileSystemItem(e))&&void 0!==t?t:null}getFolder(e){var t;return null!==(t=this.entities.getFolder(e))&&void 0!==t?t:null}async getOrCreateChildren(e,t,i){return this.views.getOrCreateChildren(e,t,i,this.entities)}upsertEntity(e){const t=this.entities.getEntity(e.id),i=t?b(t):null,r=b(e),s=!!t&&A(t),n=A(e);if(this.entities.upsertEntity(e),t){if(i!==r||s!==n)return this.views.smartInvalidateChildrenViews(i,t,"delete",this.entities),void this.views.smartInvalidateChildrenViews(r,e,"insert",this.entities);this.views.smartInvalidateChildrenViews(r,e,"update",this.entities,void 0,t)}else this.views.smartInvalidateChildrenViews(r,e,"insert",this.entities)}isAncestor(e,t){let i=t;const r=new Set;for(;i&&!r.has(i);){r.add(i);if(E(i)===E(e))return!0;const t=this.entities.getEntity(i);if(!t)break;i=b(t),null===i&&(i="")}return!1}moveEntity(e,t){const i=this.entities.getEntity(e);if(!i)return null;if(A(i)&&null!==t&&this.isAncestor(e,t))return null;const r=b(i),s=this.entities.moveEntityById(e,t);return s?(this.views.smartInvalidateChildrenViews(r,i,"delete",this.entities),this.views.smartInvalidateChildrenViews(t,s,"insert",this.entities),s):null}copyEntity(e,t,i){var r;const s=this.entities.getEntity(e);if(!s)return null;if(!A(s)){const r=null!==i&&void 0!==i?i:O(),s=this.entities.copyFileSystemItem(e,r,null!==t&&void 0!==t?t:null);return s?(this.views.smartInvalidateChildrenViews(t,s,"copy",this.entities),s):null}const n=[e],o=[];for(;n.length;){const e=n.shift();o.push(e);const t=this.entities.getChildrenIds(e,{onlyFolders:!0});for(const i of t)n.push(i)}const a=new Map;for(const c of o)a.set(c,O());const l={...s,id:a.get(e),folderId:t};this.views.smartInvalidateChildrenViews(t,l,"copy",this.entities);for(const c of o){var d;const i=this.entities.getFolder(c),r=a.get(c),s=b(i),n=null===s?t:null!==(d=a.get(s))&&void 0!==d?d:null,o={...i,id:r,folderId:n};this.entities.upsertEntity(o),c!==e&&this.views.smartInvalidateChildrenViews(n,o,"copy",this.entities)}for(const c of o){const e=a.get(c),t=this.entities.getChildrenIds(c,{onlyFileSystemItems:!0});for(const i of t){const t=this.entities.getFileSystemItem(i);if(!t)continue;const r=O(),s={...t,id:r,folderId:e};this.entities.upsertEntity(s),this.views.smartInvalidateChildrenViews(e,s,"copy",this.entities)}}const h=a.get(e);return h&&null!==(r=this.entities.getEntity(h))&&void 0!==r?r:null}deleteEntity(e){const t=this.entities.getEntity(e);if(!t)return null;if(A(t)){const{deletedFolderRecords:i,deletedFileSystemItemRecords:r}=this.entities.deleteFolderRecursive(e);for(const e of r)this.views.smartInvalidateChildrenViews(e.folderId,e,"delete",this.entities);for(const e of i)this.views.smartInvalidateChildrenViews(e.folderId,e,"delete",this.entities);return t}{const{entity:t,parentId:i}=this.entities.deleteEntityById(e);return t&&this.views.smartInvalidateChildrenViews(i,t,"delete",this.entities),t}}deleteFolderRecursive(e){const{deletedFolderRecords:t,deletedFileSystemItemRecords:i}=this.entities.deleteFolderRecursive(e);for(const r of i)this.views.smartInvalidateChildrenViews(r.folderId,r,"delete",this.entities);for(const r of t)this.views.smartInvalidateChildrenViews(r.folderId,r,"delete",this.entities);return{deletedFileSystemItemIds:i.map((e=>e.id)),deletedFolderIds:t.map((e=>e.id))}}forceInvalidate(e){const t=this.entities.getEntity(e);if(!t)return;const i=new Set;if(A(t)){const t=[e];for(;t.length;){const e=t.pop();if(i.has(e))continue;i.add(e),this.views.forceInvalidateChildrenViews(e);const r=this.entities.getChildrenIds(e,{onlyFolders:!0});for(const i of r)t.push(i)}}else{var r;const e=null!==(r=t.folderId)&&void 0!==r?r:null;this.views.forceInvalidateChildrenViews(e)}}getChildrenIds(e){return this.entities.getChildrenIds(e)}async getChildrenCount(e="",t){let i=!1;const r=E(e),s=this.childrenCountPromises.get(r);if(s)return s;const n=(async()=>{try{const i=this.entities.getFolder(e);if(i&&"number"===typeof i.childrenCount)return i.childrenCount;const r=this.views.getKnownTotal(e);if("number"===typeof r)return i&&this.entities.updateServerChildrenCount(e,r),r;if(t){const i=await t(e);return this.entities.getFolder(e)&&this.entities.updateServerChildrenCount(e,i),i}return this.entities.getChildrenIds(e).length}finally{i=!0,this.childrenCountPromises.delete(r)}})();return i||this.childrenCountPromises.set(r,n),n}toJSON(){return{entities:this.entities.toJSON(),views:this.views.toJSON(),ttl:this.ttl,errorTtl:this.errorTtl}}static fromJSON(e,t){var i,r,s,n;const o=new U(null!==t&&void 0!==t?t:{},null!==(i=null===e||void 0===e?void 0:e.ttl)&&void 0!==i?i:3e5,null!==(r=null===e||void 0===e?void 0:e.errorTtl)&&void 0!==r?r:3e4),a=M.fromJSON(null!==(s=null===e||void 0===e?void 0:e.entities)&&void 0!==s?s:{}),l=D.fromJSON(null!==(n=null===e||void 0===e?void 0:e.views)&&void 0!==n?n:{},null!==t&&void 0!==t?t:{});return o.entities=a,o.views=l,o}}var N;function B({childrenCount:e,...t}){return{...t,childCount:e}}let G=(0,C.A)(N=class{async _findOrCreateFolderByPath(e){const t=(i=e)?i.replaceAll("\\","/").split("/").filter(Boolean):[];var i;if(t.length>10)throw new Error("Path depth exceeds maximum limit of 10");let r;for(const o of t){var s;const{files:t}=await this.getFiles({folderId:(null===(s=r)||void 0===s?void 0:s.id)||"",itemType:"folder"});let i=t.find((e=>e.name===o));if(i){if(!i.isFolder)throw new Error(`Path component '${o}' in '${e}' is not a folder`);r={id:i.id,name:i.name,parentId:i.folderId}}else{var n;if(!this._dataProvider.createFolder)throw new Error("Create folder operation is not supported by data provider");r=await this.createFolder({name:o,parentId:null===(n=r)||void 0===n?void 0:n.id})}}return r}getTrashFolder(){return this._findOrCreateFolderByPath(this._pathOptions.trashPath||"Trash")}getTempFolder(){return this._findOrCreateFolderByPath(this._pathOptions.tempPath||"Edited")}constructor(e,t={},i){var r,s;this._dataProvider=e,this._options=t,this._pathOptions=i,this._cache=void 0,this._rootId=void 0,this._useSoftDelete=void 0,this._enableTrash=void 0,this._useSoftDelete=this._pathOptions.useSoftDelete,this._rootId=this._pathOptions.rootId||"",this._enableTrash=void 0===this._options.enableTrash||this._options.enableTrash,this._cache=new U(t.cacheStrategy||{},null===(r=t.cacheStrategy)||void 0===r?void 0:r.ttl,null===(s=t.cacheStrategy)||void 0===s?void 0:s.errorTtl),this.setController({invalidateItemCache:e=>{this._cache.forceInvalidate(e)},getCachedItem:e=>this._cache.getEntity(e)})}setController(e){var t,i;null===(t=(i=this._dataProvider).setController)||void 0===t||t.call(i,e)}_normalizeId(e){return e?"root"===e?this._rootId:e:this._rootId}async getFiles({folderId:e,search:t,sortBy:i,sortOrder:r,page:s,limit:n,itemType:o="all"}){const a=this._normalizeId(null!==e&&void 0!==e?e:this._rootId),l=this._options.clientSideFilter,d=this._options.clientSideSorting,h=this._options.clientSidePaging,c={folderId:a,itemType:o};l||(c.search=t),d||(c.sortBy=null!==i&&void 0!==i?i:"folder"!==o?"date":void 0,c.sortOrder=null!==r&&void 0!==r?r:"folder"!==o?"desc":void 0),h||(c.page=s,c.limit=n);const u={folderId:a,itemType:o,search:l?void 0:t,sortBy:d?void 0:c.sortBy,sortOrder:d?void 0:c.sortOrder,page:h?void 0:s,pageSize:h?void 0:n},v=await this._cache.getOrCreateChildren(a,u,(async()=>{const e=await this._dataProvider.getItems(c);return{items:e.items,...e.pagination}}));let f,m=v.items;if(l)if("function"===typeof this._options.clientSideFilter)m=this._options.clientSideFilter(m,t);else if(t){const e=t.toLowerCase();m=m.filter((t=>{var i;return null===(i=t.name)||void 0===i?void 0:i.toLowerCase().includes(e)}))}d&&(m="function"===typeof this._options.clientSideSorting?this._options.clientSideSorting(m,i,r):this._defaultClientSideSort(m,i,r)),f=h||l?m.length:v.total;let p=m;if(h&&s&&n)if("function"===typeof this._options.clientSidePaging)p=this._options.clientSidePaging(m,s,n);else{const e=(s-1)*n,t=e+n;p=m.slice(e,t)}if(this._dataProvider.getUrl||this._dataProvider.getThumbnailUrl){const e=p.map((async e=>{if(e.isFolder)return e;const[t,i]=await Promise.all([e.url?Promise.resolve(e.url):this._dataProvider.getUrl?this._dataProvider.getUrl(e):Promise.resolve(void 0),e.thumbnailUrl?Promise.resolve(e.thumbnailUrl):this._dataProvider.getThumbnailUrl?this._dataProvider.getThumbnailUrl(e):Promise.resolve(void 0)]);return{...e,url:t,thumbnailUrl:i}}));p=await Promise.all(e)}const I={page:s,limit:n,total:f,...!h&&v.totalPages&&{totalPages:v.totalPages},...!h&&v.hasNextPage&&{hasNextPage:v.hasNextPage}};return{files:p.map(B),pagination:I}}_defaultClientSideSort(e,t,i){return e.sort(((e,r)=>{let s=0;switch(t){case"name":default:s=(e.name||"").localeCompare(r.name||"");break;case"date":s=new Date(e.date||0).getTime()-new Date(r.date||0).getTime();break;case"size":s=(Number(e.size)||0)-(Number(r.size)||0)}return"desc"===i?-s:s}))}async getFileData(e){const t=this._cache.getEntity(e.id);if(this._dataProvider.getFileData)return this._dataProvider.getFileData(t);if(!e.url&&!this._dataProvider.getUrl)throw new Error("Cannot read file");const i=e.url||await this._dataProvider.getUrl(t);if(i)return(await fetch(i)).blob();throw new Error("Unable to get file data")}async getChildrenCount(e){const t=this._normalizeId(null!==e&&void 0!==e?e:this._rootId);return this._cache.getChildrenCount(t,(async()=>{const{pagination:e}=await this._dataProvider.getItems({folderId:t,limit:0,itemType:"all"});return(null===e||void 0===e?void 0:e.total)||0}))}async uploadFile(e){var t;const i=this._normalizeId(null!==(t=e.folderId)&&void 0!==t?t:this._rootId),r={...this._cache.getEntity(i),...await this._dataProvider.uploadFile({...e,folderId:i}),folderId:i};return this._cache.upsertEntity(r),r}async deleteFile(e){const t=this._normalizeId(e);if(this._useSoftDelete&&this._enableTrash)try{const e=await this.getTrashFolder();return await this.moveItem({itemId:t,targetFolderId:e.id,isFolder:!1})}catch(i){return await this.hardDeleteItem(t)}return await this.hardDeleteItem(t)}async deleteItems(e){if(this._useSoftDelete&&this._enableTrash)try{const t=await this.getTrashFolder();return await this.moveItems(t.id,e)}catch(t){return await this.hardDeleteItems(e)}return await this.hardDeleteItems(e)}async hardDeleteItems(e){let t={success:!0,detailed:[]};if(this._dataProvider.deleteItems){if(t=await this._dataProvider.deleteItems(e.map((e=>this._cache.getEntity(e)))),t.success){const i=t.detailed||e.map((e=>({id:e,success:!0,error:void 0})));for(const e of i)e.success?this._cache.deleteEntity(e.id):e.error}}else this._dataProvider.deleteItem&&(t.detailed=await Promise.all(e.map((async e=>{try{return await this._dataProvider.deleteItem(this._cache.getEntity(e)),this._cache.deleteEntity(e),{id:e,success:!0}}catch(t){return{id:e,error:t,success:!1}}}))),t.success=!t.detailed.some((e=>!e.success)));if(t.success&&this._enableTrash){const e=await this.getTrashFolder();e&&this._cache.forceInvalidate(e.id)}return t}async hardDeleteItem(e){const t=this._cache.getEntity(e);try{if(await this._dataProvider.deleteItem(t),this._enableTrash){const e=await this.getTrashFolder();e&&this._cache.forceInvalidate(e.id)}return!0}catch(i){return!1}}async createFolder({name:e,parentId:t}){const i=this._normalizeId(null!==t&&void 0!==t?t:this._rootId),r=await this._dataProvider.createFolder(e,i);return this._cache.upsertEntity({id:r.id,folderId:i,name:r.name,isFolder:!0,childrenCount:r.childrenCount}),B(r)}async deleteFolder(e){const t=this._normalizeId(e);if(this._useSoftDelete&&this._enableTrash)try{const e=await this.getTrashFolder();return!!await this.moveItem({itemId:t,targetFolderId:e.id,isFolder:!0})&&(this._cache.deleteFolderRecursive(t),!0)}catch(i){return await this.hardDeleteItem(t)}return await this.hardDeleteItem(t)}async renameFolder(e,t){if(!this._dataProvider.renameItem)throw new Error("Rename folder is not supported");const i=this._normalizeId(e),r=this._cache.getEntity(i),s=await this._dataProvider.renameItem(r,t);return this._cache.upsertEntity({...this._cache.getEntity(s.id),...s}),this._cache.getEntity(s.id)}async renameFile(e,t){if(!this._dataProvider.renameItem)throw new Error("Rename file is not supported");const i=this._cache.getEntity(e),r=this._normalizeId(e),s=await this._dataProvider.renameItem(i,t);return s&&this._cache.upsertEntity({...this._cache.getEntity(r),...s}),this._cache.getEntity(r)}async moveItem({itemId:e,targetFolderId:t}){const i=this._normalizeId(t),r=this._cache.getEntity(e),s=await this._dataProvider.moveItem(r,i);if(s.id===e){const t=this._cache.moveEntity(e,i);return this._cache.upsertEntity({...t,...s}),!0}{const t=this._cache.deleteEntity(e);return this._cache.upsertEntity({...t,...s,folderId:i}),!0}}async moveItems(e,t){const i=this._normalizeId(e),r=t.map((e=>this._cache.getEntity(e)));let s={detailed:new Array(r.length),success:!0};if(this._dataProvider.moveItems)s=await this._dataProvider.moveItems(r,i);else{if(!this._dataProvider.moveItem)throw new Error("Move items is not supported");s.detailed=await Promise.all(r.map((async(e,t)=>{try{return{id:r[t].id,data:await this._dataProvider.moveItem(e,i),success:!0}}catch(s){return{id:e.id,success:!1,error:s}}})))}if(s.success){const e=s.detailed||t.map((e=>({id:e,success:!0,data:void 0})));for(const t of e)if(t.success)if(t.data&&t.data.id!==t.id){const e=this._cache.deleteEntity(t.id);this._cache.upsertEntity({...e,...t.data,folderId:i})}else this._cache.moveEntity(t.id,i),t.data&&this._cache.upsertEntity({...this._cache.getEntity(t.id),...t.data,folderId:i});return s}return{success:!1,error:s.error}}async copyItem({itemId:e,targetFolderId:t}){if(!this._dataProvider.copyItem)throw new Error("Copy item is not supported");const i=this._normalizeId(t),r=this._cache.getEntity(e),s=await this._dataProvider.copyItem(r,i),n=this._cache.copyEntity(e,i,s.id);return this._cache.upsertEntity({...n,...s,folderId:i}),!0}async copyItems(e,t){const i=this._normalizeId(e),r=t.map((e=>this._cache.getEntity(e)));let s={detailed:new Array(r.length),success:!0};if(this._dataProvider.copyItems)s=await this._dataProvider.copyItems(r,i);else{if(!this._dataProvider.copyItem)return{error:"Copy item is not supported",success:!1};s.detailed=await Promise.all(r.map((async e=>{try{return{id:e.id,data:await this._dataProvider.copyItem(e,i),success:!0}}catch(t){return{id:e.id,success:!1,error:t}}})))}if(!s.success||!s.detailed)return{error:"batchResult in copy method must have detailed results",success:!1};for(let a=0,l=s.detailed.length;a<l;a++){const e=s.detailed[a];var n;if(e.success)if(null!==(n=e.data)&&void 0!==n&&n.id){var o;const t=this._cache.copyEntity(e.id,(null===(o=e.data)||void 0===o?void 0:o.folderId)||i,e.data.id);e.data&&this._cache.upsertEntity({...t,...e.data,folderId:i})}}return s}async uploadFileByUrl(e){var t;if(e.noFolder){const t=await this.getTempFolder();e={...e,folderId:t.id}}const i=this._normalizeId(null!==(t=e.folderId)&&void 0!==t?t:this._rootId),r=await this._dataProvider.uploadFileByUrl(e.url,i);return this._cache.upsertEntity({...r,folderId:i}),r}async updateFile(e,t){if(!this._dataProvider.updateFile)throw new Error("Update file is not supported");const i=this._normalizeId(e),r=this._cache.getEntity(i),s=await this._dataProvider.updateFile(r,{...t});return this._cache.upsertEntity({...this._cache.getEntity(i),...s,...t}),this._cache.getEntity(i)}})||N;var L=i(39416),R=i(32947),k=(i(51731),i(82900));class z{constructor(e,t="",i="Trash",r="Trash",s=!0){this._inner=e,this.rootPath=t,this.trashId=i,this.trashPath=r,this.ensureFolderTrailingSlash=s,this.getUrl=void 0,this.getThumbnailUrl=void 0,this._pathToId=new Map,this._idToPath=new Map,e.getUrl&&(this.getUrl=t=>e.getUrl({...t,id:this._pathForId(t.id,!1),folderId:t.folderId?this._pathForId(t.folderId,!0):this.rootPath})),e.getThumbnailUrl&&(this.getThumbnailUrl=t=>e.getThumbnailUrl({...t,id:this._pathForId(t.id,!1),folderId:t.folderId?this._pathForId(t.folderId,!0):this.rootPath})),this._inner.deleteItems||(this.deleteItems=void 0),this._inner.moveItems||(this.moveItems=void 0),this._inner.copyItems||(this.copyItems=void 0),this._getOrGenerateId(this.rootPath)}setController(e){var t,i;null===(t=(i=this._inner).setController)||void 0===t||t.call(i,{invalidateItemCache:t=>{const i=t.replace(/^\/+|\/+$/g,""),r=this._pathToId.get(i);r&&e.invalidateItemCache(r)},getCachedItem:t=>{const i=t.replace(/^\/+|\/+$/g,""),r=this._pathToId.get(i);if(r){let t=e.getCachedItem(r);if(t)return{...t,id:this._pathForId(t.id,t.isFolder),folderId:this._pathForId(t.folderId,t.isFolder)}}}})}_getOrGenerateId(e){if(e===this.rootPath)return;if(e===this.trashPath)return this.trashId;const t=e.replace(/^\/+|\/+$/g,"");if(this._pathToId.has(t))return this._pathToId.get(t);const i=(0,k.A)();return this._pathToId.set(t,i),this._idToPath.set(i,t),i}_pathForId(e,t){if(""===e||void 0===e)return this.rootPath;if(e===this.trashId)return this.trashPath;let i=this._idToPath.get(e);if(!i)throw new Error(`path for id ${e} not found`);let r=0;for(;r<this.rootPath.length&&"/"===this.rootPath[r];)r++;if(r){let e=0;for(;e<i.length&&"/"===i[e];)e++;const t=i.slice(e);i="/".repeat(r)+t}return t&&this.ensureFolderTrailingSlash&&!i.endsWith("/")&&(i+="/"),i}_updateIdMapping(e,t){const i=t.replace(/^\/+|\/+$/g,""),r=this._idToPath.get(e);r&&this._pathToId.delete(r),this._idToPath.set(e,i),this._pathToId.set(i,e)}async getItems(e){const t=e.folderId?this._pathForId(e.folderId,!0):this.rootPath,i=await this._inner.getItems({...e,folderId:t}),r=i.items.map((e=>{const t=this._getOrGenerateId(e.id),i=e.folderId?this._getOrGenerateId(e.folderId):this._getOrGenerateId(this.rootPath);return{...e,id:t,folderId:i}}));return{...i,items:r}}async createFolder(e,t){const i=t?this._pathForId(t,!0):this.rootPath,r=await this._inner.createFolder(e,i),s=this._getOrGenerateId(r.id),n=r.folderId?this._getOrGenerateId(r.folderId):this._getOrGenerateId(this.rootPath);return{...r,id:s,folderId:n}}async renameItem(e,t){if(!this._inner.renameItem)throw new Error("renameItem not supported by inner storage");const i=this._pathForId(e.id,e.isFolder),r=i;let{...s}=await this._inner.renameItem({...e,id:i,folderId:this._pathForId(e.folderId,!0)},t);return this._updateIdMapping(e.id,s.id),e.isFolder&&this.remapCachedFolderContents(e.id,r,s.id),s.folderId&&(s={...s,folderId:this._getOrGenerateId(s.folderId)}),{...s,id:this._getOrGenerateId(s.id)}}async deleteItem(e){const t=this._pathForId(e.id,e.isFolder);await this._inner.deleteItem({...e,id:t,folderId:this._pathForId(e.folderId,!0)}),this.recursivelyRemoveMappings(e.id,t)}async uploadFile(e){const t=e.folderId?this._pathForId(e.folderId,!0):this.rootPath,i=await this._inner.uploadFile({...e,folderId:t}),r=this._getOrGenerateId(i.id),s=e.folderId?e.folderId:this._getOrGenerateId(this.rootPath);return{...i,id:r,folderId:s}}async uploadFileByUrl(e,t){const i=t?this._pathForId(t,!0):this.rootPath,r=await this._inner.uploadFileByUrl(e,i),s=this._getOrGenerateId(r.id),n=r.folderId?this._getOrGenerateId(r.folderId):this._getOrGenerateId(this.rootPath);return{...r,id:s,folderId:n}}async moveItem(e,t){const i=this._pathForId(e.id,e.isFolder),r=this._pathForId(t,!0),s=await this._inner.moveItem({...e,id:i,folderId:this._pathForId(e.folderId,!0)},r);return this._updateIdMapping(e.id,s.id),e.isFolder&&this.remapCachedFolderContents(e.id,i,s.id),{...s,id:this._getOrGenerateId(s.id),folderId:t}}async moveItems(e,t){if(!this._inner.moveItems)throw new Error("moveItems not supported by inner storage");const i=t?this._pathForId(t,!0):this.rootPath,r=e.map((e=>({...e,id:this._pathForId(e.id,e.isFolder),folderId:e.folderId?this._pathForId(e.folderId,!0):this.rootPath}))),s=await this._inner.moveItems(r,i),n=[];if(s.detailed&&s.detailed.length===e.length)for(let o=0;o<s.detailed.length;o++){const i=s.detailed[o],r=e[o];if(i.success&&i.data){if(this._updateIdMapping(r.id,i.data.id),r.isFolder){const e=this._pathForId(r.id,r.isFolder);this.remapCachedFolderContents(r.id,e,i.data.id)}n.push({id:r.id,success:!0,data:{...i.data,id:this._getOrGenerateId(i.data.id),folderId:t||this._getOrGenerateId(this.rootPath)}})}else n.push({id:r.id,success:!1,error:i.error})}else for(const o of e)n.push({id:o.id,success:!1,error:"Move operation failed - no detailed results"});return{success:s.success,detailed:n,error:s.error}}async copyItems(e,t){if(!this._inner.copyItems)throw new Error("copyItems not supported by inner storage");const i=t?this._pathForId(t,!0):this.rootPath,r=e.map((e=>({...e,id:this._pathForId(e.id,e.isFolder),folderId:e.folderId?this._pathForId(e.folderId,!0):this.rootPath}))),s=await this._inner.copyItems(r,i),n=[];if(s.detailed&&s.detailed.length===e.length)for(let l=0;l<s.detailed.length;l++){var o;const i=s.detailed[l],r=e[l];if(i.success&&null!==(o=i.data)&&void 0!==o&&o.id){const e=this._getOrGenerateId(i.data.id);n.push({id:r.id,success:!0,data:{...i.data,id:e,folderId:t||this._getOrGenerateId(this.rootPath)}})}else{const e=i.success?i.data?i.data.id?"Unknown copy error":"No ID in copied item data":"No data returned from copy operation":i.error;n.push({id:r.id,success:!1,error:e})}}else for(const l of e)n.push({id:l.id,success:!1,error:s.detailed?"Mismatched result count":"No detailed results from copy operation"});const a=n.every((e=>e.success));return{success:a,detailed:n,error:a?void 0:s.error||"Copy operation completed with errors"}}async deleteItems(e){if(!this._inner.deleteItems)throw new Error("deleteItems not supported by inner storage");const t=e.map((e=>({...e,id:this._pathForId(e.id,e.isFolder),folderId:e.folderId?this._pathForId(e.folderId,!0):this.rootPath}))),i=await this._inner.deleteItems(t),r=[];if(i.detailed&&i.detailed.length===e.length)for(let n=0;n<i.detailed.length;n++){const t=i.detailed[n],s=e[n];if(t.success){const e=this._pathForId(s.id,s.isFolder);this.recursivelyRemoveMappings(s.id,e),r.push({id:s.id,success:!0})}else r.push({id:s.id,success:!1,error:t.error})}else for(const n of e)if(i.success){const e=this._pathForId(n.id,n.isFolder);this.recursivelyRemoveMappings(n.id,e),r.push({id:n.id,success:!0})}else r.push({id:n.id,success:!1,error:i.error||"Delete operation failed"});const s=r.every((e=>e.success));return{success:s,detailed:r,error:s?void 0:i.error||"Some items failed to delete"}}remapCachedFolderContents(e,t,i){const r=t.replace(/\/+$/,""),s=i.replace(/\/+$/,""),n=[];for(const[o,a]of this._idToPath.entries()){const e=a.replace(/\/+$/,"");e!==r&&e.startsWith(r+"/")&&n.push({id:o,oldPath:e})}for(const{id:o,oldPath:a}of n){const e=s+a.substring(r.length);this._updateIdMapping(o,e)}}recursivelyRemoveMappings(e,t){const i=t.replace(/\/+$/,""),r=[],s=[];for(const[n,o]of this._idToPath.entries()){const e=o.replace(/\/+$/,"");(e===i||e.startsWith(i+"/"))&&(r.push(n),s.push(e))}for(let n=0;n<r.length;n++)this._idToPath.delete(r[n]),this._pathToId.delete(s[n])}async copyItem(e,t){const i=this._pathForId(e.id,e.isFolder),r=this._pathForId(t,!0),s=await this._inner.copyItem({...e,id:i,folderId:this._pathForId(e.folderId,e.isFolder)},r),n=this._getOrGenerateId(s.id);return{...s,id:n,folderId:t}}async updateFile(e,t){if(!this._inner.updateFile)throw new Error("updateFile not supported by inner storage");const i=this._pathForId(e.id,!1);let{...r}=await this._inner.updateFile({...e,id:i,folderId:this._pathForId(e.folderId,!0)},t);return this._updateIdMapping(e.id,r.id),r.folderId&&(r={...r,folderId:this._getOrGenerateId(r.folderId)}),{...r,id:this._getOrGenerateId(r.id)}}async getFileData(e){const t=this._pathForId(e.id,!1);if(this._inner.getFileData)return this._inner.getFileData({...e,id:t,folderId:this._pathForId(e.folderId,!0)});const i=e.url||this.getUrl&&await this.getUrl(e);if(!i)throw new Error("Cannot get file data: no url and no inner.getFileData");return fetch(i).then((e=>e.blob()))}}const{useToken:x}=o.A,$=({storageProvider:e})=>{var t,i,o,_,C,E,S,b,A,O,T,M,D,U,N;const B=(0,p.rD)(),{projectId:k,emailId:$,blockId:V}=(0,n.g)(),{__:K}=(0,F.s9)(),{token:j}=x(),{error:J}=(0,I.hN)(),q=(0,s.wA)(),W=(0,s.d4)(c.B$),Y=(0,s.d4)(c.C1),H=(0,s.d4)(u.cL),Q=(0,s.d4)(v.Ac),X=(0,s.d4)(f.yN),Z=(0,s.d4)(v.js),[ee,te]=(0,r.useState)(""),[ie,re]=(0,r.useState)("my_files"),[se,ne]=(0,r.useState)(!1),[oe,ae]=(0,r.useState)(0),[le,de]=(0,r.useState)(""),[he,ce]=(0,r.useState)((()=>[])),ue=()=>{q((0,u.Oo)()),setTimeout((()=>te("")),600)},ve=!(W||(null===(t=Y.id)||void 0===t?void 0:t.toString())!==(null===X||void 0===X||null===(i=X.members)||void 0===i?void 0:i.owner.ID))&&!1,fe=(0,r.useMemo)((()=>({img:Z,background:Q})),[Z,Q]);(0,r.useEffect)((()=>{H.includes("UPLOAD_BACKGROUND_MODAL")?(te("background"),fe.background&&de(fe.background)):H.includes("UPLOAD_IMAGE_MODAL")&&(te("img"),fe.img&&de(fe.img)),H===R.lx.UPLOAD_IMAGE_MODAL||H===R.lx.UPLOAD_BACKGROUND_MODAL?re("editor"):H===R.lx.UPLOAD_IMAGE_MODAL_AI||H===R.lx.UPLOAD_BACKGROUND_MODAL_AI?ve?(ne(!0),ae(2)):re("ai"):H===R.lx.UPLOAD_IMAGE_MODAL_UPLOAD||H===R.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD?re("my_files"):H===R.lx.UPLOAD_IMAGE_MODAL_STOCK||H===R.lx.UPLOAD_BACKGROUND_MODAL_STOCK?ve?(ne(!0),ae(3)):re("stock_images"):H===R.lx.UPLOAD_IMAGE_MODAL_GIF||H===R.lx.UPLOAD_BACKGROUND_MODAL_GIF?ve?(ne(!0),ae(3)):re("gif"):H===R.lx.UPLOAD_IMAGE_MODAL_EDIT||H===R.lx.UPLOAD_BACKGROUND_MODAL_EDIT?(ve?(ne(!0),ae(5)):re("editor"),q((0,u.Wz)(R.lx.IMAGE_EDITOR_MODAL))):re("my_files")}),[H,q,ve,fe]);const me=(0,g.mx)((async()=>e?(e=e.pathMode?new z(e,e.rootId,"Trash",e.trashPath):e,new G(e,B.fileManager,{...e,trashPath:e.pathMode?"Trash":e.trashPath,rootId:e.pathMode?"":e.rootId})):(J(K("Error when initializing file manager")),null)),[e,J,K,B.fileManager]),pe=r.createElement(d.A,{style:{fontSize:32,margin:-16},spin:!0}),Ie=(0,r.useCallback)((e=>{w.isEqual(e,he)||ce(e)}),[he]),[ye]=(0,h.Mv)(),ge=(0,r.useCallback)((async()=>{if(me){const e=he[0];if(e){const t=e.url||e.thumbnailUrl;"img"===ee?q((0,v.tm)(t)):"background"===ee&&q((0,v.e_)(t))}}ue()}),[me,q,u.Oo,he,ee]),we=(0,r.useCallback)((async e=>{if(me&&e){const t=e.url||e.thumbnailUrl;"img"===ee?q((0,v.tm)(t)):"background"===ee&&q((0,v.e_)(t))}ue()}),[me,q,u.Oo,ee]),_e=(0,r.useCallback)((async()=>{ue()}),[q,u.Oo]),[Fe,{data:Pe=[]}]=(0,h.gg)(),Ce=(null===B||void 0===B?void 0:B.handleLimitUsageEmitter)||(0,y.ml)(P.AZ.ON_LIMIT_ID),Ee=(0,r.useCallback)((async function(e){try{await Fe(e).unwrap()}catch(t){}}),[Fe]);return ee&&me?r.createElement(r.Fragment,null,!ve&&r.createElement(a.A,{className:"file-manager",closable:!0,footer:null,open:!!ie&&H.includes("UPLOAD_IMAGE_"),width:"100vw",onOk:ge,onCancel:ue},r.createElement(l.A,{spinning:!me,indicator:pe},me&&("editor"===ie?r.createElement(L.BC,{onSave:we,onClose:_e,dataProviders:me,theme:Y.theme,file:le}):r.createElement(L.KG,{dataProviders:me,onChangeSelection:Ie,onEditorOk:we,config:{activeLibraryItem:ie,REACT_APP_GIPHY_KEY:"Nh77eBlPeMn1ed9MBAvL542NUGeNO26F",UNSPLASH_KEY:"S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o",APP_NAME_UNSPLASH:"Nh77eBlPeMn1ed9MBAvL542NUGeNO26F",fileForEdit:le,projectId:k,elementId:$||V,pushToGTM:null===B||void 0===B?void 0:B.pushToGTM,handleLimitUsageEmitter:Ce,sseQuery:Ee,messages:Pe,sendAIImageRequest:(null===B||void 0===B?void 0:B.sendAIImageRequest)||ye,locale:Y.locale,theme:Y.theme,customTheme:j,enableTrashFolder:null===(o=B.fileManager)||void 0===o?void 0:o.enableTrash,features:{enableRenameFile:!1!==(null===(_=B.fileManager)||void 0===_?void 0:_.enableRenameFile),enableRenameFolder:!1!==(null===(C=B.fileManager)||void 0===C?void 0:C.enableRenameFolder),enableUpdateFile:!1!==(null===(E=B.fileManager)||void 0===E?void 0:E.enableUpdateFile),enableCopyItem:!1!==(null===(S=B.fileManager)||void 0===S?void 0:S.enableMoveFile),enableCopyFolder:!1!==(null===(b=B.fileManager)||void 0===b?void 0:b.enableCopyFolder),enableDelete:!1!==(null===(A=B.fileManager)||void 0===A?void 0:A.enableDelete),enableEdit:!1!==(null===(O=B.fileManager)||void 0===O?void 0:O.enableEdit),enableMoveItem:!1!==(null===(T=B.fileManager)||void 0===T?void 0:T.enableMoveFile),enableMoveFolder:!1!==(null===(M=B.fileManager)||void 0===M?void 0:M.enableMoveFolder)},disablePagination:!1===(null===(D=B.fileManager)||void 0===D?void 0:D.enablePagination),multiSelect:!1!==(null===(U=B.fileManager)||void 0===U?void 0:U.multiSelect),defaultFolderName:null===(N=B.fileManager)||void 0===N?void 0:N.defaultFolderName}})))),r.createElement(m.A,{open:se,onCancel:()=>ne(!1),initialSlide:oe,sideOnOk:void 0})):null}}}]);
1
+ "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[57],{10653:(e,t,i)=>{i.r(t),i.d(t,{default:()=>$});var r=i(98173),s=i(2604),n=i(62272),o=i(40120),a=i(48753),l=i(98447),d=i(38826),h=i(871),c=i(47014),u=i(23424),v=i(80772),f=i(84572),m=i(48956),p=i(27941),I=i(5558),y=i(90614),g=i(73180);let w;var _;(_=w||(w={})).isEqual=function(e,t,i=(e,t)=>e===t){if(e===t)return!0;const r=e.length;if(r!==t.length)return!1;for(let s=0;s<r;s++)if(!i(e[s],t[s]))return!1;return!0},_.unique=function(e,t){t||(t=e=>e);const i=new Set;return e.filter((e=>{const r=t(e),s=!i.has(r);return i.add(r),s}))};var F=i(12543),P=i(15626),C=i(51213);function E(e){return null==e||""===e?"":e}function S(e){if(null==e)return 1/0;const t=Number(e);return Number.isFinite(t)&&t>=0?t:1/0}function b(e){if(!e)return null;const t=e.folderId;return null==t?null:String(t)}function A(e){return!!e&&e.isFolder}function O(){var e;if("function"===typeof(null===globalThis||void 0===globalThis||null===(e=globalThis.crypto)||void 0===e?void 0:e.randomUUID))return globalThis.crypto.randomUUID();try{const e=globalThis.crypto||globalThis.msCrypto;if(e&&"function"===typeof e.getRandomValues){const t=new Uint8Array(16);e.getRandomValues(t);let i="";for(let e=0;e<t.length;e++)i+=t[e].toString(16).padStart(2,"0");return`id_${i}`}}catch{}return`id_fallback_${Date.now().toString(36)}_${Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(36).slice(0,8)}`}function T(e){const t=new WeakSet;try{return function e(i){if(null===i)return"null";if("boolean"===typeof i)return i?"true":"false";if("number"===typeof i)return Number.isNaN(i)?"NaN":i===1/0?"Infinity":i===-1/0?"-Infinity":Object.is(i,-0)?"-0":String(i);if("string"===typeof i)return JSON.stringify(i);if("undefined"===typeof i)return"undefined";if("symbol"===typeof i)return String(i.toString());if("function"===typeof i)return'"[function]"';if(i instanceof Date)return`"Date(${i.toISOString()})"`;if(i instanceof RegExp)return`"RegExp(${i.toString()})"`;if("object"===typeof i)return t.has(i)?'"[Circular]"':(t.add(i),i instanceof Map?`{Map:${Array.from(i.entries()).sort((([e],[t])=>T(e).localeCompare(T(t)))).map((([t,i])=>`[${e(t)}:${e(i)}]`)).join(",")}}`:i instanceof Set?`{Set:[${Array.from(i.values()).map((t=>e(t))).sort().join(",")}]}`:Array.isArray(i)?`[${i.map((t=>e(t))).join(",")}]`:`{${Object.entries(i).sort((([e],[t])=>e.localeCompare(t))).map((([t,i])=>`${JSON.stringify(t)}:${e(i)}`)).join(",")}}`);return JSON.stringify(String(i))}(e)}catch(i){try{return JSON.stringify(e)}catch{return String(e)}}}class M{constructor(){this.entities=new Map,this.childrenByParent=new Map}now(){return Date.now()}getEntity(e){var t;return null===(t=this.entities.get(e))||void 0===t?void 0:t.value}getRecord(e){return this.entities.get(e)}getFileSystemItem(e){const t=this.getEntity(e);return t&&!A(t)?t:void 0}getFolder(e){const t=this.getEntity(e);return t&&A(t)?t:void 0}getChildrenIds(e,t={}){const i=E(e),r=this.childrenByParent.get(i);return r?t.onlyFileSystemItems?Array.from(r.files):t.onlyFolders?Array.from(r.folders):[...Array.from(r.folders),...Array.from(r.files)]:[]}upsertEntity(e){var t;const i=null!==(t=this.entities.get(e.id))&&void 0!==t?t:null,r=i?i.value:null,s=r?b(r):null,n=b(e),o=!!r&&A(r),a=A(e);let l;if(r&&A(r)&&a){const t=r.childrenCount,i=e.childrenCount;void 0!==t&&void 0===i&&(l=t)}if(r&&(s!==n||o!==a)){const t=E(s),i=this.childrenByParent.get(t);i&&(o?i.folders.delete(e.id):i.files.delete(e.id),0===i.files.size&&0===i.folders.size&&this.childrenByParent.delete(t))}let d=e;void 0!==l&&(d={...e,childrenCount:l}),this.entities.set(e.id,{value:{...d},updatedAt:this.now()});const h=E(n);let c=this.childrenByParent.get(h);c||(c={files:new Set,folders:new Set},this.childrenByParent.set(h,c)),a?c.folders.add(e.id):c.files.add(e.id)}updateServerChildrenCount(e,t){if(null==e||null==t||Number.isNaN(t))return;const i=this.entities.get(e);if(!i||!A(i.value))return;const r={...i.value,childrenCount:t};this.entities.set(e,{value:r,updatedAt:this.now()})}deleteEntityById(e){var t;const i=null!==(t=this.entities.get(e))&&void 0!==t?t:null;if(!i)return{entity:null,parentId:null};const r=i.value,s=b(r),n=E(s),o=this.childrenByParent.get(n);return o&&(A(r)?o.folders.delete(e):o.files.delete(e),0===o.files.size&&0===o.folders.size&&this.childrenByParent.delete(n)),this.entities.delete(e),{entity:{...r},parentId:s}}deleteFolderRecursive(e){const t=this.entities.get(e);if(!t||!A(t.value))return{deletedFolderRecords:[],deletedFileSystemItemRecords:[]};const i=[{id:e,parentId:b(t.value)}],r=[],s=[];for(;i.length;){const e=i.shift();r.push(e);const t=this.childrenByParent.get(E(e.id));if(t){for(const e of Array.from(t.folders)){const t=this.entities.get(e);t&&i.push({id:e,parentId:b(t.value)})}for(const e of Array.from(t.files))s.push(e)}}const n=[];for(const a of s){const e=this.entities.get(a);if(!e)continue;const t=e.value,i=E(b(t)),r=this.childrenByParent.get(i);r&&(r.files.delete(a),0===r.files.size&&0===r.folders.size&&this.childrenByParent.delete(i)),this.entities.delete(a),n.push({...t})}const o=[];for(let a=r.length-1;a>=0;a--){const{id:e,parentId:t}=r[a],i=this.entities.get(e);if(!i)continue;const s=i.value,n=E(s.id);this.childrenByParent.delete(n);const l=E(t),d=this.childrenByParent.get(l);d&&(d.folders.delete(e),0===d.files.size&&0===d.folders.size&&this.childrenByParent.delete(l)),this.entities.delete(e),o.push({...s})}return{deletedFolderRecords:o,deletedFileSystemItemRecords:n}}moveEntityById(e,t){var i;const r=null!==(i=this.entities.get(e))&&void 0!==i?i:null;if(!r)return null;const s=r.value,n=E(b(s)),o=this.childrenByParent.get(n);o&&(A(s)?o.folders.delete(e):o.files.delete(e),0===o.files.size&&0===o.folders.size&&this.childrenByParent.delete(n));const a={...s,folderId:t};if(A(s)&&A(a)){const e=s.childrenCount;void 0!==e&&(a.childrenCount=e)}this.entities.set(e,{value:a,updatedAt:this.now()});const l=E(t);let d=this.childrenByParent.get(l);return d||(d={files:new Set,folders:new Set},this.childrenByParent.set(l,d)),A(a)?d.folders.add(e):d.files.add(e),{...a}}copyFileSystemItem(e,t,i){var r;const s=null!==(r=this.entities.get(e))&&void 0!==r?r:null;if(!s||A(s.value))return null;const n={...s.value,id:t,folderId:i};return this.upsertEntity(n),{...n}}copyFolderShallow(e,t,i){var r;const s=null!==(r=this.entities.get(e))&&void 0!==r?r:null;if(!s||!A(s.value))return null;const n={...s.value,id:t,folderId:i};return this.upsertEntity(n),{...n}}isEntityStale(e,t){var i;const r=null!==(i=this.entities.get(e))&&void 0!==i?i:null;return!r||t!==1/0&&this.now()-r.updatedAt>t}touch(e,t){const i=this.entities.get(e);i&&(i.updatedAt=null!==t&&void 0!==t?t:this.now())}getEntitiesByIds(e){return e.map((e=>{var t,i;return null!==(t=null===(i=this.entities.get(e))||void 0===i?void 0:i.value)&&void 0!==t?t:null}))}toJSON(){return{entities:Array.from(this.entities.entries()),childrenByParent:Array.from(this.childrenByParent.entries()).map((([e,t])=>[e,{files:Array.from(t.files),folders:Array.from(t.folders)}]))}}static fromJSON(e){const t=new M;for(const[s,n]of null!==(i=e.entities)&&void 0!==i?i:[]){var i;t.entities.set(s,{value:n.value,updatedAt:n.updatedAt})}for(const[s,n]of null!==(r=e.childrenByParent)&&void 0!==r?r:[]){var r;t.childrenByParent.set(s,{files:new Set(n.files),folders:new Set(n.folders)})}return t}}class D{constructor(e={},t=3e5,i=3e4,r){var s,n,o;this.views=new Map,this.strategy=void 0,this.ttl=void 0,this.errorTtl=void 0,this.entityTtl=void 0,this.strategy={allowSortedInsert:null===(s=e.allowSortedInsert)||void 0===s||s,allowSearchInsert:null===(n=e.allowSearchInsert)||void 0===n||n,invalidateOnPaginationFull:null===(o=e.invalidateOnPaginationFull)||void 0===o||o,comparator:e.comparator,filterMatch:e.filterMatch},this.ttl=t,this.errorTtl=i,this.entityTtl=null!==r&&void 0!==r?r:t}now(){return Date.now()}parentKey(e){return E(null!==e&&void 0!==e?e:null)}isExpired(e){return null==e||this.ttl!==1/0&&this.now()-e>this.ttl}isErrorExpired(e){return null==e||this.errorTtl!==1/0&&this.now()-e>this.errorTtl}areEntitiesStale(e,t){if(!e)return!0;for(const i of e)if(t.isEntityStale(i,this.entityTtl))return!0;return!1}isEntityTypeCompatible(e,t){return!t||"all"===t||("file"===t&&!A(e)||!("folder"!==t||!A(e)))}async getOrCreateChildren(e,t,i,r){var s;const n=this.parentKey(e),o=T(null!==t&&void 0!==t?t:{});let a=this.views.get(n);a||(a=new Map,this.views.set(n,a));let l=a.get(o);if(!l){l={params:t,view:{promise:null,value:void 0,meta:void 0,error:void 0,updatedAt:0}},a.set(o,l)}if(l.view.error&&!this.isErrorExpired(l.view.updatedAt))throw l.view.error;if(l.view.value&&!this.isExpired(l.view.updatedAt)&&!this.areEntitiesStale(l.view.value,r)&&(null===(s=l.view.meta)||void 0===s||!s.stale)){var d;return{items:l.view.value.map((e=>r.getEntity(e))).filter(Boolean),...null!==(d=l.view.meta)&&void 0!==d?d:{}}}if(l.view.promise)return l.view.promise;const h=(async()=>{try{const s=await i(e,t);for(const e of s.items)r.upsertEntity(e);l.view.value=s.items.map((e=>e.id));const{items:n,...o}=s,a={...o};return"number"!==typeof a.total&&(a.total=a.total),l.view.meta=a,l.view.meta.stale=!1,l.view.error=null,l.view.updatedAt=this.now(),"number"===typeof a.total&&r.updateServerChildrenCount(e,a.total),s}catch(s){throw l.view.error=s,l.view.value=void 0,l.view.updatedAt=this.now(),s}finally{l.view.promise=null}})();return l.view.promise=h,h}tryInsertSorted(e,t,i){const r=this.strategy.comparator;if(!r)return!1;if(!e.view.value)return!1;const s=e.view.value.map((e=>i.getEntity(e)));if(s.some((e=>!e)))return!1;let n=0,o=s.length;for(;n<o;){const i=Math.floor((n+o)/2),a=r(t,s[i],e.params);if("number"!==typeof a||Number.isNaN(a))return!1;a>=0?n=i+1:o=i}return e.view.value.includes(t.id)?(e.view.updatedAt=this.now(),!0):(e.view.value=[...e.view.value.slice(0,n),t.id,...e.view.value.slice(n)],e.view.updatedAt=this.now(),e.view.meta&&"number"===typeof e.view.meta.total&&(e.view.meta.total=Number(e.view.meta.total)+1),!0)}updateChildrenCountForOperation(e,t,i,r){const s=b(t);switch(e){case"delete":this.adjustChildrenCount(r,s,-1);break;case"insert":case"copy":this.adjustChildrenCount(r,s,1);break;case"move":this.adjustChildrenCount(r,i,-1),this.adjustChildrenCount(r,s,1)}}adjustChildrenCount(e,t,i){if(!t)return;const r=e.getFolder(t);if(r&&"number"===typeof r.childrenCount){const s=Math.max(0,r.childrenCount+i);e.updateServerChildrenCount(t,s)}}smartInvalidateChildrenViews(e,t,i,r,s,n){if(!t)return;r&&this.updateChildrenCountForOperation(i,t,s,r);const o=this.parentKey(e),a=this.views.get(o);if(a)for(const[,f]of a){var l,d;const e=null!==(l=f.params)&&void 0!==l?l:{},n=null!==(d=null===e||void 0===e?void 0:e.page)&&void 0!==d?d:1,a=S(null===e||void 0===e?void 0:e.pageSize),m=Number.isFinite(a),p=!!(null!==e&&void 0!==e&&e.sortBy||null!==e&&void 0!==e&&e.sortOrder),I=!(null===e||void 0===e||!e.search),y=(null===e||void 0===e?void 0:e.itemType)||"all";if(!this.isEntityTypeCompatible(t,y))continue;if(I&&this.strategy.filterMatch&&!this.strategy.filterMatch(t,f.params)){var h;null!==(h=f.view.value)&&void 0!==h&&h.includes(t.id)&&(f.view.value=f.view.value.filter((e=>e!==t.id)),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1)),f.view.updatedAt=Date.now());continue}if(!f.view.value){f.view.meta&&(f.view.meta.stale=!0);continue}const g=f.view.value.includes(t.id);var c;if(this.shouldInvalidateCompletely(f,i,t,p,m,n))f.view.meta={...null!==(c=f.view.meta)&&void 0!==c?c:{},stale:!0};else switch(i){case"delete":g&&(f.view.value=f.view.value.filter((e=>e!==t.id)),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1)),f.view.updatedAt=Date.now());break;case"insert":case"copy":if(!g)if(p&&this.strategy.allowSortedInsert&&this.strategy.comparator&&r){this.tryInsertSorted(f,t,r)&&f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1)}else if(!m||f.view.value.length<a)f.view.value.push(t.id),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1),f.view.updatedAt=Date.now();else{var u;f.view.meta={...null!==(u=f.view.meta)&&void 0!==u?u:{},stale:!0}}break;case"update":if(g){if(p||I){f.view.value=f.view.value.filter((e=>e!==t.id));this.tryReinsertEntity(f,t,r,m,a)||f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1))}f.view.updatedAt=Date.now()}break;case"move":const e=o===this.parentKey(s),i=o===this.parentKey(t.folderId);if(e&&g&&(f.view.value=f.view.value.filter((e=>e!==t.id)),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total=Math.max(0,f.view.meta.total-1)),f.view.updatedAt=Date.now()),i&&!g)if(p&&this.strategy.allowSortedInsert&&this.strategy.comparator&&r){this.tryInsertSorted(f,t,r)&&f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1)}else if(!m||f.view.value.length<a)f.view.value.push(t.id),f.view.meta&&"number"===typeof f.view.meta.total&&(f.view.meta.total+=1),f.view.updatedAt=Date.now();else{var v;f.view.meta={...null!==(v=f.view.meta)&&void 0!==v?v:{},stale:!0}}}}}shouldInvalidateCompletely(e,t,i,r,s,n){return!(!(s&&n>1)||"insert"!==t&&"delete"!==t&&"move"!==t)||(!(!r||this.strategy.comparator||"insert"!==t&&"move"!==t)||!!this.isExpired(e.view.updatedAt))}tryReinsertEntity(e,t,i,r,s){if(this.strategy.comparator&&this.strategy.filterMatch){if(!this.strategy.filterMatch(t,e.params))return!1;if(this.tryInsertSorted(e,t,i))return!0}return(!r||e.view.value.length<s)&&(e.view.value.push(t.id),!0)}forceInvalidateChildrenViews(e){const t=this.parentKey(null!==e&&void 0!==e?e:null),i=this.views.get(t);if(i)for(const[,r]of i)r.view.value=void 0,r.view.error=null,r.view.meta=void 0,r.view.promise=null,r.view.updatedAt=0}getKnownTotal(e){const t=this.parentKey(null!==e&&void 0!==e?e:null),i=this.views.get(t);if(!i)return;let r=null;for(const[,o]of i){const e=o.view.meta;var s,n;if(e&&"number"===typeof e.total)if(!r||(null!==(s=o.view.updatedAt)&&void 0!==s?s:0)>r.updatedAt)r={total:Number(e.total),updatedAt:null!==(n=o.view.updatedAt)&&void 0!==n?n:0}}return r?r.total:void 0}toJSON(){return{views:Array.from(this.views.entries()).map((([e,t])=>[e,Array.from(t.entries())])),ttl:this.ttl,errorTtl:this.errorTtl,entityTtl:this.entityTtl,strategy:{allowSortedInsert:this.strategy.allowSortedInsert,allowSearchInsert:this.strategy.allowSearchInsert,invalidateOnPaginationFull:this.strategy.invalidateOnPaginationFull}}}static fromJSON(e,t){var i,r,s;const n=new D(null!==t&&void 0!==t?t:{},null!==(i=null===e||void 0===e?void 0:e.ttl)&&void 0!==i?i:3e5,null!==(r=null===e||void 0===e?void 0:e.errorTtl)&&void 0!==r?r:3e4,null!==(s=null===e||void 0===e?void 0:e.entityTtl)&&void 0!==s?s:void 0);for(const[v,f]of null!==(o=null===e||void 0===e?void 0:e.views)&&void 0!==o?o:[]){var o;const e=new Map;for(const[t,i]of f){var a,l,d,h,c,u;const r=null!==(a=i.params)&&void 0!==a?a:{},s=null!==(l=i.view)&&void 0!==l?l:{},n={promise:null,value:null!==(d=s.value)&&void 0!==d?d:void 0,meta:null!==(h=s.meta)&&void 0!==h?h:void 0,error:null!==(c=s.error)&&void 0!==c?c:null,updatedAt:null!==(u=s.updatedAt)&&void 0!==u?u:0};e.set(t,{params:r,view:n})}n.views.set(v,e)}return n}}class U{constructor(e={},t=3e5,i=3e4){this.entities=void 0,this.views=void 0,this.ttl=void 0,this.errorTtl=void 0,this.childrenCountPromises=new Map,this.ttl=t,this.errorTtl=i,this.entities=new M,this.views=new D(e,t,i)}getEntity(e){var t;return null!==(t=this.entities.getEntity(e))&&void 0!==t?t:null}getFileSystemItem(e){var t;return null!==(t=this.entities.getFileSystemItem(e))&&void 0!==t?t:null}getFolder(e){var t;return null!==(t=this.entities.getFolder(e))&&void 0!==t?t:null}async getOrCreateChildren(e,t,i){return this.views.getOrCreateChildren(e,t,i,this.entities)}upsertEntity(e){const t=this.entities.getEntity(e.id),i=t?b(t):null,r=b(e),s=!!t&&A(t),n=A(e);if(this.entities.upsertEntity(e),t){if(i!==r||s!==n)return this.views.smartInvalidateChildrenViews(i,t,"delete",this.entities),void this.views.smartInvalidateChildrenViews(r,e,"insert",this.entities);this.views.smartInvalidateChildrenViews(r,e,"update",this.entities,void 0,t)}else this.views.smartInvalidateChildrenViews(r,e,"insert",this.entities)}isAncestor(e,t){let i=t;const r=new Set;for(;i&&!r.has(i);){r.add(i);if(E(i)===E(e))return!0;const t=this.entities.getEntity(i);if(!t)break;i=b(t),null===i&&(i="")}return!1}moveEntity(e,t){const i=this.entities.getEntity(e);if(!i)return null;if(A(i)&&null!==t&&this.isAncestor(e,t))return null;const r=b(i),s=this.entities.moveEntityById(e,t);return s?(this.views.smartInvalidateChildrenViews(r,i,"delete",this.entities),this.views.smartInvalidateChildrenViews(t,s,"insert",this.entities),s):null}copyEntity(e,t,i){var r;const s=this.entities.getEntity(e);if(!s)return null;if(!A(s)){const r=null!==i&&void 0!==i?i:O(),s=this.entities.copyFileSystemItem(e,r,null!==t&&void 0!==t?t:null);return s?(this.views.smartInvalidateChildrenViews(t,s,"copy",this.entities),s):null}const n=[e],o=[];for(;n.length;){const e=n.shift();o.push(e);const t=this.entities.getChildrenIds(e,{onlyFolders:!0});for(const i of t)n.push(i)}const a=new Map;for(const c of o)a.set(c,O());const l={...s,id:a.get(e),folderId:t};this.views.smartInvalidateChildrenViews(t,l,"copy",this.entities);for(const c of o){var d;const i=this.entities.getFolder(c),r=a.get(c),s=b(i),n=null===s?t:null!==(d=a.get(s))&&void 0!==d?d:null,o={...i,id:r,folderId:n};this.entities.upsertEntity(o),c!==e&&this.views.smartInvalidateChildrenViews(n,o,"copy",this.entities)}for(const c of o){const e=a.get(c),t=this.entities.getChildrenIds(c,{onlyFileSystemItems:!0});for(const i of t){const t=this.entities.getFileSystemItem(i);if(!t)continue;const r=O(),s={...t,id:r,folderId:e};this.entities.upsertEntity(s),this.views.smartInvalidateChildrenViews(e,s,"copy",this.entities)}}const h=a.get(e);return h&&null!==(r=this.entities.getEntity(h))&&void 0!==r?r:null}deleteEntity(e){const t=this.entities.getEntity(e);if(!t)return null;if(A(t)){const{deletedFolderRecords:i,deletedFileSystemItemRecords:r}=this.entities.deleteFolderRecursive(e);for(const e of r)this.views.smartInvalidateChildrenViews(e.folderId,e,"delete",this.entities);for(const e of i)this.views.smartInvalidateChildrenViews(e.folderId,e,"delete",this.entities);return t}{const{entity:t,parentId:i}=this.entities.deleteEntityById(e);return t&&this.views.smartInvalidateChildrenViews(i,t,"delete",this.entities),t}}deleteFolderRecursive(e){const{deletedFolderRecords:t,deletedFileSystemItemRecords:i}=this.entities.deleteFolderRecursive(e);for(const r of i)this.views.smartInvalidateChildrenViews(r.folderId,r,"delete",this.entities);for(const r of t)this.views.smartInvalidateChildrenViews(r.folderId,r,"delete",this.entities);return{deletedFileSystemItemIds:i.map((e=>e.id)),deletedFolderIds:t.map((e=>e.id))}}forceInvalidate(e){const t=this.entities.getEntity(e);if(!t)return;const i=new Set;if(A(t)){const t=[e];for(;t.length;){const e=t.pop();if(i.has(e))continue;i.add(e),this.views.forceInvalidateChildrenViews(e);const r=this.entities.getChildrenIds(e,{onlyFolders:!0});for(const i of r)t.push(i)}}else{var r;const e=null!==(r=t.folderId)&&void 0!==r?r:null;this.views.forceInvalidateChildrenViews(e)}}getChildrenIds(e){return this.entities.getChildrenIds(e)}async getChildrenCount(e="",t){let i=!1;const r=E(e),s=this.childrenCountPromises.get(r);if(s)return s;const n=(async()=>{try{const i=this.entities.getFolder(e);if(i&&"number"===typeof i.childrenCount)return i.childrenCount;const r=this.views.getKnownTotal(e);if("number"===typeof r)return i&&this.entities.updateServerChildrenCount(e,r),r;if(t){const i=await t(e);return this.entities.getFolder(e)&&this.entities.updateServerChildrenCount(e,i),i}return this.entities.getChildrenIds(e).length}finally{i=!0,this.childrenCountPromises.delete(r)}})();return i||this.childrenCountPromises.set(r,n),n}toJSON(){return{entities:this.entities.toJSON(),views:this.views.toJSON(),ttl:this.ttl,errorTtl:this.errorTtl}}static fromJSON(e,t){var i,r,s,n;const o=new U(null!==t&&void 0!==t?t:{},null!==(i=null===e||void 0===e?void 0:e.ttl)&&void 0!==i?i:3e5,null!==(r=null===e||void 0===e?void 0:e.errorTtl)&&void 0!==r?r:3e4),a=M.fromJSON(null!==(s=null===e||void 0===e?void 0:e.entities)&&void 0!==s?s:{}),l=D.fromJSON(null!==(n=null===e||void 0===e?void 0:e.views)&&void 0!==n?n:{},null!==t&&void 0!==t?t:{});return o.entities=a,o.views=l,o}}var N;function B({childrenCount:e,...t}){return{...t,childCount:e}}let G=(0,C.A)(N=class{async _findOrCreateFolderByPath(e){const t=(i=e)?i.replaceAll("\\","/").split("/").filter(Boolean):[];var i;if(t.length>10)throw new Error("Path depth exceeds maximum limit of 10");let r;for(const o of t){var s;const{files:t}=await this.getFiles({folderId:(null===(s=r)||void 0===s?void 0:s.id)||"",itemType:"folder"});let i=t.find((e=>e.name===o));if(i){if(!i.isFolder)throw new Error(`Path component '${o}' in '${e}' is not a folder`);r={id:i.id,name:i.name,parentId:i.folderId}}else{var n;if(!this._dataProvider.createFolder)throw new Error("Create folder operation is not supported by data provider");r=await this.createFolder({name:o,parentId:null===(n=r)||void 0===n?void 0:n.id})}}return r}getTrashFolder(){return this._findOrCreateFolderByPath(this._pathOptions.trashPath||"Trash")}getTempFolder(){return this._findOrCreateFolderByPath(this._pathOptions.tempPath||"Edited")}constructor(e,t={},i){var r,s;this._dataProvider=e,this._options=t,this._pathOptions=i,this._cache=void 0,this._rootId=void 0,this._useSoftDelete=void 0,this._enableTrash=void 0,this._useSoftDelete=this._pathOptions.useSoftDelete,this._rootId=this._pathOptions.rootId||"",this._enableTrash=void 0===this._options.enableTrash||this._options.enableTrash,this._cache=new U(t.cacheStrategy||{},null===(r=t.cacheStrategy)||void 0===r?void 0:r.ttl,null===(s=t.cacheStrategy)||void 0===s?void 0:s.errorTtl),this.setController({invalidateItemCache:e=>{this._cache.forceInvalidate(e)},getCachedItem:e=>this._cache.getEntity(e)})}setController(e){var t,i;null===(t=(i=this._dataProvider).setController)||void 0===t||t.call(i,e)}_normalizeId(e){return e?"root"===e?this._rootId:e:this._rootId}async getFiles({folderId:e,search:t,sortBy:i,sortOrder:r,page:s,limit:n,itemType:o="all"}){const a=this._normalizeId(null!==e&&void 0!==e?e:this._rootId),l=this._options.clientSideFilter,d=this._options.clientSideSorting,h=this._options.clientSidePaging,c={folderId:a,itemType:o};l||(c.search=t),d||(c.sortBy=null!==i&&void 0!==i?i:"folder"!==o?"date":void 0,c.sortOrder=null!==r&&void 0!==r?r:"folder"!==o?"desc":void 0),h||(c.page=s,c.limit=n);const u={folderId:a,itemType:o,search:l?void 0:t,sortBy:d?void 0:c.sortBy,sortOrder:d?void 0:c.sortOrder,page:h?void 0:s,pageSize:h?void 0:n},v=await this._cache.getOrCreateChildren(a,u,(async()=>{const e=await this._dataProvider.getItems(c);return{items:e.items,...e.pagination}}));let f,m=v.items;if(l)if("function"===typeof this._options.clientSideFilter)m=this._options.clientSideFilter(m,t);else if(t){const e=t.toLowerCase();m=m.filter((t=>{var i;return null===(i=t.name)||void 0===i?void 0:i.toLowerCase().includes(e)}))}d&&(m="function"===typeof this._options.clientSideSorting?this._options.clientSideSorting(m,i,r):this._defaultClientSideSort(m,i,r)),f=h||l?m.length:v.total;let p=m;if(h&&s&&n)if("function"===typeof this._options.clientSidePaging)p=this._options.clientSidePaging(m,s,n);else{const e=(s-1)*n,t=e+n;p=m.slice(e,t)}if(this._dataProvider.getUrl||this._dataProvider.getThumbnailUrl){const e=p.map((async e=>{if(e.isFolder)return e;const[t,i]=await Promise.all([e.url?Promise.resolve(e.url):this._dataProvider.getUrl?this._dataProvider.getUrl(e):Promise.resolve(void 0),e.thumbnailUrl?Promise.resolve(e.thumbnailUrl):this._dataProvider.getThumbnailUrl?this._dataProvider.getThumbnailUrl(e):Promise.resolve(void 0)]);return{...e,url:t,thumbnailUrl:i}}));p=await Promise.all(e)}const I={page:s,limit:n,total:f,...!h&&v.totalPages&&{totalPages:v.totalPages},...!h&&v.hasNextPage&&{hasNextPage:v.hasNextPage}};return{files:p.map(B),pagination:I}}_defaultClientSideSort(e,t,i){return e.sort(((e,r)=>{let s=0;switch(t){case"name":default:s=(e.name||"").localeCompare(r.name||"");break;case"date":s=new Date(e.date||0).getTime()-new Date(r.date||0).getTime();break;case"size":s=(Number(e.size)||0)-(Number(r.size)||0)}return"desc"===i?-s:s}))}async getFileData(e){const t=this._cache.getEntity(e.id);if(this._dataProvider.getFileData)return this._dataProvider.getFileData(t);if(!e.url&&!this._dataProvider.getUrl)throw new Error("Cannot read file");const i=e.url||await this._dataProvider.getUrl(t);if(i)return(await fetch(i)).blob();throw new Error("Unable to get file data")}async getChildrenCount(e){if(!e)return 0;const t=this._normalizeId(null!==e&&void 0!==e?e:this._rootId);return this._cache.getChildrenCount(t,(async()=>{const{pagination:e}=await this._dataProvider.getItems({folderId:t,limit:0,itemType:"all"});return(null===e||void 0===e?void 0:e.total)||0}))}async uploadFile(e){var t;const i=this._normalizeId(null!==(t=e.folderId)&&void 0!==t?t:this._rootId),r={...this._cache.getEntity(i),...await this._dataProvider.uploadFile({...e,folderId:i}),folderId:i};return this._cache.upsertEntity(r),r}async deleteFile(e){const t=this._normalizeId(e);if(this._useSoftDelete&&this._enableTrash)try{const e=await this.getTrashFolder();return await this.moveItem({itemId:t,targetFolderId:e.id,isFolder:!1})}catch(i){return await this.hardDeleteItem(t)}return await this.hardDeleteItem(t)}async deleteItems(e,t){if(this._useSoftDelete&&this._enableTrash&&!0!==t.permanent)try{const t=await this.getTrashFolder();return await this.moveItems(t.id,e)}catch(i){return await this.hardDeleteItems(e,t)}return await this.hardDeleteItems(e,t)}async hardDeleteItems(e,t){let i={success:!0,detailed:[]};if(this._dataProvider.deleteItems){if(i=await this._dataProvider.deleteItems(e.map((e=>this._cache.getEntity(e))),t),i.success){const t=i.detailed||e.map((e=>({id:e,success:!0,error:void 0})));for(const e of t)e.success?this._cache.deleteEntity(e.id):e.error}}else this._dataProvider.deleteItem&&(i.detailed=await Promise.all(e.map((async e=>{try{return await this._dataProvider.deleteItem(this._cache.getEntity(e),t),this._cache.deleteEntity(e),{id:e,success:!0}}catch(i){return{id:e,error:i,success:!1}}}))),i.success=!i.detailed.some((e=>!e.success)));if(i.success&&this._enableTrash){const e=await this.getTrashFolder();e&&this._cache.forceInvalidate(e.id)}return i}async hardDeleteItem(e){const t=this._cache.getEntity(e);try{if(await this._dataProvider.deleteItem(t,{permanent:!0}),this._enableTrash){const e=await this.getTrashFolder();e&&this._cache.forceInvalidate(e.id)}return!0}catch(i){return!1}}async createFolder({name:e,parentId:t}){const i=this._normalizeId(null!==t&&void 0!==t?t:this._rootId),r=await this._dataProvider.createFolder(e,i);return this._cache.upsertEntity({id:r.id,folderId:i,name:r.name,isFolder:!0,childrenCount:r.childrenCount}),B(r)}async deleteFolder(e){const t=this._normalizeId(e);if(this._useSoftDelete&&this._enableTrash)try{const e=await this.getTrashFolder();return!!await this.moveItem({itemId:t,targetFolderId:e.id,isFolder:!0})&&(this._cache.deleteFolderRecursive(t),!0)}catch(i){return await this.hardDeleteItem(t)}return await this.hardDeleteItem(t)}async renameFolder(e,t){if(!this._dataProvider.renameItem)throw new Error("Rename folder is not supported");const i=this._normalizeId(e),r=this._cache.getEntity(i),s=await this._dataProvider.renameItem(r,t);return this._cache.upsertEntity({...this._cache.getEntity(s.id),...s}),this._cache.getEntity(s.id)}async renameFile(e,t){if(!this._dataProvider.renameItem)throw new Error("Rename file is not supported");const i=this._cache.getEntity(e),r=this._normalizeId(e),s=await this._dataProvider.renameItem(i,t);return s&&this._cache.upsertEntity({...this._cache.getEntity(r),...s}),this._cache.getEntity(r)}async moveItem({itemId:e,targetFolderId:t}){const i=this._normalizeId(t),r=this._cache.getEntity(e),s=await this._dataProvider.moveItem(r,i);if(s.id===e){const t=this._cache.moveEntity(e,i);return this._cache.upsertEntity({...t,...s}),!0}{const t=this._cache.deleteEntity(e);return this._cache.upsertEntity({...t,...s,folderId:i}),!0}}async moveItems(e,t){const i=this._normalizeId(e),r=t.map((e=>this._cache.getEntity(e)));let s={detailed:new Array(r.length),success:!0};if(this._dataProvider.moveItems)s=await this._dataProvider.moveItems(r,i);else{if(!this._dataProvider.moveItem)throw new Error("Move items is not supported");s.detailed=await Promise.all(r.map((async(e,t)=>{try{return{id:r[t].id,data:await this._dataProvider.moveItem(e,i),success:!0}}catch(s){return{id:e.id,success:!1,error:s}}})))}if(s.success){const e=s.detailed||t.map((e=>({id:e,success:!0,data:void 0})));for(const t of e)if(t.success)if(t.data&&t.data.id!==t.id){const e=this._cache.deleteEntity(t.id);this._cache.upsertEntity({...e,...t.data,folderId:i})}else this._cache.moveEntity(t.id,i),t.data&&this._cache.upsertEntity({...this._cache.getEntity(t.id),...t.data,folderId:i});return s}return{success:!1,error:s.error}}async copyItem({itemId:e,targetFolderId:t}){if(!this._dataProvider.copyItem)throw new Error("Copy item is not supported");const i=this._normalizeId(t),r=this._cache.getEntity(e),s=await this._dataProvider.copyItem(r,i),n=this._cache.copyEntity(e,i,s.id);return this._cache.upsertEntity({...n,...s,folderId:i}),!0}async copyItems(e,t){const i=this._normalizeId(e),r=t.map((e=>this._cache.getEntity(e)));let s={detailed:new Array(r.length),success:!0};if(this._dataProvider.copyItems)s=await this._dataProvider.copyItems(r,i);else{if(!this._dataProvider.copyItem)return{error:"Copy item is not supported",success:!1};s.detailed=await Promise.all(r.map((async e=>{try{return{id:e.id,data:await this._dataProvider.copyItem(e,i),success:!0}}catch(t){return{id:e.id,success:!1,error:t}}})))}if(!s.success||!s.detailed)return{error:"batchResult in copy method must have detailed results",success:!1};for(let a=0,l=s.detailed.length;a<l;a++){const e=s.detailed[a];var n;if(e.success)if(null!==(n=e.data)&&void 0!==n&&n.id){var o;const t=this._cache.copyEntity(e.id,(null===(o=e.data)||void 0===o?void 0:o.folderId)||i,e.data.id);e.data&&this._cache.upsertEntity({...t,...e.data,folderId:i})}}return s}async uploadFileByUrl(e){var t;if(e.noFolder){const t=await this.getTempFolder();e={...e,folderId:t.id}}const i=this._normalizeId(null!==(t=e.folderId)&&void 0!==t?t:this._rootId),r=await this._dataProvider.uploadFileByUrl(e.url,i);return this._cache.upsertEntity({...r,folderId:i}),r}async updateFile(e,t){if(!this._dataProvider.updateFile)throw new Error("Update file is not supported");const i=this._normalizeId(e),r=this._cache.getEntity(i),s=await this._dataProvider.updateFile(r,{...t});return this._cache.upsertEntity({...this._cache.getEntity(i),...s,...t}),this._cache.getEntity(i)}})||N;var L=i(39416),R=i(32947),k=(i(51731),i(82900));class z{constructor(e,t="",i="Trash",r="Trash",s=!0){this._inner=e,this.rootPath=t,this.trashId=i,this.trashPath=r,this.ensureFolderTrailingSlash=s,this.getUrl=void 0,this.getThumbnailUrl=void 0,this._pathToId=new Map,this._idToPath=new Map,e.getUrl&&(this.getUrl=t=>e.getUrl({...t,id:this._pathForId(t.id,!1),folderId:t.folderId?this._pathForId(t.folderId,!0):this.rootPath})),e.getThumbnailUrl&&(this.getThumbnailUrl=t=>e.getThumbnailUrl({...t,id:this._pathForId(t.id,!1),folderId:t.folderId?this._pathForId(t.folderId,!0):this.rootPath})),this._inner.deleteItems||(this.deleteItems=void 0),this._inner.moveItems||(this.moveItems=void 0),this._inner.copyItems||(this.copyItems=void 0),this._getOrGenerateId(this.rootPath)}setController(e){var t,i;null===(t=(i=this._inner).setController)||void 0===t||t.call(i,{invalidateItemCache:t=>{const i=t.replace(/^\/+|\/+$/g,""),r=this._pathToId.get(i);r&&e.invalidateItemCache(r)},getCachedItem:t=>{const i=t.replace(/^\/+|\/+$/g,""),r=this._pathToId.get(i);if(r){let t=e.getCachedItem(r);if(t)return{...t,id:this._pathForId(t.id,t.isFolder),folderId:this._pathForId(t.folderId,t.isFolder)}}}})}_getOrGenerateId(e){if(e===this.rootPath)return;const t=e.replaceAll(/^\/+|\/+$/g,"");if(t===this.trashPath.replaceAll(/^\/+|\/+$/g,""))return this.trashId;if(this._pathToId.has(t))return this._pathToId.get(t);const i=(0,k.A)();return this._pathToId.set(t,i),this._idToPath.set(i,t),i}_pathForId(e,t){if(""===e||void 0===e)return this.rootPath;if(e===this.trashId)return this.trashPath;let i=this._idToPath.get(e);if(!i)throw new Error(`path for id ${e} not found`);let r=0;for(;r<this.rootPath.length&&"/"===this.rootPath[r];)r++;if(r){let e=0;for(;e<i.length&&"/"===i[e];)e++;const t=i.slice(e);i="/".repeat(r)+t}return t&&this.ensureFolderTrailingSlash&&!i.endsWith("/")&&(i+="/"),i}_updateIdMapping(e,t){const i=t.replace(/^\/+|\/+$/g,""),r=this._idToPath.get(e);r&&this._pathToId.delete(r),this._idToPath.set(e,i),this._pathToId.set(i,e)}async getItems(e){const t=e.folderId?this._pathForId(e.folderId,!0):this.rootPath,i=await this._inner.getItems({...e,folderId:t}),r=i.items.map((e=>{const t=this._getOrGenerateId(e.id),i=e.folderId?this._getOrGenerateId(e.folderId):this._getOrGenerateId(this.rootPath);return{...e,id:t,folderId:i}}));return{...i,items:r}}async createFolder(e,t){const i=t?this._pathForId(t,!0):this.rootPath,r=await this._inner.createFolder(e,i),s=this._getOrGenerateId(r.id),n=r.folderId?this._getOrGenerateId(r.folderId):this._getOrGenerateId(this.rootPath);return{...r,id:s,folderId:n}}async renameItem(e,t){if(!this._inner.renameItem)throw new Error("renameItem not supported by inner storage");const i=this._pathForId(e.id,e.isFolder),r=i;let{...s}=await this._inner.renameItem({...e,id:i,folderId:this._pathForId(e.folderId,!0)},t);return this._updateIdMapping(e.id,s.id),e.isFolder&&this.remapCachedFolderContents(e.id,r,s.id),s.folderId&&(s={...s,folderId:this._getOrGenerateId(s.folderId)}),{...s,id:this._getOrGenerateId(s.id)}}async deleteItem(e,t){const i=this._pathForId(e.id,e.isFolder);await this._inner.deleteItem({...e,id:i,folderId:this._pathForId(e.folderId,!0)},t),this.recursivelyRemoveMappings(e.id,i)}async uploadFile(e){const t=e.folderId?this._pathForId(e.folderId,!0):this.rootPath,i=await this._inner.uploadFile({...e,folderId:t}),r=this._getOrGenerateId(i.id),s=e.folderId?e.folderId:this._getOrGenerateId(this.rootPath);return{...i,id:r,folderId:s}}async uploadFileByUrl(e,t){const i=t?this._pathForId(t,!0):this.rootPath,r=await this._inner.uploadFileByUrl(e,i),s=this._getOrGenerateId(r.id),n=r.folderId?this._getOrGenerateId(r.folderId):this._getOrGenerateId(this.rootPath);return{...r,id:s,folderId:n}}async moveItem(e,t){const i=this._pathForId(e.id,e.isFolder),r=this._pathForId(t,!0),s=await this._inner.moveItem({...e,id:i,folderId:this._pathForId(e.folderId,!0)},r);return this._updateIdMapping(e.id,s.id),e.isFolder&&this.remapCachedFolderContents(e.id,i,s.id),{...s,id:this._getOrGenerateId(s.id),folderId:t}}async moveItems(e,t){if(!this._inner.moveItems)throw new Error("moveItems not supported by inner storage");const i=t?this._pathForId(t,!0):this.rootPath,r=e.map((e=>({...e,id:this._pathForId(e.id,e.isFolder),folderId:e.folderId?this._pathForId(e.folderId,!0):this.rootPath}))),s=await this._inner.moveItems(r,i),n=[];if(s.detailed&&s.detailed.length===e.length)for(let o=0;o<s.detailed.length;o++){const i=s.detailed[o],r=e[o];if(i.success&&i.data){if(this._updateIdMapping(r.id,i.data.id),r.isFolder){const e=this._pathForId(r.id,r.isFolder);this.remapCachedFolderContents(r.id,e,i.data.id)}n.push({id:r.id,success:!0,data:{...i.data,id:this._getOrGenerateId(i.data.id),folderId:t||this._getOrGenerateId(this.rootPath)}})}else n.push({id:r.id,success:!1,error:i.error})}else for(const o of e)n.push({id:o.id,success:!1,error:"Move operation failed - no detailed results"});return{success:s.success,detailed:n,error:s.error}}async copyItems(e,t){if(!this._inner.copyItems)throw new Error("copyItems not supported by inner storage");const i=t?this._pathForId(t,!0):this.rootPath,r=e.map((e=>({...e,id:this._pathForId(e.id,e.isFolder),folderId:e.folderId?this._pathForId(e.folderId,!0):this.rootPath}))),s=await this._inner.copyItems(r,i),n=[];if(s.detailed&&s.detailed.length===e.length)for(let l=0;l<s.detailed.length;l++){var o;const i=s.detailed[l],r=e[l];if(i.success&&null!==(o=i.data)&&void 0!==o&&o.id){const e=this._getOrGenerateId(i.data.id);n.push({id:r.id,success:!0,data:{...i.data,id:e,folderId:t||this._getOrGenerateId(this.rootPath)}})}else{const e=i.success?i.data?i.data.id?"Unknown copy error":"No ID in copied item data":"No data returned from copy operation":i.error;n.push({id:r.id,success:!1,error:e})}}else for(const l of e)n.push({id:l.id,success:!1,error:s.detailed?"Mismatched result count":"No detailed results from copy operation"});const a=n.every((e=>e.success));return{success:a,detailed:n,error:a?void 0:s.error||"Copy operation completed with errors"}}async deleteItems(e,t){if(!this._inner.deleteItems)throw new Error("deleteItems not supported by inner storage");const i=e.map((e=>({...e,id:this._pathForId(e.id,e.isFolder),folderId:e.folderId?this._pathForId(e.folderId,!0):this.rootPath}))),r=await this._inner.deleteItems(i,t),s=[];if(r.detailed&&r.detailed.length===e.length)for(let o=0;o<r.detailed.length;o++){const t=r.detailed[o],i=e[o];if(t.success){const e=this._pathForId(i.id,i.isFolder);this.recursivelyRemoveMappings(i.id,e),s.push({id:i.id,success:!0})}else s.push({id:i.id,success:!1,error:t.error})}else for(const o of e)if(r.success){const e=this._pathForId(o.id,o.isFolder);this.recursivelyRemoveMappings(o.id,e),s.push({id:o.id,success:!0})}else s.push({id:o.id,success:!1,error:r.error||"Delete operation failed"});const n=s.every((e=>e.success));return{success:n,detailed:s,error:n?void 0:r.error||"Some items failed to delete"}}remapCachedFolderContents(e,t,i){const r=t.replace(/\/+$/,""),s=i.replace(/\/+$/,""),n=[];for(const[o,a]of this._idToPath.entries()){const e=a.replace(/\/+$/,"");e!==r&&e.startsWith(r+"/")&&n.push({id:o,oldPath:e})}for(const{id:o,oldPath:a}of n){const e=s+a.substring(r.length);this._updateIdMapping(o,e)}}recursivelyRemoveMappings(e,t){const i=t.replace(/\/+$/,""),r=[],s=[];for(const[n,o]of this._idToPath.entries()){const e=o.replace(/\/+$/,"");(e===i||e.startsWith(i+"/"))&&(r.push(n),s.push(e))}for(let n=0;n<r.length;n++)this._idToPath.delete(r[n]),this._pathToId.delete(s[n])}async copyItem(e,t){const i=this._pathForId(e.id,e.isFolder),r=this._pathForId(t,!0),s=await this._inner.copyItem({...e,id:i,folderId:this._pathForId(e.folderId,e.isFolder)},r),n=this._getOrGenerateId(s.id);return{...s,id:n,folderId:t}}async updateFile(e,t){if(!this._inner.updateFile)throw new Error("updateFile not supported by inner storage");const i=this._pathForId(e.id,!1);let{...r}=await this._inner.updateFile({...e,id:i,folderId:this._pathForId(e.folderId,!0)},t);return this._updateIdMapping(e.id,r.id),r.folderId&&(r={...r,folderId:this._getOrGenerateId(r.folderId)}),{...r,id:this._getOrGenerateId(r.id)}}async getFileData(e){const t=this._pathForId(e.id,!1);if(this._inner.getFileData)return this._inner.getFileData({...e,id:t,folderId:this._pathForId(e.folderId,!0)});const i=e.url||this.getUrl&&await this.getUrl(e);if(!i)throw new Error("Cannot get file data: no url and no inner.getFileData");return fetch(i).then((e=>e.blob()))}}const{useToken:x}=o.A,$=({storageProvider:e})=>{var t,o,_,C,E,S,b,A,O,T,M,D,U,N,B;const k=(0,p.rD)(),{projectId:$,emailId:V,blockId:K}=(0,n.g)(),{__:j}=(0,F.s9)(),{token:J}=x(),{error:q}=(0,I.hN)(),W=(0,s.wA)(),Y=(0,s.d4)(c.B$),H=(0,s.d4)(c.C1),Q=(0,s.d4)(u.cL),X=(0,s.d4)(v.Ac),Z=(0,s.d4)(f.yN),ee=(0,s.d4)(v.js),[te,ie]=(0,r.useState)(""),[re,se]=(0,r.useState)("my_files"),[ne,oe]=(0,r.useState)(!1),[ae,le]=(0,r.useState)(0),[de,he]=(0,r.useState)(""),[ce,ue]=(0,r.useState)((()=>[])),ve=()=>{W((0,u.Oo)()),setTimeout((()=>ie("")),600)},fe=!(Y||(null===(t=H.id)||void 0===t?void 0:t.toString())!==(null===Z||void 0===Z||null===(o=Z.members)||void 0===o?void 0:o.owner.ID))&&!1,me=(0,r.useMemo)((()=>({img:ee,background:X})),[ee,X]);(0,r.useEffect)((()=>{Q.includes("UPLOAD_BACKGROUND_MODAL")?(ie("background"),me.background&&he(me.background)):Q.includes("UPLOAD_IMAGE_MODAL")&&(ie("img"),me.img&&he(me.img)),Q===R.lx.UPLOAD_IMAGE_MODAL||Q===R.lx.UPLOAD_BACKGROUND_MODAL?se("editor"):Q===R.lx.UPLOAD_IMAGE_MODAL_AI||Q===R.lx.UPLOAD_BACKGROUND_MODAL_AI?fe?(oe(!0),le(2)):se("ai"):Q===R.lx.UPLOAD_IMAGE_MODAL_UPLOAD||Q===R.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD?se("my_files"):Q===R.lx.UPLOAD_IMAGE_MODAL_STOCK||Q===R.lx.UPLOAD_BACKGROUND_MODAL_STOCK?fe?(oe(!0),le(3)):se("stock_images"):Q===R.lx.UPLOAD_IMAGE_MODAL_GIF||Q===R.lx.UPLOAD_BACKGROUND_MODAL_GIF?fe?(oe(!0),le(3)):se("gif"):Q===R.lx.UPLOAD_IMAGE_MODAL_EDIT||Q===R.lx.UPLOAD_BACKGROUND_MODAL_EDIT?(fe?(oe(!0),le(5)):se("editor"),W((0,u.Wz)(R.lx.IMAGE_EDITOR_MODAL))):se("my_files")}),[Q,W,fe,me]);const pe=(0,g.mx)((async()=>e?(e=e.pathMode?new z(e,e.rootId,"Trash",e.trashPath):e,new G(e,k.fileManager,{...e,trashPath:e.pathMode?"trash":e.trashPath,rootId:e.pathMode?"":e.rootId})):(q(j("Error when initializing file manager")),null)),[e,q,j,k.fileManager]),Ie=r.createElement(d.A,{style:{fontSize:32,margin:-16},spin:!0}),ye=(0,r.useCallback)((e=>{w.isEqual(e,ce)||ue(e)}),[ce]),[ge]=(0,h.Mv)(),we=(0,r.useCallback)((async()=>{if(pe){const e=ce[0];if(e){const t=e.url||e.thumbnailUrl;"img"===te?W((0,v.tm)(t)):"background"===te&&W((0,v.e_)(t))}}ve()}),[pe,W,u.Oo,ce,te]),_e=(0,r.useCallback)((async e=>{if(pe&&e){const t=e.url||e.thumbnailUrl;"img"===te?W((0,v.tm)(t)):"background"===te&&W((0,v.e_)(t))}ve()}),[pe,W,u.Oo,te]),Fe=(0,r.useCallback)((async()=>{ve()}),[W,u.Oo]),[Pe,{data:Ce=[]}]=(0,h.gg)(),Ee=(null===k||void 0===k?void 0:k.handleLimitUsageEmitter)||(0,y.ml)(P.AZ.ON_LIMIT_ID),Se=(0,r.useCallback)((async function(e){try{await Pe(e).unwrap()}catch(t){}}),[Pe]);return te&&pe?r.createElement(r.Fragment,null,!fe&&r.createElement(a.A,{className:"file-manager",closable:!0,footer:null,open:!!re&&Q.includes("UPLOAD_IMAGE_"),width:"100vw",onOk:we,onCancel:ve},r.createElement(l.A,{spinning:!pe,indicator:Ie},pe&&("editor"===re?r.createElement(L.BC,{onSave:_e,onClose:Fe,dataProviders:pe,theme:H.theme,file:de}):r.createElement(L.KG,{dataProviders:pe,onChangeSelection:ye,onEditorOk:_e,config:{publicPath:i.p,activeLibraryItem:re,REACT_APP_GIPHY_KEY:"Nh77eBlPeMn1ed9MBAvL542NUGeNO26F",UNSPLASH_KEY:"S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o",APP_NAME_UNSPLASH:"Nh77eBlPeMn1ed9MBAvL542NUGeNO26F",fileForEdit:de,projectId:$,elementId:V||K,pushToGTM:null===k||void 0===k?void 0:k.pushToGTM,handleLimitUsageEmitter:Ee,sseQuery:Se,messages:Ce,sendAIImageRequest:(null===k||void 0===k?void 0:k.sendAIImageRequest)||ge,locale:H.locale,theme:H.theme,customTheme:J,enableTrashFolder:null===(_=k.fileManager)||void 0===_?void 0:_.enableTrash,features:{enableRenameFile:!1!==(null===(C=k.fileManager)||void 0===C?void 0:C.enableRenameFile),enableRenameFolder:!1!==(null===(E=k.fileManager)||void 0===E?void 0:E.enableRenameFolder),enableUpdateFile:!1!==(null===(S=k.fileManager)||void 0===S?void 0:S.enableUpdateFile),enableCopyItem:!1!==(null===(b=k.fileManager)||void 0===b?void 0:b.enableMoveFile),enableCopyFolder:!1!==(null===(A=k.fileManager)||void 0===A?void 0:A.enableCopyFolder),enableDelete:!1!==(null===(O=k.fileManager)||void 0===O?void 0:O.enableDelete),enableEdit:!1!==(null===(T=k.fileManager)||void 0===T?void 0:T.enableEdit),enableMoveItem:!1!==(null===(M=k.fileManager)||void 0===M?void 0:M.enableMoveFile),enableMoveFolder:!1!==(null===(D=k.fileManager)||void 0===D?void 0:D.enableMoveFolder)},disablePagination:!1===(null===(U=k.fileManager)||void 0===U?void 0:U.enablePagination),multiSelect:!1!==(null===(N=k.fileManager)||void 0===N?void 0:N.multiSelect),defaultFolderName:null===(B=k.fileManager)||void 0===B?void 0:B.defaultFolderName}})))),r.createElement(m.A,{open:ne,onCancel:()=>oe(!1),initialSlide:ae,sideOnOk:void 0})):null}}}]);