Socket
Socket
Sign inDemoInstall

@findify/sdk

Package Overview
Dependencies
21
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.5.1 to 2.5.2

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [2.5.2](https://github.com/findify/findify-js/compare/@findify/sdk@2.5.1...@findify/sdk@2.5.2) (2021-09-21)
**Note:** Version bump only for package @findify/sdk
## [2.5.1](https://github.com/findify/findify-js/compare/@findify/sdk@2.5.0...@findify/sdk@2.5.1) (2021-06-01)

@@ -8,0 +16,0 @@

2

dist/findify-sdk.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("FindifySDK",[],t):"object"==typeof exports?exports.FindifySDK=t():e.FindifySDK=t()}(self,(function(){return function(){var e={465:function(e,t,r){e.exports=r(167)},8:function(e,t,r){"use strict";var n=r(142),o=r(110),i=r(317),a=r(957),s=r(839),c=r(65),u=r(647),f=r(344);e.exports=function(e){return new Promise((function(t,r){var l=e.data,p=e.headers;n.isFormData(l)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(m+":"+h)}var y=s(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),a(y,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?c(d.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};o(t,r,i),d=null}},d.onabort=function(){d&&(r(f("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){r(f("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var g=(e.withCredentials||u(y))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;g&&(p[e.xsrfHeaderName]=g)}if("setRequestHeader"in d&&n.forEach(p,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),r(e),d=null)})),l||(l=null),d.send(l)}))}},167:function(e,t,r){"use strict";var n=r(142),o=r(255),i=r(7),a=r(948);function s(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var c=s(r(743));c.Axios=i,c.create=function(e){return s(a(c.defaults,e))},c.Cancel=r(795),c.CancelToken=r(95),c.isCancel=r(197),c.all=function(e){return Promise.all(e)},c.spread=r(313),c.isAxiosError=r(439),e.exports=c,e.exports.default=c},795:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},95:function(e,t,r){"use strict";var n=r(795);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},197:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},7:function(e,t,r){"use strict";var n=r(142),o=r(957),i=r(929),a=r(961),s=r(948);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},c.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=c},929:function(e,t,r){"use strict";var n=r(142);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},839:function(e,t,r){"use strict";var n=r(453),o=r(694);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},344:function(e,t,r){"use strict";var n=r(359);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},961:function(e,t,r){"use strict";var n=r(142),o=r(429),i=r(197),a=r(743);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},359:function(e){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.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:this.config,code:this.code}},e}},948:function(e,t,r){"use strict";var n=r(142);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function u(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=c(void 0,t[e]))})),n.forEach(i,u),n.forEach(a,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(void 0,t[o])})),n.forEach(s,(function(n){n in t?r[n]=c(e[n],t[n]):n in e&&(r[n]=c(void 0,e[n]))}));var f=o.concat(i).concat(a).concat(s),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===f.indexOf(e)}));return n.forEach(l,u),r}},110:function(e,t,r){"use strict";var n=r(344);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},429:function(e,t,r){"use strict";var n=r(142);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},743:function(e,t,r){"use strict";var n=r(142),o=r(104),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,c={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=r(8)),s),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(i)})),e.exports=c},255:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},957:function(e,t,r){"use strict";var n=r(142);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},694:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},317:function(e,t,r){"use strict";var n=r(142);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},453:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},439:function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return"object"===t(e)&&!0===e.isAxiosError}},647:function(e,t,r){"use strict";var n=r(142);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},104:function(e,t,r){"use strict";var n=r(142);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},65:function(e,t,r){"use strict";var n=r(142),o=["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"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},313:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},142:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(255),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function c(e){return null!==e&&"object"===n(e)}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function f(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!==n(e)&&(e=[e]),a(e))for(var r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:c,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:f,isStream:function(e){return c(e)&&f(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):a(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,n){e[n]=r&&"function"==typeof t?o(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},353:function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=1e3,n=60*r,o=60*n,i=24*o,a=7*i,s=365.25*i;function c(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,u){u=u||{};var f=t(e);if("string"===f&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===f&&isFinite(e))return u.long?function(e){var t=Math.abs(e);if(t>=i)return c(e,t,i,"day");if(t>=o)return c(e,t,o,"hour");if(t>=n)return c(e,t,n,"minute");if(t>=r)return c(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},18:function(e,t,r){var n;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e={NODE_ENV:"production",FINDIFY_ENV:"production"}.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=r(594)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},594:function(e,t,r){function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}e.exports=function(e){function t(e){var r,n=null;function i(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if(i.enabled){var a=i,s=Number(new Date),c=s-(r||s);a.diff=c,a.prev=r,a.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var u=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";u++;var o=t.formatters[r];if("function"==typeof o){var i=n[u];e=o.call(a,i),n.splice(u,1),u--}return e})),t.formatArgs.call(a,n);var f=a.log||t.log;f.apply(a,n)}}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=o,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:function(){return null===n?t.enabled(e):n},set:function(e){n=e}}),"function"==typeof t.init&&t.init(i),i}function o(e,r){var n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(n(t.names.map(i)),n(t.skips.map(i).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var r;t.save(e),t.names=[],t.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(353),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(r){t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},924:function(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:o}},387:function(e,t,r){"use strict";var n=r(667),o=r(134),i=r(924);e.exports={formats:i,parse:o,stringify:n}},134:function(e,t,r){"use strict";var n=r(295),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,f=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;f.push(u)}for(var l=0;r.depth>0&&null!==(s=a.exec(i))&&l<r.depth;){if(l+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(s[1])}return s&&f.push("["+i.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:c(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,f=parseInt(u,10);r.parseArrays||""!==u?!isNaN(f)&&s!==u&&String(f)===u&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(a=[])[f]=o:a[u]=o:a={0:o}}o=a}return o}(f,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var f="string"==typeof e?function(e,t){var r,u={},f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,p=f.split(t.delimiter,l),d=-1,m=t.charset;if(t.charsetSentinel)for(r=0;r<p.length;++r)0===p[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[r]?m="utf-8":"utf8=%26%2310003%3B"===p[r]&&(m="iso-8859-1"),d=r,r=p.length);for(r=0;r<p.length;++r)if(r!==d){var h,y,g=p[r],b=g.indexOf("]="),v=-1===b?g.indexOf("="):b+1;-1===v?(h=t.decoder(g,a.decoder,m,"key"),y=t.strictNullHandling?null:""):(h=t.decoder(g.slice(0,v),a.decoder,m,"key"),y=n.maybeMap(c(g.slice(v+1),t),(function(e){return t.decoder(e,a.decoder,m,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===m&&(y=s(y)),g.indexOf("[]=")>-1&&(y=i(y)?[y]:y),o.call(u,h)?u[h]=n.combine(u[h],y):u[h]=y}return u}(e,r):e,l=r.plainObjects?Object.create(null):{},p=Object.keys(f),d=0;d<p.length;++d){var m=p[d],h=u(m,f[m],r,"string"==typeof e);l=n.merge(l,h,r)}return n.compact(l)}},667:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(295),i=r(924),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=Array.prototype.push,f=function(e,t){u.apply(e,c(t)?t:[t])},l=Date.prototype.toISOString,p=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},m=function e(t,r,i,a,s,u,l,p,m,h,y,g,b,v){var w,C=t;if("function"==typeof l?C=l(r,C):C instanceof Date?C=h(C):"comma"===i&&c(C)&&(C=o.maybeMap(C,(function(e){return e instanceof Date?h(e):e}))),null===C){if(a)return u&&!b?u(r,d.encoder,v,"key",y):r;C=""}if("string"==typeof(w=C)||"number"==typeof w||"boolean"==typeof w||"symbol"===n(w)||"bigint"==typeof w||o.isBuffer(C))return u?[g(b?r:u(r,d.encoder,v,"key",y))+"="+g(u(C,d.encoder,v,"value",y))]:[g(r)+"="+g(String(C))];var O,j=[];if(void 0===C)return j;if("comma"===i&&c(C))O=[{value:C.length>0?C.join(",")||null:void 0}];else if(c(l))O=l;else{var S=Object.keys(C);O=p?S.sort(p):S}for(var x=0;x<O.length;++x){var F=O[x],E="object"===n(F)&&void 0!==F.value?F.value:C[F];if(!s||null!==E){var P=c(C)?"function"==typeof i?i(r,F):r:r+(m?"."+F:"["+F+"]");f(j,e(E,P,i,a,s,u,l,p,m,h,y,g,b,v))}}return j};e.exports=function(e,t){var r,o=e,u=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=d.filter;return("function"==typeof e.filter||c(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof u.filter?o=(0,u.filter)("",o):c(u.filter)&&(r=u.filter);var l,p=[];if("object"!==n(o)||null===o)return"";l=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=s[l];r||(r=Object.keys(o)),u.sort&&r.sort(u.sort);for(var y=0;y<r.length;++y){var g=r[y];u.skipNulls&&null===o[g]||f(p,m(o[g],g,h,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset))}var b=p.join(u.delimiter),v=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),b.length>0?v+b:""}},295:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(924),i=Object.prototype.hasOwnProperty,a=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var i=t[o],s=i.obj[i.prop],c=Object.keys(s),u=0;u<c.length;++u){var f=c[u],l=s[f];"object"===n(l)&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:s,prop:f}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,a){if(0===e.length)return e;var c=e;if("symbol"===n(e)?c=Symbol.prototype.toString.call(e):"string"!=typeof e&&(c=String(e)),"iso-8859-1"===r)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",f=0;f<c.length;++f){var l=c.charCodeAt(f);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||a===o.RFC1738&&(40===l||41===l)?u+=c.charAt(f):l<128?u+=s[l]:l<2048?u+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?u+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(f+=1,l=65536+((1023&l)<<10|1023&c.charCodeAt(f)),u+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!==n(e))&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,o){if(!r)return t;if("object"!==n(r)){if(a(t))t.push(r);else{if(!t||"object"!==n(t))return[t,r];(o&&(o.plainObjects||o.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!==n(t))return[t].concat(r);var s=t;return a(t)&&!a(r)&&(s=c(t,o)),a(t)&&a(r)?(r.forEach((function(r,a){if(i.call(t,a)){var s=t[a];s&&"object"===n(s)&&r&&"object"===n(r)?t[a]=e(s,r,o):t.push(r)}else t[a]=r})),t):Object.keys(r).reduce((function(t,n){var a=r[n];return i.call(t,n)?t[n]=e(t[n],a,o):t[n]=a,t}),s)}}},343:function(){var e;!function(e){e.Asc="asc",e.Desc="desc"}(e||(e={}))}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{init:function(){return $}});var e={};r.r(e),r.d(e,{development:function(){return _},production:function(){return I},staging:function(){return q}});var t=r(18),o=r.n(t);var i,a=function(e,t){return Object.keys(t).filter((function(t){return!e.includes(t)})).reduce((function(e,r){return Object.assign(t,(n={},o=r,i=t[r],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n));var n,o,i}),{})},s=function e(t,r){return r().catch((function(n){if(!n)throw n;if(t<=0)throw n;return e(t-1,r)}))},c=(i=1,function(){return i++&&String(i)}),u=r(465),f=r.n(u),l=r(387);var p,d,m,h,y,g=0,b=function(){},v=o()("jsonp"),w=function(e,t,r){"function"==typeof t&&(r=t,t={});var n=window;t||(t={});var o,i,a=t.prefix||"__jp",s=t.name||a+function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21,t="",r=crypto.getRandomValues(new Uint8Array(e));e--;){var n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t}(3)+g++,c=t.param||"callback",u=null!=t.timeout?t.timeout:6e4,f=encodeURIComponent,l=document.getElementsByTagName("script")[0]||document.head;function p(){o.parentNode&&o.parentNode.removeChild(o),n[s]=b,i&&clearTimeout(i)}return u&&(i=setTimeout((function(){p(),r&&r(new Error("Timeout"))}),u)),n[s]=function(e){v("jsonp got",e),p(),r&&r(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+c+"="+f(s)).replace("?&","?"),v('jsonp req "%s"',e),(o=document.createElement("script")).src=e,l.parentNode.insertBefore(o,l),function(){n[s]&&p()}};function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){e.Slot="slot",e.Newest="newest",e.Trending="trending",e.RecentlyViewed="latest",e.AlsoViewed="viewed",e.AlsoBought="bought",e.FrequentlyPurchasedTogether="purchasedTogether",e.Featured="featured"}(p||(p={})),function(e){e.ClickSuggestion="click-suggestion",e.ClickItem="click-item",e.Redirect="redirect",e.Purchase="purchase",e.AddToCart="add-to-cart",e.UpdateCart="update-cart",e.ViewPage="view-page"}(d||(d={})),function(e){e.Autocomplete="autocomplete",e.Search="search",e.SmartCollection="smart-collection",e.Recommendations="recommendations",e.Feedback="feedback",e.Content="content"}(m||(m={})),function(e){e.POST="post",e.JSONP="jsonp"}(h||(h={}));var j,S=(C(y={},h.POST,(function(e){return new Promise((function(t,r){var n={"x-key":e.body.key,"Content-type":"application/json"};o()("sdk:api:post")("url: ",e.url),o()("sdk:api:post")("body: ",e.body),o()("sdk:api:post")("headers: ",n),f().post(e.url,e.body,{headers:n}).then((function(e){console,o()("sdk:api:post")("response: ",e),t(e.data)})).catch((function(e){var t,n=null===(t=e.response)||void 0===t?void 0:t.status;if(n>=400&&n<500)return r(!1);r(e)}))}))})),C(y,h.JSONP,(function(e,t){var r=l.stringify(e.body,{addQueryPrefix:!0}),n="".concat(e.url).concat(r);return new Promise((function(r,i){o()("sdk:api:jsonp")("url: ",n),o()("sdk:api:jsonp")("options: ",e.options),w(n,e.options,(function(n,o){t()===e.id&&(n?i(n):"object"!==O(o)||o instanceof Array?r(void 0):r(o))}))}))})),y),x=function(e,t){return r=e.retryCount,n=function(){return S[e.method](e,t)},new Promise((function(e,t){return s(r,n).then((function(t){return e(t)})).catch((function(e){return t(e)}))}));var r,n};r(343);function F(e,t){if(null==t)throw new Error('"'.concat(e,'" param is required'));if(Array.isArray(t)&&0===t.length)throw new Error('"'.concat(e,'" param can not be empty'));if(String(t).trim().length<1)throw new Error('"'.concat(e,'" param can not be an empty or only-whitespace string'))}!function(e){e.Asc="asc",e.Desc="desc"}(j||(j={}));var E="To get a Merchant API key you need to register with Findify and finish the onboarding process.";function P(e,t){var r=e.key,n=(e.user,e.method),o=e.log;if(function(e){if(null==e)throw new Error('"key" param is missing. '+E);if("string"!=typeof e)throw new Error('"key" param should be a string. '+E);if(e.trim().length<1)throw new Error('"key" param can not be an empty or only-whitespace string. '+E)}(r),void 0!==n&&!Object.values(h).includes(n))throw new Error('"method" param should be either "post" or "jsonp"');if(!t&&e.method===h.JSONP)throw new Error("jsonp method is not allowed in node environment");if(void 0!==o&&"boolean"!=typeof o)throw new Error('"log" param should be "boolean" type')}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){R(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function N(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var D=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),R(this,"latestRequestID",void 0),R(this,"getLatestRequestID",(function(){return r.latestRequestID})),o()("sdk:client:config")(t)}var t,r,n;return t=e,(r=[{key:"send",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.buildRequest(e,t);return o()("sdk:client:request")(r),x(r,this.getLatestRequestID)}},{key:"buildRequest",value:function(e,t){var r=this.getEndpoint(e);return{url:this.getUrl(r),body:this.getRequestBody(e,r),method:this.config.method,retryCount:this.config.retryCount,options:this.getOptions(e,t),id:this.latestRequestID=c()}}},{key:"getEndpoint",value:function(e){switch(e.type){case m.Autocomplete:return{path:"/autocomplete"};case m.Search:return{path:"/search"};case m.Content:return{path:"/search/content"};case m.SmartCollection:return{path:"/smart-collection/".concat(e.params.slot),params:["slot"]};case m.Recommendations:return this.getRecommendationsEndpoint(e.params);case m.Feedback:return{path:"/feedback"};default:throw new Error("Invalid request type")}}},{key:"getRecommendationUrl",value:function(e){if(Boolean(e.slot))return"/recommend/".concat(e.slot);switch(e.type){case p.Featured:return"/recommend/items/featured";case p.Newest:return"/recommend/items/newest";case p.Trending:return"/recommend/items/trending";case p.RecentlyViewed:return"/recommend/items/viewed/latest";case p.Slot:return"/recommend/".concat(e.slot);case p.AlsoViewed:return"/recommend/items/".concat(e.item_id,"/viewed/viewed");case p.AlsoBought:return"/recommend/items/".concat(e.item_id,"/viewed/bought");case p.FrequentlyPurchasedTogether:var t=e.item_ids.join(",");return"/recommend/items/".concat(t,"/bought/bought");default:throw new Error("Invalid recommendations type")}}},{key:"getRecommendationsParams",value:function(e){switch(e.type){case p.Slot:return["slot"];case p.AlsoViewed:case p.AlsoBought:return["item_id"];case p.FrequentlyPurchasedTogether:return["item_ids"];default:return}}},{key:"getRecommendationsEndpoint",value:function(e){return{path:this.getRecommendationUrl(e),params:this.getRecommendationsParams(e)}}},{key:"getUrl",value:function(e){return"".concat(this.config.url).concat(e.path)}},{key:"getRequestBody",value:function(e,t){var r=this.getCommonParams(e),n=this.getSpecificParams(e,t);return A(A({},r),n)}},{key:"getCommonParams",value:function(e){var t=e.params.user||this.config.user;return function(e){if(null==e)throw new Error('"user" param should be provided either at request or at library config');F("user.uid",e.uid),F("user.sid",e.sid)}(t),{user:t,t_client:Date.now(),key:this.config.key,log:this.config.log}}},{key:"getSpecificParams",value:function(e,t){var r=t.params||[],n=function(t){return a(r.concat(t),e.params)};switch(e.type){case m.Recommendations:return n(["type"]);case m.Feedback:return n(["event"]);default:return e.params}}},{key:"getOptions",value:function(e,t){return A({timeout:this.config.timeout},t)}}])&&N(t.prototype,r),n&&N(t,n),e}();function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){U(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var L={timeout:5e3,jsonpCallback:"findifyCallback"},q=B(B({},L),{},{url:"https://search-staging.findify.io/v3",retryCount:1}),I=B(B({},L),{},{url:"https://api-v3.findify.io/v3",retryCount:3}),_=q;function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){V(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function V(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var z="production",J=function(){try{return"production"}catch(e){return z}}()||z;if(!["development","staging","production"].includes(J))throw new Error("".concat(J," is not supported environment"));var Q=e[J];function $(e){var t="undefined"!=typeof window;o()("sdk")("env: ",J),o()("sdk")("defaults: ",Q),o()("sdk")("isBrowserEnv: ",t);var r=K(e,t);return P(r,t),new D(r)}var K=function(e,t){return H(H({method:t?h.JSONP:h.POST},Q),e)}}(),n}()}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("FindifySDK",[],t):"object"==typeof exports?exports.FindifySDK=t():e.FindifySDK=t()}(self,(function(){return function(){var e={465:function(e,t,r){e.exports=r(167)},8:function(e,t,r){"use strict";var n=r(142),o=r(110),i=r(317),a=r(957),s=r(839),c=r(65),u=r(647),f=r(344);e.exports=function(e){return new Promise((function(t,r){var l=e.data,p=e.headers;n.isFormData(l)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(m+":"+h)}var y=s(e.baseURL,e.url);if(d.open(e.method.toUpperCase(),a(y,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?c(d.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};o(t,r,i),d=null}},d.onabort=function(){d&&(r(f("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){r(f("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var g=(e.withCredentials||u(y))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;g&&(p[e.xsrfHeaderName]=g)}if("setRequestHeader"in d&&n.forEach(p,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),r(e),d=null)})),l||(l=null),d.send(l)}))}},167:function(e,t,r){"use strict";var n=r(142),o=r(255),i=r(7),a=r(948);function s(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var c=s(r(743));c.Axios=i,c.create=function(e){return s(a(c.defaults,e))},c.Cancel=r(795),c.CancelToken=r(95),c.isCancel=r(197),c.all=function(e){return Promise.all(e)},c.spread=r(313),c.isAxiosError=r(439),e.exports=c,e.exports.default=c},795:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},95:function(e,t,r){"use strict";var n=r(795);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},197:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},7:function(e,t,r){"use strict";var n=r(142),o=r(957),i=r(929),a=r(961),s=r(948);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},c.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=c},929:function(e,t,r){"use strict";var n=r(142);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},839:function(e,t,r){"use strict";var n=r(453),o=r(694);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},344:function(e,t,r){"use strict";var n=r(359);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},961:function(e,t,r){"use strict";var n=r(142),o=r(429),i=r(197),a=r(743);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},359:function(e){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.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:this.config,code:this.code}},e}},948:function(e,t,r){"use strict";var n=r(142);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function u(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=c(void 0,t[e]))})),n.forEach(i,u),n.forEach(a,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(void 0,t[o])})),n.forEach(s,(function(n){n in t?r[n]=c(e[n],t[n]):n in e&&(r[n]=c(void 0,e[n]))}));var f=o.concat(i).concat(a).concat(s),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===f.indexOf(e)}));return n.forEach(l,u),r}},110:function(e,t,r){"use strict";var n=r(344);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},429:function(e,t,r){"use strict";var n=r(142);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},743:function(e,t,r){"use strict";var n=r(142),o=r(104),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,c={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=r(8)),s),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(i)})),e.exports=c},255:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},957:function(e,t,r){"use strict";var n=r(142);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},694:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},317:function(e,t,r){"use strict";var n=r(142);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},453:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},439:function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return"object"===t(e)&&!0===e.isAxiosError}},647:function(e,t,r){"use strict";var n=r(142);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},104:function(e,t,r){"use strict";var n=r(142);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},65:function(e,t,r){"use strict";var n=r(142),o=["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"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},313:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},142:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(255),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function c(e){return null!==e&&"object"===n(e)}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function f(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!==n(e)&&(e=[e]),a(e))for(var r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:c,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:f,isStream:function(e){return c(e)&&f(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):a(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,n){e[n]=r&&"function"==typeof t?o(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},353:function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=1e3,n=60*r,o=60*n,i=24*o,a=7*i,s=365.25*i;function c(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,u){u=u||{};var f=t(e);if("string"===f&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===f&&isFinite(e))return u.long?function(e){var t=Math.abs(e);if(t>=i)return c(e,t,i,"day");if(t>=o)return c(e,t,o,"hour");if(t>=n)return c(e,t,n,"minute");if(t>=r)return c(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=i)return Math.round(e/i)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},18:function(e,t,r){var n;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e={NODE_ENV:"production",FINDIFY_ENV:"production"}.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=r(594)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},594:function(e,t,r){function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}e.exports=function(e){function t(e){var r,n=null;function i(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if(i.enabled){var a=i,s=Number(new Date),c=s-(r||s);a.diff=c,a.prev=r,a.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var u=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";u++;var o=t.formatters[r];if("function"==typeof o){var i=n[u];e=o.call(a,i),n.splice(u,1),u--}return e})),t.formatArgs.call(a,n);var f=a.log||t.log;f.apply(a,n)}}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=o,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:function(){return null===n?t.enabled(e):n},set:function(e){n=e}}),"function"==typeof t.init&&t.init(i),i}function o(e,r){var n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(n(t.names.map(i)),n(t.skips.map(i).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var r;t.save(e),t.names=[],t.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(353),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(r){t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},924:function(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:o}},387:function(e,t,r){"use strict";var n=r(667),o=r(134),i=r(924);e.exports={formats:i,parse:o,stringify:n}},134:function(e,t,r){"use strict";var n=r(295),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,f=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;f.push(u)}for(var l=0;r.depth>0&&null!==(s=a.exec(i))&&l<r.depth;){if(l+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(s[1])}return s&&f.push("["+i.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:c(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,f=parseInt(u,10);r.parseArrays||""!==u?!isNaN(f)&&s!==u&&String(f)===u&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(a=[])[f]=o:a[u]=o:a={0:o}}o=a}return o}(f,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var f="string"==typeof e?function(e,t){var r,u={},f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,p=f.split(t.delimiter,l),d=-1,m=t.charset;if(t.charsetSentinel)for(r=0;r<p.length;++r)0===p[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[r]?m="utf-8":"utf8=%26%2310003%3B"===p[r]&&(m="iso-8859-1"),d=r,r=p.length);for(r=0;r<p.length;++r)if(r!==d){var h,y,g=p[r],b=g.indexOf("]="),v=-1===b?g.indexOf("="):b+1;-1===v?(h=t.decoder(g,a.decoder,m,"key"),y=t.strictNullHandling?null:""):(h=t.decoder(g.slice(0,v),a.decoder,m,"key"),y=n.maybeMap(c(g.slice(v+1),t),(function(e){return t.decoder(e,a.decoder,m,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===m&&(y=s(y)),g.indexOf("[]=")>-1&&(y=i(y)?[y]:y),o.call(u,h)?u[h]=n.combine(u[h],y):u[h]=y}return u}(e,r):e,l=r.plainObjects?Object.create(null):{},p=Object.keys(f),d=0;d<p.length;++d){var m=p[d],h=u(m,f[m],r,"string"==typeof e);l=n.merge(l,h,r)}return n.compact(l)}},667:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(295),i=r(924),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=Array.prototype.push,f=function(e,t){u.apply(e,c(t)?t:[t])},l=Date.prototype.toISOString,p=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},m=function e(t,r,i,a,s,u,l,p,m,h,y,g,b,v){var w,C=t;if("function"==typeof l?C=l(r,C):C instanceof Date?C=h(C):"comma"===i&&c(C)&&(C=o.maybeMap(C,(function(e){return e instanceof Date?h(e):e}))),null===C){if(a)return u&&!b?u(r,d.encoder,v,"key",y):r;C=""}if("string"==typeof(w=C)||"number"==typeof w||"boolean"==typeof w||"symbol"===n(w)||"bigint"==typeof w||o.isBuffer(C))return u?[g(b?r:u(r,d.encoder,v,"key",y))+"="+g(u(C,d.encoder,v,"value",y))]:[g(r)+"="+g(String(C))];var O,j=[];if(void 0===C)return j;if("comma"===i&&c(C))O=[{value:C.length>0?C.join(",")||null:void 0}];else if(c(l))O=l;else{var S=Object.keys(C);O=p?S.sort(p):S}for(var x=0;x<O.length;++x){var F=O[x],E="object"===n(F)&&void 0!==F.value?F.value:C[F];if(!s||null!==E){var P=c(C)?"function"==typeof i?i(r,F):r:r+(m?"."+F:"["+F+"]");f(j,e(E,P,i,a,s,u,l,p,m,h,y,g,b,v))}}return j};e.exports=function(e,t){var r,o=e,u=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=d.filter;return("function"==typeof e.filter||c(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof u.filter?o=(0,u.filter)("",o):c(u.filter)&&(r=u.filter);var l,p=[];if("object"!==n(o)||null===o)return"";l=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=s[l];r||(r=Object.keys(o)),u.sort&&r.sort(u.sort);for(var y=0;y<r.length;++y){var g=r[y];u.skipNulls&&null===o[g]||f(p,m(o[g],g,h,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset))}var b=p.join(u.delimiter),v=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),b.length>0?v+b:""}},295:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(924),i=Object.prototype.hasOwnProperty,a=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var i=t[o],s=i.obj[i.prop],c=Object.keys(s),u=0;u<c.length;++u){var f=c[u],l=s[f];"object"===n(l)&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:s,prop:f}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,a){if(0===e.length)return e;var c=e;if("symbol"===n(e)?c=Symbol.prototype.toString.call(e):"string"!=typeof e&&(c=String(e)),"iso-8859-1"===r)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",f=0;f<c.length;++f){var l=c.charCodeAt(f);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||a===o.RFC1738&&(40===l||41===l)?u+=c.charAt(f):l<128?u+=s[l]:l<2048?u+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?u+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(f+=1,l=65536+((1023&l)<<10|1023&c.charCodeAt(f)),u+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!==n(e))&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,o){if(!r)return t;if("object"!==n(r)){if(a(t))t.push(r);else{if(!t||"object"!==n(t))return[t,r];(o&&(o.plainObjects||o.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!==n(t))return[t].concat(r);var s=t;return a(t)&&!a(r)&&(s=c(t,o)),a(t)&&a(r)?(r.forEach((function(r,a){if(i.call(t,a)){var s=t[a];s&&"object"===n(s)&&r&&"object"===n(r)?t[a]=e(s,r,o):t.push(r)}else t[a]=r})),t):Object.keys(r).reduce((function(t,n){var a=r[n];return i.call(t,n)?t[n]=e(t[n],a,o):t[n]=a,t}),s)}}},343:function(){var e;!function(e){e.Asc="asc",e.Desc="desc"}(e||(e={}))}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{init:function(){return $}});var e={};r.r(e),r.d(e,{development:function(){return _},production:function(){return I},staging:function(){return q}});var t=r(18),o=r.n(t);var i,a=function(e,t){return Object.keys(t).filter((function(t){return!e.includes(t)})).reduce((function(e,r){return Object.assign(t,(n={},o=r,i=t[r],o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n));var n,o,i}),{})},s=function e(t,r){return r().catch((function(n){if(!n)throw n;if(t<=0)throw n;return e(t-1,r)}))},c=(i=1,function(){return i++&&String(i)}),u=r(465),f=r.n(u),l=r(387);var p,d,m,h,y,g=0,b=function(){},v=o()("jsonp"),w=function(e,t,r){"function"==typeof t&&(r=t,t={});var n=window;t||(t={});var o,i,a=t.prefix||"__jp",s=t.name||a+function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21,t="",r=crypto.getRandomValues(new Uint8Array(e));e--;){var n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t}(3)+g++,c=t.param||"callback",u=null!=t.timeout?t.timeout:6e4,f=encodeURIComponent,l=document.getElementsByTagName("script")[0]||document.head;function p(){o.parentNode&&o.parentNode.removeChild(o),n[s]=b,i&&clearTimeout(i)}return u&&(i=setTimeout((function(){p(),r&&r(new Error("Timeout"))}),u)),n[s]=function(e){v("jsonp got",e),p(),r&&r(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+c+"="+f(s)).replace("?&","?"),v('jsonp req "%s"',e),(o=document.createElement("script")).src=e,l.parentNode.insertBefore(o,l),function(){n[s]&&p()}};function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){e.Slot="slot",e.Newest="newest",e.Trending="trending",e.RecentlyViewed="latest",e.AlsoViewed="viewed",e.AlsoBought="bought",e.FrequentlyPurchasedTogether="purchasedTogether",e.Featured="featured"}(p||(p={})),function(e){e.ClickSuggestion="click-suggestion",e.ClickItem="click-item",e.Redirect="redirect",e.Purchase="purchase",e.AddToCart="add-to-cart",e.UpdateCart="update-cart",e.ViewPage="view-page"}(d||(d={})),function(e){e.Autocomplete="autocomplete",e.Search="search",e.SmartCollection="smart-collection",e.Recommendations="recommendations",e.Feedback="feedback",e.Content="content"}(m||(m={})),function(e){e.POST="post",e.JSONP="jsonp"}(h||(h={}));var j,S=(C(y={},h.POST,(function(e){return new Promise((function(t,r){var n={"x-key":e.body.key,"Content-type":"application/json"};o()("sdk:api:post")("url: ",e.url),o()("sdk:api:post")("body: ",e.body),o()("sdk:api:post")("headers: ",n),f().post(e.url,e.body,{headers:n}).then((function(e){o()("sdk:api:post")("response: ",e),t(e.data)})).catch((function(e){var t,n=null===(t=e.response)||void 0===t?void 0:t.status;if(n>=400&&n<500)return r(!1);r(e)}))}))})),C(y,h.JSONP,(function(e,t){var r=l.stringify(e.body,{addQueryPrefix:!0}),n="".concat(e.url).concat(r);return new Promise((function(r,i){o()("sdk:api:jsonp")("url: ",n),o()("sdk:api:jsonp")("options: ",e.options),w(n,e.options,(function(n,o){t()===e.id&&(n?i(n):"object"!==O(o)||o instanceof Array?r(void 0):r(o))}))}))})),y),x=function(e,t){return r=e.retryCount,n=function(){return S[e.method](e,t)},new Promise((function(e,t){return s(r,n).then((function(t){return e(t)})).catch((function(e){return t(e)}))}));var r,n};r(343);function F(e,t){if(null==t)throw new Error('"'.concat(e,'" param is required'));if(Array.isArray(t)&&0===t.length)throw new Error('"'.concat(e,'" param can not be empty'));if(String(t).trim().length<1)throw new Error('"'.concat(e,'" param can not be an empty or only-whitespace string'))}!function(e){e.Asc="asc",e.Desc="desc"}(j||(j={}));var E="To get a Merchant API key you need to register with Findify and finish the onboarding process.";function P(e,t){var r=e.key,n=(e.user,e.method),o=e.log;if(function(e){if(null==e)throw new Error('"key" param is missing. '+E);if("string"!=typeof e)throw new Error('"key" param should be a string. '+E);if(e.trim().length<1)throw new Error('"key" param can not be an empty or only-whitespace string. '+E)}(r),void 0!==n&&!Object.values(h).includes(n))throw new Error('"method" param should be either "post" or "jsonp"');if(!t&&e.method===h.JSONP)throw new Error("jsonp method is not allowed in node environment");if(void 0!==o&&"boolean"!=typeof o)throw new Error('"log" param should be "boolean" type')}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){R(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function N(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var D=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),R(this,"latestRequestID",void 0),R(this,"getLatestRequestID",(function(){return r.latestRequestID})),o()("sdk:client:config")(t)}var t,r,n;return t=e,(r=[{key:"send",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.buildRequest(e,t);return o()("sdk:client:request")(r),x(r,this.getLatestRequestID)}},{key:"buildRequest",value:function(e,t){var r=this.getEndpoint(e);return{url:this.getUrl(r),body:this.getRequestBody(e,r),method:this.config.method,retryCount:this.config.retryCount,options:this.getOptions(e,t),id:this.latestRequestID=c()}}},{key:"getEndpoint",value:function(e){switch(e.type){case m.Autocomplete:return{path:"/autocomplete"};case m.Search:return{path:"/search"};case m.Content:return{path:"/search/content"};case m.SmartCollection:return{path:"/smart-collection/".concat(e.params.slot),params:["slot"]};case m.Recommendations:return this.getRecommendationsEndpoint(e.params);case m.Feedback:return{path:"/feedback"};default:throw new Error("Invalid request type")}}},{key:"getRecommendationUrl",value:function(e){if(Boolean(e.slot))return"/recommend/".concat(e.slot);switch(e.type){case p.Featured:return"/recommend/items/featured";case p.Newest:return"/recommend/items/newest";case p.Trending:return"/recommend/items/trending";case p.RecentlyViewed:return"/recommend/items/viewed/latest";case p.Slot:return"/recommend/".concat(e.slot);case p.AlsoViewed:return"/recommend/items/".concat(e.item_id,"/viewed/viewed");case p.AlsoBought:return"/recommend/items/".concat(e.item_id,"/viewed/bought");case p.FrequentlyPurchasedTogether:var t=e.item_ids.join(",");return"/recommend/items/".concat(t,"/bought/bought");default:throw new Error("Invalid recommendations type")}}},{key:"getRecommendationsParams",value:function(e){switch(e.type){case p.Slot:return["slot"];case p.AlsoViewed:case p.AlsoBought:return["item_id"];case p.FrequentlyPurchasedTogether:return["item_ids"];default:return}}},{key:"getRecommendationsEndpoint",value:function(e){return{path:this.getRecommendationUrl(e),params:this.getRecommendationsParams(e)}}},{key:"getUrl",value:function(e){return"".concat(this.config.url).concat(e.path)}},{key:"getRequestBody",value:function(e,t){var r=this.getCommonParams(e),n=this.getSpecificParams(e,t);return A(A({},r),n)}},{key:"getCommonParams",value:function(e){var t=e.params.user||this.config.user;return function(e){if(null==e)throw new Error('"user" param should be provided either at request or at library config');F("user.uid",e.uid),F("user.sid",e.sid)}(t),{user:t,t_client:Date.now(),key:this.config.key,log:this.config.log}}},{key:"getSpecificParams",value:function(e,t){var r=t.params||[],n=function(t){return a(r.concat(t),e.params)};switch(e.type){case m.Recommendations:return n(["type"]);case m.Feedback:return n(["event"]);default:return e.params}}},{key:"getOptions",value:function(e,t){return A({timeout:this.config.timeout},t)}}])&&N(t.prototype,r),n&&N(t,n),e}();function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){U(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var L={timeout:5e3,jsonpCallback:"findifyCallback"},q=B(B({},L),{},{url:"https://search-staging.findify.io/v3",retryCount:1}),I=B(B({},L),{},{url:"https://api-v3.findify.io/v3",retryCount:3}),_=q;function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){V(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function V(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var z="production",J=function(){try{return"production"}catch(e){return z}}()||z;if(!["development","staging","production"].includes(J))throw new Error("".concat(J," is not supported environment"));var Q=e[J];function $(e){var t="undefined"!=typeof window;o()("sdk")("env: ",J),o()("sdk")("defaults: ",Q),o()("sdk")("isBrowserEnv: ",t);var r=K(e,t);return P(r,t),new D(r)}var K=function(e,t){return H(H({method:t?h.JSONP:h.POST},Q),e)}}(),n}()}));

@@ -39,3 +39,2 @@ import debug from 'debug';

.then((response) => {
console;
debug('sdk:api:post')('response: ', response);

@@ -42,0 +41,0 @@ resolve(response.data);

{
"name": "@findify/sdk",
"version": "2.5.1",
"version": "2.5.2",
"description": "Findify search API client",

@@ -70,3 +70,3 @@ "main": "lib/index.js",

},
"gitHead": "92c3b7f2ab5dde29873854203da7dc7870260ecf"
"gitHead": "970a5d556698037bdff39611a994d0bfd67bfb18"
}

@@ -68,3 +68,2 @@ import debug from 'debug';

.then((response) => {
console;
debug('sdk:api:post')('response: ', response);

@@ -71,0 +70,0 @@ resolve(response.data);

@@ -19,6 +19,25 @@ import { Type as RequestType } from './Type';

q?: string;
/** Limit of search suggestions */
/**
* @deprecated
* Limit of search suggestions
* */
suggestion_limit?: number;
/** Limit of product matches */
/**
* @deprecated
* Limit of product matches
* */
item_limit?: number;
/**
* Limit of items returned in response
* Content will not be returned if limit is not set
*/
limits: {
/** Content provider name */
[key: string]: number;
/** search suggestions */
suggestions: number;
/** product matches */
items: number;
};
}

@@ -17,6 +17,24 @@ import { Type as RequestType } from './Type';

q?: string;
/** Limit of search suggestions */
/**
* @deprecated
* Limit of search suggestions
* */
suggestion_limit?: number;
/** Limit of product matches */
/**
* @deprecated
* Limit of product matches
* */
item_limit?: number;
/**
* Limit of items returned in response
* Content will not be returned if limit is not set
*/
limits: {
/** Content provider name */
[key: string]: number;
/** search suggestions */
suggestions: number;
/** product matches */
items: number;
};
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc