@ecomplus/widget-martan 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/public/widget-martan.1.min.js +1 -1
  3. package/dist/public/widget-martan.1.min.js.map +1 -1
  4. package/dist/public/widget-martan.2.min.js +1 -1
  5. package/dist/public/widget-martan.2.min.js.map +1 -1
  6. package/dist/public/widget-martan.3.min.js +1 -1
  7. package/dist/public/widget-martan.3.min.js.map +1 -1
  8. package/dist/public/widget-martan.4.min.js +1 -1
  9. package/dist/public/widget-martan.4.min.js.map +1 -1
  10. package/dist/public/widget-martan.5.min.js +1 -1
  11. package/dist/public/widget-martan.5.min.js.map +1 -1
  12. package/dist/public/widget-martan.6.min.js +1 -1
  13. package/dist/public/widget-martan.6.min.js.map +1 -1
  14. package/dist/public/widget-martan.7.min.js +1 -1
  15. package/dist/public/widget-martan.7.min.js.map +1 -1
  16. package/dist/public/widget-martan.8.min.js +1 -1
  17. package/dist/public/widget-martan.8.min.js.map +1 -1
  18. package/dist/public/widget-martan.var.min.js +2 -2
  19. package/dist/public/widget-martan.var.min.js.map +1 -1
  20. package/dist/widget-martan.1.min.js +1 -1
  21. package/dist/widget-martan.1.min.js.map +1 -1
  22. package/dist/widget-martan.2.min.js +1 -1
  23. package/dist/widget-martan.2.min.js.map +1 -1
  24. package/dist/widget-martan.3.min.js +1 -1
  25. package/dist/widget-martan.3.min.js.map +1 -1
  26. package/dist/widget-martan.4.min.js +1 -1
  27. package/dist/widget-martan.4.min.js.map +1 -1
  28. package/dist/widget-martan.5.min.js +1 -1
  29. package/dist/widget-martan.5.min.js.map +1 -1
  30. package/dist/widget-martan.6.min.js +1 -1
  31. package/dist/widget-martan.6.min.js.map +1 -1
  32. package/dist/widget-martan.7.min.js +1 -1
  33. package/dist/widget-martan.7.min.js.map +1 -1
  34. package/dist/widget-martan.8.min.js +1 -1
  35. package/dist/widget-martan.8.min.js.map +1 -1
  36. package/dist/widget-martan.min.js +3 -3
  37. package/dist/widget-martan.min.js.map +1 -1
  38. package/package.json +2 -2
  39. package/src/widgets/reviews/components/VerifiedPurchase.vue +1 -1
  40. package/dist/public/widget-martan.0.min.js +0 -62
  41. package/dist/public/widget-martan.0.min.js.map +0 -1
  42. package/dist/public/widget-martan.9.min.js +0 -2
  43. package/dist/public/widget-martan.9.min.js.map +0 -1
  44. package/dist/widget-martan.0.min.js +0 -62
  45. package/dist/widget-martan.0.min.js.map +0 -1
  46. package/dist/widget-martan.9.min.js +0 -2
  47. package/dist/widget-martan.9.min.js.map +0 -1
