!function(){"use strict";var e,t={7005:function(e,t,r){var o=r(1609),n=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,c={},l=null,u=null;for(o in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,o)&&!s.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:i.current}}t.jsx=c,t.jsxs=c},9255:function(e,t,r){e.exports=r(7005)},7167:function(e,t,r){var o=window.wp.blocks,n=window.wp.primitives,a=r(9255),i=(0,a.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(n.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,a.jsx)(n.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})]});function s(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=s(e[t]))&&(o&&(o+=" "),o+=r);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}var c=function(){for(var e,t,r=0,o="";r<arguments.length;)(e=arguments[r++])&&(t=s(e))&&(o&&(o+=" "),o+=t);return o},l=window.wp.date,u=window.wp.blockEditor,f=window.wp.i18n,p=window.wp.element,m=window.wp.data,d=window.wp.coreData,w=window.wp.components,v=(window.wp.htmlEntities,window.wp.compose),_=JSON.parse('{"UU":"surecart/product-review-date"}');(0,o.registerBlockType)(_.UU,{icon:i,edit:e=>{let{attributes:{datetime:t,textAlign:r,format:o,metadata:n},setAttributes:a}=e;const i=(0,u.useBlockProps)({className:c({[`has-text-align-${r}`]:r})}),s=(0,v.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},[_,h]=(0,p.useState)(null),{__unstableMarkNextChangeAsNotPersistent:y}=((0,p.useMemo)((()=>({anchor:_})),[_]),(0,m.useDispatch)(u.store));(0,p.useEffect)((()=>{void 0===t&&(y(),a({datetime:new Date}))}),[t]);const b=(0,l.getSettings)(),g="sc_product",{siteFormat:x=b.formats.date}=(0,m.useSelect)((e=>{const{getPostType:t,getEntityRecord:r}=e(d.store),o=r("root","site");return{siteFormat:o?.date_format,siteTimeFormat:o?.time_format,postType:g?t(g):null}}),[g]);let O=React.createElement("time",{dateTime:(0,l.dateI18n)("c",t),ref:h},"human-diff"===o?(0,l.humanTimeDiff)(t):(0,l.dateI18n)(o||x,t));return React.createElement(React.Fragment,null,React.createElement(u.InspectorControls,null,React.createElement(w.__experimentalToolsPanel,{label:(0,f.__)("Settings","surecart"),resetAll:()=>{a({datetime:void 0,format:void 0})},dropdownMenuProps:s},React.createElement(w.__experimentalToolsPanelItem,{hasValue:()=>!!o,label:(0,f.__)("Date Format","surecart"),onDeselect:()=>a({format:void 0}),isShownByDefault:!0},React.createElement(u.__experimentalDateFormatPicker,{format:o,defaultFormat:x,onChange:e=>a({format:e})})))),React.createElement("div",i,O))}})},1609:function(e){e.exports=window.React}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=function(t,r,n,a){if(!r){var i=1/0;for(u=0;u<e.length;u++){r=e[u][0],n=e[u][1],a=e[u][2];for(var s=!0,c=0;c<r.length;c++)(!1&a||i>=a)&&Object.keys(o.O).every((function(e){return o.O[e](r[c])}))?r.splice(c--,1):(s=!1,a<i&&(i=a));if(s){e.splice(u--,1);var l=n();void 0!==l&&(t=l)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[r,n,a]},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={6802:0,3382:0};o.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,a,i=r[0],s=r[1],c=r[2],l=0;if(i.some((function(t){return 0!==e[t]}))){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);if(c)var u=c(o)}for(t&&t(r);l<i.length;l++)a=i[l],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(u)},r=self.webpackChunk_surecart_blocks_next=self.webpackChunk_surecart_blocks_next||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var n=o.O(void 0,[3382],(function(){return o(7167)}));n=o.O(n)}();