"use strict";const t=t=>{let{limitQuestions:a="1",mainWidgetAnimation:e=!1,offset:d=150,mobileOffset:i=150,excludeTags:r="",includeTags:o="",search:l="",linkify:s=!0}=t??{};return`
    <div id="stamped-main-widget"
      data-product-id="{{ product.id }}"
      data-name="{{ product.title | escape }}"
      data-url="{{ shop.url }}{{ product.url }}"
      data-image-url="{{ product.featured_image | product_img_url: "large" |replace: '?', '%3F' | replace: '&','%26'}}"
      data-description="{{ product.description | escape }}"
      data-product-sku="{{product.handle}}"
      data-product-type="{{product.type}}"
      data-offset="${d}"
      data-search="${l}"
      data-linkify="${s}"
      data-tags-include="${o}"
      data-tags-exclude="${r}"
      data-offset-mobile="${i}"
      data-take-questions="${a}"
      data-animation="${e}">
    </div>
  `},a=()=>`
  <span 
    class="stamped-product-reviews-badge" 
    data-id="{{ product.id }}"
    data-product-sku="{{ product.handle }}" 
    data-product-type="{{product.type}}" 
    data-product-title="{{product.title}}" 
    style="display:block;">
  </span>
  `,e=t=>{let{widgetType:a,carouselTitle:e="",autoSlide:d=!1,autoSlideInterval:i="",limitResults:r="",titleColor:o="",starColor:l="",textColor:s="",linkColor:$=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-take="${r}"
      data-title="${e}"
      data-auto-play="${d}"
      data-style-color-star="${l}"
      data-style-color-text="${s}"
      data-style-color-link="${$}"
      data-style-color-title="${o}"
      data-widget-type="${a}"
      data-auto-play-speed="${i}"
      ${u(t)}>
    </div>
  `},d=t=>{let{widgetType:a,showProductImage:e=!1,limitResults:d="",starColor:i="",verifiedColor:r="",textColor:o="",linkColor:l=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-take="${d}"
      data-widget-type="${a}"
      data-style-color-star="${i}"
      data-style-color-text="${o}"
      data-style-color-link="${l}"
      data-product-image="${e}"
      data-style-color-verified="${r}"
      ${u(t)}>
    </div>
  `},i=t=>{let{widgetType:a,visualGalleryType:e="feed",carouselHeight:d="",autoSlide:i=!1,autoSlideInterval:r="",starColor:o="",hoverColor:l="",hoverOpacity:s=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-auto-play="${i}"
      data-widget-type="${a}"
      data-height="${d}"
      data-feed-type="${e}"
      data-style-color-star="${o}"
      data-style-color-hover="${l}"
      data-auto-play-speed="${r}"
      data-style-color-hover-opacity="${s?.split("%")[0]}"
      ${u(t)}>
    </div>
  `},r=t=>{let{widgetType:a,starColor:e=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}"
      data-color-stars="${e}"
      ${u(t)}>
    </div>
  `},o=t=>{let{widgetType:a,siteBadgeType:e="badge",badgeOuterColor:d="",badgeInnerColor:i="",badgeRibbonColor:r="",textColor:o="",starColor:l="",siteBadgeText:s="",siteBadgeHeight:$="",siteBadgeTextSize:p=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}"
      data-badge-type="${e}"
      data-color-outer="${d}"
      data-color-inner="${i}"
      data-color-ribbon="${r}"
      data-color-text="${o}"
      data-color-stars="${l}"
      data-title="${s}"
      data-title-size="${p}"
      data-height="${$}"
      ${u(t)}>
    </div>
  `},l=t=>`
    <div id="stamped-reviews-widget"
      ${u(t)}>
    </div>
  `,s=t=>{let{widgetType:a,starColor:e="",linkColor:d=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}
      data-color-link="${d}"
      data-color-stars="${e}">
    </div>
  `},$=t=>{let{widgetType:a,instagramFeedType:e="",autoSlide:d=!1,autoSlideInterval:i="",carouselHeight:r="",limitResults:o="",hoverOpacity:l="",hoverColor:s=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}"
      data-feed-type="${e}"
      data-height="${r}"
      data-auto-play="${d}"
      data-auto-play-speed="${i}"
      data-color-hover="${s}"
      data-color-hover-opacity="${l}"
      data-take="${o}"
      ${u(t)}>
    </div>
  `},p=t=>{let{widgetType:a,productIds:e="",checkoutReviewsStyle:d="box",checkoutReviewsTitle:i="",timeAgo:r=!1,textColor:o="",linkColor:l=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}"
      data-product-ids="${e}"
      data-style="${d}"
      data-title="${i}"
      data-color-text="${o}"
      data-color-link="${l}"
      data-timeago="${r}">
    </div>
  `},c=t=>{let{publicKey:a="",storeHash:e="",productId:d="",imageWidth:i="",imageHeight:r=""}=t??{},o=`https://stamped.io/inc/image/badges.png?apikey=${a}&sId=${e}&productId=${d}`;return`<img src="${o}" width="${i}" height="${r}">`},g=t=>{let{widgetType:a,publicKey:e="",storeHash:d="",labelFront:i="",labelBack:r="",imageWidth:o="",imageHeight:l=""}=t??{},s=`https://stamped.io/inc/image/badges.png?apikey=${e}&sId=${d}&type=${{"badge-single":"badge1","badge-double":"badge2","badge-ribbon":"badge3"}[a]}&label1=${i}&label2=${r}`;return`<img src="${s}" width="${o}" height="${l}">`},u=t=>{let{reviewIds:a="",productIds:e="",productType:d="",productVendor:i="",tags:r="",limitWords:o="",minimumRating:l="",minimumCharacters:s="",fillEmpty:$=!1,random:p=!1,withPhotos:c=!1}=t??{};return`
    data-product-tags="${r}"
    data-fill-random="${p}"
    data-review-ids="${a}"
    data-fill-empty="${$}"
    data-with-photos="${c}"
    data-product-ids="${e}"
    data-limit-words="${o}"
    data-min-rating="${l}"
    data-min-length="${s}"
    data-product-brand="${i}"
    data-product-category="${d}"
  `};exports.getTemplateByWidget=u=>{let n={"main-widget":t(u),carousel:e(u),"full-page":d(u),"visual-gallery":i(u),"wall-photos":r(u),"site-badge":o(u),"badge-single":g(u),"badge-double":g(u),"badge-ribbon":g(u),"product-rating":c(u),"instagram-feed":$(u),"checkout-reviews":p(u),"single-highlight":l(u),"top-rated":s(u),"star-rating-badge":a()},y=u?.widgetType??"main-widget";return n[y]};
