PageSourceSearch

https://wendyvandijk.nl/modules/Pages/js/socialProof.js?v=1790085629675

js wendyvandijk.nl collected 2026-09-25 10:24:25 UTC 25,576 bytes, 1 lines download raw bytes

1import{T as oe,c as le,m as fe}from"./mount-on-element.js";import{l as $,u as ue}from"./index2.js";import{F as q}from"./index.es.js";import{q as he}from"./index3.js";import{b as ce}from"./index4.js";import{a as de}from"./index6.js";import{r as G,e as T,Q as ge,d as pe,k as me,o as d,c as g,g as V,w as be,u as l,n as U,b as c,F as Z,t as p,K as X,i as H,j as _e}from"./runtime-core.esm-bundler.js";import{u as ve}from"./use-builder-provider.js";import"./index.js";function P(e){"@babel/helpers - typeof";return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(e)}var ye=/^\s+/,xe=/\s+$/;function s(e,t){if(e=e||"",t=t||{},e instanceof s)return e;if(!(this instanceof s))return new s(e,t);var r=ke(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}s.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,a,i,n,o,f;return r=t.r/255,a=t.g/255,i=t.b/255,r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),i<=.03928?f=i/12.92:f=Math.pow((i+.055)/1.055,2.4),.2126*n+.7152*o+.0722*f},setAlpha:function(t){return this._a=ie(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=K(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=K(this._r,this._g,this._b),r=Math.round(t.h*360),a=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+a+"%, "+i+"%)":"hsva("+r+", "+a+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=J(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=J(this._r,this._g,this._b),r=Math.round(t.h*360),a=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+a+"%, "+i+"%)":"hsla("+r+", "+a+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return Q(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return we(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(u(this._r,255)*100)+"%",g:Math.round(u(this._g,255)*100)+"%",b:Math.round(u(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(u(this._r,255)*100)+"%, "+Math.round(u(this._g,255)*100)+"%, "+Math.round(u(this._b,255)*100)+"%)":"rgba("+Math.round(u(this._r,255)*100)+"%, "+Math.round(u(this._g,255)*100)+"%, "+Math.round(u(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Be[Q(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+W(this._r,this._g,this._b,this._a),a=r,i=this._gradientType?"GradientType = 1, ":"";if(t){var n=s(t);a="#"+W(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+r+",endColorstr="+a+")"},toString:function(t){var r=!!t;t=t||this._format;var a=!1,i=this._a<1&&this._a>=0,n=!r&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return n?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(a=this.toRgbString()),t==="prgb"&&(a=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(a=this.toHexString()),t==="hex3"&&(a=this.toHexString(!0)),t==="hex4"&&(a=this.toHex8String(!0)),t==="hex8"&&(a=this.toHex8String()),t==="name"&&(a=this.toName()),t==="hsl"&&(a=this.toHslString()),t==="hsv"&&(a=this.toHsvString()),a||this.toHexString())},clone:function(){return s(this.toString())}
1,_applyModification:function(t,r){var a=t.apply(null,[this].concat([].slice.call(r)));return this._r=a._r,this._g=a._g,this._b=a._b,this.setAlpha(a._a),this},lighten:function(){return this._applyModification(Te,arguments)},brighten:function(){return this._applyModification(Fe,arguments)},darken:function(){return this._applyModification(Ie,arguments)},desaturate:function(){return this._applyModification(Se,arguments)},saturate:function(){return this._applyModification(He,arguments)},greyscale:function(){return this._applyModification(Re,arguments)},spin:function(){return this._applyModification(Pe,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Ne,arguments)},complement:function(){return this._applyCombination(Le,arguments)},monochromatic:function(){return this._applyCombination(Oe,arguments)},splitcomplement:function(){return this._applyCombination(Ee,arguments)},triad:function(){return this._applyCombination(Y,[3])},tetrad:function(){return this._applyCombination(Y,[4])}};s.fromRatio=function(e,t){if(P(e)=="object"){var r={};for(var a in e)e.hasOwnProperty(a)&&(a==="a"?r[a]=e[a]:r[a]=R(e[a]));e=r}return s(e,t)};function ke(e){var t={r:0,g:0,b:0},r=1,a=null,i=null,n=null,o=!1,f=!1;return typeof e=="string"&&(e=je(e)),P(e)=="object"&&(C(e.r)&&C(e.g)&&C(e.b)?(t=Me(e.r,e.g,e.b),o=!0,f=String(e.r).substr(-1)==="%"?"prgb":"rgb"):C(e.h)&&C(e.s)&&C(e.v)?(a=R(e.s),i=R(e.v),t=Ae(e.h,a,i),o=!0,f="hsv"):C(e.h)&&C(e.s)&&C(e.l)&&(a=R(e.s),n=R(e.l),t=Ce(e.h,a,n),o=!0,f="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=ie(r),{ok:o,format:e.format||f,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function Me(e,t,r){return{r:u(e,255)*255,g:u(t,255)*255,b:u(r,255)*255}}function J(e,t,r){e=u(e,255),t=u(t,255),r=u(r,255);var a=Math.max(e,t,r),i=Math.min(e,t,r),n,o,f=(a+i)/2;if(a==i)n=o=0;else{var h=a-i;switch(o=f>.5?h/(2-a-i):h/(a+i),a){case e:n=(t-r)/h+(t<r?6:0);break;case t:n=(r-e)/h+2;break;case r:n=(e-t)/h+4;break}n/=6}return{h:n,s:o,l:f}}function Ce(e,t,r){var a,i,n;e=u(e,360),t=u(t,100),r=u(r,100);function o(b,m,_){return _<0&&(_+=1),_>1&&(_-=1),_<1/6?b+(m-b)*6*_:_<1/2?m:_<2/3?b+(m-b)*(2/3-_)*6:b}if(t===0)a=i=n=r;else{var f=r<.5?r*(1+t):r+t-r*t,h=2*r-f;a=o(h,f,e+1/3),i=o(h,f,e),n=o(h,f,e-1/3)}return{r:a*255,g:i*255,b:n*255}}function K(e,t,r){e=u(e,255),t=u(t,255),r=u(r,255);var a=Math.max(e,t,r),i=Math.min(e,t,r),n,o,f=a,h=a-i;if(o=a===0?0:h/a,a==i)n=0;else{switch(a){case e:n=(t-r)/h+(t<r?6:0);break;case t:n=(r-e)/h+2;break;case r:n=(e-t)/h+4;break}n/=6}return{h:n,s:o,v:f}}function Ae(e,t,r){e=u(e,360)*6,t=u(t,100),r=u(r,100);var a=Math.floor(e),i=e-a,n=r*(1-t),o=r*(1-i*t),f=r*(1-(1-i)*t),h=a%6,b=[r,o,n,n,f,r][h],m=[f,r,r,o,n,n][h],_=[n,n,f,r,r,o][h];return{r:b*255,g:m*255,b:_*255}}function Q(e,t,r,a){var i=[M(Math.round(e).toString(16)),M(Math.round(t).toString(16)),M(Math.round(r).toString(16))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function we(e,t,r,a,i){var n=[M(Math.round(e).toString(16)),M(Math.round(t).toString(16)),M(Math.round(r).toString(16)),M(se(a))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)&&n[3].charAt(0)==n[3].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)+n[3].charAt(0):n.join("")}function W(e,t,r,a){var i=[M(se(a)),M(Math.round(e).toString(16)),M(Math.round(t).toString(16)),M(Math.round(r).toString(16))];return i.join("")}s.equals=function(e,t){return!e||!t?!1:s(e).toRgbString()==s(t).toRgbString()};s.random=function(){return s.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Se(e,t){t=t===0?0:t||10;var r=s(e).toHsl();return r.s-=t/100,r.s=E(r.s),s(r)}function He(e,t){t=t===0?0:t||10;var r=s(e).toHsl();return r.s+=t/100,r.s=E(r.s),s(r)}function Re(e){return s(e).desaturate(100)}function Te(e,t){t=t===0?0:t||10;var r=s(e).toHsl();return r.l+=t/100,r.l=E(r.l),s(r)}function Fe(e,t){t=t===0?0:t||10;var r=s(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),s(r)}function Ie(e,t){t=t===0?0:t||10;var r=s(e).toHsl();return r.l-=t/100,r.l=E(r.l),s(r)}function Pe(e,t){var r=s(e).toHsl(),a=(r.h+t)%360;return r.h=a<0?360+a:a,s(r)}function Le(e){var t=s(e).toHsl();return t.h=(t.h+180)%360,s(t)}function Y(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=s(e).toHsl(),a=[s(e)],i=360/t,n=1;n<t;n++)a.push(s({h:(r.h+n*i)%360,s:r.s,l:r.l}));return a}function Ee(e){var t=s(e).toHsl(),r=t.h;return[s(e),s({h:(r+72)%360,s:t.s,l:t.l}
1),s({h:(r+216)%360,s:t.s,l:t.l})]}function Ne(e,t,r){t=t||6,r=r||30;var a=s(e).toHsl(),i=360/r,n=[s(e)];for(a.h=(a.h-(i*t>>1)+720)%360;--t;)a.h=(a.h+i)%360,n.push(s(a));return n}function Oe(e,t){t=t||6;for(var r=s(e).toHsv(),a=r.h,i=r.s,n=r.v,o=[],f=1/t;t--;)o.push(s({h:a,s:i,v:n})),n=(n+f)%1;return o}s.mix=function(e,t,r){r=r===0?0:r||50;var a=s(e).toRgb(),i=s(t).toRgb(),n=r/100,o={r:(i.r-a.r)*n+a.r,g:(i.g-a.g)*n+a.g,b:(i.b-a.b)*n+a.b,a:(i.a-a.a)*n+a.a};return s(o)};s.readability=function(e,t){var r=s(e),a=s(t);return(Math.max(r.getLuminance(),a.getLuminance())+.05)/(Math.min(r.getLuminance(),a.getLuminance())+.05)};s.isReadable=function(e,t,r){var a=s.readability(e,t),i,n;switch(n=!1,i=Ge(r),i.level+i.size){case"AAsmall":case"AAAlarge":n=a>=4.5;break;case"AAlarge":n=a>=3;break;case"AAAsmall":n=a>=7;break}return n};s.mostReadable=function(e,t,r){var a=null,i=0,n,o,f,h;r=r||{},o=r.includeFallbackColors,f=r.level,h=r.size;for(var b=0;b<t.length;b++)n=s.readability(e,t[b]),n>i&&(i=n,a=s(t[b]));return s.isReadable(e,a,{level:f,size:h})||!o?a:(r.includeFallbackColors=!1,s.mostReadable(e,["#fff","#000"],r))};var j=s.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
10",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Be=s.hexNames=Ve(j);function Ve(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function ie(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function u(e,t){ze(e)&&(e="100%");var r=De(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function E(e){return Math.min(1,Math.max(0,e))}function v(e){return parseInt(e,16)}function ze(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function De(e){return typeof e=="string"&&e.indexOf("%")!=-1}function M(e){return e.length==1?"0"+e:""+e}function R(e){return e<=1&&(e=e*100+"%"),e}function se(e){return Math.round(parseFloat(e)*255).toString(16)}function ee(e){return v(e)/255}var x=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"
1+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function C(e){return!!x.CSS_UNIT.exec(e)}function je(e){e=e.replace(ye,"").replace(xe,"").toLowerCase();var t=!1;if(j[e])e=j[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=x.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=x.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=x.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=x.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=x.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=x.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=x.hex8.exec(e))?{r:v(r[1]),g:v(r[2]),b:v(r[3]),a:ee(r[4]),format:t?"name":"hex8"}:(r=x.hex6.exec(e))?{r:v(r[1]),g:v(r[2]),b:v(r[3]),format:t?"name":"hex"}:(r=x.hex4.exec(e))?{r:v(r[1]+""+r[1]),g:v(r[2]+""+r[2]),b:v(r[3]+""+r[3]),a:ee(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=x.hex3.exec(e))?{r:v(r[1]+""+r[1]),g:v(r[2]+""+r[2]),b:v(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function Ge(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}const k=G(null),A=G(null),L=G(!1),$e=12e3,qe=5e3;let z=0,F=null;const te=T(()=>{if(!k.value||k.value?.length<3)return k.value||[];const e=k.value.filter(a=>a.type==="recent_orders"),t=k.value.find(a=>a.type==="streaks");return t?e.reduce((a,i,n,o)=>(a.push(i),(o.length===1||o.length===2&&n===1||o.length>2&&n%2===1&&n<o.length-1)&&a.push(t),a),[]):k.value}),Ue=T(()=>{if(A.value?.type!=="recent_orders")return;const e=Date.parse(A.value.date);if(isNaN(e))return{amount:1,unit:"minutes"};const t=Math.floor((Date.now()-e)/1e3);return t<60?{amount:1,unit:"minutes"}:t<3600?{amount:Math.floor(t/60),unit:"minutes"}:t<86400?{amount:Math.floor(t/3600),unit:"hours"}:t<604800?{amount:Math.floor(t/86400),unit:"days"}:t<2592e3?{amount:Math.floor(t/604800),unit:"weeks"}:t<31536e3?{amount:Math.floor(t/2592e3),unit:"months"}:{amount:Math.floor(t/31536e3),unit:"years"}});function Ze(e,t){return`/social-proof/index?social_proofable_type=${t}&social_proofable_id=${e}`}async function Xe(e,t){const r=await de(Ze(e,t),{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).json();k.value=r.data?.value.data,k.value=k.value.filter(a=>a.type!=="streaks"||a.count>1),k.value.length>0&&(F&&clearInterval(F),re(),F=setInterval(re,$e))}function re(){L.value=!1,setTimeout(()=>{A.value=te.value[z],(A.value?.type==="recent_orders"||A.value?.type==="streaks"&&A.value.count)&&(L.value=!0),z=(z+1)%te.value.length},qe)}function Je(){F&&clearInterval(F),L.value=!1}function Ke(e,t){return k.value===null&&Xe(e,t),{currentOrder:A,timeAgo:Ue,isVisible:ge(L),stop:Je}}const Qe={id:"social-proof-app-container","data-reactive":"true"},We=["src"],Ye={key:1,width:"32",height:"32",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},et=c("path",{d:"M1.5 4C0.66875 4 0 4.66875 0 5.5C0 6.33125 0.66875 7 1.5 7H4.75625L8.525 26.7812C8.6625 27.4875 9.28125 28 10 28H20.0438C20.0125 27.6688 20 27.3375 20 27C20 26.3188 20.0625 25.65 20.1812 25H11.2437L10.675 22H21.2C21.775 20.875 22.5375 19.8625 23.45 19H10.1L8.19375 9H32.5375L30.5688 16.0063C30.7125 16 30.8563 16 31 16C31.8937 16 32.7687 16.1062 33.6 16.3062L35.7875 8.5375C36.1437 7.26875 35.1875 6 33.8625 6H7.625L7.475 5.21875C7.3375 4.5125 6.71875 4 6 4H1.5ZM11 36C11.7956 36 12.5587 35.6839 13.1213 35.1213C13.6839 34.5587 14 33.7956 14 33C14 32.2044 13.6839 31.4413 13.1213 30.8787C12.5587 30.3161 11.7956 30 11 30C10.2044 30 9.44129 30.3161 8.87868 30.8787C8.31607 31.4413 8 32.2044 8 33C8 33.7956 8.31607 34.5587 8.87868 35.1213C9.44129 35.6839 10.2044 36 11 36ZM40 27C40 24.6131 39.0518 22.3239 37.364 20.636C35.6761 18.9482 33.3869 18 31 18C28.6131 18 26.3239 18.9482 24.636 20.636C22.9482 22.3239 22 24.6131 22 27C22 29.3869 22.9482 31.6761 24.636 33.364C26.3239 35.0518 28.6131 36 31 36C33.3869 36 35.6761 35.0518 37.364 33.364C39.0518 31.6761 40 29.3869 40 27ZM33.7938 24.2938C34.1813 23.9062 34.8187 23.9062 35.2062 24.2938C35.5938 24.6813 35.5938 25.3187 35.2062 25.7062L30.7062 30.2062C30.3187 30.5938 29.6813 30.5938 29.2938 30.2062L26.7938 27.7062C26.4062 27.3187 26.4062 26.6813 26.7938 26.2938C27.1813 25.9062 27.8187 25.9062 28.2062 26.2938L30 28.0875L33.7938 24.2938Z",fill:"#2563EB"},null,-1),tt=[et],rt=c("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M5.52656 8.72344C3.90938 10.3406 3 12.5344 3 14.8219V15.3609C3 20.1328 6.86719 24 11.6391 24H12.3469C17.1281 24 21 20.1281 21 15.3469C21 12.2484 19.7297 9.29063 17.4891 7.15313L13.8234 3.66562C13.3781 3.23906 13.125 2.65313 13.125 2.03438V1.74844V0.998437C13.125 0.45 12.675 0 12.1266 0C11.8125 0 11.5172 0.15 11.325 0.398438L10.875 0.998437L10.4109 1.61719C9.73594 2.52187 9.32344 3.59531 9.22969 4.72031L9.1875 5.22656C9.17344 5.40938 9.16406 5.59219 9.16875 5.775C9.17813 6.84844 9.47813 7.90312 10.0312 8.82187C10.1344 8.99531 10.2469 9.15938 10.3687 9.31875L10.875 9.99844L11.8687 11.325C12.1969 11.7609 12.375 12.2953 12.375 12.8438V13.5C12.375 14.5359 11.5359 15.375 10.5 15.375C9.46406 15.375 8.625 14.5359 8.625 13.5V10.7484V10.6313V8.82656C8.625 8.09531 8.02969 7.5 7.29844 7.5C7.2375 7.5 7.17656 7.50469 7.11563 7.51406C6.83438 7.55156 6.56719 7.68281 6.36094 7.88906L5.52656 8.72344ZM6.375 11.2078V13.5C6.375 15.7781 8.22188 17.625 10.5 17.625C12.7781 17.625 14.625 15.7781 14.625 13.5V12.8438C14.625 11.8078 14.2875 10.8047 13.6688 9.975L12.1688 7.97344C11.6156 7.2375 11.3531 6.32812 11.4328 5.41406L11.475 4.90781C11.4891 4.73906 11.5125 4.57031 11.55 4.40625C11.7516 4.72969 11.9906 5.02969 12.2719 5.29219L15.9375 8.78437C17.7328 10.4953 18.75 12.8672 18.75 15.3469C18.75 18.8859 15.8859 21.75 12.3469 21.75H11.6391C8.10938 21.75 5.25 18.8906 5.25 15.3609V14.8219C5.25 13.5234 5.64844 12.2625 6.375 11.2031V11.2078Z",fill:"#DC2626"})],-1),at={class:"text-red-500 text-[0.875rem]"},nt={key:3,src:"https://via.placeholder.com/150",alt:"image",class:"w-full h-full object-cover rounded-lg"},it={class:"flex flex-col"},st={id:"title",class:"text-[0.875rem]"},ot={class:"font-bold"},lt={key:0,class:"ml-1"},ft={class:"font-bold"},ut={key:0},ht={id:"message",class:"text-[0.875rem]"},ct={key:0},dt={key:1},gt={key:1,id:"title",class:"text-[0.875rem]"},pt={class:"font-bold me-1"},mt={key:0,class:"font-bold me-1"},bt={key:1,class:"me-1"},_t={key:2},vt={key:3},yt={class:"text-[0.75rem] opacity-80 flex items-center gap-1 mt-1"},xt={class:"flex items-center gap-1 opacity-80"},kt={key:0,class:"first-letter:uppercase"},Mt={key:1},Ct=c("p",null,"•",-1),At={class:"flex items-center gap-1 text-blue-500"},wt=c("p",null,"Plug&Pay",-1),St=pe({__name:"SocialProof",props:{pageId:{},revisionId:{},socialProofSettings:{},theme:{}},setup(e){const t=ue,r=e,a=T(()=>s(r.theme.background_color).getBrightness()<128),{revisionId:i}=me(r),{currentOrder:n,isVisible:o,stop:f}=Ke(i.value,"page_revision");function h(y){const S=Math.floor((new Date().getTime()-y.getTime())/1e3),N=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}],I=new Intl.RelativeTimeFormat($.value,{numeric:"auto"});for(const O of N){const B=Math.floor(S/O.seconds);if(Math.abs(B)>=1)return I.format(-B,O.unit)}}function b(y){return new Intl.NumberFormat($.value).format(y)}const m=T(()=>({recentOrder:r.socialProofSettings.find(y=>y.type==="recent_orders"),streak:r.socialProofSettings.find(y=>y.type==="streaks")})),_=T(()=>{const y=r.theme.text_font_color;if(!y)return"var(--font-color)";const w=s(y),S=s("#ffffff"),N=s("#0f172a"),I=a.value?N:S;return s.isReadable(w,I,{level:"AA",size:"small"})?"var(--font-color)":s.mostReadable(I,["#000000","#ffffff"],{level:"AA",size:"small"}).toHexString()});return(y,w)=>(d(),g("div",Qe,[V(oe,null,{default:be(()=>[l(n)&&l(o)?(d(),g("div",{key:0,id:"social-proof",class:U([{dark:a.value},"fixed bottom-0 left-0 z-[70] max-w-[424px] w-full p-2 lg:p-4 pointer-events-none"])},[c("div",{class:"shadow-xl p-4 pe-10 border border-slate-200 dark:border-slate-700 flex rounded dark:rounded-lg gap-4 items-center relative w-full pointer-events-auto bg-white dark:bg-slate-900",style:_e({color:_.value})},[c("div",{class:U(["w-[86px] h-[86px] rounded-lg flex items-center justify-center gap-2 flex-col shrink-0",{"bg-red-100":l(n).type==="streaks","bg-blue-50":l(n).type==="recent_orders"&&!m.value.recentOrder?.image}])},[l(n).type==="recent_orders"&&m.value.recentOrder?.image?(d(),g("img",{key:0,src:m.value.recentOrder?.image,alt:"image",class:"max-w-full max-h-full rounded-lg"},null,8,We)):l(n).type==="recent_orders"?(d(),g("svg",Ye,tt)):l(n).type==="streaks"?(d(),g(Z,{key:2},[rt,c("p",at,p(b(l(n).count)),1)],64)):(d(),g("img",nt))],2),c("div",it,[l(n).type==="recent_orders"?(d(),g(Z,{key:0},[c("div",st,[c("p",null,[c("span",ot,p(m.value.recentOrder?.privacy?l(n).first_name?.at(0)?.padEnd(l(n).first_name.length,"*"):l(n).first_name),1),l(n).city||l(n).c
1ountry?(d(),g("span",lt,[X(p(l(t)("social_proof.recent_orders.from"))+" ",1),c("span",ft,[l(n).city?(d(),g("span",ut,p(l(n).city)+",",1)):H("",!0),X(" "+p(l(n).country),1)])])):H("",!0)])]),c("div",ht,[m.value.recentOrder?.message?(d(),g("p",ct,p(m.value.recentOrder?.message),1)):(d(),g("p",dt,p(l(t)("social_proof.recent_orders.default_message_start"))+" "+p(l(n).product_name)+" "+p(l(t)("social_proof.recent_orders.default_message_end")),1))])],64)):l(n).type==="streaks"?(d(),g("div",gt,[c("p",null,[c("span",pt,p(b(l(n).count)),1),m.value.streak?.target?(d(),g("span",mt,p(m.value.streak?.target),1)):(d(),g("span",bt,p(l(t)("social_proof.streaks.default_target")),1)),m.value.streak?.message?(d(),g("span",_t,p(m.value.streak?.message),1)):(d(),g("span",vt,p(l(t)("social_proof.streaks.message_start"))+" "+p(l(n).product_name)+" "+p(l(t)("social_proof.streaks.message_end")),1))])])):H("",!0),c("div",yt,[c("div",xt,[l(n).type==="recent_orders"?(d(),g("p",kt,p(h(new Date(l(n).date))),1)):l(n).type==="streaks"?(d(),g("p",Mt,p(l(t)(`social_proof.streaks.period.${m.value.streak?.period??"today"}`)),1)):H("",!0),Ct]),c("div",At,[V(l(q),{icon:l(ce)},null,8,["icon"]),wt])])]),c("button",{id:"close-button",class:"absolute top-3 end-3 mt-1 h-8 w-8 bg-slate-50 rounded flex items-center justify-center hover:bg-slate-100 dark:bg-slate-800 dark:hover:bg-slate-700",onClick:w[0]||(w[0]=(...S)=>l(f)&&l(f)(...S))},[V(l(q),{icon:l(he)},null,8,["icon"])])],4)],2)):H("",!0)]),_:1})]))}});function Ht(e,t){const r=le(St,{...t,ownInstance:!0,isClientSide:!0}),{provideBuilderState:a}=ve();return a(r,"client"),fe(r,e),r}function Rt(e){return Array.isArray(e.socialProofSettings)&&e.socialProofSettings.some(t=>t.enabled)}const ae=document.getElementById("social-proof-app-container"),ne=document.getElementById("social-proof-settings"),D=ne?JSON.parse(ne.innerHTML):void 0;ae&&D&&Rt(D)&&Ht(ae,D);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.