useblocks 1.3.8 → 1.3.11-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/iframe/.vite/manifest.json +4 -4
- package/iframe/css/sandbox.css +6 -0
- package/iframe/{iframe-eblock.a0b8903e.html → iframe-eblock.c5a8ebf9.html} +2 -2
- package/iframe/{iframe.a0b8903e.html → iframe.c5a8ebf9.html} +2 -2
- package/iframe/js/{elMarkupHelper.C1NUEUOF.js → elMarkupHelper.DjmNMeRr.js} +90 -90
- package/iframe/js/{iframe-eblock.body.a0b8903e.js → iframe-eblock.body.c5a8ebf9.js} +1 -1
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/{iframe.body.a0b8903e.js → iframe.body.c5a8ebf9.js} +1 -1
- package/iframe/js/iframe.js +2 -2
- package/package.json +1 -1
- package/runtime/react/index.js +1 -1
- package/static/core/{f370243f.js → 1155fc70.js} +1 -1
- package/static/core/{5bf0cc25.js → 14819724.js} +1 -1
- package/static/core/{e85778fc.js → 1c0ad4e2.js} +1 -1
- package/static/core/{7a1ca179.js → 1c94aa95.js} +1 -1
- package/static/core/{4a69114d.js → 1d3606c0.js} +1 -1
- package/static/core/{c0f26c01.js → 203f8a09.js} +1 -1
- package/static/core/{3e55fbd4.js → 2a8276a7.js} +1 -1
- package/static/core/{d4aa63e7.js → 2aa29959.js} +1 -1
- package/static/core/{bd188fca.js → 2b3023ec.js} +1 -1
- package/static/core/{2d458997.js → 2f369eab.js} +1 -1
- package/static/core/{55a6e3bc.js → 35a1d850.js} +3 -3
- package/static/core/{31aad6a0.js → 3b0fc21e.js} +1 -1
- package/static/core/{4e869a27.js → 3f1b20ee.js} +1 -1
- package/static/core/{88ed7988.js → 411823ad.js} +1 -1
- package/static/core/{74b30e13.js → 4430410a.js} +1 -1
- package/static/core/{e6079a68.js → 490ecf9b.js} +1 -1
- package/static/core/{e4ebcc13.js → 62abaa0c.js} +1 -1
- package/static/core/{6584ba9a.js → 6a4c653c.js} +1 -1
- package/static/core/{58b98b23.js → 6b521a88.js} +2 -2
- package/static/core/{d5cd129a.js → 6c84f3aa.js} +1 -1
- package/static/core/81908794.js +1 -0
- package/static/core/{851da4d1.js → 880187e3.js} +1 -1
- package/static/core/{75b3d05d.js → 8b0eaa20.js} +2 -2
- package/static/core/{91a91433.js → 8c5662da.js} +1 -1
- package/static/core/{1b6e3017.js → 9689c25e.js} +1 -1
- package/static/core/{ec23adac.js → a5cf594a.js} +1 -1
- package/static/core/{64a5118e.js → a636d084.js} +1 -1
- package/static/core/{f06286dd.js → b8e2e735.js} +1 -1
- package/static/core/{3fc88c79.js → b90b0517.js} +1 -1
- package/static/core/{c015f53f.js → bf6cd7cc.js} +1 -1
- package/static/core/{d5774798.js → bfa8fbcd.js} +1 -1
- package/static/core/{cad7dc27.js → c96e8d1f.js} +1 -1
- package/static/core/{ffabcd69.js → cff76b3c.js} +1 -1
- package/static/core/{a7e83e25.js → d3ae23fa.js} +1 -1
- package/static/core/{b79eddad.js → d8b648e9.js} +1 -1
- package/static/core/{d7ccd97b.js → dbf8654f.js} +1 -1
- package/static/core/{80f29ed0.js → e4a8dec2.js} +1 -1
- package/static/core/{3d73b614.js → e5cae5a9.js} +1 -1
- package/static/core/{3339abc3.js → e6bcae1a.js} +1 -1
- package/static/core/{a2fb7ae9.js → e955189e.js} +1 -1
- package/static/core/{addbb53c.js → ebf996e0.js} +1 -1
- package/static/core/ed99afa7.js +19 -0
- package/static/core/{9f12c233.js → f10baea7.js} +1 -1
- package/static/core/{4f9f6515.js → f3eb0f57.js} +1 -1
- package/static/esm/{b6a1b54a.js → f97f42d1.js} +1 -1
- package/static/umd-runtime/runtime.CtmO-sKr.js +1 -0
- package/{useblocks-core.a0b8903e.js → useblocks-core.c5a8ebf9.js} +43 -42
- package/useblocks-esm.js +12 -12
- package/{useblocks-po.a0b8903e.js → useblocks-po.c5a8ebf9.js} +1 -1
- package/useblocks.js +13 -13
- package/vendor/useblocks-ui-kit/package.json +1 -1
- package/static/core/2ca6f0ad.js +0 -19
- package/static/core/d67c9b4e.js +0 -2
- package/static/umd-runtime/runtime.B77pxBrU.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
__useblocks__.define("static/core/a73da823.js",["require","exports","module"],function(d,a,u){function s(c,l="application/octet-stream"){let t=c.trim(),i=l?.trim()||"application/octet-stream";const o=t.indexOf(",");if(t.startsWith("data:")&&o>=0){const e=t.slice(5,o).split(";")[0]?.trim();e&&(i=e),t=t.slice(o+1)}const m=t.replace(/\s/g,""),r=atob(m),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return new Blob([n],{type:i})}Object.defineProperty(a,"base64ToBlob",{enumerable:!0,get:function(){return s}})});
|
|
2
2
|
|
|
3
3
|
(function(){try{if(typeof document<"u"){var t=".blocks-app .image-preview{text-align:center;min-height:100px;position:relative}.blocks-app .image-preview .image-editor-modal{border:1px solid red}.blocks-app .image-preview__edit-button{position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-preview img{border:1px solid var(--ub-colorBorder);border-radius:6px;max-width:100%;max-height:500px}.blocks-app .serach-results .ant-row{align-items:center}.blocks-app .serach-results .blocks-search__divider-wrapper{margin-top:12px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{border-top:1px solid var(--ub-colorBorderSecondary);background:0 0;width:100%;height:1px;min-height:0;margin:0;position:static}.blocks-app .slideshow-container{width:524px;height:350px;margin:auto;position:relative;overflow:hidden}.blocks-app .slideshow-image{opacity:0;width:100%;height:100%;position:absolute;top:0;left:0}.blocks-app .image-ai .slideshow-image{width:auto;height:auto}.blocks-app .image-ai__image-item{text-align:center;border-radius:6px;justify-content:center;align-items:center;min-height:100px;display:flex;position:relative}.blocks-app .image-ai__image-item .buttons{justify-content:space-between;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-ai .text-area-input-hybrid{border:none;outline:none;min-height:0;padding:0 0 0 1px}.blocks-app .image-ai .text-area-input-hybrid textarea{height:32px;min-height:32px;padding:3px 11px;line-height:26px}.blocks-app .image-ai__loading{justify-content:center;align-items:center;min-height:150px;display:flex}.blocks-app .image-ai__loading .spin{flex-direction:column;justify-content:center;align-items:center;height:150px;display:flex}.blocks-app .image-ai__loading .status{margin:3px 0 0}.blocks-app .image-ai__preview{border-radius:6px;margin-top:24px;overflow:hidden}.blocks-app .image-ai__preview .image-ai__image-item img{border-radius:calc(var(--ub-borderRadius) * 1px);object-fit:contain;max-height:100%;transition:height 1s;top:50%;left:50%;overflow:hidden;transform:translate(-50%,-50%)}.blocks-app .image-ai .small{width:302px;height:202px}.blocks-app .image-ai .large{width:524px;height:350px}.blocks-app .image-ai .image-ai__row{padding:0 2px}.blocks-app .image-ai .image-ai__input-affix-wrapper{border-style:solid;border-width:calc(var(--ub-borderWidth) * 1px);border-color:var(--ub-colorFillSecondaryDarken);border-radius:calc(var(--ub-borderRadius) * 1px);width:100%;padding-left:0;display:inline-flex}.blocks-app .image-ai .image-ai__input-affix-wrapper:hover{border-color:var(--ub-borderColorHover)}.blocks-app .image-ai .image-ai__input-affix-wrapper.ant-input-affix-wrapper-focused{border-color:var(--ub-colorPrimaryBorder)}.blocks-app .image-ai .image-ai__textarea{font-size:16px}.blocks-app .image-ai .image-ai__input-icon{font-size:16px;top:0;right:0}.dark .blocks-app .image-ai .image-ai__preview .image-ai__image-item img{background:#2b2b2b;border:1px solid #434343}.dark .blocks-app .image-ai .ant-btn{background:#1f1f1f}.dark .blocks-app .image-ai .ant-btn:hover{color:var(--ub-colorPrimary)}.blocks-app .stock-tab img{border-radius:0;max-width:none;max-height:none}.blocks-app .stock-tab .stock-search-input{padding:0 2px}.blocks-app .stock-tab .my-masonry-grid{text-align:center;width:auto;display:flex}.blocks-app .stock-tab .my-masonry-grid_column{background-clip:padding-box}.blocks-app .stock-tab .list-item{cursor:pointer;background:#f0f2f5;border:1px solid #f0f2f5;border-radius:6px;min-height:100px;max-height:100px;margin-bottom:20px;transition:all .3s;display:inline-block;position:relative;overflow:hidden}.blocks-app .stock-tab .list-item .overlay-image{opacity:0;background-size:cover;width:110px;height:40px;transition:opacity .5s;position:absolute;bottom:10px;right:10px}.blocks-app .stock-tab .list-item .ant-spin{color:#f0f2f5;font-size:20px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.blocks-app .stock-tab .list-item img{object-fit:cover;opacity:0;border-radius:6px;height:auto;transition:opacity .5s ease-in-out;display:block}.blocks-app .stock-tab .list-item.loaded{border:1px solid #d9d9d9;max-height:1000px}.blocks-app .stock-tab .list-item.loaded img{opacity:1;height:100%}.blocks-app .stock-tab .list-item.loaded .loaded-image{opacity:.5}.blocks-app .stock-tab .list-item:hover{box-shadow:0 1px 2px -2px #00000029,0 3px 6px #0000001f,0 5px 12px 4px #00000017}.blocks-app .stock-tab .list-item:hover p.creator-info,.blocks-app .stock-tab .list-item:hover .overlay-image{opacity:1}.blocks-app .stock-tab .list-item p.creator-info{color:#fff;opacity:0;background-color:#00000080;border-radius:0 0 6px;margin:0;padding:5px;font-size:10px;line-height:1.2;position:absolute;bottom:0;right:0}.blocks-app .stock-tab .list-item p.creator-info:hover a{color:#fff;text-decoration:underline}.blocks-app .stock-tab .list-item p.creator-info a{color:#fff;text-decoration:none}.blocks-app .stock-color-filter{display:flex}.blocks-app .stock-color-filter label{border-width:1px;width:24px;height:24px;margin:4px;padding:0;font-size:0;border-radius:6px!important}.blocks-app .stock-color-filter label.all-colors{background-image:linear-gradient(135deg,red,#ff7f00,#ff0,#0f0,#00f,#8b00ff)}.blocks-app .stock-color-filter label.black-color{background:#222}.blocks-app .stock-color-filter label.bw-color{background-image:linear-gradient(135deg,#222 50%,#fff 50%)}.blocks-app .stock-color-filter label.white-color{background:#fff}.blocks-app .stock-color-filter label.orange-color{background:#fa8c16}.blocks-app .stock-color-filter label.red-color{background:#f5222d}.blocks-app .stock-color-filter label.purple-color{background:#722ed1}.blocks-app .stock-color-filter label.magenta-color{background:#eb2f96}.blocks-app .stock-color-filter label.green-color{background:#52c41a}.blocks-app .stock-color-filter label.teal-color{background:#43c3c3}.blocks-app .stock-color-filter label.blue-color{background:#1677ff}.blocks-app .stock-color-filter .ant-radio-button-wrapper:not(:first-child):before{display:none}.blocks-app .serach-results{padding-top:6px}.blocks-app .serach-results .stock-search-input{width:322px;padding:0 2px}.blocks-app .serach-results .blocks-search__divider-wrapper{width:calc(100% + 48px);margin-top:12px;margin-left:-24px;margin-right:-24px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{pointer-events:none;border-top:1px solid var(--ub-colorBorderSecondary);background:linear-gradient(180deg, var(--ub-colorBgContainerDisabled), transparent 40%);border-bottom:none;width:100%;height:20px;min-height:20px;margin:0;position:relative;bottom:auto;left:auto;right:auto}.dark .blocks-app .image-center .stock-tab .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{background:linear-gradient(180deg, var(--ub-colorBgBase), transparent 40%)}.dark .blocks-app .stock-tab .list-item{background:#2b2b2b;border:1px solid #2b2b2b}.dark .blocks-app .stock-tab .list-item.loaded{border:1px solid #434343}.blocks-app .image-center .image-center-image-preview{justify-content:center;align-items:center;display:flex}.blocks-app .image-center .ant-divider-horizontal{pointer-events:none;z-index:1;background:linear-gradient(180deg, var(--ub-colorBgContainerDisabled), transparent 40%);width:calc(100% + 48px);height:20px;margin:24px -24px 0;position:absolute;bottom:-19px}.dark .blocks-app .image-center .ant-divider-horizontal{background:linear-gradient(180deg, var(--ub-colorBgBase), transparent 40%)}.blocks-app .image-center .ant-divider-horizontal.ant-divider-with-text{background:0 0;width:calc(100% + 38px);margin:0 -24px 20px;position:relative;top:0}.blocks-app .image-center img{border-radius:4px;max-width:524px;max-height:352px}.blocks-app .image-center .image-size{justify-content:center;margin-top:6px;font-size:14px;line-height:22px;display:flex}.blocks-app .image-center .ant-upload.ant-upload-drag{border-radius:6px}.blocks-app .image-center .ant-modal-body .stock-search-input{margin-bottom:0}.blocks-app .image-center .ant-modal-body .serach-results .stock-search-input{margin-bottom:10px}.blocks-app .image-center .ant-modal-body .ant-form:not(.serach-results) .ant-form-item:last-child{margin-bottom:0}.blocks-app .image-center .ant-modal-body .ant-tabs{transition:all .7s cubic-bezier(.075,.82,.165,1)}.blocks-app .image-center .ant-modal-body .ant-tabs .ant-tabs-content-holder{overflow-y:clip}.blocks-app .ant-modal{transition:width .7s ease-in-out}",e=window.__useblocks_styles__||(window.__useblocks_styles__={sheets:{},order:[]}),r=t;if(!e.sheets[r]){var o=null;try{typeof CSSStyleSheet=="function"&&"replaceSync"in CSSStyleSheet.prototype&&(o=new CSSStyleSheet,o.replaceSync(t))}catch{o=null}if(o){if(!e.host||!e.host.isConnected||!e.host.sheet){var a=document.createElement("style");a.setAttribute("data-useblocks","true"),document.head.appendChild(a),e.host=a}for(var l=e.host.sheet,p=0;p<o.cssRules.length;p++)try{l.insertRule(o.cssRules[p].cssText,l.cssRules.length)}catch{}(e.texts||(e.texts=[])).push(t),(e.listeners||[]).forEach(function(i){try{i(t)}catch{}})}else{var a=document.createElement("style");a.setAttribute("data-useblocks","true"),a.appendChild(document.createTextNode(t)),document.head.appendChild(a)}e.sheets[r]=!0,e.order.push(r)}}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
4
|
-
__useblocks__.define("static/core/
|
|
4
|
+
__useblocks__.define("static/core/cff76b3c.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/82dfd28b.js","static/core/2aa29959.js","static/core/ed99afa7.js","static/core/a73da823.js","react","react/jsx-runtime","__delivery__/libs","vite/preload-helper"],function(ae,kt,mn){const et=ae("./2ff39ddf.js"),be=ae("./cf7d1dd7.js"),s=ae("./82dfd28b.js"),we=ae("./2aa29959.js"),me=ae("./ed99afa7.js"),xt=ae("./a73da823.js");let e=ae("react");e=et.__toESM(e);let t=ae("react/jsx-runtime"),m=ae("__delivery__/libs"),_t=ae("vite/preload-helper");var Et=et.__toESM(s.require_prop_types()),St=s.lazyRoute(()=>(0,_t.__vitePreload)(()=>Promise.resolve().then(()=>ae("./dbf8654f.js")),void 0,{}.url));function jt(r){return s.useSelector(s.selectSecondModal)?(0,t.jsx)(e.Suspense,{fallback:null,children:(0,t.jsx)(St,{...r})}):null}var Rt=({currentImageLink:r,newLink:o,previewDisplayUrl:i,resolvedPreviewObjectUrl:l,resolvedPreviewBlob:u,resolveImageBlob:c,onSave:f,uploadImageResultIsLoading:p})=>{const g=i||l;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"image-preview",children:[p&&(0,t.jsx)("div",{style:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:s.emCssVar("colorBgLayout"),zIndex:10,opacity:.7},children:(0,t.jsx)(m.ui_kit$Spin,{size:"large"})}),g&&(0,t.jsx)("img",{alt:"uploadedImage",src:g})]})}),(0,t.jsx)(jt,{currentImageLink:r,prefetchedBlob:u,resolveImageBlob:c,newLink:o,onSave:f,uploadImageResultIsLoading:p})]})},Ee={Pixel:"Pixel",Percent:"Percent"},tt={unit:Ee.Percent,value:80};function Lt(r){return typeof r=="number"?{unit:Ee.Percent,value:r*100}:typeof r=="string"?/^(\d*(\.\d+)?)px$/.exec(r)?{unit:Ee.Pixel,value:parseFloat(r)}:/^(\d*(\.\d+)?)%$/.exec(r)?{unit:Ee.Percent,value:parseFloat(r)}:tt:tt}function Ot(r,o){const i=Lt(r);let l;return i.unit===Ee.Pixel?l=`${i.value}px`:l=`${100-i.value}%`,o?`${l} 0px 0px 0px`:`0px 0px ${l} 0px`}function nt({next:r,hasMore:o,children:i,loader:l,scrollThreshold:u=.8,endMessage:c,style:f,height:p,scrollableTarget:g,hasChildren:w,inverse:x=!1,pullDownToRefresh:A=!1,pullDownToRefreshContent:h,releaseToRefreshContent:_,pullDownToRefreshThreshold:I=100,refreshFunction:O,onScroll:b,dataLength:E,initialScrollY:S,className:T="",role:H,tabIndex:z,id:P,...$}){const[K,V]=(0,e.useState)(!1),[Q,W]=(0,e.useState)(!1),[B,te]=(0,e.useState)(0),k=(0,e.useRef)(null),q=(0,e.useRef)(null),N=(0,e.useRef)(null),ne=(0,e.useRef)(r);ne.current=r;const M=(0,e.useRef)(O);M.current=O;const X=(0,e.useRef)(I);X.current=I;const n=(0,e.useRef)(!1),C=(0,e.useRef)(!1),U=(0,e.useRef)(0),F=(0,e.useRef)(0),se=(0,e.useRef)(0),j=(0,e.useCallback)(()=>g instanceof HTMLElement?g:typeof g=="string"?document.getElementById(g):null,[g]);(0,e.useEffect)(()=>{if(typeof E>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(A&&typeof O!="function")throw new Error(`Mandatory prop "refreshFunction" missing.
|
|
5
5
|
Pull Down To Refresh functionality will not work
|
|
6
6
|
as expected. Check README.md for usage'`);if(typeof S=="number"){const D=p?k.current:j();D&&D.scrollHeight>S&&D.scrollTo(0,S)}},[]),(0,e.useEffect)(()=>{n.current=!1,V(!1)},[E]),(0,e.useEffect)(()=>{if(!o||typeof IntersectionObserver>"u")return;const D=q.current;if(!D)return;const J=p?k.current:j(),R=new IntersectionObserver(([ee])=>{!ee.isIntersecting||n.current||(n.current=!0,V(!0),ne.current())},{root:J,rootMargin:Ot(u,x),threshold:0});return R.observe(D),()=>R.disconnect()},[o,u,x,p,j]),(0,e.useEffect)(()=>{var D;if(!b)return;const J=(D=p?k.current:j())!==null&&D!==void 0?D:typeof window<"u"?window:null;if(!J)return;const R=ee=>{setTimeout(()=>b(ee),0)};return J.addEventListener("scroll",R),()=>J.removeEventListener("scroll",R)},[b,p,j]),(0,e.useEffect)(()=>{var D,J;if(!A)return;const R=(D=p?k.current:j())!==null&&D!==void 0?D:typeof window<"u"?window:null;if(!R)return;if(!((J=N.current)===null||J===void 0)&&J.firstChild){const L=N.current.firstChild.getBoundingClientRect().height;se.current=L,te(L)}const ee=L=>{(R instanceof HTMLElement?R.scrollTop:document.documentElement.scrollTop)>0||(C.current=!0,L instanceof MouseEvent?U.current=L.pageY:L instanceof TouchEvent&&(U.current=L.touches[0].pageY),F.current=U.current,k.current&&(k.current.style.willChange="transform",k.current.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},ie=L=>{if(!C.current||(L instanceof MouseEvent?F.current=L.pageY:L instanceof TouchEvent&&(F.current=L.touches[0].pageY),F.current<U.current))return;const Y=F.current-U.current;Y>=X.current&&W(!0),!(Y>se.current*1.5)&&k.current&&(k.current.style.overflow="visible",k.current.style.transform=`translate3d(0px, ${Y}px, 0px)`)},v=()=>{U.current=0,F.current=0,C.current=!1,W(L=>{var Y;return L&&((Y=M.current)===null||Y===void 0||Y.call(M)),!1}),requestAnimationFrame(()=>{k.current&&(k.current.style.overflow="auto",k.current.style.transform="none",k.current.style.willChange="unset")})};return R.addEventListener("touchstart",ee),R.addEventListener("touchmove",ie),R.addEventListener("touchend",v),R.addEventListener("mousedown",ee),R.addEventListener("mousemove",ie),R.addEventListener("mouseup",v),()=>{R.removeEventListener("touchstart",ee),R.removeEventListener("touchmove",ie),R.removeEventListener("touchend",v),R.removeEventListener("mousedown",ee),R.removeEventListener("mousemove",ie),R.removeEventListener("mouseup",v)}},[A,p,j]);const pe={height:p??"auto",overflow:"auto",WebkitOverflowScrolling:"touch",...f},re=w||!!(i&&i instanceof Array&&i.length),he=A&&p?{overflow:"auto"}:{},ge=o?(0,t.jsx)("div",{ref:q,style:{height:1}}):null;return(0,t.jsx)("div",{style:he,className:"infinite-scroll-component__outerdiv",children:(0,t.jsxs)("div",{...$,role:H,tabIndex:z,id:P,className:["infinite-scroll-component",T].filter(Boolean).join(" "),ref:k,style:pe,children:[A&&(0,t.jsx)("div",{style:{position:"relative"},ref:N,children:(0,t.jsx)("div",{style:{position:"absolute",left:0,right:0,top:-1*B},children:Q?_:h})}),i,!K&&!re&&o&&l,K&&o&&l,ge,!o&&c]})})}function Pt(r,o){if(r==null)return{};var i=Ut(r,o),l,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);for(u=0;u<c.length;u++)l=c[u],!(o.indexOf(l)>=0)&&Object.prototype.propertyIsEnumerable.call(r,l)&&(i[l]=r[l])}return i}function Ut(r,o){if(r==null)return{};for(var i={},l=Object.keys(r),u,c=0;c<l.length;c++)u=l[c],!(o.indexOf(u)>=0)&&(i[u]=r[u]);return i}function Ue(){return Ue=Object.assign||function(r){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(r[l]=i[l])}return r},Ue.apply(this,arguments)}function st(r,o){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);o&&(l=l.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),i.push.apply(i,l)}return i}function Se(r){for(var o=1;o<arguments.length;o++){var i=arguments[o]!=null?arguments[o]:{};o%2?st(Object(i),!0).forEach(function(l){Dt(r,l,i[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):st(Object(i)).forEach(function(l){Object.defineProperty(r,l,Object.getOwnPropertyDescriptor(i,l))})}return r}function Dt(r,o,i){return o in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r}var Mt={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0},Te=2,Be=class extends e.default.Component{constructor(r){super(r),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this);let o;this.props.breakpointCols&&this.props.breakpointCols.default?o=this.props.breakpointCols.default:o=parseInt(this.props.breakpointCols)||Te,this.state={columnCount:o}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){if(!window||!window.requestAnimationFrame){this.reCalculateColumnCount();return}window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()})}reCalculateColumnCount(){const r=window&&window.innerWidth||1/0;let o=this.props.breakpointCols;typeof o!="object"&&(o={default:parseInt(o)||Te});let i=1/0,l=o.default||Te;for(let u in o){const c=parseInt(u);c>0&&r<=c&&c<i&&(i=c,l=o[u])}l=Math.max(1,parseInt(l)||1),this.state.columnCount!==l&&this.setState({columnCount:l})}itemsInColumns(){const r=this.state.columnCount,o=new Array(r),i=e.default.Children.toArray(this.props.children);for(let l=0;l<i.length;l++){const u=l%r;o[u]||(o[u]=[]),o[u].push(i[l])}return o}renderColumns(){const{column:r,columnAttrs:o={},columnClassName:i}=this.props,l=this.itemsInColumns(),u=`${100/l.length}%`;let c=i;c&&typeof c!="string"&&(this.logDeprecated('The property "columnClassName" requires a string'),typeof c>"u"&&(c="my-masonry-grid_column"));const f=Se(Se(Se({},r),o),{},{style:Se(Se({},o.style),{},{width:u}),className:c});return l.map((p,g)=>e.default.createElement("div",Ue({},f,{key:g}),p))}logDeprecated(r){}render(){const r=this.props,{children:o,breakpointCols:i,columnClassName:l,columnAttrs:u,column:c,className:f}=r,p=Pt(r,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let g=f;return typeof f!="string"&&(this.logDeprecated('The property "className" requires a string'),typeof f>"u"&&(g="my-masonry-grid")),e.default.createElement("div",Ue({},p,{className:g}),this.renderColumns())}};Be.defaultProps=Mt;function Fe(r,o){return r?r.exhausted?{...r,src:null}:{...r,src:r.src||o||null}:null}function rt({items:r,getItemId:o,getRequestUrl:i,createController:l}){const[u,c]=(0,e.useState)({}),f=(0,e.useRef)(new Map),p=(0,e.useCallback)(g=>{const w=o(g),x=i(g),A=`${w}:${x}`;if(f.current.has(A))return{itemId:w,requestUrl:x,cacheKey:A,controller:f.current.get(A)};const h=l(x);return f.current.set(A,h),{itemId:w,requestUrl:x,cacheKey:A,controller:h}},[l,o,i]);return(0,e.useEffect)(()=>{const g=new Set,w={},x=r.map(A=>{const{itemId:h,cacheKey:_,controller:I}=p(A);g.add(_),w[h]=I.src;const O=Fe(I.handleChangeSrc?.(),I.src);return O?.changed&&O.src&&(w[h]=O.src),I.subscribeToSrcChange?.(b=>{const E=Fe(b,I.src);!E?.changed||!E.src||c(S=>S[h]===E.src?S:{...S,[h]:E.src})})}).filter(Boolean);return f.current.forEach((A,h)=>{g.has(h)||f.current.delete(h)}),c(w),()=>{x.forEach(A=>A?.())}},[p,r]),{getDisplaySrc:(0,e.useCallback)(g=>{const{itemId:w,requestUrl:x,controller:A}=p(g);return u[w]||A.src||x},[u,p]),handleLoad:(0,e.useCallback)(g=>{p(g).controller.handleSuccess()},[p]),handleError:(0,e.useCallback)(g=>{const{itemId:w,controller:x}=p(g),A=Fe(x.handleError(),x.src);A?.changed&&A.src&&c(h=>({...h,[w]:A.src}))},[p])}}var at="blocks",Gt=({setCurrentImageLink:r,setModalHeight:o,setModalWidth:i,setImageStockList:l,imageStockList:u,currentReq:c,setCurrentReq:f,inputRef:p,setStockLink:g,customRequest:w})=>{const x=s.useAppConfig(),A=s.useIsStandalone(),[h,_]=(0,e.useState)(!1),[I,O]=(0,e.useState)(2),{__:b}=s.useI18n(),E=s.useNotification(),[S]=s.useLazyGetUnsplashImageQuery(),[T]=s.useLazyGetSearchImageQuery(),H=(0,e.useCallback)(n=>n instanceof Error||typeof n?.message=="string"&&n.message?n.message:typeof n?.error?.message=="string"&&n.error.message?n.error.message:b("Failed to load stock images through the configured proxy chain."),[b]),z=(0,e.useCallback)(n=>{E.error({id:"STOCK_IMAGES_SEARCH_FAILED",title:b("Failed to load stock images"),description:H(n)})},[b,H,E]),P=async()=>{h||(_(!0),T({query:c,page:I}).then(n=>{if(n?.error){z(n.error),_(!1);return}const C=n?.data?.results||[];l(U=>[...U,...C]),_(!1),O(U=>U+1)}).catch(()=>{_(!1)}))};(0,e.useEffect)(()=>{c.keywords!==""&&$()},[c.color,c.orientation]);const $=async()=>{const n=await T({query:c,page:1});if(n?.error){z(n.error),l([]);return}const C=n?.data?.results||[];C.length>0?(l(C),setTimeout(()=>{i(1060),o("84vh")},0)):l([])},[K,V]=(0,e.useState)(null),Q=(0,e.useCallback)((n,C,U)=>`${n}${n.includes("?")?"&":"?"}w=${C}&q=${U}`,[]),W=(0,e.useCallback)(n=>be.getProxiedUrl(n,{config:x,standalone:A,resourceType:"stockImages",intent:"display"}),[x,A]),B=(0,e.useCallback)(n=>n.id,[]),te=(0,e.useCallback)(n=>Q(n.urls.raw,644,96),[Q]),{getDisplaySrc:k,handleLoad:q,handleError:N}=rt({items:u,getItemId:B,getRequestUrl:te,createController:W}),ne=n=>C=>{q(n),C.target.parentNode.classList.add("loaded")},M=n=>()=>{N(n)},X=(n,C,U)=>{S(C.download_location),V(U),setTimeout(()=>V(null),2e3),g(`${n.raw}&w=1200&q=96`),r(`${n.raw}&w=1200&q=96`),w(`${n.raw}&w=1200&q=96`)};return(0,t.jsxs)("div",{className:"stock-tab",children:[(0,t.jsxs)(m.ui_kit$Form,{onValuesChange:$,className:u.length>0?"serach-results":"",children:[(0,t.jsxs)(m.ui_kit$Row,{gutter:24,children:[(0,t.jsx)(m.ui_kit$Col,{span:u.length>0?"":24,children:(0,t.jsx)(m.ui_kit$Form.Item,{className:"stock-search-input",children:(0,t.jsx)(m.ui_kit$SearchInput,{onSearch:$,allowClear:!0,size:u.length>0?"medium":"large",placeholder:b("Search image"),value:c.keywords,onChange:n=>f(C=>({...C,keywords:n.target.value})),ref:p,spellCheck:"false",enterButton:!1})})}),u.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.ui_kit$Col,{children:(0,t.jsxs)(m.ui_kit$Radio.Group,{defaultValue:"",onChange:n=>f(C=>({...C,orientation:n.target.value})),children:[(0,t.jsx)(m.ui_kit$Tooltip,{title:b("All"),placement:"top",children:(0,t.jsx)(m.ui_kit$Radio.Button,{value:"",children:(0,t.jsx)(s.EmIcons,{icon:"MixedView",component:m.icons$MixedView})})}),(0,t.jsx)(m.ui_kit$Tooltip,{title:b("Landscape"),placement:"top",children:(0,t.jsx)(m.ui_kit$Radio.Button,{value:"landscape",children:(0,t.jsx)(s.EmIcons,{icon:"LandscapeView",component:m.icons$LandscapeView})})}),(0,t.jsx)(m.ui_kit$Tooltip,{title:b("Portrait"),placement:"top",children:(0,t.jsx)(m.ui_kit$Radio.Button,{value:"portrait",children:(0,t.jsx)(s.EmIcons,{icon:"PortraitView",component:m.icons$PortraitView})})}),(0,t.jsx)(m.ui_kit$Tooltip,{title:b("Squarish"),placement:"top",children:(0,t.jsx)(m.ui_kit$Radio.Button,{value:"squarish",children:(0,t.jsx)(s.EmIcons,{icon:"SquareView",component:m.icons$SquareView})})})]})}),(0,t.jsx)(m.ui_kit$Col,{children:(0,t.jsx)(m.ui_kit$RadioColorFilter,{defaultValue:"",onChange:n=>f(C=>({...C,color:n.target.value})),options:[{value:"",colorClass:"all-colors",label:b("All")},{value:"black",colorClass:"black-color",label:b("Black")},{value:"black_and_white",colorClass:"bw-color",label:b("Black and White")},{value:"white",colorClass:"white-color",label:b("White")},{value:"orange",colorClass:"orange-color",label:b("Orange")},{value:"red",colorClass:"red-color",label:b("Red")},{value:"purple",colorClass:"purple-color",label:b("Purple")},{value:"magenta",colorClass:"magenta-color",label:b("Magenta")},{value:"green",colorClass:"green-color",label:b("Green")},{value:"teal",colorClass:"teal-color",label:b("Teal")},{value:"blue",colorClass:"blue-color",label:b("Blue")}],tooltipPlacement:"top"})})]})]}),u.length>0&&(0,t.jsx)("div",{className:"blocks-search__divider-wrapper",children:(0,t.jsx)("div",{className:"ant-divider ant-divider-horizontal",role:"separator"})})]}),(0,t.jsx)("div",{className:"serach-output-wrapper",style:{marginRight:-10},children:u.length>0&&(0,t.jsx)("div",{id:"scrollableDiv",style:{width:"100%",height:"calc(84vh - 148px)",overflow:"auto",paddingTop:24,paddingRight:14,paddingLeft:24,marginLeft:-24,lineHeight:"0",boxSizing:"unset"},children:(0,t.jsx)(nt,{dataLength:u&&u.length,next:P,hasMore:u,endMessage:(0,t.jsxs)(m.ui_kit$Divider,{plain:!0,children:[b("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:null,children:(0,t.jsx)(Be,{breakpointCols:{default:3},className:"my-masonry-grid",columnClassName:"my-masonry-grid_column",children:u.map(n=>(0,t.jsxs)("div",{className:"list-item",onClick:()=>X(n.urls,n.links,n.id),children:[(0,t.jsx)("img",{className:K===n.id?"loaded-image":"",width:"322px",src:k(n),alt:n.description,onLoad:ne(n),onError:M(n)}),(0,t.jsxs)("p",{className:"creator-info",onClick:C=>C.stopPropagation(),children:["Photo by"," ",(0,t.jsx)("a",{target:"_blank",href:`${n.user.links.html}?utm_source=${at}&utm_medium=referral`,rel:"noreferrer",children:n.user.name})," ","on"," ",(0,t.jsx)("a",{target:"_blank",href:`https://unsplash.com/?utm_source=${at}&utm_medium=referral`,rel:"noreferrer",children:"Unsplash"})]}),K===n.id&&(0,t.jsx)(m.ui_kit$Spin,{className:"ant-spin",size:"small"})]},n.id))})})})})]})};function ot(r){return/^(https?:)?\/\//i.test(r.trim())}function Nt(r){const o=r.trim();return ot(o)||/^data:/i.test(o)?o:`data:image/jpeg;base64, ${r}`}var Tt=({images:r,transitionDuration:o=1e3})=>{const[i,l]=(0,e.useState)([]);return(0,e.useEffect)(()=>{if(r.length>0){const u=r[r.length-1];l(c=>[...c,{src:u,opacity:0}]),setTimeout(()=>{l(c=>c.map((f,p)=>p===c.length-1?{...f,opacity:1}:f))},1e3)}},[r]),(0,t.jsx)("div",{className:"slideshow-container",children:i.map((u,c)=>(0,t.jsx)("img",{src:Nt(u.src),alt:`Slide ${c+1}`,className:"slideshow-image",style:{opacity:u.opacity,transition:`opacity ${o}ms linear`}},c))})};function Bt({setModalHeight:r,customRequest:o,aiTabRef:i,isImageUploaded:l,setIsImageUploaded:u,aiImageRequest:c,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:w,onPluginAiImageLimitExceeded:x,onImageGenerateLimitExceeded:A}){const{__:h}=s.useI18n(),_=s.useAppConfig(),I=s.useNotification(),O=s.usePushToDataLayer(),{blockId:b}=s.useRouteParams(),E=s.useEditorProjectId(),S=s.useRouteEmailId(),T=s.useWpEntityId(),[H]=s.useLazySendAiImageRequestQuery(),[z,{data:P=[]}]=s.useLazyGetAiImageSSEQuery(),$=s.useProjectPlanLimitPreflight(),K=_?.sendAIImageRequest||H,V=_?.trigger||z,Q=_?.handleLimitUsageEmitter||s.useEventEmitter(be.events.ON_LIMIT_ID),[W,B]=(0,e.useState)(0),[te,k]=(0,e.useState)(null),[q,N]=(0,e.useState)(!1),[ne,M]=(0,e.useState)(h("Evaluating the task")),[X,n]=(0,e.useState)(!1),C=(S?s.isEmailsV2Enabled():s.isBlocksV2Enabled())?T:S||b,{limits:U}=_?.limits?_:{limits:{ai_img_limit:0}},{ai_img_limit:F}=U,se=!!(_.limits&&_.counters)&&!0,j=s.useEventEmitter(be.events.AI_IMAGE_REQUEST_ID).hasListeners(),pe=me.shouldCountAiUsage({limitsInPlugin:se,hostedAiActive:j}),re=!j&&F>0&&W>=F,he=(0,e.useCallback)(()=>{Q.fire({name:"AiImgCount",count:W+1})},[Q,W]),ge=(0,e.useMemo)(()=>!re&&(!pe||F===0||W<F),[re,pe,W,F]),D=(0,e.useCallback)(async()=>{M(h("Evaluating the task")),c!==""&&!g&&(w(!0),n(!0),p([]),O({event:"submit_form",action:"ai_image_generation",entity_id:S,project_id:E}),K({body:{project_id:E,request:"create-image",connection:"midjourney",message:c}}).then(({data:v,error:L})=>{if(L)throw L;if(v.data.status===401)throw new Error(s.ERROR);if(v?.data?._eventResult){p(v.data.task.images),w(!1),n(!1),M(h("Evaluating the task"));return}v?.data.status===200?(v?.data.task.id&&(M(v.data.task.message),k(v.data.task.id)),v.message&&I.success({id:"AI_IMAGE_SEND_SUCCESS",title:v.message,placement:"bottomRight",data:c}),V({task_id:v?.data.task.id,entity_id:C})):(w(!1),n(!1),I.error({id:"AI_IMAGE_SEND_ERROR",title:v?.message||h("Something went wrong, please try again"),placement:"bottomRight",data:c,innerException:v}))}).catch(v=>{w(!1),n(!1),(v?.error||v?.data)&&I.fromError("AI_IMAGE_SEND_ERROR",c,v.error||v)}))},[c,g,w,n,p,O,S,E,K,I,V,C,h]),J=(0,e.useCallback)(async()=>{ge?(pe&&(B(v=>v+1),he()),D()):se&&(x?x():I.error({title:h("The usage limit has been exceeded"),description:h(`The maximum number of requests for the current subscription period has been reached.
|
|
7
7
|
Select the appropriate plan to fulfil more requests`),placement:"bottomRight"}))},[ge,se,j,pe,$,A,B,he,D,I,h,x]);(0,e.useEffect)(()=>{se&&B(_?.counters?.ai_img_counter||0)},[_,se]);const R=s.useEventEmitter(be.events.AI_IMAGE_PROGRESS_ID);(0,e.useEffect)(()=>{const v=R.event(({progress:L,status:Y})=>{M(Y||`${Math.round(L)}%`)});return()=>v.dispose()},[R]);const ee=(0,e.useCallback)(async v=>{if(!l){u(!0);try{const L=ot(v)?await(await fetch(v)).blob():xt.base64ToBlob(v);o({file:new File([L],"image.jpeg",{type:L.type||"image/jpeg"})})}catch{u(!1)}}},[l,u,o]),ie=(0,e.useCallback)(v=>{v.status!=="error"&&v.status!=="Canceled"?v.images?(M(v.status),v.progress===100&&(p(v.images),M(h("Evaluating the task")),k(null),n(!1))):(p([v.data]),w(!1)):(w(!1),n(!1),I.error({id:"AI_IMAGE_GET_ERROR",title:h("Something went wrong, please try again"),placement:"bottomRight",data:te}))},[p,M,h,w,r,te,I,n]);return(0,e.useEffect)(()=>{P.length>1&&ie(P[P.length-1])},[P,ie]),(0,e.useEffect)(()=>{(g||f.length>0)&&setTimeout(()=>{let v=550;i.current&&(v=i.current.offsetHeight+68),r(v)},0)},[i,P,f.length,g,r]),{aiImageCounter:W,setAiImageCounter:B,currentAiImgLimits:F,isFieldsDisabled:re,canGenerateImage:ge,aiImageRequest:c,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:w,loadingDuringGeneration:X,setLoadingDuringGeneration:n,requestStatus:ne,setRequestStatus:M,handleGenerate:J,handleLimitAiImgCount:he,convertBase64ToFile:ee,isShiftPressed:q,setIsShiftPressed:N,currentReqId:te,setCurrentReqId:k,limitsInPlugin:se}}var Ft=({setModalHeight:r,customRequest:o,aiTabRef:i,inputAiRef:l,isImageUploaded:u,setIsImageUploaded:c,aiImageRequest:f,setAiImageRequest:p,imageAiList:g,setImageAiList:w,isLoadingAi:x,setIsLoadingAi:A})=>{const h=s.useAppNavigate();s.useDispatch();const _=s.useOpenPlanCatalog(),{__:I,_n:O}=s.useI18n(),b=s.useAppConfig(),[E,S]=(0,e.useState)(!1),[T,H]=(0,e.useState)(null),{aiImageCounter:z,currentAiImgLimits:P,loadingDuringGeneration:$,requestStatus:K,handleGenerate:V,convertBase64ToFile:Q,isShiftPressed:W,setIsShiftPressed:B,limitsInPlugin:te}=Bt({setModalHeight:r,customRequest:o,aiTabRef:i,isImageUploaded:u,setIsImageUploaded:c,aiImageRequest:f,imageAiList:g,setImageAiList:w,isLoadingAi:x,setIsLoadingAi:A,onPluginAiImageLimitExceeded:()=>S(!0),onImageGenerateLimitExceeded:H}),k=E&&P>0?s.getAiTariffUpgradeStep(P):null,q=k?s.getLimitUpgradePresetDefinition(k.presetId):null,N=T?s.getLimitUpgradePresetDefinition(T.presetId):null,[ne,M]=(0,e.useState)(!1),X=(0,e.useCallback)(()=>M(!0),[]),n=(0,e.useCallback)(()=>M(!1),[]),C=(0,e.useCallback)(j=>p(j.target.value),[p]),U=(0,e.useCallback)(j=>{j.key==="Shift"?B(!0):j.key==="Enter"&&!W&&(j.preventDefault(),V())},[W,V,B]),F=(0,e.useCallback)(j=>{j.key==="Shift"&&B(!1)},[B]),se=g[g.length-1];return(0,t.jsxs)("div",{className:"image-ai",children:[q&&k?(0,t.jsx)(me.LimitUpgradeModal$1,{open:!0,onClose:()=>S(!1),title:I(q.titleKey),subtitle:I(q.subtitleKey),usageResource:q.usageResource,previousDisplay:s.presetLimitDisplay(k.previousLimit),nextDisplay:s.presetLimitDisplay(k.nextLimit),onChangePlan:()=>{S(!1),_()}}):null,N&&T?(0,t.jsx)(me.LimitUpgradeModal$1,{open:!0,onClose:()=>H(null),title:I(N.titleKey),subtitle:I(N.subtitleKey),usageResource:N.usageResource,previousDisplay:s.presetLimitDisplay(T.previousLimit),nextDisplay:s.presetLimitDisplay(T.nextLimit),onChangePlan:()=>{H(null),_()}}):null,te&&(0,t.jsx)(m.ui_kit$LimitsCounter,{text:`${z} ${I("of")} ${P>0?P:"∞"} images ${O("was used","were used",z)}`,exceeded:P>0&&z>=P,style:{marginTop:-25},extra:(0,t.jsx)("span",{style:{textDecoration:"underline",cursor:"pointer"},onClick:()=>h(b.billingPageUrl||s.APP_ROUTES.billing),children:I("Need more?")})}),(0,t.jsx)(m.ui_kit$Row,{gutter:24,className:"image-ai__row",children:(0,t.jsx)(m.ui_kit$Col,{span:24,children:(0,t.jsx)(m.ui_kit$Form.Item,{style:{margin:0},children:(0,t.jsxs)("span",{className:`ant-input-affix-wrapper ant-input-affix-wrapper-lg image-ai__input-affix-wrapper${ne?" ant-input-affix-wrapper-focused":""}`,children:[(0,t.jsx)(m.ui_kit$TextArea,{ref:l,onKeyDown:U,onKeyUp:F,onFocus:X,onBlur:n,autoSize:!0,allowClear:!0,className:"text-area-input-hybrid image-ai__textarea",placeholder:I("Generate image"),value:f,onChange:C,spellCheck:"false"}),(0,t.jsx)("span",{className:"ant-input-suffix image-ai__input-suffix",children:x||$?(0,t.jsx)(s.EmIcons,{icon:"LoadingOutlined",component:m.icons$LoadingOutlined,className:"input-icon image-ai__input-icon",spin:!0}):(0,t.jsx)(s.EmIcons,{icon:"AI",component:m.icons$AI,className:"input-icon image-ai__input-icon",onClick:V})})]})})})}),(x||g.length>0)&&(0,t.jsxs)("div",{className:"image-ai__preview",children:[x&&g.length===0&&(0,t.jsx)("div",{className:"image-ai__loading",children:(0,t.jsxs)("div",{className:"spin",children:[(0,t.jsx)(s.EmIcons,{icon:"LoadingOutlined",component:m.icons$LoadingOutlined,style:{fontSize:48},spin:!0}),(0,t.jsx)("p",{className:"status",children:K})]})}),g.length>0&&(0,t.jsxs)("div",{className:"image-ai__image-item",children:[(0,t.jsx)(Tt,{images:g}),(0,t.jsx)("div",{className:"buttons",children:(0,t.jsx)(m.ui_kit$Button,{onClick:()=>Q(se),icon:(0,t.jsx)(s.EmIcons,{icon:"CheckOutlined",component:m.icons$CheckOutlined}),children:I("Use this one")})})]})]})]})},pn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAkCAYAAAB/up84AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABSBJREFUeNrsWjFv2zoQVoMW8BZ18xaN3qLRW9QtW9OtW92to98vaPoP3K1b1S1b3c2jvWlUNm3lw1s8Mpu3PAo4Iocr70jKlp0COuCQlpKPx/t43x1pv3h8fEwGeT5yNoTgeclLZvza6NgxXoNaGRktjE6MpjC2NVqh92bwt4HxBI1ro0s0dgN2tvD5a8a/9vkq0M+xYKdG81A7Gp6pyBjZddrnO6N36Hkbqyn8u4L3vYC0hjLHeAbPVhC4TwAK/ewNvLsEhyxgFXLK2l/D4tvnOVrUiPEh1k/JjvLYyWENdeTcKazBBr6AdY4AqBTmbkIzhO4gvMumYLxAYKzgPTvhBBajYNwCksHYhOyYiow1KONaKYlfO8bPEWyGEfi5Iu+Vjizg7EzB3xvwWTMxWkHG4mDnMF6BnSnYncLzHWGG4BqiwZkKQMC7I0cOVTCJhvRUKNgNCmCOxhNmrBEWzwGi0Y6rIihbsnOH/JgE2hshKrLZv4Px9yhj1twafRlid/UIGWvlFdlVLirIkIM12nETGLeO2tTPECBUZuT/a7JBMpSxUybYLjulUCN2iEpHQoyuGWZJUCa8R/VGSZvGB0iOdjAO9n8EtC2zUxICSIoW0ICTmA53DCDKQzWZg89XAXZ2B2iMavBnjDKpBX6B1tnAM5aqQgGhnU2D6GmHuqw7AkaOPmP/bsHpFC1kTLqVhglS6fFNgX1MCXUHO1zR1h5AFOoSc1jjmKx/An/1PoBQasBSoZZ3hpyaOrg0IW2sRkG8JsU8CaCaLckAhfi6AG0cmeuzkyMQMtL+SiySkY3oA/EgGeICK0UOZYQKVsQpDAjm2BpsaAGQLMKnMdok3yLtpKS70yT7OUBcm7UTHb5grk5y1Csrj40MqUbUpgW7NXo+RunckODkQvdXM37iwm7b1VA7lAaVB4jUUZOUIzNxfOougAwy3GUN0qWG2IJJ09V2NcvIFE8c54nQelEHFM6C6chUhI+WZjjffDQkrenPhqmlrAC9Naof/aLhXZeNNfMZOk+MtPOVRjNmTpfcCut0+biGZ3PBj1ywWTOfqV3v+yjLFuDPRs8Ddu05vLtmsuHQ0s73wehvR0t7aGkPevfCM5fcGr0MbOW9NSSFwF52cP5KcLIv+X4EUGbCemcOqpoz73/haE4CZNkRjAR20vwENXHRc2bWEMyQuUuGVe4hc6K6rBmg7pKN0XdGX7dts9E3Rr8afUATFl1PqgLAG6T3AoX1nSVtMP9l5r5FVyiu+D14/YssRHOheGVQYNMeinrhsMcV2WVPRR1rIRT4QmiA5r4G6oxp0y6ZzFh4LvhmB84MHz1xta9vWQMrcFR/3iF+7DmEu2YoyTshRbuMvGE9hnwGPQR1tdR04aCueKrqAIgiu/AqcCf1JXPhfuoYosGHn4Hgqa6AnCK4IfSkCa1eCJRxLGnn+mX0rfDOJok4AsQAUpwQlND2++HIgNiOVO1LVRIgtXDPs0bpunEU08vktHLMpoJS1/d9qEo6h6gAzq7RRaPV+QmBeICzUUh2fIHzk0s3HedXwkEy2ReQmjn4XDzDjqkN4D/J04/y/np5KbSrrtbwAyx+kTxdf9tfpvSZIW9O3FScHJAF8PEFc5F2lQzSi5wJheoG3U/t0xYOcgBAcOHuAkr7mY9ditoAiCz2q8uvEcD8gJpSDuGNl5hfnaTJ0/fpheMUr4CitHCO6fqdesj359xh1tWiqggfdUCmcz9ZivZ7+BnQM5P/BRgABx8sJWqTxoYAAAAASUVORK5CYII=",zt=({setNewLink:r,setCurrentImageLink:o,setModalHeight:i,setModalWidth:l,setImageGifList:u,imageGifList:c,currentReqGif:f,setCurrentReqGif:p,inputRef:g,setStockLink:w,customRequest:x})=>{const{__:A}=s.useI18n(),h=s.useAppConfig(),_=s.useIsStandalone(),I=s.useNotification(),[O,b]=(0,e.useState)(null),[E,S]=(0,e.useState)(!1),[T,H]=(0,e.useState)(25),[z]=s.useLazyGetSearchGifQuery(),P=(0,e.useCallback)(n=>n instanceof Error||typeof n?.message=="string"&&n.message?n.message:typeof n?.error?.message=="string"&&n.error.message?n.error.message:A("Failed to load GIFs through the configured proxy chain."),[A]),$=(0,e.useCallback)(n=>{I.error({id:"STOCK_GIFS_SEARCH_FAILED",title:A("Failed to load GIFs"),description:P(n)})},[A,P,I]),K=async()=>{E||(S(!0),z({query:f,page:T}).then(n=>{if(n?.error){$(n.error),S(!1);return}u(C=>[...C,...n.data.data]),S(!1),H(C=>C+25)}).catch(()=>{S(!1)}))},V=async()=>{const n=await z({query:f,page:0});if(n?.error){$(n.error),u([]);return}n?.data?.data?.length>0&&(u(n.data.data),setTimeout(()=>{i("84vh"),l(1060)},0))},Q=(n,C)=>{b(C),setTimeout(()=>{b(null)},2e3),w(`${n}`),o(`${n}`),x(`${n}`)},W={default:3},B=(0,e.useCallback)(n=>be.getProxiedUrl(n,{config:h,standalone:_,resourceType:"generic",intent:"display"}),[h,_]),te=(0,e.useCallback)(n=>n.id,[]),k=(0,e.useCallback)(n=>n.images.downsized.url,[]),{getDisplaySrc:q,handleLoad:N,handleError:ne}=rt({items:c,getItemId:te,getRequestUrl:k,createController:B}),M=n=>C=>{N(n),C.target.parentNode.classList.add("loaded")},X=n=>()=>{ne(n)};return(0,t.jsxs)("div",{className:"stock-tab",children:[(0,t.jsxs)(m.ui_kit$Form,{onValuesChange:V,className:c.length>0?"serach-results":"",children:[(0,t.jsx)(m.ui_kit$Row,{gutter:24,children:(0,t.jsx)(m.ui_kit$Col,{span:c.length>0?"":24,children:(0,t.jsx)(m.ui_kit$Form.Item,{className:"stock-search-input",children:(0,t.jsx)(m.ui_kit$SearchInput,{onSearch:V,allowClear:!0,size:c.length>0?"medium":"large",placeholder:A("Search GIFs"),value:f.keywords,onChange:n=>p(C=>({...C,keywords:n.target.value})),ref:g,spellCheck:"false",enterButton:!1})})})}),c.length>0&&(0,t.jsx)("div",{className:"blocks-search__divider-wrapper",children:(0,t.jsx)("div",{className:"ant-divider ant-divider-horizontal",role:"separator"})})]}),(0,t.jsx)("div",{className:"serach-output-wrapper",style:{marginRight:-10},children:c.length>0&&(0,t.jsx)("div",{id:"scrollableDiv",style:{width:"100%",height:"calc(84vh - 148px)",overflow:"auto",paddingTop:24,paddingRight:14,paddingLeft:24,marginLeft:-24,lineHeight:"0",boxSizing:"unset"},children:(0,t.jsx)(nt,{dataLength:c&&c.length,next:K,hasMore:c,endMessage:(0,t.jsxs)(m.ui_kit$Divider,{plain:!0,children:[A("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:(0,t.jsx)(m.ui_kit$Spin,{size:"small"}),children:(0,t.jsx)(Be,{breakpointCols:W,className:"my-masonry-grid",columnClassName:"my-masonry-grid_column",children:c.map((n,C)=>(0,t.jsxs)("div",{className:"list-item",onClick:()=>Q(n.images.downsized.url,n.id),children:[(0,t.jsx)("img",{className:O===n.id?"loaded-image":"",width:"322px",src:q(n),alt:n.title,onLoad:M(n),onError:X(n)}),(0,t.jsx)("a",{rel:"noreferrer",href:"https://giphy.com/",target:"_blank",onClick:U=>U.stopPropagation(),children:(0,t.jsx)("div",{className:"overlay-image",style:{backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAkCAYAAAB/up84AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABSBJREFUeNrsWjFv2zoQVoMW8BZ18xaN3qLRW9QtW9OtW92to98vaPoP3K1b1S1b3c2jvWlUNm3lw1s8Mpu3PAo4Iocr70jKlp0COuCQlpKPx/t43x1pv3h8fEwGeT5yNoTgeclLZvza6NgxXoNaGRktjE6MpjC2NVqh92bwt4HxBI1ro0s0dgN2tvD5a8a/9vkq0M+xYKdG81A7Gp6pyBjZddrnO6N36Hkbqyn8u4L3vYC0hjLHeAbPVhC4TwAK/ewNvLsEhyxgFXLK2l/D4tvnOVrUiPEh1k/JjvLYyWENdeTcKazBBr6AdY4AqBTmbkIzhO4gvMumYLxAYKzgPTvhBBajYNwCksHYhOyYiow1KONaKYlfO8bPEWyGEfi5Iu+Vjizg7EzB3xvwWTMxWkHG4mDnMF6BnSnYncLzHWGG4BqiwZkKQMC7I0cOVTCJhvRUKNgNCmCOxhNmrBEWzwGi0Y6rIihbsnOH/JgE2hshKrLZv4Px9yhj1twafRlid/UIGWvlFdlVLirIkIM12nETGLeO2tTPECBUZuT/a7JBMpSxUybYLjulUCN2iEpHQoyuGWZJUCa8R/VGSZvGB0iOdjAO9n8EtC2zUxICSIoW0ICTmA53DCDKQzWZg89XAXZ2B2iMavBnjDKpBX6B1tnAM5aqQgGhnU2D6GmHuqw7AkaOPmP/bsHpFC1kTLqVhglS6fFNgX1MCXUHO1zR1h5AFOoSc1jjmKx/An/1PoBQasBSoZZ3hpyaOrg0IW2sRkG8JsU8CaCaLckAhfi6AG0cmeuzkyMQMtL+SiySkY3oA/EgGeICK0UOZYQKVsQpDAjm2BpsaAGQLMKnMdok3yLtpKS70yT7OUBcm7UTHb5grk5y1Csrj40MqUbUpgW7NXo+RunckODkQvdXM37iwm7b1VA7lAaVB4jUUZOUIzNxfOougAwy3GUN0qWG2IJJ09V2NcvIFE8c54nQelEHFM6C6chUhI+WZjjffDQkrenPhqmlrAC9Naof/aLhXZeNNfMZOk+MtPOVRjNmTpfcCut0+biGZ3PBj1ywWTOfqV3v+yjLFuDPRs8Ddu05vLtmsuHQ0s73wehvR0t7aGkPevfCM5fcGr0MbOW9NSSFwF52cP5KcLIv+X4EUGbCemcOqpoz73/haE4CZNkRjAR20vwENXHRc2bWEMyQuUuGVe4hc6K6rBmg7pKN0XdGX7dts9E3Rr8afUATFl1PqgLAG6T3AoX1nSVtMP9l5r5FVyiu+D14/YssRHOheGVQYNMeinrhsMcV2WVPRR1rIRT4QmiA5r4G6oxp0y6ZzFh4LvhmB84MHz1xta9vWQMrcFR/3iF+7DmEu2YoyTshRbuMvGE9hnwGPQR1tdR04aCueKrqAIgiu/AqcCf1JXPhfuoYosGHn4Hgqa6AnCK4IfSkCa1eCJRxLGnn+mX0rfDOJok4AsQAUpwQlND2++HIgNiOVO1LVRIgtXDPs0bpunEU08vktHLMpoJS1/d9qEo6h6gAzq7RRaPV+QmBeICzUUh2fIHzk0s3HedXwkEy2ReQmjn4XDzDjqkN4D/J04/y/np5KbSrrtbwAyx+kTxdf9tfpvSZIW9O3FScHJAF8PEFc5F2lQzSi5wJheoG3U/t0xYOcgBAcOHuAkr7mY9ditoAiCz2q8uvEcD8gJpSDuGNl5hfnaTJ0/fpheMUr4CitHCO6fqdesj359xh1tWiqggfdUCmcz9ZivZ7+BnQM5P/BRgABx8sJWqTxoYAAAAASUVORK5CYII=)"}})}),O===n.id&&(0,t.jsx)(m.ui_kit$Spin,{className:"ant-spin",size:"small"})]},n.id+C))})})})})]})},it="IMG",lt="BACKGROUND",$t="GALLERY",Ie="EDITOR",ue="UPLOAD",ze="STOCK",$e="GIF",Ke="AI",Kt={mode:"select"},Wt={mode:"save"},{Dragger:Vt}=m.ui_kit$Upload,Ht=(r,o="image")=>s.decodeFileNameFromUrl(r)??o,je=we.normalizeImageFormatForDisplay,Qt=(r,o)=>{const i=je(o);return!i||r.includes(".")?r:`${r}.${i}`},qt=(r,o)=>new File([r],Qt(Ht(o),r.type),{type:r.type||"application/octet-stream"}),ct=({dataProvider:r,usesBuiltInStorage:o})=>{const i=s.useAppConfig(),l=s.useIntegratorConfigValue("compressMaxSize"),u=s.useIsStandalone(),c=s.shouldInsertUploadLinkAsIs(i),{__:f}=s.useI18n(),p=s.useDispatch(),g=s.useEditorProjectId(),[w]=s.useLazyGetImageInfoQuery(),{modal:x}=m.ui_kit$App.useApp(),A=s.useNotification(),h=s.useSelector(s.selectActiveModal$1),{request:_,resolveImagePicker:I}=s.useImagePicker(),[O,b]=(0,e.useState)(""),[E,S]=(0,e.useState)(""),[T,H]=(0,e.useState)(""),[z,P]=(0,e.useState)(""),[$,K]=(0,e.useState)(ue),[V,Q]=(0,e.useState)({width:"",height:"",size:"",format:""}),[W,B]=(0,e.useState)("success"),[te,k]=(0,e.useState)(!1),q=e.default.useRef(null),N=e.default.useRef(null),ne=e.default.useRef(null),M=e.default.useRef(null),X=e.default.useRef(null),n=e.default.useRef(null),C=e.default.useRef(null),U=e.default.useRef(null),F=e.default.useRef(null),[se,j]=(0,e.useState)("auto"),[pe,re]=(0,e.useState)(572),[he,ge]=(0,e.useState)(!1),[D,J]=(0,e.useState)({keywords:"",color:"",orientation:""}),[R,ee]=(0,e.useState)({keywords:""}),[ie,v]=(0,e.useState)([]),[L,Y]=(0,e.useState)([]),[ut,Yt]=(0,e.useState)([]),[dt,ft]=(0,e.useState)(!1),[mt,We]=(0,e.useState)(""),[Zt,Re]=(0,e.useState)(!1),[Xt,De]=(0,e.useState)(0),pt=s.useProjectData(),ht=pt?.id!==void 0?String(pt.id):g||"",gt=s.useEventEmitter(be.events.UPLOAD_EVENT_ID),de=we.useImageBlobResolver(),Le=e.default.useRef(""),ye=e.default.useRef(0),ke=e.default.useRef(""),[Jt,vt]=(0,e.useState)(""),[en,Ct]=(0,e.useState)(null),[tn,Ve]=(0,e.useState)(""),Me=(0,e.useCallback)(a=>{if(!(a instanceof Blob))return;ke.current&&URL.revokeObjectURL(ke.current);const d=URL.createObjectURL(a);ke.current=d,vt(d),Ct(a)},[]),fe=(0,e.useCallback)(()=>{ke.current&&(URL.revokeObjectURL(ke.current),ke.current=""),vt(""),Ct(null)},[]),oe=(0,e.useCallback)(()=>{Ve("")},[]),He=s.usePlanFeatureGate("element_ai_image"),Qe=s.usePlanFeatureGate("stock_photo"),qe=s.usePlanFeatureGate("stock_gif"),yt=s.usePlanFeatureGate("image_editor"),Ge=(0,e.useRef)(!1),Ye=a=>{Ge.current=!0,S(a)},nn=a=>{Ge.current=!1,S(a.target.value)},Oe=(0,e.useCallback)((a,d,y=f("The image could not be uploaded."))=>{const G=d instanceof Error?d.message:y;A.error({id:"IMAGE_UPLOAD_ERROR",data:a,title:f("Upload failed"),description:G})},[f,A]),sn=(0,e.useCallback)(a=>s.fireUploadImageEvent(gt,{file:a,project:ht}),[ht,gt]),Ae=me.useImageBlobFetch(),rn=(0,e.useCallback)(a=>de.resolve(we.canonicalImageUrlKey(a),void 0,Ae),[Ae,de]),Ze=async a=>{if(a)try{const d=await on(a);d&&Je(d)?await xe({file:d}):d||Oe({url:a},null,f("Failed to download image from URL."))}catch(d){Oe({url:a},d,f("Failed to process image URL."))}},At=(a,d)=>{const y=s.resolveUploadLinkAction(c,d,Ge.current);y==="insertAsIs"?(Ge.current=!1,Ne({url:a})):y==="upload"&&Ze(a)},Xe=e.default.useRef(At);Xe.current=At;const an=(0,e.useCallback)(()=>{const a=E.trim();a.toLowerCase().startsWith("http")&&Xe.current(a,"enter")},[E]);e.default.useEffect(()=>{if($!==ue||!z)return;const a=E.trim();if(!a||!a.toLowerCase().startsWith("http"))return;const d=setTimeout(()=>{Xe.current(a,"timer")},1e3);return()=>{clearTimeout(d)}},[E,$,z]);const on=async a=>{try{const d=we.canonicalImageUrlKey(a),y=await de.resolve(d,void 0,Ae);return qt(y,d)}catch{}};document.onpaste=function(a){const d=a.clipboardData?.items?.[0];if($===ue&&z){if(d?.type?.indexOf("image")===0&&i.imageCenterLocalUploadEnabled!==!1){const G=d.getAsFile();Je(G);const Z={file:G};S(""),xe(Z);return}const y=a.clipboardData?.getData("text/plain");if(y&&y.trim().toLowerCase().startsWith("http")){a.preventDefault(),a.stopPropagation(),Ye(y.trim());return}d?.type?.indexOf("text")===0&&d.getAsString(G=>{if(G.trim().toLowerCase().startsWith("http"))Ye(G.trim());else if(G.toString().slice(1,5)==="meta"){const Z=G.toString().split('"')[1];Z&&Ye(Z)}})}},(0,e.useEffect)(()=>{const a=d=>{let y=null;_?.kind==="background"?(y=lt,P(lt)):_?.kind==="img"&&(P(it),y=it),_?.currentUrl&&y&&(b(_.currentUrl),K(d))};h===s.MODALS.UPLOAD_IMAGE_MODAL||h===s.MODALS.UPLOAD_BACKGROUND_MODAL?a(Ie):h===s.MODALS.UPLOAD_IMAGE_MODAL_AI||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_AI?(He.isLocked?(Re(!0),De(s.FEATURE_UPSELL_SLIDE.element_ai_image)):a(Ke),setTimeout(()=>F.current?.focus({cursor:"start"}),100)):h===s.MODALS.UPLOAD_IMAGE_MODAL_UPLOAD||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_UPLOAD?(a(ue),setTimeout(()=>n.current?.focus({cursor:"start"}),100)):h===s.MODALS.UPLOAD_IMAGE_MODAL_STOCK||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_STOCK?(Qe.isLocked?(Re(!0),De(s.FEATURE_UPSELL_SLIDE.stock_photo)):a(ze),setTimeout(()=>U.current?.focus({cursor:"start"}),100)):h===s.MODALS.UPLOAD_IMAGE_MODAL_GIF||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_GIF?(qe.isLocked?(Re(!0),De(s.FEATURE_UPSELL_SLIDE.stock_gif)):a($e),setTimeout(()=>C.current?.focus({cursor:"start"}),100)):h===s.MODALS.UPLOAD_IMAGE_MODAL_EDIT||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_EDIT?(yt.isLocked?(Re(!0),De(s.FEATURE_UPSELL_SLIDE.image_editor)):a(Ie),p(s.openSecondModal(s.MODALS.IMAGE_EDITOR_MODAL))):P("")},[h,p,He.isLocked,Qe.isLocked,qe.isLocked,yt.isLocked,_]);const Ne=(0,e.useCallback)(({url:a=O||"",meta:d=Kt})=>{b(a),I({url:a,meta:d}),setTimeout(()=>{oe(),fe(),J({keywords:"",color:"",orientation:""}),ee({keywords:""}),Y([]),v([]),P(""),We(""),ft(!1),H(""),S(""),K(ue)},200),p(s.closeModal$1()),p(s.closeSecondModal())},[O,oe,p,I,fe]),bt=(0,e.useCallback)((a,d)=>(j("auto"),k(!1),Ne({url:a,meta:Wt}),A.success({id:"IMAGE_UPLOAD_SUCCESS",data:d,title:f("The image was successfully uploaded.")}),a),[f,Ne,A]);(0,e.useEffect)(()=>{const a=c?"":E,d=a||T,y=we.canonicalImageUrlKey(d);if(!d||!y){B(""),Le.current&&de.abandonKey(Le.current),Le.current="",oe(),fe();return}const G=Le.current;G&&G!==y&&(de.abandonKey(G),oe(),fe()),Le.current=y;const Z=new AbortController,le=a?800:0,ve=++ye.current,dn=setTimeout(async()=>{try{const _e=async()=>{const ce=await de.resolve(y,Z.signal,Ae);if(ve!==ye.current)return;const{width:Ce,height:fn}=await me.getImageDimensionsFromBlob(ce);ve===ye.current&&(Q({width:Ce,height:fn,size:(ce.size/1024).toFixed(2),format:je(ce.type)}),oe(),Me(ce))};if(u)await _e();else{const ce=await me.resolveDataProviderPreview(r,y);if(ce?.previewUrl&&ve===ye.current){Ve(ce.previewUrl),fe();try{const{data:Ce}=await w(y);if(ve!==ye.current)return;Ce?Q({width:Ce?.width,height:Ce?.height,size:Ce?.fileSize!=null?(Ce.fileSize/1024).toFixed(2):"",format:je(Ce?.format)}):await _e()}catch{await _e()}}else await _e()}if(ve!==ye.current)return;B("success"),b(d),re(572),setTimeout(()=>{let ce=0;N.current&&(ce=N.current.offsetHeight+62),j(ce)},0)}catch(_e){if(_e?.name==="AbortError"||Z.signal.aborted||ve!==ye.current)return;oe(),fe(),B("error")}},le);return()=>{clearTimeout(dn),Z.abort()}},[E,T,c,u,oe,Ae,w,de,fe,r,Me]),(0,e.useEffect)(()=>{if(!O||E||T||!h)return;const a=we.canonicalImageUrlKey(O),d=new AbortController;let y=!1;const G=async()=>{const Z=await de.resolve(a,d.signal,Ae);if(y)return;const{width:le,height:ve}=await me.getImageDimensionsFromBlob(Z);y||(oe(),Me(Z),Q({width:le,height:ve,size:(Z.size/1024).toFixed(2),format:je(Z.type)}))};return(async()=>{try{if(!u){const Z=await me.resolveDataProviderPreview(r,a);if(Z?.previewUrl&&!y){Ve(Z.previewUrl),fe();try{const{data:le}=await w(a);if(y)return;le?Q({width:le?.width,height:le?.height,size:le?.fileSize!=null?(le.fileSize/1024).toFixed(2):"",format:je(le?.format)}):await G();return}catch{await G()}}}await G()}catch{y||oe()}})(),()=>{y=!0,d.abort()}},[u,h,oe,O,Ae,w,de,r,E,T,Me]);const ln=()=>{p(s.closeModal$1()),setTimeout(()=>{oe(),fe(),b(""),S(""),Y([]),Y([]),J({keywords:"",color:"",orientation:""}),ee({keywords:""}),j("auto"),!dt&&We(""),re(572),K(ue)},200)},cn=a=>{a===$t?x.success({mask:{closable:!0},centered:!0,title:f("Coming soon"),content:f("The feature is under development."),okText:f("Ok. I'll be waiting"),onOk:()=>{}}):a===Ie&&O===""?x.warning({mask:{closable:!0},centered:!0,title:f(""),content:f("To preview and edit the uploaded image"),okText:f("Upload Image"),onOk:()=>{K(ue)}}):(setTimeout(()=>{let d=0,y=0;a===ue&&q.current?(D.keywords===""&&n.current?.focus({cursor:"start"}),d=300,y=572):a===Ie&&N.current?(d=N.current.offsetHeight+62,y=572):a===ze&&ne.current?(D.keywords===""&&U.current?.focus({cursor:"start"}),d=130,y=572,L.length>0&&(y=1060,d="84vh")):a===$e&&M.current?(D.keywords===""&&C.current?.focus({cursor:"start"}),d=130,y=572,ie.length>0&&(y=1060,d="84vh")):a===Ke&&X.current&&(mt===""&&ut.length===0?(F.current?.focus({cursor:"start"}),d=130):d=X.current.offsetHeight+82,y=572),j(d),re(y)},0),K(a))};(0,e.useEffect)(()=>{D.keywords===""&&(n?.current?.focus({cursor:"start"}),Y([]),setTimeout(()=>{j("auto"),re(572)},0))},[D,Y,j,re]);const Je=a=>{const d=a.type==="image/jpeg"||a.type==="image/png"||a.type==="image/jpg"||a.type==="image/webp"||a.type==="image/gif"||a.type==="image/svg+xml";return d||A.error({id:"IMAGE_UPLOAD_WRONG_FORMAT",data:a,title:"Upload",description:"You can only upload JPG/JPEG/PNG/WEBP/GIF/SVG file!"}),d},wt=(0,e.useRef)(null),xe=async({file:a})=>{try{ge(!0);const d=a===wt.current?await s.prepareImageForEditorResult(a,i,void 0,{compressBySize:l!==void 0}):await s.prepareImageForEditorUpload(a,i),y=await sn(d);if(y.url)return bt(y.url,d),y.url;if(!s.shouldFallbackToBuiltInUpload(y,{isStandalone:u,targetIsOurBackend:!!o})){Oe(d,s.toUploadImageError(y));return}const G=await s.uploadFileViaDataProvider(d,r);if(G?.url)return bt(G.url,d),G.url;Oe(d,null);return}catch(d){Oe(a,d);return}finally{ge(!1)}},It=(0,e.useRef)(xe);It.current=xe;const un=(0,e.useCallback)(a=>(wt.current=a,It.current({file:a})),[]);let Pe=[{label:f("Upload"),key:ue,children:(0,t.jsxs)("div",{ref:q,style:{paddingBottom:24},children:[i.imageCenterLocalUploadEnabled!==!1&&(0,t.jsxs)(Vt,{showUploadList:!1,name:"Image",beforeUpload:Je,customRequest:xe,style:{marginBottom:10},multiple:!1,accept:"image/png, image/jpeg, image/jpg, image/webp, image/gif, image/svg+xml",children:[(0,t.jsx)("p",{className:"ant-upload-drag-icon",children:(0,t.jsx)(s.EmIcons,{icon:"InboxOutlined",component:m.icons$InboxOutlined})}),(0,t.jsx)("p",{className:"ant-upload-text",children:f("Click to select, paste from the clipboard, or drag and drop")}),(0,t.jsx)("p",{className:"ant-upload-hint",children:f("Accepted formats: PNG, JPG, WEBP, SVG or GIF.")})]}),(0,t.jsx)(m.ui_kit$Form,{style:{padding:"0 2px 0 2px"},children:(0,t.jsx)(m.ui_kit$Form.Item,{validateStatus:W,children:(0,t.jsx)(m.ui_kit$Input,{ref:n,allowClear:!0,size:"large",placeholder:f("Paste image URL here"),value:E,onChange:nn,onPressEnter:an,spellCheck:"false"})})})]})}];return i.imageCenterStockEnabled&&!Qe.isLocked&&Pe.push({label:f("Stock"),key:ze,children:(0,t.jsx)("div",{ref:ne,style:{paddingBottom:24},children:(0,t.jsx)(Gt,{currentReq:D,setCurrentReq:J,imageStockList:L,setImageStockList:Y,setModalWidth:re,setModalHeight:j,setStockLink:H,setCurrentImageLink:b,inputRef:U,customRequest:Ze})})}),i.imageCenterGifEnabled&&!qe.isLocked&&Pe.push({label:f("GIF"),key:$e,children:(0,t.jsx)("div",{ref:M,style:{paddingBottom:24},children:(0,t.jsx)(zt,{currentReqGif:R,setCurrentReqGif:ee,imageGifList:ie,setImageGifList:v,setModalWidth:re,setModalHeight:j,setStockLink:H,setCurrentImageLink:b,inputRef:C,customRequest:Ze})})}),i.elementAIimageEnabled&&!He.isLocked&&Pe.push({label:f("AI"),key:Ke,children:(0,t.jsx)("div",{ref:X,style:{paddingBottom:24},children:(0,t.jsx)(Ft,{setModalHeight:j,customRequest:xe,aiImageRequest:mt,setAiImageRequest:We,imageAiList:ut,setImageAiList:Yt,isLoadingAi:dt,setIsLoadingAi:ft,aiTabRef:X,inputAiRef:F,isImageUploaded:te,setIsImageUploaded:k})})}),i.imageCenterEditorEnabled&&Pe.push({label:"",key:Ie,children:(0,t.jsx)("div",{ref:N,children:(0,t.jsx)(Rt,{currentImageLink:O,newLink:E,previewDisplayUrl:tn,resolvedPreviewObjectUrl:Jt,resolvedPreviewBlob:en,resolveImageBlob:rn,imageSize:V,onSave:un,uploadImageResultIsLoading:he||!1})})}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.ui_kit$Modal,{width:pe,className:"image-center",title:f("Image Center"),style:{minHeight:390},open:!!z,onOk:Ne,onCancel:ln,footer:$===Ie?(0,t.jsx)(t.Fragment,{}):null,children:(0,t.jsx)(m.ui_kit$Spin,{spinning:he,children:(0,t.jsx)(m.ui_kit$Tabs,{activeKey:$,onChange:cn,items:Pe,className:"modal-tabs",style:{height:se,minHeight:130}})})}),(0,t.jsx)(s.PlanUpgradePrompt,{open:Zt,onCancel:()=>Re(!1),initialSlide:Xt})]})};ct.propTypes={dataProvider:Et.default.object},kt.default=ct});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__useblocks__.define("static/core/
|
|
1
|
+
__useblocks__.define("static/core/d3ae23fa.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/82dfd28b.js","dayjs"],function(E,s,Ce){const z=E("./2ff39ddf.js"),I=E("./cf7d1dd7.js"),T=E("./82dfd28b.js");let l=E("dayjs");l=z.__toESM(l);var o={PRODUCT_CAROUSEL:"productCarousel",SINGLE_IMAGE_PREVIEW:"singleImagePreview",DEAL_ANNOTATION:"dealAnnotation",DEAL_CARD:"dealCard"},x="emailmaker-gmail-annotations";function b(e){return/^[A-Za-z]{3}$/.test((e??"").trim())}function K(e){return typeof e=="object"&&e!==null}function P(e,n){const t=e[n];return typeof t=="string"?t:""}var B=new Set(["PromotionCard","DiscountOffer","Organization"]);function N(e){let n;try{n=JSON.parse(e)}catch{return!1}const t=Array.isArray(n)?n:[n];return t.length===0?!1:t.every(r=>typeof r=="object"&&r!==null&&B.has(String(r["@type"])))}function V(){let e=new Date().getTime(),n=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(n+r)%16|0,n=Math.floor(n/16)),(t==="x"?r:r&3|8).toString(16)})}function C(e){return e.annotationType||o.PRODUCT_CAROUSEL}function f(e){return!!(e?.image||e?.url||e?.headline||e?.price||e?.priceCurrency||e?.discountValue)}function h(e){return!e.description&&!e.discountCode&&!e.availabilityStarts&&!e.availabilityEnds}function O(e){return typeof e=="string"&&e.trim().length>0}function S(e){return O(e)?/^https?:\/\//i.test(e.trim()):!1}function L(e){return O(e?.image)&&S(e?.url)}function $(e){switch(C(e)){case o.SINGLE_IMAGE_PREVIEW:return L(e.cards?.[0]);case o.DEAL_ANNOTATION:return!h(e);case o.DEAL_CARD:return O(e.description)&&(S(e.offerPageUrl)||S(e.merchantHomepageUrl));case o.PRODUCT_CAROUSEL:default:return!!e.cards?.some(L)}}function Y(e){switch(C(e)){case o.SINGLE_IMAGE_PREVIEW:return!f(e.cards?.[0])&&!O(e.discountCode);case o.DEAL_ANNOTATION:return h(e);case o.DEAL_CARD:return h(e)&&!e.offerPageUrl&&!e.merchantHomepageUrl;case o.PRODUCT_CAROUSEL:default:return!e.cards?.some(f)}}function Z(e){switch(C(e)){case o.DEAL_ANNOTATION:case o.DEAL_CARD:return!!(e.description||e.discountCode||e.availabilityStarts||e.availabilityEnds||e.offerPageUrl||e.merchantHomepageUrl);case o.SINGLE_IMAGE_PREVIEW:return f(e.cards?.[0]);case o.PRODUCT_CAROUSEL:default:return e.logo?!0:!!e.cards?.some(f)}}function q(e){let n=typeof e.price=="string"||typeof e.price=="number"?String(e.price):"",t=typeof e.discountValue=="string"||typeof e.discountValue=="number"?String(e.discountValue):"";const r=typeof e.em_regularPrice=="string"||typeof e.em_regularPrice=="number"?String(e.em_regularPrice):"",i=typeof e.em_price=="string"||typeof e.em_price=="number"?String(e.em_price):"";if(!n&&r&&(n=r),!t&&n&&i){const u=parseFloat(n),c=parseFloat(i);!isNaN(u)&&!isNaN(c)&&u>=c&&(t=String(u-c))}return{id:V(),image:typeof e.image=="string"?e.image:"",url:typeof e.url=="string"?e.url:"",headline:typeof e.headline=="string"?e.headline:"",price:n,priceCurrency:typeof e.priceCurrency=="string"?e.priceCurrency:"",discountValue:t}}function v(e,n){const t={"@context":"http://schema.org/","@type":"PromotionCard",image:e.image};if(e.url&&(t.url=e.url),e.headline&&(t.headline=e.headline),e.price&&(t.price=e.price),e.priceCurrency){const r=e.priceCurrency.trim();t.priceCurrency=b(r)?r.toUpperCase():r}return e.discountValue&&(t.discountValue=e.discountValue),n&&(t.position=n),t}function D(e){const n={"@context":"http://schema.org/","@type":"DiscountOffer"};for(const t of["description","discountCode","availabilityStarts","availabilityEnds","offerPageUrl","merchantHomepageUrl"]){const r=e[t];r&&(n[t]=r)}return n}function j(e){return{"@context":"http://schema.org/","@type":"Organization",logo:e}}function X(e){const n=C(e),t=[];if(n===o.DEAL_CARD)return[D(e)];if(n===o.DEAL_ANNOTATION){const r=[];return e.logo&&r.push(j(e.logo)),r.push(D(e)),r}if(e.logo&&t.push(j(e.logo)),n===o.SINGLE_IMAGE_PREVIEW){const r=e.cards?.[0];return e.discountCode?.trim()&&t.push(D(e)),r&&f(r)&&t.push(v(r)),t}return(e.cards||[]).filter(f).forEach((r,i)=>{t.push(v(r,i+1))}),t}function Q(e){return e.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function ee(e){if(Y(e))return null;const n=Q(JSON.stringify(X(e),null,2));return`<script type="application/ld+json" id="${x}">
|
|
2
2
|
${n}
|
|
3
3
|
<\/script>`}function G(e,n){const t=e.toLowerCase().indexOf("<\/script>",n);return t===-1?-1:t+9}function w(e,n,t,r){return{range:{start:n,end:r},contentRange:{start:t,end:r-9}}}function R(e){const n=new RegExp(`<script\\b[^>]*\\bid=["']${x}["']`,"i").exec(e);if(n?.index!==void 0){const i=e.indexOf(">",n.index)+1;if(i<=0)return null;const u=G(e,i);if(u!==-1)return w(e,n.index,i,u)}const t=/<script\b[^>]*type=["']application\/ld\+json["'][^>]*>/gi;let r;for(;(r=t.exec(e))!==null;){const i=r.index+r[0].length,u=G(e,i);if(u!==-1&&N(e.slice(i,u-9)))return w(e,r.index,i,u)}return null}function ne(e){const n=e.indexOf(">")+1,t=e.toLowerCase().lastIndexOf("<\/script>");return n<=0||t===-1?e:e.slice(n,t)}function te(e){const n=/<\/head>/i.exec(e);if(n?.index!==void 0)return n.index;const t=/<head\b[^>]*>/i.exec(e);if(t?.index!==void 0)return t.index+t[0].length;const r=/<body\b[^>]*>/i.exec(e);return r?.index!==void 0?r.index:e.length}function H(e,n){let{start:t,end:r}=n;return t>0&&e[t-1]===`
|
|
4
4
|
`?t-=1:r<e.length&&e[r]===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__useblocks__.define("static/core/
|
|
1
|
+
__useblocks__.define("static/core/d8b648e9.js",["require","exports","module","static/core/82dfd28b.js"],function(u,t,m){const r=u("./82dfd28b.js");var n="https://cdn.ampproject.org/v0",i=`${n}.js`,c=`script[src='${i}']`;function a(e){return r.isElement(e)&&(e.tagName.startsWith("AMP")||e.tagName==="FORM"||e.tagName==="TEMPLATE"&&e.getAttribute("type")?.toLowerCase()==="amp-mustache")}function s(e){return r.isScriptElement(e)&&e.src?.startsWith("https://cdn.ampproject.org/v0")}Object.defineProperty(t,"AMP_BASE_SCRIPT",{enumerable:!0,get:function(){return i}}),Object.defineProperty(t,"AMP_BASE_SELECTOR",{enumerable:!0,get:function(){return c}}),Object.defineProperty(t,"AMP_SCRIPTS_PATH",{enumerable:!0,get:function(){return n}}),Object.defineProperty(t,"isAmpElement",{enumerable:!0,get:function(){return a}}),Object.defineProperty(t,"isAmpScript",{enumerable:!0,get:function(){return s}})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(){try{if(typeof document<"u"){var r=".blocks-app .image-editor-modal .ant-modal-container{flex-direction:column;min-height:100vh;display:flex;border-radius:0!important}.blocks-app .image-editor-modal .ant-modal-body{border-bottom:1px solid #d9d9d9;flex-grow:1;display:flex}.blocks-app .image-editor-modal .ant-modal-body #filerobot-editor{flex-grow:1;height:calc(100vh - 70px);min-height:calc(100vh - 70px);overflow:hidden}.blocks-app .image-editor-modal .pi .text-on-primary{background:var(--ub-colorPrimary);border-color:var(--ub-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary:hover{background:var(--ub-colorPrimaryHover);border-color:var(--ub-colorPrimaryHover)}.blocks-app .image-editor-modal .pi .text-on-primary.rounded-full{border-radius:calc(var(--ub-borderRadius) * 1px)}.blocks-app .image-editor-modal .pi .shadow-xl{box-shadow:none}.blocks-app .image-editor-modal .w-\\[4ch\\].text-sm.text-center{width:5ch}.blocks-app .image-editor-modal .pi .border-white{border-color:var(--ub-colorPrimary)}.blocks-app .image-editor-modal .pi .bg-white\\/50{background-color:var(--ub-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary{color:var(--ub-colorWhite)}",e=window.__useblocks_styles__||(window.__useblocks_styles__={sheets:{},order:[]}),l=r;if(!e.sheets[l]){var t=null;try{typeof CSSStyleSheet=="function"&&"replaceSync"in CSSStyleSheet.prototype&&(t=new CSSStyleSheet,t.replaceSync(r))}catch{t=null}if(t){if(!e.host||!e.host.isConnected||!e.host.sheet){var o=document.createElement("style");o.setAttribute("data-useblocks","true"),document.head.appendChild(o),e.host=o}for(var d=e.host.sheet,i=0;i<t.cssRules.length;i++)try{d.insertRule(t.cssRules[i].cssText,d.cssRules.length)}catch{}(e.texts||(e.texts=[])).push(r),(e.listeners||[]).forEach(function(a){try{a(r)}catch{}})}else{var o=document.createElement("style");o.setAttribute("data-useblocks","true"),o.appendChild(document.createTextNode(r)),document.head.appendChild(o)}e.sheets[l]=!0,e.order.push(l)}}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
__useblocks__.define("static/core/
|
|
2
|
+
__useblocks__.define("static/core/dbf8654f.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/82dfd28b.js","static/core/c96e8d1f.js","static/core/6b521a88.js","static/core/2a8276a7.js","static/core/a73da823.js","react","react/jsx-runtime","__delivery__/libs"],function(r,N,Z){const F=r("./2ff39ddf.js"),b=r("./cf7d1dd7.js"),e=r("./82dfd28b.js"),E=r("./c96e8d1f.js");r("./6b521a88.js");const d=r("./2a8276a7.js"),U=r("./a73da823.js");let s=r("react");s=F.__toESM(s);let c=r("react/jsx-runtime"),_=r("__delivery__/libs");var L={width:"100%",height:"100%"},P=[d.TABS_IDS.ADJUST,d.TABS_IDS.ANNOTATE,d.TABS_IDS.RESIZE],$={presetsItems:E.C};function z(n,l){if(n==="json")return new Blob([l],{type:"application/json"});if(n==="svg")return new Blob([l],{type:"image/svg+xml"});const f=`image/${n}`,p=l.replace(/data:image\/([a-z]*)?;base64,/,"");return U.base64ToBlob(p,f)}var G=({currentImageLink:n,prefetchedBlob:l,resolveImageBlob:f,onSave:p,uploadImageResultIsLoading:H})=>{const v=e.useCookieManager(),[I,S]=(0,s.useState)(),[R,T]=(0,s.useState)(),{__:D}=e.useI18n();let m=e.useDispatch();const O=e.useStore(),y=e.useAppConfig(),w=e.useEditorLocale(),J=e.useSelector(e.selectSecondModal),k=e.useProjectData();(0,s.useMemo)(()=>{if(!y?.icons)return;const a={};for(const[i,t]of Object.entries(y.icons))typeof t=="string"&&(a[i]=e.sanitizeHtml(t));return Object.keys(a).length>0?a:void 0},[y?.icons]);const[K,x]=(0,s.useState)(!1),h=(0,s.useRef)(),A=(0,s.useRef)(null),j=d.useCornerRadiusSync(A),B=e.useEventEmitter(b.events.FILE_PROXY_EVENT_ID);(0,s.useEffect)(()=>{let a=!1;return(async()=>{const t=n;if(!t&&!l)return;let o=l;if(!o&&t)try{typeof f=="function"?o=await f(t):o=await(await fetch(t)).blob()}catch{if(a)return;if(o=await B.fire({url:t,project:k}).filter(u=>u instanceof Blob)[0],!o){const u=v.get(e.APP_COOKIES.em_token)||await e.di.getContainer(O)?.getInstance(b.TOKEN_ID);o=await(await fetch(`https://app.useblocks.io/api/wp-json/cors-proxy/v1/get?url=${encodeURIComponent(t)}`,{headers:{authorization:`Bearer ${u}`}})).blob()}}if(a||!o)return;const g=new FileReader;g.onload=()=>{if(a)return;const u=g.result;typeof u=="string"&&(S(u),T(o.type))},g.onerror=()=>{},g.readAsDataURL(o)})().catch(t=>{}),()=>{a=!0}},[n,l,f,v,B,k,O]);const V=(0,s.useCallback)(()=>{S(null),T(null),x(!1),m(e.closeSecondModal()),m(e.closeModal$1(e.MODALS.UPLOAD_IMAGE_MODAL))},[m]),M=(0,s.useRef)();M.current=async function(a,i,t){try{const o=z(t,a);p&&await p(new File([o],i,{lastModified:Date.now(),type:o.type}))}catch(o){throw o}};const Y=(0,s.useCallback)(a=>{x(!!a)},[]),W=(0,s.useCallback)(()=>{if(!h.current)return;const a=n?.split("/").pop().split(".")[0]||"image",i=j.isRounded?"png":R?.split("/")[1]||"png";try{const{imageData:t}=h.current({name:a,extension:i},void 0,!1),o=t.imageBase64??(t.imageCanvas?t.imageCanvas.toDataURL(`image/${i}`):void 0);if(!o)throw new Error("FIE не вернул ни imageBase64, ни imageCanvas");M.current(o,a,i)}catch{}},[j.isRounded,n,R]),C=w?w.replace("_","-"):"en-US",X=(0,s.useMemo)(()=>E._(C),[C]);return(0,c.jsxs)(_.ui_kit$Modal,{afterOpenChange:Y,width:"100%",style:{maxWidth:"100%",minHeight:"100vh"},className:"image-editor-modal",centered:!0,closable:!1,zIndex:1100,mask:!1,open:J,footer:[(0,c.jsx)(_.ui_kit$Button,{className:"em-analytics__profile-cancel",onClick:V,children:D("Cancel")},"Cancel"),(0,c.jsx)(_.ui_kit$Button,{className:"em-analytics__profile-updafilerobotte",id:"save",type:"primary",onClick:W,children:D("Update")},"Ok")],children:[H&&(0,c.jsx)("div",{style:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:e.emCssVar("colorBgLayout"),zIndex:10,opacity:.7},children:(0,c.jsx)(_.ui_kit$Spin,{size:"large"})}),(0,c.jsx)("div",{id:"filerobot-editor",ref:A,style:L,children:K&&I&&(0,c.jsx)(d.AssemblyPoint_default,{source:I,useBackendTranslations:!1,language:C.split("-")[0],translations:X,tabsIds:P,defaultTabId:d.TABS_IDS.ADJUST,Crop:$,...j.editorConfig,avoidChangesNotSavedAlertOnLeave:!0,removeSaveButton:!0,getCurrentImgDataFnRef:h})})]})};N.default=G});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__useblocks__.define("static/core/
|
|
1
|
+
__useblocks__.define("static/core/e4a8dec2.js",["require","exports","module","static/core/2ff39ddf.js","static/core/82dfd28b.js","static/core/bf6cd7cc.js"],function(f,M,it){const D=f("./2ff39ddf.js"),s=f("./82dfd28b.js"),h=f("./bf6cd7cc.js");var F=1.25,O=80,$=3,k=1,p=16,L="p, div, td, th";function d(t){if(!t)return;const e=parseFloat(t);if(Number.isFinite(e))return t.trim().endsWith("pt")?e*4/3:e}function A(t){return t.style}function l(t){const e=A(t);if(!e)return!1;if(e.display==="none"||e.visibility==="hidden"||e.opacity==="0")return!0;const r=d(e.fontSize);return r!==void 0&&r<=k&&N(t)<=k?!0:d(e.maxHeight)===0}function u(t){for(let e=t;e;e=e.parentElement){const r=d(A(e)?.fontSize);if(r!==void 0)return r}return p}function w(t,e){for(const r of Array.from(t.childNodes)){if(s.isTextNode(r)){const n=r.data.trim().length;if(n){const i=u(r.parentElement);e.set(i,(e.get(i)??0)+n)}continue}!s.isElement(r)||l(r)||w(r,e)}}function b(t){const e=new Map;w(t,e);let r=p,n=0;for(const[i,o]of e)o>n&&(r=i,n=o);return r}function N(t){let e=u(t);for(const r of Array.from(t.querySelectorAll("*")))r.textContent?.trim()&&(e=Math.max(e,u(r)));return e}function j(t,e){return t.querySelector("a")?.textContent?.trim()===e}function q(t){return Array.from(t.querySelectorAll(L)).some(e=>e.textContent?.trim())}function G(t){const e=b(t),r=[];for(const o of Array.from(t.querySelectorAll(L))){if(l(o)||q(o))continue;const a=o.textContent?.trim()??"";if(!a||a.length>O||j(o,a))continue;const c=N(o);c>=e*F&&r.push({elem:o,size:c})}const n=[...new Set(r.map(o=>o.size))].sort((o,a)=>a-o),i=new Map;for(const{elem:o,size:a}of r)i.set(o,Math.min(n.indexOf(a)+1,$));return{headingLevels:i}}var R=D.__exportAll({markdownAnchor:()=>Y,markdownBlock:()=>X,markdownImage:()=>Q,markdownInline:()=>J,markdownOrderedList:()=>Z,markdownStrong:()=>K,markdownUnorderedList:()=>U}),E=h.formatList,_=20;function W(t){return!t||t.includes("%")?NaN:parseFloat(t)}function m(t,e){const r=t.style,n=e==="width"?"maxWidth":"maxHeight";for(const i of[t.getAttribute(e),r?.[e],r?.[n]]){const o=W(i);if(Number.isFinite(o))return o}return NaN}function x(t){return(t.getAttribute("alt")??"").trim()?!1:m(t,"width")<=_||m(t,"height")<=_}function S(t){return t.replace(/ /g,"%20").replace(/\(/g,"%28").replace(/\)/g,"%29")}function B(t){const e=t.getAttribute("href");return!e||e.startsWith("#")?"":e}function g(t){for(const e of Array.from(t.childNodes)){if(s.isTextNode(e)){if(/\S/.test(e.data))return!0;continue}if(!s.isElement(e))continue;const r=e.tagName.toLowerCase();if(r==="img"){if(e.getAttribute("src")&&!x(e))return!0;continue}if(r==="hr"||r==="a"&&B(e)&&v(e)||g(e))return!0}return!1}function v(t){const e=(t.getAttribute("title")??"").trim();if(e)return e;const r=t.querySelector("img");return r?(r.getAttribute("title")??"").trim():""}function y(t,e,r){r.addLiteral("["),e(),r.addLiteral(`](${S(t)})`)}function I(t,e){return t.parentElement?.tagName.toLowerCase()!=="li"?e:{...e,leadingLineBreaks:1,trailingLineBreaks:1}}var U=(t,e,r,n)=>{E(t,e,r,I(t,n),()=>"- ")},Z=(t,e,r,n)=>{let i=Number(t.getAttribute("start")??"1")||1;E(t,e,r,I(t,n),()=>`${i++}. `)},V={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6};function z(t,e){return V[t.tagName.toLowerCase()]??e.metadata?.headingLevels.get(t)}var X=(t,e,r,n)=>{if(l(t)||!g(t))return;const i=z(t,r);r.openBlock({leadingLineBreaks:i?2:n.leadingLineBreaks}),i&&r.addLiteral(`${"#".repeat(i)} `),e(Array.from(t.childNodes),r),r.closeBlock({trailingLineBreaks:i?2:n.trailingLineBreaks})};function P(t,e){for(let r=t.parentElement;r;r=r.parentElement)if(z(r,e))return!0;return!1}function C(t){return s.isTextNode(t)?!/\S/.test(t.data):s.isElement(t)&&t.tagName.toLowerCase()==="br"}var K=(t,e,r)=>{const n=Array.from(t.childNodes);if(P(t,r)){e(n,r);return}let i=0,o=n.length;for(;i<o&&C(n[i]);)i++;for(;o>i&&C(n[o-1]);)o--;const a=n.slice(i,o),c=a.map(nt=>nt.textContent??"").join("");if(!a.length||c!==c.trim()){e(n,r);return}e(n.slice(0,i),r),r.addLiteral("**"),e(a,r),r.addLiteral("**"),e(n.slice(o),r)},J=(t,e,r)=>{l(t)||e(Array.from(t.childNodes),r)};function T(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function H(t,e){const r=m(t,e);return Number.isFinite(r)?` ${e}="${Math.round(r)}"`:""}var Q=(t,e,r)=>{const n=t.getAttribute("src");if(!n||x(t))return;const i=t.getAttribute("alt")??"",o=H(t,"width"),a=H(t,"height");if(o||a){r.addLiteral(`<img src="${T(n)}" alt="${T(i)}"${o}${a}>`);return}r.addLiteral("})`)},Y=(t,e,r)=>{const n=B(t);if(!n){e(Array.from(t.childNodes),r);return}if(g(t)){y(n,()=>e(Array.from(t.childNodes),r),r);return}const i=v(t);i&&y(n,()=>r.addInline(i),r)},tt={"\\":"\\\\","`":"\\`","*":"\\*",_:"\\_","[":"\\[","]":"\\]","#":"\\#",">":"\\>"},et={wordwrap:!1,encodeCharacters:tt,baseElements:{selectors:["body"]},formatters:R,selectors:[{selector:"*",format:"markdownInline"},{selector:"p",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"div",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"td",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"th",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},...["h1","h2","h3","h4","h5","h6"].map(t=>({selector:t,format:"markdownBlock"})),{selector:"a",format:"markdownAnchor"},{selector:"img",format:"markdownImage"},{selector:"ul",format:"markdownUnorderedList"},{selector:"ol",format:"markdownOrderedList"},{selector:"hr",format:"blockString",options:{string:"---",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"b",format:"markdownStrong"},{selector:"strong",format:"markdownStrong"},{selector:"i",format:"inlineSurround",options:{prefix:"*",suffix:"*"}},{selector:"em",format:"inlineSurround",options:{prefix:"*",suffix:"*"}}]};function rt(t){return h.convert(t,et,G(t))}M.htmlToMarkdown=rt});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__useblocks__.define("static/core/
|
|
1
|
+
__useblocks__.define("static/core/e5cae5a9.js",["require","exports","module","static/core/2ff39ddf.js","static/core/82dfd28b.js","static/core/d3ae23fa.js","dayjs"],function(l,_,b){const A=l("./2ff39ddf.js"),t=l("./82dfd28b.js"),i=l("./d3ae23fa.js");let r=l("dayjs");r=A.__toESM(r);var d=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],E=[i.GMAIL_ANNOTATION_TYPES.PRODUCT_CAROUSEL,i.GMAIL_ANNOTATION_TYPES.SINGLE_IMAGE_PREVIEW],c=n=>n;function f(n){const e=t.openDocument(n)?.get().attributes.utm_parameters;return Object.fromEntries(d.map(a=>[a,e?.[a]??""]))}function T(n,e){return n.map((a,o)=>({id:e?.cards?.[o]?.id??"",image:a.image??"",url:a.url??"",headline:a.headline??"",price:a.price??"",priceCurrency:a.priceCurrency??"",discountPercent:a.discountPercent??""}))}function O(n){return{"document.getUtm":()=>t.emailOnlyRefusal(n,"UTM marks")??t.featureRefusal(n,"utm_editor","UTM marks")??f(n),"document.setUtm":({params:e})=>{const a=t.emailOnlyRefusal(n,"UTM marks")??t.featureRefusal(n,"utm_editor","UTM marks");if(a)return a;if(t.isReadOnly(n))return t.readOnlyError();const o=Object.keys(e).filter(u=>!d.includes(u));if(o.length)return t.err("invalidArgs",`Unknown UTM marks: ${o.join(", ")}. Allowed: ${d.join(", ")}.`);const s={...f(n),...e};return t.writeEmailAttributes(t.openDocument(n),{utm_parameters:s}),t.ok(s)},"document.setAnnotations":e=>{const a=t.emailOnlyRefusal(n,"Gmail annotations");if(a)return a;if(t.isReadOnly(n))return t.readOnlyError();const o=t.openDocument(n),s=["availabilityStarts","availabilityEnds"].find(y=>e[y]!==void 0&&!(0,r.default)(e[y]).isValid());if(s)return t.err("invalidArgs",`"${s}" must be an ISO 8601 date, for example 2026-12-31T00:00:00Z.`);if(!o)return t.noDocument();const u=T(e.cards??[],i.parseGmailAnnotations(o.getContent())),m=i.buildAnnotationsData({annotationType:e.annotationType,annotationLogo:e.logo,description:e.description,discountCode:e.discountCode,availabilityStarts:e.availabilityStarts?(0,r.default)(e.availabilityStarts):null,availabilityEnds:e.availabilityEnds?(0,r.default)(e.availabilityEnds):null,offerPageUrl:e.offerPageUrl,merchantHomepageUrl:e.merchantHomepageUrl,cards:u}),p=[...i.getAnnotationsApplyBlockers(m,c),...E.includes(e.annotationType)?i.getDiscountPercentBlockers(u,c):[]];return p.length||!i.canApplyGmailAnnotations(m)?t.err("invalidArgs",`The annotations cannot be applied: ${p.join("; ")||"required fields are empty"}.`):t.ok({changed:i.applyAnnotationsEditToDocument(o,m)})},"document.removeAnnotations":()=>{const e=t.emailOnlyRefusal(n,"Gmail annotations"),a=t.openDocument(n);return e||(t.isReadOnly(n)?t.readOnlyError():t.ok({changed:a?i.removeAnnotationsFromDocument(a):!1}))}}}_.agentFinishHandlers=O});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__useblocks__.define("static/core/
|
|
1
|
+
__useblocks__.define("static/core/e6bcae1a.js",["require","exports","module","static/core/82dfd28b.js"],function(d,i,g){const r=d("./82dfd28b.js");function l(t){return t?Date.parse(t):NaN}function f(t){return r.isBlocksV2Enabled()&&t.id!=null&&r.isBlockAutosaveInFlight(String(t.id))}function s(t,e){if(!r.isBlocksV2Enabled()||e.id==null)return e.html;const n=String(e.id);if(r.isBlockAutosaveInFlight(n))return;const u=r.blocksApi.endpoints.getBlock.select(n)(t());if(u.data?.html===void 0)return e.html;const c=l(e.modified);return Number.isNaN(c)||l(u.data.modified)>c?u.data.html:e.html}async function a(t,e){return await new Promise(n=>r.whenBlockAutosaveSettledWithin(String(e.id),r.getSaveTimeoutMs(),n))?s(t,e):void 0}var o=new Set;function m(t,e){const n=String(e.id);return o.has(n)?null:(o.add(n),a(t,e).finally(()=>o.delete(n)))}Object.defineProperty(i,"blockHtmlForInsert",{enumerable:!0,get:function(){return a}}),Object.defineProperty(i,"blockHtmlForInsertOnce",{enumerable:!0,get:function(){return m}}),Object.defineProperty(i,"freshBlockHtml",{enumerable:!0,get:function(){return s}}),Object.defineProperty(i,"waitsForWrite",{enumerable:!0,get:function(){return f}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__useblocks__.define("static/core/
|
|
1
|
+
__useblocks__.define("static/core/e955189e.js",["require","exports","module","static/core/2ff39ddf.js","static/core/82dfd28b.js","vite/preload-helper"],function(a,g,z){const j=a("./2ff39ddf.js"),t=a("./82dfd28b.js");let f=a("vite/preload-helper");var h=3e3,S=/\.(woff2?|ttf|otf|eot)(\?|$)/i;function b(e){if(S.test(e.name))return"font";switch(e.initiatorType){case"script":return"script";case"link":case"css":return"style";case"fetch":case"xmlhttprequest":return"fetch";case"img":case"image":return"image";default:return"other"}}function _(e){return e.decodedBodySize===0&&e.transferSize===0?{transferred:null,fromCache:null}:{transferred:e.transferSize,fromCache:e.transferSize===0}}function d(e,r){return{name:e.name,kind:b(e),startedAt:t.toAbsolute(e.startTime,r),finishedAt:t.toAbsolute(e.responseEnd,r),..._(e)}}function y(e){if(!t.isDiagnosticsEnabled()||typeof PerformanceObserver>"u")return null;performance.setResourceTimingBufferSize(h);const{timeOrigin:r}=performance,n=new PerformanceObserver(s=>{s.getEntries().forEach(i=>{e(d(i,r))})});return n.observe({type:"resource",buffered:!0}),()=>n.disconnect()}var k="__emmDiagnostics__";function p(e){return typeof e=="object"&&e!==null}function o(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function R(e){if(!p(e))return null;const r=o(e.startTime),n=o(e.responseEnd),s=o(e.transferSize),i=o(e.decodedBodySize);return typeof e.name!="string"||typeof e.initiatorType!="string"||r===null||n===null||s===null||i===null?null:{name:e.name,initiatorType:e.initiatorType,startTime:r,responseEnd:n,transferSize:s,decodedBodySize:i}}function D(e){if(!p(e)||e.mark!=="__emmDiagnostics__")return null;if(e.type==="paint"||e.type==="settled"){const r=o(e.at);return r===null?null:{type:e.type,at:r}}if(e.type==="resources"){const r=o(e.timeOrigin);return r===null||!Array.isArray(e.items)?null:{type:"resources",records:e.items.map(R).filter(n=>n!==null).map(n=>d(n,r))}}return null}var c=null,m=null,u=!1,l=!1;function E(){return c?!0:(c=y(e=>t.getDiagnosticsStore().resources.push(e)),c!==null)}function w(){if(m!==null)return!0;if(!t.isDiagnosticsEnabled()||typeof window>"u")return!1;const e=r=>{const n=D(r.data);if(!n)return;const s=t.getDiagnosticsStore();if(n.type==="paint"){u||(u=!0,s.marks.push({phase:t.PHASES.canvasPainted,at:n.at}));return}if(n.type==="settled"){l||(l=!0,s.marks.push({phase:t.PHASES.canvasSettled,at:n.at}));return}n.records.forEach(i=>s.resources.push(i))};return window.addEventListener("message",e),m=()=>window.removeEventListener("message",e),!0}function v(){t.clearDiagnostics(),u=!1,l=!1}async function P(){if(!t.isDiagnosticsEnabled()||typeof window>"u")return!1;const{buildReportPayload:e,renderReportHtml:r}=await(0,f.__vitePreload)(async()=>{const{buildReportPayload:i,renderReportHtml:O}=await Promise.resolve().then(()=>a("./1d3606c0.js"));return{buildReportPayload:i,renderReportHtml:O}},void 0,{}.url),n=r(e(t.getDiagnosticsSnapshot(),t.getResourcesSnapshot())),s=window.open("","_blank");return s?(s.document.open(),s.document.write(n),s.document.close(),!0):!1}async function T(){const{buildReportPayload:e}=await(0,f.__vitePreload)(async()=>{const{buildReportPayload:r}=await Promise.resolve().then(()=>a("./1d3606c0.js"));return{buildReportPayload:r}},void 0,{}.url);return e(t.getDiagnosticsSnapshot(),t.getResourcesSnapshot())}function A(){if(!t.isDiagnosticsEnabled())return!1;t.drainLoaderMarks(),E(),w();const e=t.getBrandNamespace();return e?(e.diagnostics={snapshot:t.getDiagnosticsSnapshot,resources:t.getResourcesSnapshot,report:P,export:T,clear:v},!0):!1}g.installDiagnostics=A});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__useblocks__.define("static/core/
|
|
1
|
+
__useblocks__.define("static/core/ebf996e0.js",["require","exports","module","static/core/2ff39ddf.js","static/core/82dfd28b.js"],function(n,u,P){const x=n("./2ff39ddf.js"),p=n("./82dfd28b.js");var b={items_per_page:"/ сторінці",jump_to:"Перейти",jump_to_confirm:"підтвердити",page:"",prev_page:"Попередня сторінка",next_page:"Наступна сторінка",prev_5:"Попередні 5 сторінок",next_5:"Наступні 5 сторінок",prev_3:"Попередні 3 сторінки",next_3:"Наступні 3 сторінки",page_size:"Page Size"};function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(r)}function i(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(v){return Object.getOwnPropertyDescriptor(r,v).enumerable})),t.push.apply(t,a)}return t}function c(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?i(Object(t),!0).forEach(function(a){d(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function d(r,e,t){return e=f(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function f(r){var e=y(r,"string");return o(e)=="symbol"?e:String(e)}function y(r,e){if(o(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e||"default");if(o(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var g=c(c({},p.commonLocale),{},{locale:"uk_UA",today:"Сьогодні",now:"Зараз",backToToday:"Поточна дата",ok:"OK",clear:"Очистити",week:"Тиждень",month:"Місяць",year:"Рік",timeSelect:"Обрати час",dateSelect:"Обрати дату",monthSelect:"Обрати місяць",yearSelect:"Обрати рік",decadeSelect:"Обрати десятиріччя",previousMonth:"Попередній місяць (PageUp)",nextMonth:"Наступний місяць (PageDown)",previousYear:"Попередній рік (Control + left)",nextYear:"Наступний рік (Control + right)",previousDecade:"Попереднє десятиріччя",nextDecade:"Наступне десятиріччя",previousCentury:"Попереднє століття",nextCentury:"Наступне століття"}),s={placeholder:"Оберіть час",rangePlaceholder:["Початковий час","Кінцевий час"]},m={lang:{placeholder:"Оберіть дату",yearPlaceholder:"Оберіть рік",quarterPlaceholder:"Оберіть квартал",monthPlaceholder:"Оберіть місяць",weekPlaceholder:"Оберіть тиждень",rangePlaceholder:["Початкова дата","Кінцева дата"],rangeYearPlaceholder:["Початковий рік","Кінцевий рік"],rangeMonthPlaceholder:["Початковий місяць","Кінцевий місяць"],rangeWeekPlaceholder:["Початковий тиждень","Кінцевий тиждень"],shortWeekDays:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],shortMonths:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],...g},timePickerLocale:{...s}},h=m,l="${label} не є типом ${type}",$={locale:"uk",Pagination:b,DatePicker:m,TimePicker:s,Calendar:h,global:{placeholder:"Будь ласка, оберіть",close:"Закрити",show:"Показати",hide:"Приховати"},Table:{filterTitle:"Фільтрувати",filterConfirm:"OK",filterReset:"Скинути",filterEmptyText:"Фільтри відсутні",filterCheckAll:"Обрати всі",filterSearchPlaceholder:"Пошук у фільтрах",emptyText:"Даних немає",selectAll:"Обрати всі на сторінці",selectInvert:"Інвертувати вибір",selectNone:"Очистити вибір",selectionAll:"Обрати всі",sortTitle:"Сортувати",expand:"Розгорнути рядок",collapse:"Згорнути рядок",triggerDesc:"Сортувати за спаданням",triggerAsc:"Сортувати за зростанням",cancelSort:"Відмінити сортування"},Tour:{Next:"Далі",Previous:"Назад",Finish:"Завершити"},Modal:{okText:"Гаразд",cancelText:"Скасувати",justOkText:"Гаразд"},Popconfirm:{okText:"Гаразд",cancelText:"Скасувати"},Transfer:{titles:["",""],searchPlaceholder:"Введіть текст для пошуку",itemUnit:"елем.",itemsUnit:"елем.",remove:"Видалити",selectCurrent:"Вибрати поточну сторінку",removeCurrent:"Скасувати вибір на сторінці",selectAll:"Вибрати всі дані",deselectAll:"Очистити вибір",removeAll:"Скасувати вибір",selectInvert:"Інвертувати поточну сторінку"},Upload:{uploading:"Завантаження ...",removeFile:"Видалити файл",uploadError:"Помилка завантаження",previewFile:"Попередній перегляд файлу",downloadFile:"Завантажити файл"},Empty:{description:"Даних немає"},Icon:{icon:"іконка"},Text:{edit:"Редагувати",copy:"Скопіювати",copied:"Скопійовано",expand:"Розширити"},Form:{optional:"(опціонально)",defaultValidateMessages:{default:"Помилка валідації для поля ${label}",required:"Будь ласка, заповніть ${label}",enum:"Лише одне зі значень [${enum}] доступне для ${label}",whitespace:"Значення у полі ${label} не може бути пробілом",date:{format:"Не валідний формат дати у ${label}",parse:"Значення ${label} не може бути приведене до дати",invalid:"Не валідна дата у ${label}"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label} має містити ${len} символів",min:"${label} має містити не менш, ніж ${min} символів",max:"${label} має містити не більш, ніж ${max} символів",range:"${label} має містити ${min}-${max} символів"},number:{len:"${label} має дорівнювати ${len}",min:"${label} має бути не менш, ніж ${min}",max:"${label} має бути не більш, ніж ${max}",range:"${label} має бути в межах ${min}-${max}"},array:{len:"${label} має містити ${len} елементи",min:"${label} має містити не менш, ніж ${min} елементи",max:"${label} має містити не більш, ніж ${max} елементи",range:"Кількість елементів в ${label} має бути в межах ${min}-${max}"},pattern:{mismatch:"${label} не відповідає шаблону ${pattern}"}}},QRCode:{expired:"QR-код закінчився",refresh:"Оновити"}};u.default=$});
|