@@ -1,11 +1,11 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("jquery/dist/jquery.slim"),require("@ecomplus/utils"),require("popper.js")):"function"==typeof define&&define.amd?define([,,,],e):"object"==typeof exports?exports.widgetMartan=e(require("vue"),require("jquery/dist/jquery.slim"),require("@ecomplus/utils"),require("popper.js")):t.widgetMartan=e(t.Vue,t.$,t.ecomUtils,t.Popper)}(window,(function(t,e,r,n){return function(t){function e(e){for(var r,i,o=e[0],s=e[1],a=0,u=[];a<o.length;a++)i=o[a],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&u.push(n[i][0]),n[i]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r]);for(c&&c(e);u.length;)u.shift()()}var r={},n={1:0};function i(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(t){var e=[],r=n[t];if(0!==r)if(r)e.push(r[2]);else{var o=new Promise((function(e,i){r=n[t]=[e,i]}));e.push(r[2]=o);var s,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(t){return i.p+"widget-martan."+({}[t]||t)+".min.js"}(t);var c=new Error;s=function(e){a.onerror=a.onload=null,clearTimeout(u);var r=n[t];if(0!==r){if(r){var i=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src;c.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",c.name="ChunkLoadError",c.type=i,c.request=o,r[1](c)}n[t]=void 0}};var u=setTimeout((function(){s({type:"timeout",target:a})}),12e4);a.onerror=a.onload=s,document.head.appendChild(a)}return Promise.all(e)},i.m=t,i.c=r,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/assets/vendor/",i.oe=function(t){throw console.error(t),t};var o=window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[],s=o.push.bind(o);o.push=e,o=o.slice();for(var a=0;a<o.length;a++)e(o[a]);var c=s;return i(i.s=25)}([function(t,e,r){"use strict";(function(t){var n=r(6);const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,s=(a=Object.create(null),t=>{const e=i.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const c=t=>(t=t.toLowerCase(),e=>s(e)===t),u=t=>e=>typeof e===t,{isArray:l}=Array,f=u("undefined");const h=c("ArrayBuffer");const d=u("string"),p=u("function"),g=u("number"),m=t=>null!==t&&"object"==typeof t,w=t=>{if("object"!==s(t))return!1;const e=o(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},v=c("Date"),y=c("File"),b=c("Blob"),_=c("FileList"),E=c("URLSearchParams");function R(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,i;if("object"!=typeof t&&(t=[t]),l(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,t[s],s,t)}}function x(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,i=r.length;for(;i-- >0;)if(n=r[i],e===n.toLowerCase())return n;return null}const S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:t,A=t=>!f(t)&&t!==S;const O=(C="undefined"!=typeof Uint8Array&&o(Uint8Array),t=>C&&t instanceof C);var C;const T=c("HTMLFormElement"),P=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),k=c("RegExp"),q=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};R(r,(r,i)=>{let o;!1!==(o=e(r,i,t))&&(n[i]=o||r)}),Object.defineProperties(t,n)},j="abcdefghijklmnopqrstuvwxyz",B={DIGIT:"0123456789",ALPHA:j,ALPHA_DIGIT:j+j.toUpperCase()+"0123456789"};const U=c("AsyncFunction");e.a={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&p(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||p(t.append)&&("formdata"===(e=s(t))||"object"===e&&p(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:d,isNumber:g,isBoolean:t=>!0===t||!1===t,isObject:m,isPlainObject:w,isUndefined:f,isDate:v,isFile:y,isBlob:b,isRegExp:k,isFunction:p,isStream:t=>m(t)&&p(t.pipe),isURLSearchParams:E,isTypedArray:O,isFileList:_,forEach:R,merge:function t(){const{caseless:e}=A(this)&&this||{},r={},n=(n,i)=>{const o=e&&x(r,i)||i;w(r[o])&&w(n)?r[o]=t(r[o],n):w(n)?r[o]=t({},n):l(n)?r[o]=n.slice():r[o]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&R(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:i}={})=>(R(e,(e,i)=>{r&&p(e)?t[i]=Object(n.a)(e,r):t[i]=e},{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let i,s,a;const c={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],n&&!n(a,t,e)||c[a]||(e[a]=t[a],c[a]=!0);t=!1!==r&&o(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:c,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!g(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:T,hasOwnProperty:P,hasOwnProp:P,reduceDescriptors:q,freezeMethods:t=>{q(t,(e,r)=>{if(p(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];p(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return l(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:x,global:S,isContextDefined:A,ALPHABET:B,generateString:(t=16,e=B.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&p(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(m(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const i=l(t)?[]:{};return R(t,(t,e)=>{const o=r(t,n+1);!f(o)&&(i[e]=o)}),e[n]=void 0,i}}return t};return r(t,0)},isAsyncFn:U,isThenable:t=>t&&(m(t)||p(t))&&p(t.then)&&p(t.catch)}}).call(this,r(12))},function(t,e,r){"use strict";var n=r(0);function i(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}n.a.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n.a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const o=i.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{s[t]={value:t}}),Object.defineProperties(i,s),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=(t,e,r,s,a,c)=>{const u=Object.create(o);return n.a.toFlatObject(t,u,(function(t){return t!==Error.prototype}),t=>"isAxiosError"!==t),i.call(u,t.message,e,r,s,a),u.cause=t,u.name=t.name,c&&Object.assign(u,c),u},e.a=i},function(t,e,r){"use strict";(function(t){var n=r(0),i=r(1),o=r(7);function s(t){return n.a.isPlainObject(t)||n.a.isArray(t)}function a(t){return n.a.endsWith(t,"[]")?t.slice(0,-2):t}function c(t,e,r){return t?t.concat(e).map((function(t,e){return t=a(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const u=n.a.toFlatObject(n.a,{},null,(function(t){return/^is[A-Z]/.test(t)}));e.a=function(e,r,l){if(!n.a.isObject(e))throw new TypeError("target must be an object");r=r||new(o.a||FormData);const f=(l=n.a.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!n.a.isUndefined(e[t])}))).metaTokens,h=l.visitor||w,d=l.dots,p=l.indexes,g=(l.Blob||"undefined"!=typeof Blob&&Blob)&&n.a.isSpecCompliantForm(r);if(!n.a.isFunction(h))throw new TypeError("visitor must be a function");function m(e){if(null===e)return"";if(n.a.isDate(e))return e.toISOString();if(!g&&n.a.isBlob(e))throw new i.a("Blob is not supported. Use a Buffer instead.");return n.a.isArrayBuffer(e)||n.a.isTypedArray(e)?g&&"function"==typeof Blob?new Blob([e]):t.from(e):e}function w(t,e,i){let o=t;if(t&&!i&&"object"==typeof t)if(n.a.endsWith(e,"{}"))e=f?e:e.slice(0,-2),t=JSON.stringify(t);else if(n.a.isArray(t)&&function(t){return n.a.isArray(t)&&!t.some(s)}(t)||(n.a.isFileList(t)||n.a.endsWith(e,"[]"))&&(o=n.a.toArray(t)))return e=a(e),o.forEach((function(t,i){!n.a.isUndefined(t)&&null!==t&&r.append(!0===p?c([e],i,d):null===p?e:e+"[]",m(t))})),!1;return!!s(t)||(r.append(c(i,e,d),m(t)),!1)}const v=[],y=Object.assign(u,{defaultVisitor:w,convertValue:m,isVisitable:s});if(!n.a.isObject(e))throw new TypeError("data must be an object");return function t(e,i){if(!n.a.isUndefined(e)){if(-1!==v.indexOf(e))throw Error("Circular reference detected in "+i.join("."));v.push(e),n.a.forEach(e,(function(e,o){!0===(!(n.a.isUndefined(e)||null===e)&&h.call(r,e,n.a.isString(o)?o.trim():o,i,y))&&t(e,i?i.concat(o):[o])})),v.pop()}}(e),r}}).call(this,r(17).Buffer)},function(t,e,r){"use strict";function n(t,e,r,n,i,o,s,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):i&&(c=a?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n={config:{type:Object,default:()=>({store_id:null,web_id:null,widget_rating:{is_enabled:!1,font_size:15,star_color:null,display:null,search_page:!0,theme:null},widget_review:{is_enabled:!1,title:null,star_color:null,header_layout:null,reviews_layout:null},widget_questions:{is_enabled:!1,title:null,enable_new_questions:!1}})}}},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(t,e){return function(){return t.apply(e,arguments)}}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";e.a=null},function(t,e,r){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=function(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"==typeof btoa){var i=(s=n,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),o=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[r].concat(o).concat([i]).join("\n")}var s,a,c;return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(i[s]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);n&&i[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),e.push(c))}},e}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],s=o[0],a={id:t+":"+i,css:o[1],media:o[2],sourceMap:o[3]};n[s]?n[s].parts.push(a):r.push(n[s]={id:s,parts:[a]})}return r}r.r(e),r.d(e,"default",(function(){return d}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},s=i&&(document.head||document.getElementsByTagName("head")[0]),a=null,c=0,u=!1,l=function(){},f=null,h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(t,e,r,i){u=r,f=i||{};var s=n(t,e);return p(s),function(e){for(var r=[],i=0;i<s.length;i++){var a=s[i];(c=o[a.id]).refs--,r.push(c)}e?p(s=n(t,e)):s=[];for(i=0;i<r.length;i++){var c;if(0===(c=r[i]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}}function p(t){for(var e=0;e<t.length;e++){var r=t[e],n=o[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(m(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var s=[];for(i=0;i<r.parts.length;i++)s.push(m(r.parts[i]));o[r.id]={id:r.id,refs:1,parts:s}}}}function g(){var t=document.createElement("style");return t.type="text/css",s.appendChild(t),t}function m(t){var e,r,n=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(n){if(u)return l;n.parentNode.removeChild(n)}if(h){var i=c++;n=a||(a=g()),e=y.bind(null,n,i,!1),r=y.bind(null,n,i,!0)}else n=g(),e=b.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var w,v=(w=[],function(t,e){return w[t]=e,w.filter(Boolean).join("\n")});function y(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=v(e,i);else{var o=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function b(t,e){var r=e.css,n=e.media,i=e.sourceMap;if(n&&t.setAttribute("media",n),f.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},function(t,e,r){"use strict";function n(t,e=.2){3===(t=t.replace(/^#/,"")).length&&(t=t.split("").map(t=>t+t).join(""));let r=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);r=Math.min(255,Math.round(r+(255-r)*e)),n=Math.min(255,Math.round(n+(255-n)*e)),i=Math.min(255,Math.round(i+(255-i)*e));const o=t=>t.toString(16).padStart(2,"0");return`#${o(r)}${o(n)}${o(i)}`}r.d(e,"a",(function(){return n}))},function(t,e,r){var n=r(16);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,r(9).default)("5ee28310",n,!0,{})},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(22);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,r(9).default)("4042fd78",n,!0,{})},function(t,e,r){var n=r(24);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,r(9).default)("271f866a",n,!0,{})},function(t,e,r){"use strict";r(11)},function(t,e,r){(e=r(8)(!1)).push([t.i,".martan-rating{align-items:center;display:flex;gap:4px}.martan-rating-text{color:#6c757d;font-size:12px;font-weight:600}.martan-rating--compact{align-items:center;display:flex;gap:6px}.martan-rating-compact{align-items:center;display:flex;gap:4px}.martan-rating-compact__star{flex-shrink:0}.martan-rating-compact__text{color:var(--gray-dark);font-size:12px;font-weight:600;white-space:nowrap}",""]),t.exports=e},function(t,e,r){"use strict";(function(t){
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("@ecomplus/utils"),require("@ecomplus/storefront-twbs")):"function"==typeof define&&define.amd?define([,,],e):"object"==typeof exports?exports.widgetMartan=e(require("vue"),require("@ecomplus/utils"),require("@ecomplus/storefront-twbs")):t.widgetMartan=e(t.Vue,t.ecomUtils,t.__storefrontTwbs)}(window,(function(t,e,r){return function(t){function e(e){for(var r,i,o=e[0],s=e[1],a=0,u=[];a<o.length;a++)i=o[a],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&u.push(n[i][0]),n[i]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r]);for(c&&c(e);u.length;)u.shift()()}var r={},n={0:0};function i(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(t){var e=[],r=n[t];if(0!==r)if(r)e.push(r[2]);else{var o=new Promise((function(e,i){r=n[t]=[e,i]}));e.push(r[2]=o);var s,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(t){return i.p+"widget-martan."+({}[t]||t)+".min.js"}(t);var c=new Error;s=function(e){a.onerror=a.onload=null,clearTimeout(u);var r=n[t];if(0!==r){if(r){var i=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src;c.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",c.name="ChunkLoadError",c.type=i,c.request=o,r[1](c)}n[t]=void 0}};var u=setTimeout((function(){s({type:"timeout",target:a})}),12e4);a.onerror=a.onload=s,document.head.appendChild(a)}return Promise.all(e)},i.m=t,i.c=r,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/assets/vendor/",i.oe=function(t){throw console.error(t),t};var o=window.webpackJsonpwidgetMartan=window.webpackJsonpwidgetMartan||[],s=o.push.bind(o);o.push=e,o=o.slice();for(var a=0;a<o.length;a++)e(o[a]);var c=s;return i(i.s=25)}([function(t,e,r){"use strict";(function(t){var n=r(6);const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,s=(a=Object.create(null),t=>{const e=i.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const c=t=>(t=t.toLowerCase(),e=>s(e)===t),u=t=>e=>typeof e===t,{isArray:l}=Array,f=u("undefined");const h=c("ArrayBuffer");const d=u("string"),p=u("function"),g=u("number"),m=t=>null!==t&&"object"==typeof t,w=t=>{if("object"!==s(t))return!1;const e=o(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},v=c("Date"),y=c("File"),b=c("Blob"),_=c("FileList"),E=c("URLSearchParams");function R(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,i;if("object"!=typeof t&&(t=[t]),l(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,t[s],s,t)}}function x(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,i=r.length;for(;i-- >0;)if(n=r[i],e===n.toLowerCase())return n;return null}const S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:t,A=t=>!f(t)&&t!==S;const O=(C="undefined"!=typeof Uint8Array&&o(Uint8Array),t=>C&&t instanceof C);var C;const T=c("HTMLFormElement"),P=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),k=c("RegExp"),q=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};R(r,(r,i)=>{let o;!1!==(o=e(r,i,t))&&(n[i]=o||r)}),Object.defineProperties(t,n)},B="abcdefghijklmnopqrstuvwxyz",U={DIGIT:"0123456789",ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+"0123456789"};const j=c("AsyncFunction");e.a={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&p(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||p(t.append)&&("formdata"===(e=s(t))||"object"===e&&p(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:d,isNumber:g,isBoolean:t=>!0===t||!1===t,isObject:m,isPlainObject:w,isUndefined:f,isDate:v,isFile:y,isBlob:b,isRegExp:k,isFunction:p,isStream:t=>m(t)&&p(t.pipe),isURLSearchParams:E,isTypedArray:O,isFileList:_,forEach:R,merge:function t(){const{caseless:e}=A(this)&&this||{},r={},n=(n,i)=>{const o=e&&x(r,i)||i;w(r[o])&&w(n)?r[o]=t(r[o],n):w(n)?r[o]=t({},n):l(n)?r[o]=n.slice():r[o]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&R(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:i}={})=>(R(e,(e,i)=>{r&&p(e)?t[i]=Object(n.a)(e,r):t[i]=e},{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let i,s,a;const c={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],n&&!n(a,t,e)||c[a]||(e[a]=t[a],c[a]=!0);t=!1!==r&&o(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:c,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!g(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:T,hasOwnProperty:P,hasOwnProp:P,reduceDescriptors:q,freezeMethods:t=>{q(t,(e,r)=>{if(p(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];p(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return l(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:x,global:S,isContextDefined:A,ALPHABET:U,generateString:(t=16,e=U.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&p(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(m(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const i=l(t)?[]:{};return R(t,(t,e)=>{const o=r(t,n+1);!f(o)&&(i[e]=o)}),e[n]=void 0,i}}return t};return r(t,0)},isAsyncFn:j,isThenable:t=>t&&(m(t)||p(t))&&p(t.then)&&p(t.catch)}}).call(this,r(12))},function(t,e,r){"use strict";var n=r(0);function i(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}n.a.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n.a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const o=i.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{s[t]={value:t}}),Object.defineProperties(i,s),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=(t,e,r,s,a,c)=>{const u=Object.create(o);return n.a.toFlatObject(t,u,(function(t){return t!==Error.prototype}),t=>"isAxiosError"!==t),i.call(u,t.message,e,r,s,a),u.cause=t,u.name=t.name,c&&Object.assign(u,c),u},e.a=i},function(t,e,r){"use strict";(function(t){var n=r(0),i=r(1),o=r(7);function s(t){return n.a.isPlainObject(t)||n.a.isArray(t)}function a(t){return n.a.endsWith(t,"[]")?t.slice(0,-2):t}function c(t,e,r){return t?t.concat(e).map((function(t,e){return t=a(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const u=n.a.toFlatObject(n.a,{},null,(function(t){return/^is[A-Z]/.test(t)}));e.a=function(e,r,l){if(!n.a.isObject(e))throw new TypeError("target must be an object");r=r||new(o.a||FormData);const f=(l=n.a.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!n.a.isUndefined(e[t])}))).metaTokens,h=l.visitor||w,d=l.dots,p=l.indexes,g=(l.Blob||"undefined"!=typeof Blob&&Blob)&&n.a.isSpecCompliantForm(r);if(!n.a.isFunction(h))throw new TypeError("visitor must be a function");function m(e){if(null===e)return"";if(n.a.isDate(e))return e.toISOString();if(!g&&n.a.isBlob(e))throw new i.a("Blob is not supported. Use a Buffer instead.");return n.a.isArrayBuffer(e)||n.a.isTypedArray(e)?g&&"function"==typeof Blob?new Blob([e]):t.from(e):e}function w(t,e,i){let o=t;if(t&&!i&&"object"==typeof t)if(n.a.endsWith(e,"{}"))e=f?e:e.slice(0,-2),t=JSON.stringify(t);else if(n.a.isArray(t)&&function(t){return n.a.isArray(t)&&!t.some(s)}(t)||(n.a.isFileList(t)||n.a.endsWith(e,"[]"))&&(o=n.a.toArray(t)))return e=a(e),o.forEach((function(t,i){!n.a.isUndefined(t)&&null!==t&&r.append(!0===p?c([e],i,d):null===p?e:e+"[]",m(t))})),!1;return!!s(t)||(r.append(c(i,e,d),m(t)),!1)}const v=[],y=Object.assign(u,{defaultVisitor:w,convertValue:m,isVisitable:s});if(!n.a.isObject(e))throw new TypeError("data must be an object");return function t(e,i){if(!n.a.isUndefined(e)){if(-1!==v.indexOf(e))throw Error("Circular reference detected in "+i.join("."));v.push(e),n.a.forEach(e,(function(e,o){!0===(!(n.a.isUndefined(e)||null===e)&&h.call(r,e,n.a.isString(o)?o.trim():o,i,y))&&t(e,i?i.concat(o):[o])})),v.pop()}}(e),r}}).call(this,r(17).Buffer)},function(t,e,r){"use strict";function n(t,e,r,n,i,o,s,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):i&&(c=a?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n={config:{type:Object,default:()=>({store_id:null,web_id:null,widget_rating:{is_enabled:!1,font_size:15,star_color:null,display:null,search_page:!0,theme:null},widget_review:{is_enabled:!1,title:null,star_color:null,header_layout:null,reviews_layout:null},widget_questions:{is_enabled:!1,title:null,enable_new_questions:!1}})}}},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(t,e){return function(){return t.apply(e,arguments)}}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";e.a=null},function(t,e,r){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=function(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"==typeof btoa){var i=(s=n,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),o=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[r].concat(o).concat([i]).join("\n")}var s,a,c;return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(i[s]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);n&&i[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),e.push(c))}},e}},function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},i=0;i<e.length;i++){var o=e[i],s=o[0],a={id:t+":"+i,css:o[1],media:o[2],sourceMap:o[3]};n[s]?n[s].parts.push(a):r.push(n[s]={id:s,parts:[a]})}return r}r.r(e),r.d(e,"default",(function(){return d}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},s=i&&(document.head||document.getElementsByTagName("head")[0]),a=null,c=0,u=!1,l=function(){},f=null,h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(t,e,r,i){u=r,f=i||{};var s=n(t,e);return p(s),function(e){for(var r=[],i=0;i<s.length;i++){var a=s[i];(c=o[a.id]).refs--,r.push(c)}e?p(s=n(t,e)):s=[];for(i=0;i<r.length;i++){var c;if(0===(c=r[i]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}}function p(t){for(var e=0;e<t.length;e++){var r=t[e],n=o[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(m(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var s=[];for(i=0;i<r.parts.length;i++)s.push(m(r.parts[i]));o[r.id]={id:r.id,refs:1,parts:s}}}}function g(){var t=document.createElement("style");return t.type="text/css",s.appendChild(t),t}function m(t){var e,r,n=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(n){if(u)return l;n.parentNode.removeChild(n)}if(h){var i=c++;n=a||(a=g()),e=y.bind(null,n,i,!1),r=y.bind(null,n,i,!0)}else n=g(),e=b.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var w,v=(w=[],function(t,e){return w[t]=e,w.filter(Boolean).join("\n")});function y(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=v(e,i);else{var o=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function b(t,e){var r=e.css,n=e.media,i=e.sourceMap;if(n&&t.setAttribute("media",n),f.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},function(t,e,r){"use strict";function n(t,e=.2){3===(t=t.replace(/^#/,"")).length&&(t=t.split("").map(t=>t+t).join(""));let r=parseInt(t.substring(0,2),16),n=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);r=Math.min(255,Math.round(r+(255-r)*e)),n=Math.min(255,Math.round(n+(255-n)*e)),i=Math.min(255,Math.round(i+(255-i)*e));const o=t=>t.toString(16).padStart(2,"0");return`#${o(r)}${o(n)}${o(i)}`}r.d(e,"a",(function(){return n}))},function(t,e,r){var n=r(16);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,r(9).default)("5ee28310",n,!0,{})},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(22);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,r(9).default)("4042fd78",n,!0,{})},function(t,e,r){var n=r(24);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);(0,r(9).default)("271f866a",n,!0,{})},function(t,e,r){"use strict";r(11)},function(t,e,r){(e=r(8)(!1)).push([t.i,".martan-rating{align-items:center;display:flex;gap:4px}.martan-rating-text{color:#6c757d;font-size:12px;font-weight:600}.martan-rating--compact{align-items:center;display:flex;gap:6px}.martan-rating-compact{align-items:center;display:flex;gap:4px}.martan-rating-compact__star{flex-shrink:0}.martan-rating-compact__text{color:var(--gray-dark);font-size:12px;font-weight:600;white-space:nowrap}",""]),t.exports=e},function(t,e,r){"use strict";(function(t){
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
5
5
  * @author Feross Aboukhadijeh <http://feross.org>
6
6
  * @license MIT
7
7
  */
8
- var n=r(18),i=r(19),o=r(20);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(c.isBuffer(e)){var r=0|d(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=a(t,e<0?0:0|d(e)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|d(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){for(var f=!0,h=0;h<c;h++)if(u(t,o+h)!==u(e,h)){f=!1;break}if(f)return o}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function b(t,e,r,n){return z(F(e,t.length-r),t,r,n)}function _(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return _(t,e,r,n)}function R(t,e,r,n){return z(D(e),t,r,n)}function x(t,e,r,n){return z(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,c,u=t[i],l=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,r){return u(null,t,e,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},c.allocUnsafe=function(t){return f(null,t)},c.allocUnsafeSlow=function(t){return f(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):g.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(n,i),l=t.slice(e,r),f=0;f<a;++f)if(u[f]!==l[f]){o=u[f],s=l[f];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return R(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function T(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=I(t[o]);return i}function P(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function k(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function q(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function j(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function B(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,o){return o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},c.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=c.isBuffer(t)?t:F(new c(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function I(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(12))},function(t,e,r){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=u(t),s=n[0],a=n[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,c[l++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(l(t,s,s+16383>a?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
8
+ var n=r(18),i=r(19),o=r(20);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(c.isBuffer(e)){var r=0|d(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=a(t,e<0?0:0|d(e)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|d(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){for(var f=!0,h=0;h<c;h++)if(u(t,o+h)!==u(e,h)){f=!1;break}if(f)return o}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function b(t,e,r,n){return z(F(e,t.length-r),t,r,n)}function _(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return _(t,e,r,n)}function R(t,e,r,n){return z(D(e),t,r,n)}function x(t,e,r,n){return z(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,c,u=t[i],l=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,r){return u(null,t,e,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},c.allocUnsafe=function(t){return f(null,t)},c.allocUnsafeSlow=function(t){return f(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):g.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(n,i),l=t.slice(e,r),f=0;f<a;++f)if(u[f]!==l[f]){o=u[f],s=l[f];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return R(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function T(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=I(t[o]);return i}function P(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function k(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function q(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function B(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,o){return o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},c.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||q(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):U(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);q(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):U(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||q(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=c.isBuffer(t)?t:F(new c(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function I(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(12))},function(t,e,r){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=u(t),s=n[0],a=n[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,c[l++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(l(t,s,s+16383>a?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
9
9
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
10
- e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";r(13)},function(t,e,r){(e=r(8)(!1)).push([t.i,".martan-reviews[data-v-1f781a3f]{color:#444}.martan-reviews .widget-header[data-v-1f781a3f]{align-items:center;display:flex;gap:1rem;justify-content:space-between}.martan-reviews .widget-header__score[data-v-1f781a3f]{max-width:500px;width:100%}.martan-reviews .widget-header__score-average[data-v-1f781a3f]{color:#444;font-size:1.25rem}.martan-reviews .list-expanded[data-v-1f781a3f]{display:flex;flex-direction:column;gap:1rem}.martan-reviews .list-grid[data-v-1f781a3f]{align-items:start;display:grid;gap:1rem;grid-template-columns:repeat(2,1fr);grid-template-rows:masonry;margin:0 auto;max-width:1200px}@media(max-width:768px){.martan-reviews .list-grid[data-v-1f781a3f]{gap:.75rem;grid-template-columns:1fr;grid-template-rows:masonry;max-width:100%}}@media(min-width:769px)and (max-width:1200px){.martan-reviews .list-grid[data-v-1f781a3f]{grid-template-columns:repeat(2,1fr);grid-template-rows:masonry;max-width:100%}}@media(min-width:1201px){.martan-reviews .list-grid[data-v-1f781a3f]{grid-template-columns:repeat(2,minmax(0,580px));grid-template-rows:masonry;justify-content:center}}@supports not (grid-template-rows:masonry){.martan-reviews .list-grid[data-v-1f781a3f]{align-content:flex-start;display:flex;flex-direction:column;flex-wrap:wrap;max-height:none}@media(min-width:769px){.martan-reviews .list-grid[data-v-1f781a3f]{align-content:flex-start;flex-direction:row}}}.martan-reviews .list-grid--masonry-fallback[data-v-1f781a3f]{-moz-column-count:1;column-count:1;-moz-column-gap:1rem;column-gap:1rem;display:block}@media(min-width:769px){.martan-reviews .list-grid--masonry-fallback[data-v-1f781a3f]{-moz-column-count:2;column-count:2}}@media(min-width:1201px){.martan-reviews .list-grid--masonry-fallback[data-v-1f781a3f]{-moz-column-count:2;column-count:2;margin:0 auto;max-width:1200px}}.martan-reviews .list-grid--masonry-fallback .masonry-item[data-v-1f781a3f]{-moz-column-break-inside:avoid;break-inside:avoid;display:inline-block;margin-bottom:1rem;width:100%}.martan-reviews .reviews-with-pictures[data-v-1f781a3f]{background-color:rgba(255,236,219,.102);border:1px solid rgba(255,236,219,.102);border-radius:.25rem;display:flex;flex-direction:column;font-size:80%;gap:.5rem;margin-top:1rem;padding:2rem;width:100%}.martan-reviews .reviews-with-pictures .list[data-v-1f781a3f]{-webkit-overflow-scrolling:touch;display:flex;flex-direction:row;gap:1rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.martan-reviews .reviews-with-pictures .list[data-v-1f781a3f]::-webkit-scrollbar{display:none}.martan-reviews .reviews-with-pictures .list img[data-v-1f781a3f]{border-radius:.25rem;cursor:pointer;height:80px;-o-object-fit:cover;object-fit:cover;width:80px}.martan-reviews .credit[data-v-1f781a3f]{color:#a1a1aa;font-size:.75rem;line-height:1rem;margin-top:1rem;text-align:right}.martan-reviews .credit a[data-v-1f781a3f]{color:#0f172a!important}.martan-reviews .actions[data-v-1f781a3f]{display:flex;justify-content:center;margin-bottom:1rem;margin-top:1rem}.martan-reviews .review-list-enter-active[data-v-1f781a3f],.martan-reviews .review-list-leave-active[data-v-1f781a3f]{transition:all .3s ease}.martan-reviews .review-list-enter-from[data-v-1f781a3f]{opacity:0;transform:translateY(20px)}.martan-reviews .review-list-leave-to[data-v-1f781a3f]{opacity:0;transform:translateY(-20px)}.martan-reviews .review-list-move[data-v-1f781a3f]{transition:transform .3s ease}",""]),t.exports=e},function(t,e,r){"use strict";r(14)},function(t,e,r){(e=r(8)(!1)).push([t.i,'.martan-questions[data-v-009bb4ce]{margin-bottom:3rem}.martan-questions .questions-search[data-v-009bb4ce]{margin-bottom:20px}.martan-questions .questions-search .search-input-group[data-v-009bb4ce]{max-width:500px}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]{border:1px solid #e0e0e0;border-radius:8px 0 0 8px;border-right:none;flex:1;font-size:14px;outline:none;padding:12px 16px;transition:border-color .2s}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]:focus{border-color:#69f}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]::-moz-placeholder{color:#999}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]::placeholder{color:#999}.martan-questions .questions-search .search-input-group .search-button[data-v-009bb4ce]{align-items:center;background-color:#69f;border:1px solid #69f;border-radius:0 8px 8px 0;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:12px 16px;transition:background-color .2s}.martan-questions .questions-search .search-input-group .search-button[data-v-009bb4ce]:hover:not(:disabled){background-color:#58e}.martan-questions .questions-search .search-input-group .search-button[data-v-009bb4ce]:disabled{cursor:not-allowed;opacity:.6}.martan-questions .questions-list .question-item[data-v-009bb4ce]{border-bottom:1px solid #f0f0f0;margin-bottom:20px;padding-bottom:20px}.martan-questions .questions-list .question-item[data-v-009bb4ce]:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.martan-questions .questions-list .question-item .question-text[data-v-009bb4ce]{color:#333;font-size:.9375rem;font-weight:500;line-height:1.4;margin-bottom:12px}.martan-questions .questions-list .question-item .answer-container[data-v-009bb4ce]{align-items:flex-start;display:flex;margin-top:8px;position:relative}.martan-questions .questions-list .question-item .answer-container .subtle-hook[data-v-009bb4ce]{flex-shrink:0;height:12px;margin-right:16px;margin-top:6px;position:relative;width:12px}.martan-questions .questions-list .question-item .answer-container .subtle-hook .hook-l-shape[data-v-009bb4ce]{height:12px;position:relative;width:12px}.martan-questions .questions-list .question-item .answer-container .subtle-hook .hook-l-shape[data-v-009bb4ce]:before{background-color:#d0d0d0;content:"";height:8px;left:0;position:absolute;top:0;width:1px}.martan-questions .questions-list .question-item .answer-container .subtle-hook .hook-l-shape[data-v-009bb4ce]:after{background-color:#d0d0d0;content:"";height:1px;left:0;position:absolute;top:7px;width:6px}.martan-questions .questions-list .question-item .answer-container .answer-text[data-v-009bb4ce]{color:#666;flex:1;font-weight:300;line-height:1.4}.martan-questions .no-questions[data-v-009bb4ce]{color:#999;font-style:italic;padding:40px 20px;text-align:center}.martan-questions .loading[data-v-009bb4ce]{color:#666;padding:20px;text-align:center}.martan-questions .questions-footer .view-more-link[data-v-009bb4ce]{background:none;border:none;color:#69f;cursor:pointer;font-family:inherit;font-size:14px;padding:0;text-decoration:none}.martan-questions .questions-footer .view-more-link[data-v-009bb4ce]:hover{text-decoration:underline}.martan-questions .questions-footer .view-more-link[data-v-009bb4ce]:focus{border-radius:2px;outline:2px solid #69f;outline-offset:2px}.martan-questions .iframe-container[data-v-009bb4ce]{border:1px solid #e0e0e0;border-radius:4px;margin-top:20px;max-width:580px;overflow:hidden}.martan-questions .iframe-container .question-iframe[data-v-009bb4ce]{border:none;display:block;width:100%}.martan-questions .ask-question-section[data-v-009bb4ce]{margin-top:30px}.martan-questions .ask-question-section .ask-question-button[data-v-009bb4ce]{align-items:center;background-color:#e6f2ff;border:1px solid #b3d9ff;border-radius:8px;color:#69f;cursor:pointer;display:inline-flex;font-size:14px;gap:8px;padding:12px 20px;transition:all .2s}.martan-questions .ask-question-section .ask-question-button[data-v-009bb4ce]:hover{background-color:#d1e7ff;border-color:#9cf}.martan-questions .ask-question-section .ask-question-button svg[data-v-009bb4ce]{flex-shrink:0}.martan-questions .actions[data-v-009bb4ce]{display:flex;justify-content:center;margin-bottom:1rem;margin-top:1rem}',""]),t.exports=e},function(t,e,r){"use strict";r.r(e),r.d(e,"MARTAN_API",(function(){return Et})),r.d(e,"MARTAN_QUESTIONS_WEBUI",(function(){return Rt}));var n={};r.r(n),r.d(n,"hasBrowserEnv",(function(){return b})),r.d(n,"hasStandardBrowserWebWorkerEnv",(function(){return R})),r.d(n,"hasStandardBrowserEnv",(function(){return _}));var i=r(5),o=r.n(i),s=(t={},e,r,n={})=>{const i=document.getElementById(e);if(!(t&&i&&i.dataset&&i.dataset.product))return;const{product:s}=i.dataset,a={store_id:null,web_id:null,widget_key:null,widget_rating:null,widget_review:null,widget_questions:null,...n,...t};if("function"==typeof window.IntersectionObserver){new window.IntersectionObserver((t,e)=>{t.forEach((function(t){const{isIntersecting:n,intersectionRatio:c}=t;(!0===n||c>0)&&(new o.a({render:t=>t(r,{props:{config:a,product:s}})}).$mount(i),e.disconnect())}))},{rootMargin:"250px"}).observe(i)}},a=r(0),c=r(6),u=r(2);function l(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function f(t,e){this._pairs=[],t&&Object(u.a)(t,this,e)}const h=f.prototype;h.append=function(t,e){this._pairs.push([t,e])},h.toString=function(t){const e=t?function(e){return t.call(this,e,l)}:l;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var d=f;function p(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function g(t,e,r){if(!e)return t;const n=r&&r.encode||p,i=r&&r.serialize;let o;if(o=i?i(e,r):a.a.isURLSearchParams(e)?e.toString():new d(e,r).toString(n),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}var m=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.a.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},w=r(1),v={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},y={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:d,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const b="undefined"!=typeof window&&"undefined"!=typeof document,_=(E="undefined"!=typeof navigator&&navigator.product,b&&["ReactNative","NativeScript","NS"].indexOf(E)<0);var E;const R="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var x={...n,...y};var S=function(t){function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),c=i>=t.length;if(o=!o&&a.a.isArray(n)?n.length:o,c)return a.a.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&a.a.isObject(n[o])||(n[o]=[]);return e(t,r,n[o],i)&&a.a.isArray(n[o])&&(n[o]=function(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}(n[o])),!s}if(a.a.isFormData(t)&&a.a.isFunction(t.entries)){const r={};return a.a.forEachEntry(t,(t,n)=>{e(function(t){return a.a.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}(t),n,r,0)}),r}return null};const A={transitional:v,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,i=a.a.isObject(t);i&&a.a.isHTMLForm(t)&&(t=new FormData(t));if(a.a.isFormData(t))return n?JSON.stringify(S(t)):t;if(a.a.isArrayBuffer(t)||a.a.isBuffer(t)||a.a.isStream(t)||a.a.isFile(t)||a.a.isBlob(t))return t;if(a.a.isArrayBufferView(t))return t.buffer;if(a.a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Object(u.a)(t,new x.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return x.isNode&&a.a.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=a.a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Object(u.a)(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),function(t,e,r){if(a.a.isString(t))try{return(e||JSON.parse)(t),a.a.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||A.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&a.a.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw w.a.from(t,w.a.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.a.forEach(["delete","get","head","post","put","patch"],t=>{A.headers[t]={}});var O=A;const C=a.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const T=Symbol("internals");function P(t){return t&&String(t).trim().toLowerCase()}function k(t){return!1===t||null==t?t:a.a.isArray(t)?t.map(k):String(t)}function q(t,e,r,n,i){return a.a.isFunction(n)?n.call(this,e,r):(i&&(e=r),a.a.isString(e)?a.a.isString(n)?-1!==e.indexOf(n):a.a.isRegExp(n)?n.test(e):void 0:void 0)}class j{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function i(t,e,r){const i=P(e);if(!i)throw new Error("header name must be a non-empty string");const o=a.a.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||e]=k(t))}const o=(t,e)=>a.a.forEach(t,(t,r)=>i(t,r,e));return a.a.isPlainObject(t)||t instanceof this.constructor?o(t,e):a.a.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?o((t=>{const e={};let r,n,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&C[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&i(e,t,r),this}get(t,e){if(t=P(t)){const r=a.a.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(a.a.isFunction(e))return e.call(this,t,r);if(a.a.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=P(t)){const r=a.a.findKey(this,t);return!(!r||void 0===this[r]||e&&!q(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function i(t){if(t=P(t)){const i=a.a.findKey(r,t);!i||e&&!q(0,r[i],i,e)||(delete r[i],n=!0)}}return a.a.isArray(t)?t.forEach(i):i(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const i=e[r];t&&!q(0,this[i],i,t,!0)||(delete this[i],n=!0)}return n}normalize(t){const e=this,r={};return a.a.forEach(this,(n,i)=>{const o=a.a.findKey(r,i);if(o)return e[o]=k(n),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete e[i],e[s]=k(n),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return a.a.forEach(this,(r,n)=>{null!=r&&!1!==r&&(e[n]=t&&a.a.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(t){const e=(this[T]=this[T]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=P(t);e[n]||(!function(t,e){const r=a.a.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(t,r,i){return this[n].call(this,e,t,r,i)},configurable:!0})})}(r,t),e[n]=!0)}return a.a.isArray(t)?t.forEach(n):n(t),this}}j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.a.reduceDescriptors(j.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),a.a.freezeMethods(j);var B=j;function U(t,e){const r=this||O,n=e||r,i=B.from(n.headers);let o=n.data;return a.a.forEach(t,(function(t){o=t.call(r,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function N(t){return!(!t||!t.__CANCEL__)}function L(t,e,r){w.a.call(this,null==t?"canceled":t,w.a.ERR_CANCELED,e,r),this.name="CanceledError"}a.a.inherits(L,w.a,{__CANCEL__:!0});var M=L,I=r(7);var F=x.hasStandardBrowserEnv?{write(t,e,r,n,i,o){const s=[t+"="+encodeURIComponent(e)];a.a.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),a.a.isString(n)&&s.push("path="+n),a.a.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function D(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var z=x.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=a.a.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};var $=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=n[s];i||(i=c),r[o]=a,n[o]=c;let l=s,f=0;for(;l!==o;)f+=r[l++],l%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-i<e)return;const h=u&&c-u;return h?Math.round(1e3*f/h):void 0}};function Y(t,e){let r=0;const n=$(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-r,c=n(a);r=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:i};u[e?"download":"upload"]=!0,t(u)}}var Q="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const i=B.from(t.headers).normalize();let o,s,{responseType:c,withXSRFToken:u}=t;function l(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(a.a.isFormData(n))if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(s=i.getContentType())){const[t,...e]=s?s.split(";").map(t=>t.trim()).filter(Boolean):[];i.setContentType([t||"multipart/form-data",...e].join("; "))}let f=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+r))}const h=D(t.baseURL,t.url);function d(){if(!f)return;const n=B.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new w.a("Request failed with status code "+r.status,[w.a.ERR_BAD_REQUEST,w.a.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),l()}),(function(t){r(t),l()}),{data:c&&"text"!==c&&"json"!==c?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f}),f=null}if(f.open(t.method.toUpperCase(),g(h,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,"onloadend"in f?f.onloadend=d:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(d)},f.onabort=function(){f&&(r(new w.a("Request aborted",w.a.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new w.a("Network Error",w.a.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||v;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new w.a(e,n.clarifyTimeoutError?w.a.ETIMEDOUT:w.a.ECONNABORTED,t,f)),f=null},x.hasStandardBrowserEnv&&(u&&a.a.isFunction(u)&&(u=u(t)),u||!1!==u&&z(h))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&F.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===n&&i.setContentType(null),"setRequestHeader"in f&&a.a.forEach(i.toJSON(),(function(t,e){f.setRequestHeader(e,t)})),a.a.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),c&&"json"!==c&&(f.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",Y(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",Y(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{f&&(r(!e||e.type?new M(null,t,f):e),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(h);p&&-1===x.protocols.indexOf(p)?r(new w.a("Unsupported protocol "+p+":",w.a.ERR_BAD_REQUEST,t)):f.send(n||null)}))};const H={http:I.a,xhr:Q};a.a.forEach(H,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});const J=t=>"- "+t,V=t=>a.a.isFunction(t)||null===t||!1===t;var W=t=>{t=a.a.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let o=0;o<e;o++){let e;if(r=t[o],n=r,!V(r)&&(n=H[(e=String(r)).toLowerCase()],void 0===n))throw new w.a(`Unknown adapter '${e}'`);if(n)break;i[e||"#"+o]=n}if(!n){const t=Object.entries(i).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));let r=e?t.length>1?"since :\n"+t.map(J).join("\n"):" "+J(t[0]):"as no adapter specified";throw new w.a("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function K(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new M(null,t)}function X(t){K(t),t.headers=B.from(t.headers),t.data=U.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return W(t.adapter||O.adapter)(t).then((function(e){return K(t),e.data=U.call(t,t.transformResponse,e),e.headers=B.from(e.headers),e}),(function(e){return N(e)||(K(t),e&&e.response&&(e.response.data=U.call(t,t.transformResponse,e.response),e.response.headers=B.from(e.response.headers))),Promise.reject(e)}))}const G=t=>t instanceof B?{...t}:t;function Z(t,e){e=e||{};const r={};function n(t,e,r){return a.a.isPlainObject(t)&&a.a.isPlainObject(e)?a.a.merge.call({caseless:r},t,e):a.a.isPlainObject(e)?a.a.merge({},e):a.a.isArray(e)?e.slice():e}function i(t,e,r){return a.a.isUndefined(e)?a.a.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function o(t,e){if(!a.a.isUndefined(e))return n(void 0,e)}function s(t,e){return a.a.isUndefined(e)?a.a.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function c(r,i,o){return o in e?n(r,i):o in t?n(void 0,r):void 0}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(t,e)=>i(G(t),G(e),!0)};return a.a.forEach(Object.keys(Object.assign({},t,e)),(function(n){const o=u[n]||i,s=o(t[n],e[n],n);a.a.isUndefined(s)&&o!==c||(r[n]=s)})),r}const tt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{tt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const et={};tt.transitional=function(t,e,r){function n(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,i,o)=>{if(!1===t)throw new w.a(n(i," has been removed"+(e?" in "+e:"")),w.a.ERR_DEPRECATED);return e&&!et[i]&&(et[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,i,o)}};var rt={assertOptions:function(t,e,r){if("object"!=typeof t)throw new w.a("options must be an object",w.a.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const e=t[o],r=void 0===e||s(e,o,t);if(!0!==r)throw new w.a("option "+o+" must be "+r,w.a.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new w.a("Unknown option "+o,w.a.ERR_BAD_OPTION)}},validators:tt};const nt=rt.validators;class it{constructor(t){this.defaults=t,this.interceptors={request:new m,response:new m}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Z(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:i}=e;void 0!==r&&rt.assertOptions(r,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),null!=n&&(a.a.isFunction(n)?e.paramsSerializer={serialize:n}:rt.assertOptions(n,{encode:nt.function,serialize:nt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&a.a.merge(i.common,i[e.method]);i&&a.a.forEach(["delete","get","head","post","put","patch","common"],t=>{delete i[t]}),e.headers=B.concat(o,i);const s=[];let c=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const u=[];let l;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let f,h=0;if(!c){const t=[X.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,u),f=t.length,l=Promise.resolve(e);h<f;)l=l.then(t[h++],t[h++]);return l}f=s.length;let d=e;for(h=0;h<f;){const t=s[h++],e=s[h++];try{d=t(d)}catch(t){e.call(this,t);break}}try{l=X.call(this,d)}catch(t){return Promise.reject(t)}for(h=0,f=u.length;h<f;)l=l.then(u[h++],u[h++]);return l}getUri(t){return g(D((t=Z(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}a.a.forEach(["delete","get","head","options"],(function(t){it.prototype[t]=function(e,r){return this.request(Z(r||{},{method:t,url:e,data:(r||{}).data}))}})),a.a.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,i){return this.request(Z(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}it.prototype[t]=e(),it.prototype[t+"Form"]=e(!0)}));var ot=it;class st{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then(t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null}),this.promise.then=t=>{let e;const n=new Promise(t=>{r.subscribe(t),e=t}).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,i){r.reason||(r.reason=new M(t,n,i),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new st((function(e){t=e})),cancel:t}}}var at=st;const ct={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ct).forEach(([t,e])=>{ct[e]=t});var ut=ct;const lt=function t(e){const r=new ot(e),n=Object(c.a)(ot.prototype.request,r);return a.a.extend(n,ot.prototype,r,{allOwnKeys:!0}),a.a.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Z(e,r))},n}(O);lt.Axios=ot,lt.CanceledError=M,lt.CancelToken=at,lt.isCancel=N,lt.VERSION="1.6.8",lt.toFormData=u.a,lt.AxiosError=w.a,lt.Cancel=lt.CanceledError,lt.all=function(t){return Promise.all(t)},lt.spread=function(t){return function(e){return t.apply(null,e)}},lt.isAxiosError=function(t){return a.a.isObject(t)&&!0===t.isAxiosError},lt.mergeConfig=Z,lt.AxiosHeaders=B,lt.formToJSON=t=>S(a.a.isHTMLForm(t)?new FormData(t):t),lt.getAdapter=W,lt.HttpStatusCode=ut,lt.default=lt;var ft=lt,ht=r(10),dt=r(4),pt={name:"Rating",props:{...dt.a,rating:{type:Number,default:0},totalReviews:{type:Number,default:0}},data:()=>({stars:Array(5).fill(0)}),mounted(){this.updateStars()},computed:{isCompact(){return"compact"===this.config.widget_rating.theme},fontSize(){const t=this.config.widget_rating.font_size;return t?"number"==typeof t?t+"px":t:this.isCompact?"16px":"14px"},fontSizeNumber(){const t=this.config.widget_rating.font_size;if(!t)return this.isCompact?16:14;if("number"==typeof t)return t;const e=String(t).match(/^(\d+(?:\.\d+)?)/);return e?parseFloat(e[1]):this.isCompact?16:14},compactFillPercentage(){const t=Math.max(0,Math.min(5,this.rating));return t<=2?t/2*25:t<=3?25+(t-2)/1.5*20:t<=4.5?45+(t-3.5)/1*25:70+(t-4.5)/.5*30},starColor(){return this.config.widget_rating.star_color||"#ffc107"},ratingText(){return this.formatNumber(this.totalReviews)},colorClosest(){return Object(ht.a)(this.config.widget_rating.star_color,.3)},normalizeRating(){return Number.isInteger(this.rating)?this.rating:Number(this.rating.toFixed(1))}},methods:{lightenColor:ht.a,formatNumber:t=>t>=1e6?(t/1e6).toFixed(1).replace(/\.0$/,"")+"M":t>=1e3?(t/1e3).toFixed(1).replace(/\.0$/,"")+"k":t.toString(),updateStars(){const t=Math.max(0,Math.min(5,this.rating));this.stars=Array(5).fill(0).map((e,r)=>t>=r+1?1:t>r?.5:0)},getStarClass:t=>1===t?"icon-tabler-star-filled":.5===t?"icon-tabler-star-half":"icon-tabler-star",getStarFill(t,e){return 1===t?this.starColor:.5===t?`url(#gradient-${e})`:"none"}},watch:{rating:"updateStars"}},gt=(r(15),r(3)),mt=Object(gt.a)(pt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("span",{staticClass:"martan-rating",class:{"martan-rating--compact":t.isCompact}},[t.isCompact?[r("div",{staticClass:"martan-rating-compact"},[r("svg",{staticClass:"icon icon-tabler martan-rating-compact__star",style:{color:t.config.widget_rating.star_color},attrs:{xmlns:"http://www.w3.org/2000/svg",width:t.fontSizeNumber,height:t.fontSizeNumber,viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}},[r("defs",[r("linearGradient",{attrs:{id:"compact-gradient-"+t._uid,x1:"0%",y1:"0%",x2:"100%",y2:"0%"}},[r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:1",attrs:{offset:"0%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:1",attrs:{offset:t.compactFillPercentage+"%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:0",attrs:{offset:t.compactFillPercentage+"%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:0",attrs:{offset:"100%"}})],1)],1),r("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),r("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",fill:"url(#compact-gradient-"+t._uid+")"}})]),r("span",{staticClass:"martan-rating-compact__text",style:{fontSize:t.fontSize}},[t._v(t._s(t.normalizeRating)+" / 5")])])]:[t._l(t.stars,(function(e,n){return r("svg",{key:n,staticClass:"icon icon-tabler",class:t.getStarClass(e),style:{color:t.config.widget_rating.star_color},attrs:{xmlns:"http://www.w3.org/2000/svg",width:t.fontSizeNumber,height:t.fontSizeNumber,viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:t.getStarFill(e,n),"stroke-linecap":"round","stroke-linejoin":"round"}},[.5===e?r("defs",[r("linearGradient",{attrs:{id:"gradient-"+n,x1:"0%",y1:"0%",x2:"100%",y2:"0%"}},[r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:1",attrs:{offset:"50%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:0",attrs:{offset:"50%"}})],1)],1):t._e(),r("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),r("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",fill:t.getStarFill(e,n)}})])})),r("span",{staticClass:"martan-rating-text",style:{color:"var(--gray-dark)",fontSize:t.fontSize}},[t._v(t._s(t.normalizeRating)+" / 5")]),r("span",{staticClass:"martan-rating-text",style:{color:"var(--gray)",fontSize:t.fontSize}},[t._v("("+t._s(t.totalReviews)+")")])]],2)}),[],!1,null,null,null).exports;var wt=class{constructor(t){this.list=[],this.offset=0,this.loading=!1,this.options=t}async init(){try{await this.fetchRatings(),await this.mounted(),this.listenerForSearchPage()}catch(t){console.error("@Martan/Ratings init error",t)}}async fetchRatings(){if(this.loading)return Promise.resolve();if(this.loading=!0,this.loadFromLocalStorage())return this.loading=!1,Promise.resolve();return ft({url:Et+"/api/v1/ratings.json?expand=metrics",headers:{"X-Store-Id":this.options.store_id,"X-Api-Key":this.options.web_id}}).then(({data:t})=>(this.list=t.result||[],this.saveToLocalStorage({result:t.result,timestamp:Date.now()}))).catch(t=>{console.error("Ratings fetchRatings error",t)})}loadFromLocalStorage(){try{const t=window.localStorage.getItem("martan_ratings");if(t){const e=JSON.parse(t);return!!(e&&e.result&&e.timestamp&&Date.now()-e.timestamp<864e5)&&(this.list=e.result,!0)}}catch(t){return console.error("Ratings loadFromLocalStorage error",t),!1}}saveToLocalStorage(t){window.localStorage.setItem("martan_ratings",JSON.stringify(t))}getProductRatingFromList(t){return t&&this.list&&0!==this.list.length?this.list.find(e=>e.sku===t):null}getClasses(){const t=[".product-card__rating",".mt-review-average"];return this.options.widget_rating.custom_class&&t.push(this.options.widget_rating.custom_class),t}async mounted(){const t=this.getClasses(),e=document.querySelectorAll(t.join(",")),r=[];Array.from(e).forEach(t=>{r.push(this.renderRating(t))}),await Promise.all(r).then(()=>{this.listenerForNewRatings()})}async renderRating(t){return new Promise(e=>{if(!t.dataset)return e();const r=this.getProductFromElement(t);if(!r)return e();const n=this.getProductRatingFromList(r);if(n&&0===n.total&&"gt1"===this.options.widget_rating.display||!n&&"gt1"===this.options.widget_rating.display)return e();const i=document.createElement("div"),s=this.options;return new o.a({render:t=>t(mt,{props:{rating:n&&n.average?n.average:0,totalReviews:n&&n.total?n.total:0,config:s}})}).$mount(t),t.setAttribute("data-martan-rating-id",this.generateId()),t.appendChild(i),e()})}generateId(t){return Math.random().toString(36).replace("0.",t||"")}listenerForNewRatings(){new window.MutationObserver(this.callbackForNewRatings.bind(this)).observe(document.body,{childList:!0,attributes:!1,subtree:!1})}callbackForNewRatings(t,e){t.forEach(t=>{"childList"===t.type&&t.addedNodes.forEach(t=>{this.isMartanElement(t)&&this.getProductFromElement(t)&&this.renderRating(t)})})}isMartanElement(t){let e=!1;const r=this.getClasses();return t.classList.length&&t.classList.forEach(t=>{r.includes(t)&&(e=!0)}),e}getProductFromElement(t){return t.dataset&&(t.dataset.martanProductId||t.dataset.product||t.dataset.sku||t.dataset.martanProductSku)||null}listenerForSearchPage(){const t=document.getElementById("search-engine");if(!t||!this.options.widget_rating.search_page)return!1;const e=new window.MutationObserver(()=>{e.disconnect();const r=t.querySelectorAll(".search-engine__retail > .row")[0],n=new window.MutationObserver(()=>{setTimeout(()=>{this.mounted()},100),n.disconnect()});n.observe(r,{childList:!0,subtree:!0})});e.observe(t,{attributes:!0,childList:!0})}},vt={name:"Reviews",props:{...dt.a,product:{type:String,required:!0}},data:()=>({list:[],total:0,limit:4,offset:0,loading:!1,orderRating:null,orderReviews:null,$isSorting:!1,$count:null,hasMore:!1,averageTotal:0,totalRecommended:null,average:{one:0,two:0,three:0,four:0,five:0},isOpenQuickView:!1,selectedReview:null,isScrollable:!1,$listEl:null}),watch:{onlyWithPictures:function(t){!this.$listEl&&t.length>0&&(this.$listEl=document.querySelector(".reviews-with-pictures"))},orderRating:function(t,e){t!==e&&(this.list=[],this.fetchReviews())},orderReviews:function(t,e){t!==e&&(this.list=[],this.fetchReviews())},limit:function(){this.fetchReviews()},offset:function(){this.fetchReviews()}},computed:{i19basedOn$1Reviews:()=>"Baseado em $1 avaliações",i19basedOn$1Review:()=>"Baseado em $1 avaliação",i19noReview:()=>"Nenhuma avaliação",onlyWithPictures(){return this.list.filter(t=>t.pictures&&t.pictures.length>0)},getUrl:()=>"https://www.martan.app/?ref="+new URL(window.location.href).origin,title(){return this.config.widget_review.title?this.config.widget_review.title:null}},methods:{fetchReviews(){const t={limit:this.limit,offset:this.offset,sku:this.product};this.orderReviews&&(t.orderBy=this.orderReviews,t.limit=this.limit,t.offset=0),this.orderRating&&(t.rating=this.orderRating),this.$count=null,this.loading=!0,axios({url:Et+"/api/v1/reviews.json",headers:{"X-Store-Id":this.config.store_id,"X-Api-Key":this.config.web_id},params:t}).then(({data:t})=>{const{result:e,count:r}=t;let n=[];if(this.hasMore=e.length>=this.limit,Array.isArray(this.list)&&!this.orderReviews||this.orderReviews&&this.$isSorting){for(const t of e){this.list.some(e=>e.id===t.id)||this.list.push(t)}n=[...this.list]}else(Array.isArray(this.list)&&this.orderReviews||this.orderRating)&&(n=e,this.$isSorting=!1);return{count:r,list:n}}).then(({count:t,list:e})=>(this.orderRating?this.$count=t:this.total=t,this.list=e,e)).catch(t=>{console.error("Failed to load resource from Martan",t)}).finally(()=>{this.loading=!1})},async fetchAverage(){try{const t=new wt({store_id:this.config.store_id,web_id:this.config.web_id});await t.fetchRatings();const e=t.getProductRatingFromList(this.product);if(e){const{average:t,rate:r,recommended_percentage:n}=e;Object.assign(this.average,r),this.averageTotal=t,this.totalRecommended=n}}catch(t){console.error("Failed to load average from Martan",t)}},loadMore(){this.orderReviews?this.limit=this.limit+this.limit:this.offset++},showLoadMore(){return!this.loading&&(!!this.hasMore&&(this.orderRating?this.$count>0&&this.list.length<this.$count:this.total>0&&this.list.length<this.total))},updateOrderBy(t){t===this.orderRating?this.orderRating=null:(this.offset=0,this.orderRating=t),this.hasMore=!0},onSort({order:t}){this.orderReviews=t,this.hasMore=!0},openQuickview:function({review:t}){this.selectedReview=t,this.isOpenQuickView=!0},onCloseQuickview:function(){this.isOpenQuickView=!1,this.selectedReview=null},checkScrollability(){const t=this.$listEl;t&&(this.isScrollable=t.scrollWidth>t.clientWidth)},scrollLeft(){const t=this.$listEl;t&&t.scrollBy({left:-1500,behavior:"smooth"})},scrollRight(){const t=this.$listEl;t&&t.scrollBy({left:1500,behavior:"smooth"})},initMasonry(){if(CSS.supports("grid-template-rows","masonry")){const t=this.$el.querySelector(".list-grid");t&&t.classList.remove("list-grid--masonry-fallback")}else{const t=this.$el.querySelector(".list-grid");if(t){t.classList.add("list-grid--masonry-fallback");t.querySelectorAll("review-card").forEach(t=>{t.classList.add("masonry-item")})}}}},mounted(){Promise.all([this.fetchAverage(),this.fetchReviews()]).then(()=>{this.checkScrollability(),this.initMasonry(),window.addEventListener("resize",()=>{this.checkScrollability(),this.initMasonry()})})},beforeDestroy(){window.removeEventListener("resize",this.checkScrollability)},components:{ReviewCard:()=>Promise.all([r.e(0),r.e(5)]).then(r.bind(null,75)),Quickview:()=>Promise.all([r.e(0),r.e(9),r.e(2)]).then(r.bind(null,101)),Compact:()=>r.e(3).then(r.bind(null,102)),Center:()=>r.e(4).then(r.bind(null,105)),Summary:()=>r.e(6).then(r.bind(null,106)),Padrao:()=>r.e(8).then(r.bind(null,103)),Histogram:()=>r.e(7).then(r.bind(null,104))}},yt=(r(21),Object(gt.a)(vt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],staticClass:"martan-reviews container"},[t.title?r("p",{staticClass:"lead"},[r("a",{attrs:{href:"#reviews",name:t.title||"reviews"}},[t._v("#")]),t._v(" "+t._s(t.title)+" ")]):t._e(),r(t.config.widget_review.header_layout,{tag:"component",attrs:{config:t.config,rating:t.average,recommended:t.totalRecommended,average:t.averageTotal,"total-rating":t.total,list:t.list,"order-rating":t.orderRating,offset:t.offset},on:{"rating-selected":t.updateOrderBy}}),r("div",{class:t.config.widget_review.reviews_layout},[r("transition-group",{class:t.config.widget_review.reviews_layout,attrs:{name:"review-list",tag:"div"}},t._l(t.list,(function(e){return r("review-card",{key:e.id,staticClass:"masonry-item",attrs:{review:e,"star-color":t.config.widget_review.star_color},on:{openQuickview:t.openQuickview}})})),1)],1),t.showLoadMore()?r("div",{staticClass:"actions"},[r("div",{staticClass:"pagination"},[r("button",{staticClass:"btn btn-primary",attrs:{disabled:t.loading},on:{click:t.loadMore}},[t._v(" "+t._s(t.loading?"Carregando..":"Mostrar mais avaliações")+" ")])])]):t._e(),r("Quickview",{attrs:{isOpen:t.isOpenQuickView,review:t.selectedReview,starColor:t.config.widget_review.star_color},on:{onClose:t.onCloseQuickview}}),r("div",{staticClass:"credit"},[t._v(" Avaliações reais, auditadas por "),r("a",{attrs:{href:t.getUrl,target:"_blank",rel:"noopener"}},[t._v("MARTAN.app")])])],1)}),[],!1,null,"1f781a3f",null).exports),bt={name:"Questions",props:{...dt.a,product:{type:String,required:!0}},data:()=>({list:[],total:0,limit:4,offset:0,searchQuery:"",loading:!1,searchTimeout:null,showIframe:!1,iframeError:null,iframeHeight:215}),computed:{title(){const t=this.config||{};return t.widget_questions&&t.widget_questions.title?t.widget_questions.title:null},iframeUrl(){let t=null,e=null;if(window.storefront&&window.storefront.settings&&(e=encodeURIComponent(`https://${window.storefront.settings.domain}/storefront.css`),t=window.storefront.settings.domain),!window.storefront||!window.storefront.context||!window.storefront.context.body)return"";const r=window.storefront.context.body._id,n=window.storefront.context.body.sku,i=this.config.web_id,o=this.config.store_id,s=window.location.origin||t;return`${Rt}/?product=${r}&sku=${n}&web_id=${i}&store_id=${o}&origin=${encodeURIComponent(s)}&stylesheet=${e}`}},watch:{searchQuery(t){if(this.searchTimeout&&clearTimeout(this.searchTimeout),!t.trim())return this.offset=0,void this.fetchQuestions();this.searchTimeout=setTimeout(()=>{this.offset=0,this.fetchQuestions()},500)}},mounted(){this.fetchQuestions(),this.setupIframeMessageListener()},beforeDestroy(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.removeIframeMessageListener()},methods:{fetchQuestions(){const t={limit:this.limit,offset:this.offset,sku:this.product,expand:"reply"};this.searchQuery.trim()&&(t.terms=this.searchQuery.trim()),this.loading=!0,axios({url:Et+"/api/v1/questions.json",headers:{"X-Store-Id":this.config.store_id,"X-Api-Key":this.config.web_id},params:t}).then(({data:t})=>{const{result:e,meta:r}=t;0===this.offset?this.list=e:this.list=[...this.list,...e],this.total=r.count}).finally(()=>{this.loading=!1})},loadMoreQuestions(){this.offset+=this.limit,this.fetchQuestions()},askQuestion(){this.showIframe=!this.showIframe,this.showIframe&&(this.iframeError=null)},handleIframeError(){this.iframeError="Erro ao carregar o iframe. Verifique se o servidor está rodando e se não há restrições de X-Frame-Options."},clearSearch(){this.searchQuery="",this.offset=0,this.fetchQuestions()},setupIframeMessageListener(){this.messageHandler=t=>{"iframe_height_change"===t.data.type&&(this.iframeHeight=t.data.height)},window.addEventListener("message",this.messageHandler)},removeIframeMessageListener(){this.messageHandler&&window.removeEventListener("message",this.messageHandler)}}},_t=(r(23),Object(gt.a)(bt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.config.widget_questions.is_enabled?r("div",{staticClass:"martan-questions container"},[t.title?r("p",{staticClass:"lead"},[r("a",{attrs:{href:"#questions",name:t.title||"Perguntas e respostas"}},[t._v("#")]),t._v(" "+t._s(t.title)+" ")]):t._e(),r("div",{staticClass:"questions-search"},[r("div",{staticClass:"search-input-group"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.searchQuery,expression:"searchQuery"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Busque uma pergunta ou palavra-chave..."},domProps:{value:t.searchQuery},on:{input:function(e){e.target.composing||(t.searchQuery=e.target.value)}}}),t.config.widget_questions.enable_new_questions?r("div",{staticClass:"questions-footer"},[r("button",{staticClass:"view-more-link",attrs:{type:"button","aria-expanded":t.showIframe,"aria-controls":"question-iframe","aria-label":"Abrir formulário para fazer uma nova pergunta"},on:{click:t.askQuestion}},[t._v(" Não encontrou a resposta para sua pergunta? Faça uma pergunta. ")])]):t._e(),t.showIframe?r("div",{staticClass:"iframe-container"},[r("iframe",{staticClass:"question-iframe",attrs:{id:"question-iframe",src:t.iframeUrl,width:"580",height:t.iframeHeight,frameborder:"0",title:"Formulário para fazer nova pergunta"},on:{error:t.handleIframeError}})]):t._e()])]),t.list.length>0?r("div",{staticClass:"questions-list"},t._l(t.list,(function(e){return r("div",{key:e._id,staticClass:"question-item"},[r("div",{staticClass:"question-text"},[t._v(" "+t._s(e.body)+" ")]),e.reply?r("div",{staticClass:"answer-container"},[t._m(0,!0),r("div",{staticClass:"answer-text"},[t._v(" "+t._s(e.reply.body)+" ")])]):t._e()])})),0):t.loading||0!==t.list.length?t._e():r("div",{staticClass:"no-questions"},[t._v(" Nenhuma pergunta encontrada para este produto. ")]),t.loading?r("div",{staticClass:"loading"},[t._v(" Carregando perguntas... ")]):t._e(),t.list.length<t.total?r("div",{staticClass:"actions"},[r("div",{staticClass:"pagination"},[r("button",{staticClass:"btn btn-primary",attrs:{disabled:t.loading},on:{click:t.loadMoreQuestions}},[t._v(" "+t._s(t.loading?"Carregando..":"Mostrar mais perguntas")+" ")])])]):t._e()]):t._e()}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"subtle-hook"},[e("div",{staticClass:"hook-l-shape"})])}],!1,null,"009bb4ce",null).exports);const Et="https://widgets.appmartan.com.br",Rt="https://create-questions.martan.app";e.default=t=>{t&&t.store_id&&t.web_id?(t.widget_questions&&t.widget_questions.is_enabled&&((t={},e="questions_widget")=>{s(t,e,_t,{widget_questions:null})})(t),t.widget_review&&t.widget_review.is_enabled&&((t={},e="reviews_widget")=>{s(t,e,yt)})(t),t.widget_rating&&t.widget_rating.is_enabled&&new wt(t).init()):console.error(new Error("Can't setup Martan widget without `martanStoreId` and `martanWebId`"))}},function(t,r){t.exports=e},function(t,e){t.exports=r},function(t,e){t.exports=n}]).default}));
10
+ e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";r(13)},function(t,e,r){(e=r(8)(!1)).push([t.i,".martan-reviews[data-v-1f781a3f]{color:#444}.martan-reviews .widget-header[data-v-1f781a3f]{align-items:center;display:flex;gap:1rem;justify-content:space-between}.martan-reviews .widget-header__score[data-v-1f781a3f]{max-width:500px;width:100%}.martan-reviews .widget-header__score-average[data-v-1f781a3f]{color:#444;font-size:1.25rem}.martan-reviews .list-expanded[data-v-1f781a3f]{display:flex;flex-direction:column;gap:1rem}.martan-reviews .list-grid[data-v-1f781a3f]{align-items:start;display:grid;gap:1rem;grid-template-columns:repeat(2,1fr);grid-template-rows:masonry;margin:0 auto;max-width:1200px}@media(max-width:768px){.martan-reviews .list-grid[data-v-1f781a3f]{gap:.75rem;grid-template-columns:1fr;grid-template-rows:masonry;max-width:100%}}@media(min-width:769px)and (max-width:1200px){.martan-reviews .list-grid[data-v-1f781a3f]{grid-template-columns:repeat(2,1fr);grid-template-rows:masonry;max-width:100%}}@media(min-width:1201px){.martan-reviews .list-grid[data-v-1f781a3f]{grid-template-columns:repeat(2,minmax(0,580px));grid-template-rows:masonry;justify-content:center}}@supports not (grid-template-rows:masonry){.martan-reviews .list-grid[data-v-1f781a3f]{align-content:flex-start;display:flex;flex-direction:column;flex-wrap:wrap;max-height:none}@media(min-width:769px){.martan-reviews .list-grid[data-v-1f781a3f]{align-content:flex-start;flex-direction:row}}}.martan-reviews .list-grid--masonry-fallback[data-v-1f781a3f]{-moz-column-count:1;column-count:1;-moz-column-gap:1rem;column-gap:1rem;display:block}@media(min-width:769px){.martan-reviews .list-grid--masonry-fallback[data-v-1f781a3f]{-moz-column-count:2;column-count:2}}@media(min-width:1201px){.martan-reviews .list-grid--masonry-fallback[data-v-1f781a3f]{-moz-column-count:2;column-count:2;margin:0 auto;max-width:1200px}}.martan-reviews .list-grid--masonry-fallback .masonry-item[data-v-1f781a3f]{-moz-column-break-inside:avoid;break-inside:avoid;display:inline-block;margin-bottom:1rem;width:100%}.martan-reviews .reviews-with-pictures[data-v-1f781a3f]{background-color:rgba(255,236,219,.102);border:1px solid rgba(255,236,219,.102);border-radius:.25rem;display:flex;flex-direction:column;font-size:80%;gap:.5rem;margin-top:1rem;padding:2rem;width:100%}.martan-reviews .reviews-with-pictures .list[data-v-1f781a3f]{-webkit-overflow-scrolling:touch;display:flex;flex-direction:row;gap:1rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}.martan-reviews .reviews-with-pictures .list[data-v-1f781a3f]::-webkit-scrollbar{display:none}.martan-reviews .reviews-with-pictures .list img[data-v-1f781a3f]{border-radius:.25rem;cursor:pointer;height:80px;-o-object-fit:cover;object-fit:cover;width:80px}.martan-reviews .credit[data-v-1f781a3f]{color:#a1a1aa;font-size:.75rem;line-height:1rem;margin-top:1rem;text-align:right}.martan-reviews .credit a[data-v-1f781a3f]{color:#0f172a!important}.martan-reviews .actions[data-v-1f781a3f]{display:flex;justify-content:center;margin-bottom:1rem;margin-top:1rem}.martan-reviews .review-list-enter-active[data-v-1f781a3f],.martan-reviews .review-list-leave-active[data-v-1f781a3f]{transition:all .3s ease}.martan-reviews .review-list-enter-from[data-v-1f781a3f]{opacity:0;transform:translateY(20px)}.martan-reviews .review-list-leave-to[data-v-1f781a3f]{opacity:0;transform:translateY(-20px)}.martan-reviews .review-list-move[data-v-1f781a3f]{transition:transform .3s ease}",""]),t.exports=e},function(t,e,r){"use strict";r(14)},function(t,e,r){(e=r(8)(!1)).push([t.i,'.martan-questions[data-v-009bb4ce]{margin-bottom:3rem}.martan-questions .questions-search[data-v-009bb4ce]{margin-bottom:20px}.martan-questions .questions-search .search-input-group[data-v-009bb4ce]{max-width:500px}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]{border:1px solid #e0e0e0;border-radius:8px 0 0 8px;border-right:none;flex:1;font-size:14px;outline:none;padding:12px 16px;transition:border-color .2s}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]:focus{border-color:#69f}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]::-moz-placeholder{color:#999}.martan-questions .questions-search .search-input-group .search-input[data-v-009bb4ce]::placeholder{color:#999}.martan-questions .questions-search .search-input-group .search-button[data-v-009bb4ce]{align-items:center;background-color:#69f;border:1px solid #69f;border-radius:0 8px 8px 0;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:12px 16px;transition:background-color .2s}.martan-questions .questions-search .search-input-group .search-button[data-v-009bb4ce]:hover:not(:disabled){background-color:#58e}.martan-questions .questions-search .search-input-group .search-button[data-v-009bb4ce]:disabled{cursor:not-allowed;opacity:.6}.martan-questions .questions-list .question-item[data-v-009bb4ce]{border-bottom:1px solid #f0f0f0;margin-bottom:20px;padding-bottom:20px}.martan-questions .questions-list .question-item[data-v-009bb4ce]:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.martan-questions .questions-list .question-item .question-text[data-v-009bb4ce]{color:#333;font-size:.9375rem;font-weight:500;line-height:1.4;margin-bottom:12px}.martan-questions .questions-list .question-item .answer-container[data-v-009bb4ce]{align-items:flex-start;display:flex;margin-top:8px;position:relative}.martan-questions .questions-list .question-item .answer-container .subtle-hook[data-v-009bb4ce]{flex-shrink:0;height:12px;margin-right:16px;margin-top:6px;position:relative;width:12px}.martan-questions .questions-list .question-item .answer-container .subtle-hook .hook-l-shape[data-v-009bb4ce]{height:12px;position:relative;width:12px}.martan-questions .questions-list .question-item .answer-container .subtle-hook .hook-l-shape[data-v-009bb4ce]:before{background-color:#d0d0d0;content:"";height:8px;left:0;position:absolute;top:0;width:1px}.martan-questions .questions-list .question-item .answer-container .subtle-hook .hook-l-shape[data-v-009bb4ce]:after{background-color:#d0d0d0;content:"";height:1px;left:0;position:absolute;top:7px;width:6px}.martan-questions .questions-list .question-item .answer-container .answer-text[data-v-009bb4ce]{color:#666;flex:1;font-weight:300;line-height:1.4}.martan-questions .no-questions[data-v-009bb4ce]{color:#999;font-style:italic;padding:40px 20px;text-align:center}.martan-questions .loading[data-v-009bb4ce]{color:#666;padding:20px;text-align:center}.martan-questions .questions-footer .view-more-link[data-v-009bb4ce]{background:none;border:none;color:#69f;cursor:pointer;font-family:inherit;font-size:14px;padding:0;text-decoration:none}.martan-questions .questions-footer .view-more-link[data-v-009bb4ce]:hover{text-decoration:underline}.martan-questions .questions-footer .view-more-link[data-v-009bb4ce]:focus{border-radius:2px;outline:2px solid #69f;outline-offset:2px}.martan-questions .iframe-container[data-v-009bb4ce]{border:1px solid #e0e0e0;border-radius:4px;margin-top:20px;max-width:580px;overflow:hidden}.martan-questions .iframe-container .question-iframe[data-v-009bb4ce]{border:none;display:block;width:100%}.martan-questions .ask-question-section[data-v-009bb4ce]{margin-top:30px}.martan-questions .ask-question-section .ask-question-button[data-v-009bb4ce]{align-items:center;background-color:#e6f2ff;border:1px solid #b3d9ff;border-radius:8px;color:#69f;cursor:pointer;display:inline-flex;font-size:14px;gap:8px;padding:12px 20px;transition:all .2s}.martan-questions .ask-question-section .ask-question-button[data-v-009bb4ce]:hover{background-color:#d1e7ff;border-color:#9cf}.martan-questions .ask-question-section .ask-question-button svg[data-v-009bb4ce]{flex-shrink:0}.martan-questions .actions[data-v-009bb4ce]{display:flex;justify-content:center;margin-bottom:1rem;margin-top:1rem}',""]),t.exports=e},function(t,e,r){"use strict";r.r(e),r.d(e,"MARTAN_API",(function(){return Et})),r.d(e,"MARTAN_QUESTIONS_WEBUI",(function(){return Rt}));var n={};r.r(n),r.d(n,"hasBrowserEnv",(function(){return b})),r.d(n,"hasStandardBrowserWebWorkerEnv",(function(){return R})),r.d(n,"hasStandardBrowserEnv",(function(){return _}));var i=r(5),o=r.n(i),s=(t={},e,r,n={})=>{const i=document.getElementById(e);if(!(t&&i&&i.dataset&&i.dataset.product))return;const{product:s}=i.dataset,a={store_id:null,web_id:null,widget_key:null,widget_rating:null,widget_review:null,widget_questions:null,...n,...t};if("function"==typeof window.IntersectionObserver){new window.IntersectionObserver((t,e)=>{t.forEach((function(t){const{isIntersecting:n,intersectionRatio:c}=t;(!0===n||c>0)&&(new o.a({render:t=>t(r,{props:{config:a,product:s}})}).$mount(i),e.disconnect())}))},{rootMargin:"250px"}).observe(i)}},a=r(0),c=r(6),u=r(2);function l(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function f(t,e){this._pairs=[],t&&Object(u.a)(t,this,e)}const h=f.prototype;h.append=function(t,e){this._pairs.push([t,e])},h.toString=function(t){const e=t?function(e){return t.call(this,e,l)}:l;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var d=f;function p(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function g(t,e,r){if(!e)return t;const n=r&&r.encode||p,i=r&&r.serialize;let o;if(o=i?i(e,r):a.a.isURLSearchParams(e)?e.toString():new d(e,r).toString(n),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}var m=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.a.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},w=r(1),v={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},y={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:d,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const b="undefined"!=typeof window&&"undefined"!=typeof document,_=(E="undefined"!=typeof navigator&&navigator.product,b&&["ReactNative","NativeScript","NS"].indexOf(E)<0);var E;const R="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var x={...n,...y};var S=function(t){function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),c=i>=t.length;if(o=!o&&a.a.isArray(n)?n.length:o,c)return a.a.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&a.a.isObject(n[o])||(n[o]=[]);return e(t,r,n[o],i)&&a.a.isArray(n[o])&&(n[o]=function(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}(n[o])),!s}if(a.a.isFormData(t)&&a.a.isFunction(t.entries)){const r={};return a.a.forEachEntry(t,(t,n)=>{e(function(t){return a.a.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}(t),n,r,0)}),r}return null};const A={transitional:v,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,i=a.a.isObject(t);i&&a.a.isHTMLForm(t)&&(t=new FormData(t));if(a.a.isFormData(t))return n?JSON.stringify(S(t)):t;if(a.a.isArrayBuffer(t)||a.a.isBuffer(t)||a.a.isStream(t)||a.a.isFile(t)||a.a.isBlob(t))return t;if(a.a.isArrayBufferView(t))return t.buffer;if(a.a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Object(u.a)(t,new x.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return x.isNode&&a.a.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=a.a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Object(u.a)(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),function(t,e,r){if(a.a.isString(t))try{return(e||JSON.parse)(t),a.a.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||A.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&a.a.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw w.a.from(t,w.a.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.a.forEach(["delete","get","head","post","put","patch"],t=>{A.headers[t]={}});var O=A;const C=a.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const T=Symbol("internals");function P(t){return t&&String(t).trim().toLowerCase()}function k(t){return!1===t||null==t?t:a.a.isArray(t)?t.map(k):String(t)}function q(t,e,r,n,i){return a.a.isFunction(n)?n.call(this,e,r):(i&&(e=r),a.a.isString(e)?a.a.isString(n)?-1!==e.indexOf(n):a.a.isRegExp(n)?n.test(e):void 0:void 0)}class B{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function i(t,e,r){const i=P(e);if(!i)throw new Error("header name must be a non-empty string");const o=a.a.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||e]=k(t))}const o=(t,e)=>a.a.forEach(t,(t,r)=>i(t,r,e));return a.a.isPlainObject(t)||t instanceof this.constructor?o(t,e):a.a.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?o((t=>{const e={};let r,n,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&C[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&i(e,t,r),this}get(t,e){if(t=P(t)){const r=a.a.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(a.a.isFunction(e))return e.call(this,t,r);if(a.a.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=P(t)){const r=a.a.findKey(this,t);return!(!r||void 0===this[r]||e&&!q(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function i(t){if(t=P(t)){const i=a.a.findKey(r,t);!i||e&&!q(0,r[i],i,e)||(delete r[i],n=!0)}}return a.a.isArray(t)?t.forEach(i):i(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const i=e[r];t&&!q(0,this[i],i,t,!0)||(delete this[i],n=!0)}return n}normalize(t){const e=this,r={};return a.a.forEach(this,(n,i)=>{const o=a.a.findKey(r,i);if(o)return e[o]=k(n),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}(i):String(i).trim();s!==i&&delete e[i],e[s]=k(n),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return a.a.forEach(this,(r,n)=>{null!=r&&!1!==r&&(e[n]=t&&a.a.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(t){const e=(this[T]=this[T]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=P(t);e[n]||(!function(t,e){const r=a.a.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(t,r,i){return this[n].call(this,e,t,r,i)},configurable:!0})})}(r,t),e[n]=!0)}return a.a.isArray(t)?t.forEach(n):n(t),this}}B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.a.reduceDescriptors(B.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),a.a.freezeMethods(B);var U=B;function j(t,e){const r=this||O,n=e||r,i=U.from(n.headers);let o=n.data;return a.a.forEach(t,(function(t){o=t.call(r,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function N(t){return!(!t||!t.__CANCEL__)}function L(t,e,r){w.a.call(this,null==t?"canceled":t,w.a.ERR_CANCELED,e,r),this.name="CanceledError"}a.a.inherits(L,w.a,{__CANCEL__:!0});var M=L,I=r(7);var F=x.hasStandardBrowserEnv?{write(t,e,r,n,i,o){const s=[t+"="+encodeURIComponent(e)];a.a.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),a.a.isString(n)&&s.push("path="+n),a.a.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function D(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var z=x.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=a.a.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};var $=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=n[s];i||(i=c),r[o]=a,n[o]=c;let l=s,f=0;for(;l!==o;)f+=r[l++],l%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-i<e)return;const h=u&&c-u;return h?Math.round(1e3*f/h):void 0}};function Y(t,e){let r=0;const n=$(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-r,c=n(a);r=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:i};u[e?"download":"upload"]=!0,t(u)}}var Q="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const i=U.from(t.headers).normalize();let o,s,{responseType:c,withXSRFToken:u}=t;function l(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(a.a.isFormData(n))if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(s=i.getContentType())){const[t,...e]=s?s.split(";").map(t=>t.trim()).filter(Boolean):[];i.setContentType([t||"multipart/form-data",...e].join("; "))}let f=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+r))}const h=D(t.baseURL,t.url);function d(){if(!f)return;const n=U.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new w.a("Request failed with status code "+r.status,[w.a.ERR_BAD_REQUEST,w.a.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),l()}),(function(t){r(t),l()}),{data:c&&"text"!==c&&"json"!==c?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f}),f=null}if(f.open(t.method.toUpperCase(),g(h,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,"onloadend"in f?f.onloadend=d:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(d)},f.onabort=function(){f&&(r(new w.a("Request aborted",w.a.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new w.a("Network Error",w.a.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||v;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new w.a(e,n.clarifyTimeoutError?w.a.ETIMEDOUT:w.a.ECONNABORTED,t,f)),f=null},x.hasStandardBrowserEnv&&(u&&a.a.isFunction(u)&&(u=u(t)),u||!1!==u&&z(h))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&F.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===n&&i.setContentType(null),"setRequestHeader"in f&&a.a.forEach(i.toJSON(),(function(t,e){f.setRequestHeader(e,t)})),a.a.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),c&&"json"!==c&&(f.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",Y(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",Y(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{f&&(r(!e||e.type?new M(null,t,f):e),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(h);p&&-1===x.protocols.indexOf(p)?r(new w.a("Unsupported protocol "+p+":",w.a.ERR_BAD_REQUEST,t)):f.send(n||null)}))};const H={http:I.a,xhr:Q};a.a.forEach(H,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}});const J=t=>"- "+t,V=t=>a.a.isFunction(t)||null===t||!1===t;var W=t=>{t=a.a.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let o=0;o<e;o++){let e;if(r=t[o],n=r,!V(r)&&(n=H[(e=String(r)).toLowerCase()],void 0===n))throw new w.a(`Unknown adapter '${e}'`);if(n)break;i[e||"#"+o]=n}if(!n){const t=Object.entries(i).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));let r=e?t.length>1?"since :\n"+t.map(J).join("\n"):" "+J(t[0]):"as no adapter specified";throw new w.a("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function K(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new M(null,t)}function X(t){K(t),t.headers=U.from(t.headers),t.data=j.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return W(t.adapter||O.adapter)(t).then((function(e){return K(t),e.data=j.call(t,t.transformResponse,e),e.headers=U.from(e.headers),e}),(function(e){return N(e)||(K(t),e&&e.response&&(e.response.data=j.call(t,t.transformResponse,e.response),e.response.headers=U.from(e.response.headers))),Promise.reject(e)}))}const G=t=>t instanceof U?{...t}:t;function Z(t,e){e=e||{};const r={};function n(t,e,r){return a.a.isPlainObject(t)&&a.a.isPlainObject(e)?a.a.merge.call({caseless:r},t,e):a.a.isPlainObject(e)?a.a.merge({},e):a.a.isArray(e)?e.slice():e}function i(t,e,r){return a.a.isUndefined(e)?a.a.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function o(t,e){if(!a.a.isUndefined(e))return n(void 0,e)}function s(t,e){return a.a.isUndefined(e)?a.a.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function c(r,i,o){return o in e?n(r,i):o in t?n(void 0,r):void 0}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(t,e)=>i(G(t),G(e),!0)};return a.a.forEach(Object.keys(Object.assign({},t,e)),(function(n){const o=u[n]||i,s=o(t[n],e[n],n);a.a.isUndefined(s)&&o!==c||(r[n]=s)})),r}const tt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{tt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const et={};tt.transitional=function(t,e,r){function n(t,e){return"[Axios v1.6.8] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,i,o)=>{if(!1===t)throw new w.a(n(i," has been removed"+(e?" in "+e:"")),w.a.ERR_DEPRECATED);return e&&!et[i]&&(et[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,i,o)}};var rt={assertOptions:function(t,e,r){if("object"!=typeof t)throw new w.a("options must be an object",w.a.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const e=t[o],r=void 0===e||s(e,o,t);if(!0!==r)throw new w.a("option "+o+" must be "+r,w.a.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new w.a("Unknown option "+o,w.a.ERR_BAD_OPTION)}},validators:tt};const nt=rt.validators;class it{constructor(t){this.defaults=t,this.interceptors={request:new m,response:new m}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Z(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:i}=e;void 0!==r&&rt.assertOptions(r,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),null!=n&&(a.a.isFunction(n)?e.paramsSerializer={serialize:n}:rt.assertOptions(n,{encode:nt.function,serialize:nt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&a.a.merge(i.common,i[e.method]);i&&a.a.forEach(["delete","get","head","post","put","patch","common"],t=>{delete i[t]}),e.headers=U.concat(o,i);const s=[];let c=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const u=[];let l;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let f,h=0;if(!c){const t=[X.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,u),f=t.length,l=Promise.resolve(e);h<f;)l=l.then(t[h++],t[h++]);return l}f=s.length;let d=e;for(h=0;h<f;){const t=s[h++],e=s[h++];try{d=t(d)}catch(t){e.call(this,t);break}}try{l=X.call(this,d)}catch(t){return Promise.reject(t)}for(h=0,f=u.length;h<f;)l=l.then(u[h++],u[h++]);return l}getUri(t){return g(D((t=Z(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}a.a.forEach(["delete","get","head","options"],(function(t){it.prototype[t]=function(e,r){return this.request(Z(r||{},{method:t,url:e,data:(r||{}).data}))}})),a.a.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,i){return this.request(Z(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}it.prototype[t]=e(),it.prototype[t+"Form"]=e(!0)}));var ot=it;class st{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then(t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null}),this.promise.then=t=>{let e;const n=new Promise(t=>{r.subscribe(t),e=t}).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,i){r.reason||(r.reason=new M(t,n,i),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new st((function(e){t=e})),cancel:t}}}var at=st;const ct={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ct).forEach(([t,e])=>{ct[e]=t});var ut=ct;const lt=function t(e){const r=new ot(e),n=Object(c.a)(ot.prototype.request,r);return a.a.extend(n,ot.prototype,r,{allOwnKeys:!0}),a.a.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Z(e,r))},n}(O);lt.Axios=ot,lt.CanceledError=M,lt.CancelToken=at,lt.isCancel=N,lt.VERSION="1.6.8",lt.toFormData=u.a,lt.AxiosError=w.a,lt.Cancel=lt.CanceledError,lt.all=function(t){return Promise.all(t)},lt.spread=function(t){return function(e){return t.apply(null,e)}},lt.isAxiosError=function(t){return a.a.isObject(t)&&!0===t.isAxiosError},lt.mergeConfig=Z,lt.AxiosHeaders=U,lt.formToJSON=t=>S(a.a.isHTMLForm(t)?new FormData(t):t),lt.getAdapter=W,lt.HttpStatusCode=ut,lt.default=lt;var ft=lt,ht=r(10),dt=r(4),pt={name:"Rating",props:{...dt.a,rating:{type:Number,default:0},totalReviews:{type:Number,default:0}},data:()=>({stars:Array(5).fill(0)}),mounted(){this.updateStars()},computed:{isCompact(){return"compact"===this.config.widget_rating.theme},fontSize(){const t=this.config.widget_rating.font_size;return t?"number"==typeof t?t+"px":t:this.isCompact?"16px":"14px"},fontSizeNumber(){const t=this.config.widget_rating.font_size;if(!t)return this.isCompact?16:14;if("number"==typeof t)return t;const e=String(t).match(/^(\d+(?:\.\d+)?)/);return e?parseFloat(e[1]):this.isCompact?16:14},compactFillPercentage(){const t=Math.max(0,Math.min(5,this.rating));return t<=2?t/2*25:t<=3?25+(t-2)/1.5*20:t<=4.5?45+(t-3.5)/1*25:70+(t-4.5)/.5*30},starColor(){return this.config.widget_rating.star_color||"#ffc107"},ratingText(){return this.formatNumber(this.totalReviews)},colorClosest(){return Object(ht.a)(this.config.widget_rating.star_color,.3)},normalizeRating(){return Number.isInteger(this.rating)?this.rating:Number(this.rating.toFixed(1))}},methods:{lightenColor:ht.a,formatNumber:t=>t>=1e6?(t/1e6).toFixed(1).replace(/\.0$/,"")+"M":t>=1e3?(t/1e3).toFixed(1).replace(/\.0$/,"")+"k":t.toString(),updateStars(){const t=Math.max(0,Math.min(5,this.rating));this.stars=Array(5).fill(0).map((e,r)=>t>=r+1?1:t>r?.5:0)},getStarClass:t=>1===t?"icon-tabler-star-filled":.5===t?"icon-tabler-star-half":"icon-tabler-star",getStarFill(t,e){return 1===t?this.starColor:.5===t?`url(#gradient-${e})`:"none"}},watch:{rating:"updateStars"}},gt=(r(15),r(3)),mt=Object(gt.a)(pt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("span",{staticClass:"martan-rating",class:{"martan-rating--compact":t.isCompact}},[t.isCompact?[r("div",{staticClass:"martan-rating-compact"},[r("svg",{staticClass:"icon icon-tabler martan-rating-compact__star",style:{color:t.config.widget_rating.star_color},attrs:{xmlns:"http://www.w3.org/2000/svg",width:t.fontSizeNumber,height:t.fontSizeNumber,viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}},[r("defs",[r("linearGradient",{attrs:{id:"compact-gradient-"+t._uid,x1:"0%",y1:"0%",x2:"100%",y2:"0%"}},[r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:1",attrs:{offset:"0%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:1",attrs:{offset:t.compactFillPercentage+"%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:0",attrs:{offset:t.compactFillPercentage+"%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:0",attrs:{offset:"100%"}})],1)],1),r("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),r("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",fill:"url(#compact-gradient-"+t._uid+")"}})]),r("span",{staticClass:"martan-rating-compact__text",style:{fontSize:t.fontSize}},[t._v(t._s(t.normalizeRating)+" / 5")])])]:[t._l(t.stars,(function(e,n){return r("svg",{key:n,staticClass:"icon icon-tabler",class:t.getStarClass(e),style:{color:t.config.widget_rating.star_color},attrs:{xmlns:"http://www.w3.org/2000/svg",width:t.fontSizeNumber,height:t.fontSizeNumber,viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:t.getStarFill(e,n),"stroke-linecap":"round","stroke-linejoin":"round"}},[.5===e?r("defs",[r("linearGradient",{attrs:{id:"gradient-"+n,x1:"0%",y1:"0%",x2:"100%",y2:"0%"}},[r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:1",attrs:{offset:"50%"}}),r("stop",{style:"stop-color:"+t.config.widget_rating.star_color+";stop-opacity:0",attrs:{offset:"50%"}})],1)],1):t._e(),r("path",{attrs:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}}),r("path",{attrs:{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",fill:t.getStarFill(e,n)}})])})),r("span",{staticClass:"martan-rating-text",style:{color:"var(--gray-dark)",fontSize:t.fontSize}},[t._v(t._s(t.normalizeRating)+" / 5")]),r("span",{staticClass:"martan-rating-text",style:{color:"var(--gray)",fontSize:t.fontSize}},[t._v("("+t._s(t.totalReviews)+")")])]],2)}),[],!1,null,null,null).exports;var wt=class{constructor(t){this.list=[],this.offset=0,this.loading=!1,this.options=t}async init(){try{await this.fetchRatings(),await this.mounted(),this.listenerForSearchPage()}catch(t){console.error("@Martan/Ratings init error",t)}}async fetchRatings(){if(this.loading)return Promise.resolve();if(this.loading=!0,this.loadFromLocalStorage())return this.loading=!1,Promise.resolve();return ft({url:Et+"/api/v1/ratings.json?expand=metrics",headers:{"X-Store-Id":this.options.store_id,"X-Api-Key":this.options.web_id}}).then(({data:t})=>(this.list=t.result||[],this.saveToLocalStorage({result:t.result,timestamp:Date.now()}))).catch(t=>{console.error("Ratings fetchRatings error",t)})}loadFromLocalStorage(){try{const t=window.localStorage.getItem("martan_ratings");if(t){const e=JSON.parse(t);return!!(e&&e.result&&e.timestamp&&Date.now()-e.timestamp<864e5)&&(this.list=e.result,!0)}}catch(t){return console.error("Ratings loadFromLocalStorage error",t),!1}}saveToLocalStorage(t){window.localStorage.setItem("martan_ratings",JSON.stringify(t))}getProductRatingFromList(t){return t&&this.list&&0!==this.list.length?this.list.find(e=>e.sku===t):null}getClasses(){const t=[".product-card__rating",".mt-review-average"];return this.options.widget_rating.custom_class&&t.push(this.options.widget_rating.custom_class),t}async mounted(){const t=this.getClasses(),e=document.querySelectorAll(t.join(",")),r=[];Array.from(e).forEach(t=>{r.push(this.renderRating(t))}),await Promise.all(r).then(()=>{this.listenerForNewRatings()})}async renderRating(t){return new Promise(e=>{if(!t.dataset)return e();const r=this.getProductFromElement(t);if(!r)return e();const n=this.getProductRatingFromList(r);if(n&&0===n.total&&"gt1"===this.options.widget_rating.display||!n&&"gt1"===this.options.widget_rating.display)return e();const i=document.createElement("div"),s=this.options;return new o.a({render:t=>t(mt,{props:{rating:n&&n.average?n.average:0,totalReviews:n&&n.total?n.total:0,config:s}})}).$mount(t),t.setAttribute("data-martan-rating-id",this.generateId()),t.appendChild(i),e()})}generateId(t){return Math.random().toString(36).replace("0.",t||"")}listenerForNewRatings(){new window.MutationObserver(this.callbackForNewRatings.bind(this)).observe(document.body,{childList:!0,attributes:!1,subtree:!1})}callbackForNewRatings(t,e){t.forEach(t=>{"childList"===t.type&&t.addedNodes.forEach(t=>{this.isMartanElement(t)&&this.getProductFromElement(t)&&this.renderRating(t)})})}isMartanElement(t){let e=!1;const r=this.getClasses();return t.classList.length&&t.classList.forEach(t=>{r.includes(t)&&(e=!0)}),e}getProductFromElement(t){return t.dataset&&(t.dataset.martanProductId||t.dataset.product||t.dataset.sku||t.dataset.martanProductSku)||null}listenerForSearchPage(){const t=document.getElementById("search-engine");if(!t||!this.options.widget_rating.search_page)return!1;const e=new window.MutationObserver(()=>{e.disconnect();const r=t.querySelectorAll(".search-engine__retail > .row")[0],n=new window.MutationObserver(()=>{setTimeout(()=>{this.mounted()},100),n.disconnect()});n.observe(r,{childList:!0,subtree:!0})});e.observe(t,{attributes:!0,childList:!0})}},vt={name:"Reviews",props:{...dt.a,product:{type:String,required:!0}},data:()=>({list:[],total:0,limit:4,offset:0,loading:!1,orderRating:null,orderReviews:null,$isSorting:!1,$count:null,hasMore:!1,averageTotal:0,totalRecommended:null,average:{one:0,two:0,three:0,four:0,five:0},isOpenQuickView:!1,selectedReview:null,isScrollable:!1,$listEl:null}),watch:{onlyWithPictures:function(t){!this.$listEl&&t.length>0&&(this.$listEl=document.querySelector(".reviews-with-pictures"))},orderRating:function(t,e){t!==e&&(this.list=[],this.fetchReviews())},orderReviews:function(t,e){t!==e&&(this.list=[],this.fetchReviews())},limit:function(){this.fetchReviews()},offset:function(){this.fetchReviews()}},computed:{i19basedOn$1Reviews:()=>"Baseado em $1 avaliações",i19basedOn$1Review:()=>"Baseado em $1 avaliação",i19noReview:()=>"Nenhuma avaliação",onlyWithPictures(){return this.list.filter(t=>t.pictures&&t.pictures.length>0)},getUrl:()=>"https://www.martan.app/?ref="+new URL(window.location.href).origin,title(){return this.config.widget_review.title?this.config.widget_review.title:null}},methods:{fetchReviews(){const t={limit:this.limit,offset:this.offset,sku:this.product};this.orderReviews&&(t.orderBy=this.orderReviews,t.limit=this.limit,t.offset=0),this.orderRating&&(t.rating=this.orderRating),this.$count=null,this.loading=!0,axios({url:Et+"/api/v1/reviews.json",headers:{"X-Store-Id":this.config.store_id,"X-Api-Key":this.config.web_id},params:t}).then(({data:t})=>{const{result:e,count:r}=t;let n=[];if(this.hasMore=e.length>=this.limit,Array.isArray(this.list)&&!this.orderReviews||this.orderReviews&&this.$isSorting){for(const t of e){this.list.some(e=>e.id===t.id)||this.list.push(t)}n=[...this.list]}else(Array.isArray(this.list)&&this.orderReviews||this.orderRating)&&(n=e,this.$isSorting=!1);return{count:r,list:n}}).then(({count:t,list:e})=>(this.orderRating?this.$count=t:this.total=t,this.list=e,e)).catch(t=>{console.error("Failed to load resource from Martan",t)}).finally(()=>{this.loading=!1})},async fetchAverage(){try{const t=new wt({store_id:this.config.store_id,web_id:this.config.web_id});await t.fetchRatings();const e=t.getProductRatingFromList(this.product);if(e){const{average:t,rate:r,recommended_percentage:n}=e;Object.assign(this.average,r),this.averageTotal=t,this.totalRecommended=n}}catch(t){console.error("Failed to load average from Martan",t)}},loadMore(){this.orderReviews?this.limit=this.limit+this.limit:this.offset++},showLoadMore(){return!this.loading&&(!!this.hasMore&&(this.orderRating?this.$count>0&&this.list.length<this.$count:this.total>0&&this.list.length<this.total))},updateOrderBy(t){t===this.orderRating?this.orderRating=null:(this.offset=0,this.orderRating=t),this.hasMore=!0},onSort({order:t}){this.orderReviews=t,this.hasMore=!0},openQuickview:function({review:t}){this.selectedReview=t,this.isOpenQuickView=!0},onCloseQuickview:function(){this.isOpenQuickView=!1,this.selectedReview=null},checkScrollability(){const t=this.$listEl;t&&(this.isScrollable=t.scrollWidth>t.clientWidth)},scrollLeft(){const t=this.$listEl;t&&t.scrollBy({left:-1500,behavior:"smooth"})},scrollRight(){const t=this.$listEl;t&&t.scrollBy({left:1500,behavior:"smooth"})},initMasonry(){if(CSS.supports("grid-template-rows","masonry")){const t=this.$el.querySelector(".list-grid");t&&t.classList.remove("list-grid--masonry-fallback")}else{const t=this.$el.querySelector(".list-grid");if(t){t.classList.add("list-grid--masonry-fallback");t.querySelectorAll("review-card").forEach(t=>{t.classList.add("masonry-item")})}}}},mounted(){Promise.all([this.fetchAverage(),this.fetchReviews()]).then(()=>{this.checkScrollability(),this.initMasonry(),window.addEventListener("resize",()=>{this.checkScrollability(),this.initMasonry()})})},beforeDestroy(){window.removeEventListener("resize",this.checkScrollability)},components:{ReviewCard:()=>r.e(5).then(r.bind(null,63)),Quickview:()=>Promise.all([r.e(8),r.e(1)]).then(r.bind(null,89)),Compact:()=>r.e(2).then(r.bind(null,90)),Center:()=>r.e(3).then(r.bind(null,93)),Summary:()=>r.e(4).then(r.bind(null,94)),Padrao:()=>r.e(7).then(r.bind(null,91)),Histogram:()=>r.e(6).then(r.bind(null,92))}},yt=(r(21),Object(gt.a)(vt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],staticClass:"martan-reviews container"},[t.title?r("p",{staticClass:"lead"},[r("a",{attrs:{href:"#reviews",name:t.title||"reviews"}},[t._v("#")]),t._v(" "+t._s(t.title)+" ")]):t._e(),r(t.config.widget_review.header_layout,{tag:"component",attrs:{config:t.config,rating:t.average,recommended:t.totalRecommended,average:t.averageTotal,"total-rating":t.total,list:t.list,"order-rating":t.orderRating,offset:t.offset},on:{"rating-selected":t.updateOrderBy}}),r("div",{class:t.config.widget_review.reviews_layout},[r("transition-group",{class:t.config.widget_review.reviews_layout,attrs:{name:"review-list",tag:"div"}},t._l(t.list,(function(e){return r("review-card",{key:e.id,staticClass:"masonry-item",attrs:{review:e,"star-color":t.config.widget_review.star_color},on:{openQuickview:t.openQuickview}})})),1)],1),t.showLoadMore()?r("div",{staticClass:"actions"},[r("div",{staticClass:"pagination"},[r("button",{staticClass:"btn btn-primary",attrs:{disabled:t.loading},on:{click:t.loadMore}},[t._v(" "+t._s(t.loading?"Carregando..":"Mostrar mais avaliações")+" ")])])]):t._e(),r("Quickview",{attrs:{isOpen:t.isOpenQuickView,review:t.selectedReview,starColor:t.config.widget_review.star_color},on:{onClose:t.onCloseQuickview}}),r("div",{staticClass:"credit"},[t._v(" Avaliações reais, auditadas por "),r("a",{attrs:{href:t.getUrl,target:"_blank",rel:"noopener"}},[t._v("MARTAN.app")])])],1)}),[],!1,null,"1f781a3f",null).exports),bt={name:"Questions",props:{...dt.a,product:{type:String,required:!0}},data:()=>({list:[],total:0,limit:4,offset:0,searchQuery:"",loading:!1,searchTimeout:null,showIframe:!1,iframeError:null,iframeHeight:215}),computed:{title(){const t=this.config||{};return t.widget_questions&&t.widget_questions.title?t.widget_questions.title:null},iframeUrl(){let t=null,e=null;if(window.storefront&&window.storefront.settings&&(e=encodeURIComponent(`https://${window.storefront.settings.domain}/storefront.css`),t=window.storefront.settings.domain),!window.storefront||!window.storefront.context||!window.storefront.context.body)return"";const r=window.storefront.context.body._id,n=window.storefront.context.body.sku,i=this.config.web_id,o=this.config.store_id,s=window.location.origin||t;return`${Rt}/?product=${r}&sku=${n}&web_id=${i}&store_id=${o}&origin=${encodeURIComponent(s)}&stylesheet=${e}`}},watch:{searchQuery(t){if(this.searchTimeout&&clearTimeout(this.searchTimeout),!t.trim())return this.offset=0,void this.fetchQuestions();this.searchTimeout=setTimeout(()=>{this.offset=0,this.fetchQuestions()},500)}},mounted(){this.fetchQuestions(),this.setupIframeMessageListener()},beforeDestroy(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.removeIframeMessageListener()},methods:{fetchQuestions(){const t={limit:this.limit,offset:this.offset,sku:this.product,expand:"reply"};this.searchQuery.trim()&&(t.terms=this.searchQuery.trim()),this.loading=!0,axios({url:Et+"/api/v1/questions.json",headers:{"X-Store-Id":this.config.store_id,"X-Api-Key":this.config.web_id},params:t}).then(({data:t})=>{const{result:e,meta:r}=t;0===this.offset?this.list=e:this.list=[...this.list,...e],this.total=r.count}).finally(()=>{this.loading=!1})},loadMoreQuestions(){this.offset+=this.limit,this.fetchQuestions()},askQuestion(){this.showIframe=!this.showIframe,this.showIframe&&(this.iframeError=null)},handleIframeError(){this.iframeError="Erro ao carregar o iframe. Verifique se o servidor está rodando e se não há restrições de X-Frame-Options."},clearSearch(){this.searchQuery="",this.offset=0,this.fetchQuestions()},setupIframeMessageListener(){this.messageHandler=t=>{"iframe_height_change"===t.data.type&&(this.iframeHeight=t.data.height)},window.addEventListener("message",this.messageHandler)},removeIframeMessageListener(){this.messageHandler&&window.removeEventListener("message",this.messageHandler)}}},_t=(r(23),Object(gt.a)(bt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.config.widget_questions.is_enabled?r("div",{staticClass:"martan-questions container"},[t.title?r("p",{staticClass:"lead"},[r("a",{attrs:{href:"#questions",name:t.title||"Perguntas e respostas"}},[t._v("#")]),t._v(" "+t._s(t.title)+" ")]):t._e(),r("div",{staticClass:"questions-search"},[r("div",{staticClass:"search-input-group"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.searchQuery,expression:"searchQuery"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Busque uma pergunta ou palavra-chave..."},domProps:{value:t.searchQuery},on:{input:function(e){e.target.composing||(t.searchQuery=e.target.value)}}}),t.config.widget_questions.enable_new_questions?r("div",{staticClass:"questions-footer"},[r("button",{staticClass:"view-more-link",attrs:{type:"button","aria-expanded":t.showIframe,"aria-controls":"question-iframe","aria-label":"Abrir formulário para fazer uma nova pergunta"},on:{click:t.askQuestion}},[t._v(" Não encontrou a resposta para sua pergunta? Faça uma pergunta. ")])]):t._e(),t.showIframe?r("div",{staticClass:"iframe-container"},[r("iframe",{staticClass:"question-iframe",attrs:{id:"question-iframe",src:t.iframeUrl,width:"580",height:t.iframeHeight,frameborder:"0",title:"Formulário para fazer nova pergunta"},on:{error:t.handleIframeError}})]):t._e()])]),t.list.length>0?r("div",{staticClass:"questions-list"},t._l(t.list,(function(e){return r("div",{key:e._id,staticClass:"question-item"},[r("div",{staticClass:"question-text"},[t._v(" "+t._s(e.body)+" ")]),e.reply?r("div",{staticClass:"answer-container"},[t._m(0,!0),r("div",{staticClass:"answer-text"},[t._v(" "+t._s(e.reply.body)+" ")])]):t._e()])})),0):t.loading||0!==t.list.length?t._e():r("div",{staticClass:"no-questions"},[t._v(" Nenhuma pergunta encontrada para este produto. ")]),t.loading?r("div",{staticClass:"loading"},[t._v(" Carregando perguntas... ")]):t._e(),t.list.length<t.total?r("div",{staticClass:"actions"},[r("div",{staticClass:"pagination"},[r("button",{staticClass:"btn btn-primary",attrs:{disabled:t.loading},on:{click:t.loadMoreQuestions}},[t._v(" "+t._s(t.loading?"Carregando..":"Mostrar mais perguntas")+" ")])])]):t._e()]):t._e()}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"subtle-hook"},[e("div",{staticClass:"hook-l-shape"})])}],!1,null,"009bb4ce",null).exports);const Et="https://widgets.appmartan.com.br",Rt="https://create-questions.martan.app";e.default=t=>{t&&t.store_id&&t.web_id?(t.widget_questions&&t.widget_questions.is_enabled&&((t={},e="questions_widget")=>{s(t,e,_t,{widget_questions:null})})(t),t.widget_review&&t.widget_review.is_enabled&&((t={},e="reviews_widget")=>{s(t,e,yt)})(t),t.widget_rating&&t.widget_rating.is_enabled&&new wt(t).init()):console.error(new Error("Can't setup Martan widget without `martanStoreId` and `martanWebId`"))}},function(t,r){t.exports=e},function(t,e){t.exports=r}]).default}));
11
11
  //# sourceMappingURL=widget-martan.min.js.map