mirror of
https://github.com/hanzoai/a.git
synced 2026-10-30 18:50:12 +00:00
One-line <script> loaders that mount Hanzo widgets on any site: /chat hz_ widget key -> Ask-AI bubble (streams /v1/chat/completions) /analytics pk_ ingest key -> [email protected] + Annotate /checkout pk_ pub key -> [email protected] hosted checkout Tiny, framework-free, Shadow-DOM isolated loaders; secret keys (hk-/sk-) refused; missing key -> warn, no crash. Served by ghcr.io/hanzoai/static. Widget builds vendored. Behavior-tested (jsdom + headless gallery render).
9 lines
39 KiB
JavaScript
9 lines
39 KiB
JavaScript
/* Karma vendor: [email protected] (Hanzo Analytics). Browser IIFE → window.HanzoTrack. Rebuild: scratchpad/vendorbuild/build.mjs. */
|
|
var __HanzoTrackModule=(()=>{var me=r=>t=>{var e=r[t];if(e)return e();throw new Error("Module not found in bundle: "+t)};var wr=(r,t)=>()=>(r&&(t=r(r=0)),t);var d=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var be=d((io,we)=>{var $,_e,V,W;W=function(r){var t;return r!=null&&r.tagName?(t=r.tagName.toLowerCase(),r.id&&(t+="#"+r.id),typeof r.className=="string"&&r.className.trim()&&(t+="."+r.className.trim().replace(/\s+/g,".")),t):null};V=function(r){var t,e,n,i,o,a,u,c;for(t={type:r.getAttribute("itemtype")||"WebsiteSection"},a=r.querySelectorAll("[itemprop]"),e=0,n=a.length;e<n;e++)o=a[e],o.closest("[itemscope]")===r&&(i=o.getAttribute("itemprop"),c=o.getAttribute("content")||o.getAttribute("href")||((u=o.textContent)!=null?u.trim():void 0),i&&c&&(t[i]=c));return t};_e=function(r){var t,e,n,i,o,a;for(r==null&&(r=document),t=[],a=r.querySelectorAll('script[type="application/ld+json"]'),n=0,i=a.length;n<i;n++){o=a[n];try{t.push(JSON.parse(o.textContent))}catch(u){e=u}}return t};we.exports=$=function(r,t){var e,n,i,o,a,u,c,s,l,p;if(t==null&&(t={}),!!(r&&typeof document!="undefined")){if(u=t.root||document,p=(a=t.threshold)!=null?a:.5,e=_e(u),e.length&&r.track("content-schema",{blocks:e}),s=Array.prototype.slice.call(u.querySelectorAll("[itemscope]")),!s.length)return $;if(typeof IntersectionObserver!="undefined")for(l=new WeakSet,i=new IntersectionObserver(function(h){var g,y,L;for(y=0,L=h.length;y<L;y++)g=h[y],g.isIntersecting&&!l.has(g.target)&&(l.add(g.target),r.track("content-view",Object.assign({selector:W(g.target)},V(g.target))),i.unobserve(g.target))},{threshold:p}),n=0,o=s.length;n<o;n++)c=s[n],i.observe(c);return u.addEventListener("click",function(h){var g,y;g=(y=h.target)!=null&&typeof y.closest=="function"?y.closest("[itemscope]"):void 0,g&&r.track("content-click",Object.assign({selector:W(g)},V(g)))},!0),$}}});var m=d(C=>{C.onload=function(r,t){var e,n;return e=function(i,o){return i.addEventListener("load",function(a,u){return o(null,u)},!1),i.addEventListener("error",function(a){var u;return u=new Error("failed to load the script '"+i.src+"'"),u.event=a,o(u)},!1)},n=function(i,o){return i.attachEvent("onreadystatechange",function(a){if(/complete|loaded/.test(i.readyState))return o(null,a)}),i.attachEvent("onerror",function(a){var u;return u=new Error("failed to load the script '"+i.src+"'"),u.event=a||window.event,o(u)})},r.addEventListener?e(r,t):n(r,t)};C.tld=function(r){var t;return t=r.match(/[^.\s\/]+\.([a-z]{3,}|[a-z]{2}.[a-z]{2})$/),t!=null?t[0]:r};C.safariPrivateBrowsing=function(){try{return localStorage.t=0,!1}catch{return!0}};C.uuid=function(){var r,t,e;for(e=[],r=t=0;t<256;r=++t)e[r]=(r<16?"0":"")+r.toString(16);return function(){var n,i,o,a;return n=Math.random()*4294967295|0,i=Math.random()*4294967295|0,o=Math.random()*4294967295|0,a=Math.random()*4294967295|0,e[n&255]+e[n>>8&255]+e[n>>16&255]+e[n>>24&255]+"-"+e[i&255]+e[i>>8&255]+"-"+e[i>>16&15|64]+e[i>>24&255]+"-"+e[o&63|128]+e[o>>8&255]+"-"+e[o>>16&255]+e[o>>24&255]+e[a&255]+e[a>>8&255]+e[a>>16&255]+e[a>>24&255]}()}});var qe=d((uo,ke)=>{var xe;xe=m().onload;ke.exports=function(r,t){var e,n;return n=document.createElement("iframe"),xe(n,t),n.width=1,n.height=1,n.style.display="none",n.src=r.url,e=document.getElementsByTagName("script")[0],e.parentNode.insertBefore(n,e),n}});var Ae=d((co,Pe)=>{var Se;Se=m().onload;Pe.exports=function(r,t){var e;return e=new Image,Se(e,t),e.width=1,e.height=1,e.src=r.url,e}});var Ie=d((so,Ce)=>{var Ee;Ee=m().onload;Ce.exports=function(r,t){var e,n,i,o,a,u;if(a=document.createElement("script"),Ee(a,t),a.async=(i=r.async)!=null?i:1,a.src=r.url,r.attrs!=null){o=r.attrs;for(n in o)u=o[n],a.setAttribute(n,u)}return r.text!=null&&(a.text=""+r.text),e=document.head||document.getElementsByTagName("head")[0],e.parentNode.insertBefore(a,e),a}});var Oe=d((lo,je)=>{je.exports={window,document}});var w=d((fo,Fe)=>{var X=qr(),br=Sr(),xr=Pr(),kr=typeof window!="undefined"?window:global;Fe.exports={assign:X,create:br,trim:xr,bind:Ar,slice:Y,each:Ne,map:Er,pluck:Z,isList:Q,isFunction:Cr,isObject:Ir,Global:kr};function qr(){return Object.assign?Object.assign:function(t,e,n,i){for(var o=1;o<arguments.length;o++)Ne(Object(arguments[o]),function(a,u){t[u]=a});return t}}function Sr(){if(Object.create)return function(e,n,i,o){var a=Y(arguments,1);return X.apply(this,[Object.create(e)].concat(a))};{let t=function(){};var r=t;return function(n,i,o,a){var u=Y(arguments,1);return t.prototype=n,X.apply(this,[new t].concat(u))}}}function Pr(){return String.prototype.trim?function(t){return String.prototype.trim.call(t)}:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function Ar(r,t){return function(){return t.apply(r,Array.prototype.slice.call(arguments,0))}}function Y(r,t){return Array.prototype.slice.call(r,t||0)}function Ne(r,t){Z(r,function(e,n){return t(e,n),!1})}function Er(r,t){var e=Q(r)?[]:{};return Z(r,function(n,i){return e[i]=t(n,i),!1}),e}function Z(r,t){if(Q(r)){for(var e=0;e<r.length;e++)if(t(r[e],e))return r[e]}else for(var n in r)if(r.hasOwnProperty(n)&&t(r[n],n))return r[n]}function Q(r){return r!=null&&typeof r!="function"&&typeof r.length=="number"}function Cr(r){return r&&{}.toString.call(r)==="[object Function]"}function Ir(r){return r&&{}.toString.call(r)==="[object Object]"}});var De=d((po,Te)=>{var _=w(),jr=_.slice,Or=_.pluck,k=_.each,Nr=_.bind,Fr=_.create,ee=_.isList,te=_.isFunction,Tr=_.isObject;Te.exports={createStore:re};var Dr={version:"2.0.12",enabled:!1,get:function(r,t){var e=this.storage.read(this._namespacePrefix+r);return this._deserialize(e,t)},set:function(r,t){return t===void 0?this.remove(r):(this.storage.write(this._namespacePrefix+r,this._serialize(t)),t)},remove:function(r){this.storage.remove(this._namespacePrefix+r)},each:function(r){var t=this;this.storage.each(function(e,n){r.call(t,t._deserialize(e),(n||"").replace(t._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(r){return this._namespacePrefix=="__storejs_"+r+"_"},createStore:function(){return re.apply(this,arguments)},addPlugin:function(r){this._addPlugin(r)},namespace:function(r){return re(this.storage,this.plugins,r)}};function zr(){var r=typeof console=="undefined"?null:console;if(r){var t=r.warn?r.warn:r.log;t.apply(r,arguments)}}function re(r,t,e){e||(e=""),r&&!ee(r)&&(r=[r]),t&&!ee(t)&&(t=[t]);var n=e?"__storejs_"+e+"_":"",i=e?new RegExp("^"+n):null,o=/^[a-zA-Z0-9_\-]*$/;if(!o.test(e))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var a={_namespacePrefix:n,_namespaceRegexp:i,_testStorage:function(c){try{var s="__storejs__test__";c.write(s,s);var l=c.read(s)===s;return c.remove(s),l}catch{return!1}},_assignPluginFnProp:function(c,s){var l=this[s];this[s]=function(){var h=jr(arguments,0),g=this;function y(){if(l)return k(arguments,function(mr,_r){h[_r]=mr}),l.apply(g,h)}var L=[y].concat(h);return c.apply(g,L)}},_serialize:function(c){return JSON.stringify(c)},_deserialize:function(c,s){if(!c)return s;var l="";try{l=JSON.parse(c)}catch{l=c}return l!==void 0?l:s},_addStorage:function(c){this.enabled||this._testStorage(c)&&(this.storage=c,this.enabled=!0)},_addPlugin:function(c){var s=this;if(ee(c)){k(c,function(h){s._addPlugin(h)});return}var l=Or(this.plugins,function(h){return c===h});if(!l){if(this.plugins.push(c),!te(c))throw new Error("Plugins must be function values that return objects");var p=c.call(this);if(!Tr(p))throw new Error("Plugins must return an object of function properties");k(p,function(h,g){if(!te(h))throw new Error("Bad plugin property: "+g+" from plugin "+c.name+". Plugins should only return functions.");s._assignPluginFnProp(h,g)})}},addStorage:function(c){zr("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(c)}},u=Fr(a,Dr,{plugins:[]});return u.raw={},k(u,function(c,s){te(c)&&(u.raw[s]=Nr(u,c))}),k(r,function(c){u._addStorage(c)}),k(t,function(c){u._addPlugin(c)}),u}});var Re=d((ho,Le)=>{var Lr=w(),Rr=Lr.Global;Le.exports={name:"localStorage",read:ze,write:Ur,each:Gr,remove:Jr,clearAll:Mr};function q(){return Rr.localStorage}function ze(r){return q().getItem(r)}function Ur(r,t){return q().setItem(r,t)}function Gr(r){for(var t=q().length-1;t>=0;t--){var e=q().key(t);r(ze(e),e)}}function Jr(r){return q().removeItem(r)}function Mr(){return q().clear()}});var Je=d((go,Ge)=>{var Br=w(),Hr=Br.Global;Ge.exports={name:"oldFF-globalStorage",read:Kr,write:$r,each:Ue,remove:Vr,clearAll:Wr};var b=Hr.globalStorage;function Kr(r){return b[r]}function $r(r,t){b[r]=t}function Ue(r){for(var t=b.length-1;t>=0;t--){var e=b.key(t);r(b[e],e)}}function Vr(r){return b.removeItem(r)}function Wr(){Ue(function(r,t){delete b[r]})}});var He=d((vo,Be)=>{var Xr=w(),ne=Xr.Global;Be.exports={name:"oldIE-userDataStorage",write:Yr,read:Zr,each:Qr,remove:en,clearAll:tn};var O="storejs",I=ne.document,N=nn(),Me=(ne.navigator?ne.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function Yr(r,t){if(!Me){var e=oe(r);N(function(n){n.setAttribute(e,t),n.save(O)})}}function Zr(r){if(!Me){var t=oe(r),e=null;return N(function(n){e=n.getAttribute(t)}),e}}function Qr(r){N(function(t){for(var e=t.XMLDocument.documentElement.attributes,n=e.length-1;n>=0;n--){var i=e[n];r(t.getAttribute(i.name),i.name)}})}function en(r){var t=oe(r);N(function(e){e.removeAttribute(t),e.save(O)})}function tn(){N(function(r){var t=r.XMLDocument.documentElement.attributes;r.load(O);for(var e=t.length-1;e>=0;e--)r.removeAttribute(t[e].name);r.save(O)})}var rn=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function oe(r){return r.replace(/^\d/,"___$&").replace(rn,"___")}function nn(){if(!I||!I.documentElement||!I.documentElement.addBehavior)return null;var r="script",t,e,n;try{e=new ActiveXObject("htmlfile"),e.open(),e.write("<"+r+">document.w=window</"+r+'><iframe src="/favicon.ico"></iframe>'),e.close(),t=e.w.frames[0].document,n=t.createElement("div")}catch{n=I.createElement("div"),t=I.body}return function(i){var o=[].slice.call(arguments,0);o.unshift(n),t.appendChild(n),n.addBehavior("#default#userData"),n.load(O),i.apply(this,o),t.removeChild(n)}}});var Ye=d((yo,Xe)=>{var Ke=w(),on=Ke.Global,an=Ke.trim;Xe.exports={name:"cookieStorage",read:un,write:cn,each:$e,remove:Ve,clearAll:sn};var F=on.document;function un(r){if(!r||!We(r))return null;var t="(?:^|.*;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(F.cookie.replace(new RegExp(t),"$1"))}function $e(r){for(var t=F.cookie.split(/; ?/g),e=t.length-1;e>=0;e--)if(an(t[e])){var n=t[e].split("="),i=unescape(n[0]),o=unescape(n[1]);r(o,i)}}function cn(r,t){r&&(F.cookie=escape(r)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function Ve(r){!r||!We(r)||(F.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function sn(){$e(function(r,t){Ve(t)})}function We(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(F.cookie)}});var et=d((mo,Qe)=>{var ln=w(),fn=ln.Global;Qe.exports={name:"sessionStorage",read:Ze,write:dn,each:pn,remove:hn,clearAll:gn};function S(){return fn.sessionStorage}function Ze(r){return S().getItem(r)}function dn(r,t){return S().setItem(r,t)}function pn(r){for(var t=S().length-1;t>=0;t--){var e=S().key(t);r(Ze(e),e)}}function hn(r){return S().removeItem(r)}function gn(){return S().clear()}});var rt=d((_o,tt)=>{tt.exports={name:"memoryStorage",read:vn,write:yn,each:mn,remove:_n,clearAll:wn};var x={};function vn(r){return x[r]}function yn(r,t){x[r]=t}function mn(r){for(var t in x)x.hasOwnProperty(t)&&r(x[t],t)}function _n(r){delete x[r]}function wn(r){x={}}});var ot=d((wo,nt)=>{nt.exports=[Re(),Je(),He(),Ye(),et(),rt()]});var it=d((exports,module)=>{typeof JSON!="object"&&(JSON={});(function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(r){return r<10?"0"+r:r}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(r){return rx_escapable.lastIndex=0,rx_escapable.test(r)?'"'+r.replace(rx_escapable,function(t){var e=meta[t];return typeof e=="string"?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+r+'"'}function str(r,t){var e,n,i,o,a=gap,u,c=t[r];switch(c&&typeof c=="object"&&typeof c.toJSON=="function"&&(c=c.toJSON(r)),typeof rep=="function"&&(c=rep.call(t,r,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,u=[],Object.prototype.toString.apply(c)==="[object Array]"){for(o=c.length,e=0;e<o;e+=1)u[e]=str(e,c)||"null";return i=u.length===0?"[]":gap?`[
|
|
`+gap+u.join(`,
|
|
`+gap)+`
|
|
`+a+"]":"["+u.join(",")+"]",gap=a,i}if(rep&&typeof rep=="object")for(o=rep.length,e=0;e<o;e+=1)typeof rep[e]=="string"&&(n=rep[e],i=str(n,c),i&&u.push(quote(n)+(gap?": ":":")+i));else for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(i=str(n,c),i&&u.push(quote(n)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?`{
|
|
`+gap+u.join(`,
|
|
`+gap)+`
|
|
`+a+"}":"{"+u.join(",")+"}",gap=a,i}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(r,t,e){var n;if(gap="",indent="",typeof e=="number")for(n=0;n<e;n+=1)indent+=" ";else typeof e=="string"&&(indent=e);if(rep=t,t&&typeof t!="function"&&(typeof t!="object"||typeof t.length!="number"))throw new Error("JSON.stringify");return str("",{"":r})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(r,t){var e,n,i=r[t];if(i&&typeof i=="object")for(e in i)Object.prototype.hasOwnProperty.call(i,e)&&(n=walk(i,e),n!==void 0?i[e]=n:delete i[e]);return reviver.call(r,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(r){return"\\u"+("0000"+r.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})})()});var ut=d((bo,at)=>{at.exports=bn;function bn(){return it(),{}}});var st=d((xo,ct)=>{var xn=De(),kn=ot(),qn=[ut()];ct.exports=xn.createStore(kn,qn)});var lt=d((T,R)=>{(function(r,t){"use strict";var e=function(i){if(typeof i.document!="object")throw new Error("Cookies.js requires a `window` with a `document` object");var o=function(a,u,c){return arguments.length===1?o.get(a):o.set(a,u,c)};return o._document=i.document,o._cacheKeyPrefix="cookey.",o._maxExpireDate=new Date("Fri, 31 Dec 9999 23:59:59 UTC"),o.defaults={path:"/",secure:!1},o.get=function(a){o._cachedDocumentCookie!==o._document.cookie&&o._renewCache();var u=o._cache[o._cacheKeyPrefix+a];return u===t?t:decodeURIComponent(u)},o.set=function(a,u,c){return c=o._getExtendedOptions(c),c.expires=o._getExpiresDate(u===t?-1:c.expires),o._document.cookie=o._generateCookieString(a,u,c),o},o.expire=function(a,u){return o.set(a,t,u)},o._getExtendedOptions=function(a){return{path:a&&a.path||o.defaults.path,domain:a&&a.domain||o.defaults.domain,expires:a&&a.expires||o.defaults.expires,secure:a&&a.secure!==t?a.secure:o.defaults.secure}},o._isValidDate=function(a){return Object.prototype.toString.call(a)==="[object Date]"&&!isNaN(a.getTime())},o._getExpiresDate=function(a,u){if(u=u||new Date,typeof a=="number"?a=a===1/0?o._maxExpireDate:new Date(u.getTime()+a*1e3):typeof a=="string"&&(a=new Date(a)),a&&!o._isValidDate(a))throw new Error("`expires` parameter cannot be converted to a valid Date instance");return a},o._generateCookieString=function(a,u,c){a=a.replace(/[^#$&+\^`|]/g,encodeURIComponent),a=a.replace(/\(/g,"%28").replace(/\)/g,"%29"),u=(u+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent),c=c||{};var s=a+"="+u;return s+=c.path?";path="+c.path:"",s+=c.domain?";domain="+c.domain:"",s+=c.expires?";expires="+c.expires.toUTCString():"",s+=c.secure?";secure":"",s},o._getCacheFromString=function(a){for(var u={},c=a?a.split("; "):[],s=0;s<c.length;s++){var l=o._getKeyValuePairFromCookieString(c[s]);u[o._cacheKeyPrefix+l.key]===t&&(u[o._cacheKeyPrefix+l.key]=l.value)}return u},o._getKeyValuePairFromCookieString=function(a){var u=a.indexOf("=");u=u<0?a.length:u;var c=a.substr(0,u),s;try{s=decodeURIComponent(c)}catch(l){console&&typeof console.error=="function"&&console.error('Could not decode cookie with key "'+c+'"',l)}return{key:s,value:a.substr(u+1)}},o._renewCache=function(){o._cache=o._getCacheFromString(o._document.cookie),o._cachedDocumentCookie=o._document.cookie},o._areEnabled=function(){var a="cookies.js",u=o.set(a,1).get(a)==="1";return o.expire(a),u},o.enabled=o._areEnabled(),o},n=r&&typeof r.document=="object"?e(r):e;typeof define=="function"&&define.amd?define(function(){return n}):typeof T=="object"?(typeof R=="object"&&typeof R.exports=="object"&&(T=R.exports=n),T.Cookies=n):r.Cookies=n})(typeof window=="undefined"?T:window)});var U=d((ko,vt)=>{var P,ft,dt,ie,ae,pt,ht,gt;ie=m(),pt=ie.safariPrivateBrowsing,ht=ie.tld;ae=Oe(),ft=ae.document,gt=ae.window;dt=function(){return st()};P=function(){var r,t,e;return P=lt()(gt),r=ht(ft.domain),t="_hza",e=function(){var n;return n=P.get(t),n!=null?JSON.parse(n):{}},{get:function(n){return e()[n]},set:function(n,i){var o;return o=e(),o[n]=i,P.set(t,JSON.stringify(o,{domain:r,secure:!0,expires:1/0}))},remove:function(n){return this.set(n,void 0)},clear:function(){return P.expire(t)}}};vt.exports=pt()?P():dt()});var mt=d((qo,yt)=>{var G;G=U();yt.exports=function(r,t){var e,n;return t==null&&(t=1),e="sample:"+r,(n=G.get(e))!=null?n:Math.random()<t?(G.set(e,!1),!1):(G.set(e,!0),!0)}});var v=d((So,kt)=>{var Sn,_t,wt,bt,xt;_t=qe();wt=Ae();bt=Ie();xt=mt();kt.exports=Sn=function(){function r(){}return r.prototype.init=function(){},r.prototype.name=function(){return this.opts.type},r.prototype.sample=function(){return this.opts.sample!=null?xt(this.name(),this.opts.sample):!0},r.prototype.load=function(t){if(t==null&&(t=function(){}),this.src!=null&&this.src.type!=null&&this.src.url!=null)switch(this.log("load",this.src),this.src.type){case"script":switch(typeof this.src.url){case"object":window.location.protocol==="https:"?this.src.url=this.src.url.https:this.src.url=this.src.url.http;break;case"function":this.src.url=this.src.url.call(this)}return bt(this.src,t);case"img":return wt(this.src,t);case"iframe":return _t(this.src,t)}},r}()});var M=d((Po,Pt)=>{var qt,J,St;J=U();St=m().uuid;qt=function(){function r(){var t,e,n,i;e=(n=J.get("identity"))!=null?n:{};for(t in e)i=e[t],this[t]=i;this.userId!=null||this.anonId!=null||(this.anonId=St())}return r.prototype.set=function(t,e){var n;return n=identity(),n[t]=e,J.set("identity",n)},r.prototype.clear=function(){return J.remove("identity")},r.prototype.id=function(){var t;return(t=this.userId)!=null?t:this.anonId},r}();Pt.exports=new qt});var ce=d((Ao,Et)=>{var ue,At;ue=U();At=m().tld;Et.exports={title:function(){return document.title},referrer:function(){var r,t,e;return this._referrer!=null?this._referrer:(r=At(document.domain),t=document.referrer,t.indexOf(r)===-1?(ue.set("referrer",t),this._referrer=t):this._referrer=(e=ue.get("referrer"))!=null?e:"")}}});var Nt=d((Eo,Ot)=>{var Pn,Ct,It,jt,An=function(r,t){for(var e in t)En.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r},En={}.hasOwnProperty;Ct=v();It=M();jt=ce();Ot.exports=Pn=function(r){An(t,r),t.prototype.src={type:"script",url:{https:"https://s.adroll.com/j/roundtrip.js",http:"https://a.adroll.com/j/roundtrip.js"}};function t(e){this.opts=e}return t.prototype.init=function(){if(window.__adroll_loaded==null)return window.adroll_adv_id=this.opts.advId,window.adroll_pix_id=this.opts.pixId,window.__adroll_loaded=!0},t.prototype.identify=function(e,n,i){var o;return window.adroll_email((o=n.email)!=null?o:e)},t.prototype.page=function(e,n,i,o){return this.track(jt.title()),o(null)},t.prototype.track=function(e,n,i){var o,a;return o={user_id:It.id(),order_id:n.orderId,adroll_conversion_value:n.revenue,adroll_currency:(a=n.currency)!=null?a:"USD"},window.__adroll.record_user(o)},t}(Ct)});var Dt=d((Co,Tt)=>{var Cn,Ft,In=function(r,t){for(var e in t)jn.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r},jn={}.hasOwnProperty;Ft=v();Tt.exports=Cn=function(r){In(t,r),t.prototype.src={type:"script",url:"//bat.bing.com/bat.js"};function t(e){this.opts=e}return t.prototype.init=function(){return window.uetq=window.uetq||[],this.load(function(){var e;return e={ti:self.options.tagId,q:window.uetq},window.uetq=new window.UET(e),this.ready()})},t.prototype.page=function(e,n,i){return window.uetq.push("pageLoad"),i(null)},t.prototype.track=function(e,n,i){return window.heap.track(e,n),i(null),e={ea:"track",el:e},e.ec==null&&(e.ec=n.category),e.gv==null&&(e.gv=n.revenue),window.uetq.push(e)},t}(Ft)});var se=d((Io,Lt)=>{var On,zt,Nn=function(r,t){for(var e in t)Fn.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r},Fn={}.hasOwnProperty;zt=v();Lt.exports=On=function(r){Nn(t,r);function t(e){this.opts=e,this.src==null&&(this.src=this.opts.src),this.fn=new Function(this.opts.code)}return t.prototype.track=function(e,n,i){var o;if(e===this.opts.event)try{return this.fn(e,n,i)}catch(a){return o=a,this.log("Custom integration failed, "+o.toString())}},t}(zt)});var le=d((jo,Ut)=>{var Tn,Rt,Dn=function(r,t){for(var e in t)zn.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r},zn={}.hasOwnProperty;Rt=v();Ut.exports=Tn=function(r){Dn(t,r),t.prototype.src={type:"script",url:"//connect.facebook.net/en_US/fbds.js"};function t(e){this.opts=e}return t.prototype.init=function(){if(window._fbq==null)return window._fbq=[]},t.prototype.load=function(){if(!(typeof _fbq!="undefined"&&_fbq!==null&&_fbq.loaded))return t.__super__.load.apply(this,arguments),_fbq.loaded=!0},t.prototype.page=function(e,n,i,o){return arguments.length===1&&(n=e),this.track(n,i,o)},t.prototype.track=function(e,n,i){var o,a,u,c,s,l,p;if(e===this.opts.event)return a=this.opts.id,p=(u=(c=n.value)!=null?c:this.opts.value)!=null?u:"0.00",o=(s=(l=n.currency)!=null?l:this.opts.currency)!=null?s:"USD",_fbq.push(["track",a,{value:p,currency:o}])},t}(Rt)});var Jt=d((Oo,Gt)=>{Gt.exports=function(){var r,t,e,n,i,o,a,u;if(r=typeof Crowdstart!="undefined"&&Crowdstart!==null&&(a=Crowdstart.Shop)!=null?a.data:void 0,r==null)return{total:0,items:[],ids:[]};for(i=r.get("order.items"),e=[],t=0,o=i.length;t<o;t++)n=i[t],e.push((u=n.sku)!=null?u:n.id);return{total:r.get("order.total"),items:i,ids:e}}});var de=d((No,Ht)=>{var Ln,Mt,fe,Bt,Rn=function(r,t){for(var e in t)Un.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r},Un={}.hasOwnProperty;Mt=v();fe=Jt();Bt=function(r){if(typeof r=="string")return r;if(typeof r=="number")return r.toFixed(2)};Ht.exports=Ln=function(r){Rn(t,r),t.prototype.src={type:"script",url:"//connect.facebook.net/en_US/fbevents.js"};function t(e){var n,i,o,a,u,c;this.opts=e,(n=this.opts).values==null&&(n.values={}),(i=this.opts.values).currency==null&&(i.currency="USD"),(o=this.opts.values).viewedProduct==null&&(o.viewedProduct={percent:1e-4}),(a=this.opts.values).addedProduct==null&&(a.addedProduct={percent:.001}),(u=this.opts.values).initiateCheckout==null&&(u.initiateCheckout={percent:.01}),(c=this.opts.values).addPaymentInfo==null&&(c.addPaymentInfo={percent:.02})}return t.prototype.init=function(){var e;window.fbq==null&&(e=function(){e.callMethod?e.callMethod.apply(e,arguments):e.queue.push(arguments)},e.push=e,e.loaded=!0,e.version="2.0",e.queue=[],e.agent="hza",window.fbq=window._fbq=e,this.identity!=null?e("init",this.opts.id,this.identity):e("init",this.opts.id))},t.prototype.identify=function(e,n,i){return this.identity={em:n.email,ph:n.phone,fn:n.firstName},i(null)},t.prototype.page=function(e,n,i,o){return o(null)},t.prototype.track=function(e,n,i){switch(e){case"Lead":fbq("track","Lead");break;case"Complete Registration":fbq("track","CompleteRegistration");break;case"Search":fbq("track","Search");break;case"Add to Wishlist":fbq("track","AddToWishList")}return i(null)},t.prototype.calcValue=function(e,n,i){var o,a,u;return n==null&&(n={}),i==null&&(i=0),i=math.Max(n.total,i),o=(a=n.currency)!=null?a:this.opts.values.currency,(u=n.values[e].value)!=null?[u,o]:(u=n.values[e].percent*i,[u,o])},t.prototype.viewedCheckoutStep=function(e,n,i){var o,a,u,c,s,l,p;if(!(n.step!=null&&n.step>1))return c=fe(),a=c.ids,l=c.total,u=c.items,s=this.calcValue("initiateCheckout",n,l),p=s[0],o=s[1],fbq("track","InitiateCheckout",{content_ids:a,currency:o,num_items:u.length,value:p}),i(null)},t.prototype.completedCheckoutStep=function(e,n,i){var o,a,u,c,s,l;if(!(n.step!=null&&n.step>1))return u=fe(),a=u.ids,s=u.total,c=this.calcValue("addPaymentInfo",n,s),l=c[0],o=c[1],fbq("track","AddPaymentInfo",{content_ids:a,currency:o,value:l}),i(null)},t.prototype.viewedProduct=function(e,n,i){var o,a,u;return a=this.calcValue("viewedProduct",n,n.price),u=a[0],o=a[1],fbq("track","ViewContent",{content_ids:[n.id],content_type:"product",currency:o,value:u}),i(null)},t.prototype.addedProduct=function(e,n,i){var o,a,u;return a=this.calcValue("addedProduct",n,n.price),u=a[0],o=a[1],fbq("track","AddToCart",{content_type:"product",content_ids:[n.id]}),i(null)},t.prototype.completedOrder=function(e,n,i){var o,a,u;return o=function(){var c,s,l,p,h;for(l=n.products,h=[],c=0,s=l.length;c<s;c++)a=l[c],h.push((p=a.sku)!=null?p:a);return h}(),fbq("track","Purchase",{value:Bt(n.total),currency:(u=n.currency)!=null?u:"USD",content_type:"product",content_ids:o,num_items:o.length}),i(null)},t}(Mt)});var pe=d((Fo,$t)=>{var Gn,Kt,Jn=function(r,t){for(var e in t)Mn.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r},Mn={}.hasOwnProperty;Kt=v();$t.exports=Gn=function(r){Jn(t,r),t.prototype.src={type:"script",url:"//www.googleadservices.com/pagead/conversion_async.js"};function t(e){this.opts=e,this.queue=[]}return t.prototype.init=function(){if(window.google_trackConversion==null)return window.google_trackConversion=function(e){return function(n){return e.queue.push(n)}}(this)},t.prototype.load=function(e){return t.__super__.load.call(this,function(n){return function(){var i,o,a,u;if(n.queue.length)for(u=n.queue,o=0,a=u.length;o<a;o++)i=u[o],google_trackConversion(i);return e(null)}}(this))},t.prototype.page=function(e,n,i,o){if(arguments.length===1&&(n=e),n===this.opts.event)return google_trackConversion({google_conversion_id:this.opts.id,google_custom_params:i,google_remarketing_only:!0}),o(null)},t.prototype.track=function(e,n,i){if(e===this.opts.event)return google_trackConversion({google_conversion_id:this.opts.id,google_custom_params:n,google_conversion_language:"en",google_conversion_format:"3",google_conversion_color:"ffffff",google_conversion_label:e,google_conversion_value:n.total,google_remarketing_only:!1}),i(null)},t}(Kt)});var he=d((To,Xt)=>{var Bn,Vt,D,Wt,A,Hn=function(r,t){for(var e in t)Kn.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r},Kn={}.hasOwnProperty;Vt=v();Wt=function(r){return typeof r=="string"&&(r.indexOf(".")!==-1?r=Math.round(parseFloat(r,10)):r=parseInt(r,10)),r};D=function(r){if(typeof r=="string")return r;if(typeof r=="number")return r.toFixed(2)};A=function(r){var t,e,n;r==null&&(r={}),t={};for(e in r)n=r[e],n!=null&&(t[e]=n);return t};Xt.exports=Bn=function(r){Hn(t,r),t.prototype.src={type:"script",url:"//www.google-analytics.com/analytics.js"};function t(e){this.opts=e}return t.prototype.init=function(){return function(e,n,i,o,a,u,c){return e.GoogleAnalyticsObject=a,e[a]=e[a]||function(){(e[a].q=e[a].q||[]).push(arguments)},e[a].l=1*new Date}(window,document,"","","ga"),window.GoogleAnalyticsObject="ga",ga("create",this.opts.id,"auto"),this.loadLinkAttribution()},t.prototype.setAction=function(e,n){return ga("ec:setAction",e,A(n))},t.prototype.sendEvent=function(e,n){var i,o,a,u,c;return o={eventAction:e},n!=null&&(o.eventCategory=n.category,o.eventLabel=n.label,o.eventValue=Wt((a=(u=(c=n.value)!=null?c:n.total)!=null?u:n.revenue)!=null?a:0),o.nonInteraction=n.nonInteraction,(i=n.campaign)!=null&&(o.campaignName=i.name,o.campaignSource=i.source,o.campaignMedium=i.medium,o.campaignContent=i.content,o.campaignKeyword=i.term)),ga("send","event",A(o))},t.prototype.sendEEvent=function(e,n){return this.loadEcommerce(e,n),n.category==null&&(n.category="EnhancedEcommerce"),this.sendEvent(e,n)},t.prototype.identify=function(e,n,i){return ga("set","userId",e),i(null)},t.prototype.page=function(e,n,i,o){return ga("set",A(i)),ga("send","pageview",A(i)),o(null)},t.prototype.track=function(e,n,i){return this.sendEvent(e,n),i(null)},t.prototype.loadLinkAttribution=function(){if(this.opts.linkAttribution!=null&&!this._loadedLinkAttribution)return ga("require","linkid",this.opts.linkAttribution),this._loadedLinkAttribution=!0},t.prototype.loadEcommerce=function(e){var n;return e==null&&(e={}),this._loadedEcommerce||(ga("require","ec"),this._loadedEcommerce=!0),ga("set","&cu",(n=e.currency)!=null?n:"USD")},t.prototype.addProduct=function(e){var n;return ga("ec:addProduct",A({id:(n=e.sku)!=null?n:e.id,brand:e.brand,category:e.category,coupon:e.coupon,currency:e.currency,name:e.name,price:D(e.price),quantity:e.quantity,variant:e.variant}))},t.prototype.viewedProduct=function(e,n,i){return this.sendEEvent(e,n),this.addProduct(n),this.setAction("detail",n),i(null)},t.prototype.addedProduct=function(e,n,i){return this.sendEEvent(e,n),this.addProduct(n),this.setAction("add",n),i(null)},t.prototype.removedProduct=function(e,n,i){return this.sendEEvent(e,n),this.addProduct(n),this.setAction("remove",n),i(null)},t.prototype.completedOrder=function(e,n,i){var o,a,u,c,s;if(n.orderId!=null&&n.products!=null){for(this.sendEEvent(e,n),c=n.products,o=0,a=c.length;o<a;o++)u=c[o],this.addProduct(u);return this.setAction("purchase",{id:n.orderId,affiliation:n.affiliation,revenue:D((s=n.total)!=null?s:n.revenue),tax:D(n.tax),shipping:D(n.shipping),coupon:n.coupon}),i(null)}},t.prototype.viewedCheckoutStep=function(e,n,i){var o;return this.sendEEvent(e,n),this.setAction("checkout",{step:(o=n.step)!=null?o:1,option:n.option}),i(null)},t.prototype.completedCheckoutStep=function(e,n,i){var o;return this.sendEEvent(e,n),this.setAction("checkout_option",{step:(o=n.step)!=null?o:1,option:n.option}),i(null)},t}(Vt)});var Qt=d((Do,Zt)=>{var $n,Yt,Vn=function(r,t){for(var e in t)Wn.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r},Wn={}.hasOwnProperty;Yt=v();Zt.exports=$n=function(r){Vn(t,r),t.prototype.src={type:"script",url:function(){return"//cdn.heapanalytics.com/js/heap-"+this.id+".js"}};function t(e){this.opts=e}return t.prototype.init=function(){if(window.heap==null)return window.heap=window.heap||[],window.heap.load=function(e,n){var i,o,a,u,c,s;for(window.heap.appid=e,window.heap.config=n,c=function(l){return function(){window.heap.push([l].concat(Array.prototype.slice.call(arguments,0)))}},i=["addEventProperties","addUserProperties","clearEventProperties","identify","removeEventProperty","setEventProperties","track","unsetEventProperty"],s=[],o=0,a=i.length;o<a;o++)u=i[o],s.push(window.heap[u]=c(u));return s},window.heap.load(this.options.id)},t.prototype.track=function(e,n,i){return window.heap.track(e,n),i(null)},t.prototype.identify=function(e,n,i){return window.identify(e),window.heap.addUserProperties(n)},t}(Yt)});var er=d((zo,Xn)=>{Xn.exports={name:"track.js",version:"0.2.19",description:"Identify users and track interactions with Hanzo. DEPRECATED: Use modern analytics solutions.",deprecated:"This package is deprecated. Consider using modern analytics libraries or Hanzo's updated tracking via @hanzo/commerce.js.",main:"lib",devDependencies:{bebop:"1.12.5","sake-bundle":"0.6.0","sake-cli":"0.5.21","sake-core":"1.5.1","sake-linked":"0.1.2","sake-outdated":"0.1.28","sake-publish":"0.1.16","sake-test":"0.1.5","sake-version":"0.1.19",chai:"4.1.0","coffee-script":"1.12.7",connect:"3.6.3",handroll:"0.15.0",jsdom:"9.12.0",mocha:"3.5.0","selenium-standalone":"6.6.0","serve-static":"1.12.3",shortcake:"1.2.8",webdriverio:"4.8.0"},scripts:{build:"coffee -bcm -o lib/ src/",prepublishOnly:"coffee -bcm -o lib/ src/",pretest:"sake build",test:"sake test"},repository:{type:"git",url:"git+https://github.com/hanzo-io/track.js.git"},keywords:["analytics","tracking","ecommerce","hanzo"],author:"Hanzo, Inc. <[email protected]>",license:"BSD-3-Clause",bugs:{url:"https://github.com/hanzo-io/track.js/issues"},homepage:"https://github.com/hanzo-io/track.js#readme",dependencies:{"cookies-js":"1.2.3","load-iframe":"^1.0.0","load-script":"^1.0.0",store:"2.0.12"}}});var B=d((Lo,ur)=>{var ge,rr,nr,Yn,or,z,ir,tr,ar,Zn=function(r,t){for(var e in t)Qn.call(t,e)&&(r[e]=t[e]);function n(){this.constructor=r}return n.prototype=t.prototype,r.prototype=new n,r.__super__=t.prototype,r},Qn={}.hasOwnProperty;nr=v();z=M();ar=m().uuid;ir=(tr=function(){try{return er()}catch{}}())!=null?tr:{};rr="https://api.hanzo.ai";ge="/v1/analytics";or="/v1/tracker";ur.exports=Yn=function(r){Zn(t,r);function t(e){var n,i;this.opts=e!=null?e:{},this.host=((n=this.opts.host)!=null?n:rr).replace(/\/+$/,""),this.token=(i=this.opts.token)!=null?i:this.opts.writeKey,this.product=this.opts.product}return t.prototype.identify=function(e,n,i){return i==null&&(i=function(){}),this.send(this.event("identify",void 0,n)),i(null)},t.prototype.track=function(e,n,i){return i==null&&(i=function(){}),this.send(this.event("event",e,n)),i(null)},t.prototype.page=function(e,n,i,o){return i==null&&(i={}),o==null&&(o=function(){}),this.send(this.event("pageview","pageview",i)),o(null)},t.prototype.event=function(e,n,i){var o,a;return o=(a=z.anonId)!=null?a:z.id(),{messageId:ar(),type:e,event:n,timestamp:new Date().toISOString(),distinctId:z.id(),anonymousId:o,personId:z.userId,product:this.product,properties:i!=null?i:{},library:"track.js",libraryVersion:ir.version}},t.prototype.send=function(e){var n,i,o;if(n=JSON.stringify({batch:[e]}),typeof fetch=="function"){i={"Content-Type":"application/json"},this.token!=null&&(i.Authorization="Bearer "+this.token),fetch(this.host+ge,{method:"POST",headers:i,body:n,keepalive:!0,credentials:"include"}).catch(function(){});return}if(this.token==null&&typeof navigator!="undefined"&&navigator.sendBeacon!=null){navigator.sendBeacon(this.host+or,new Blob([n],{type:"application/json"}));return}typeof XMLHttpRequest=="function"&&(o=new XMLHttpRequest,o.open("POST",this.host+ge,!0),o.withCredentials=!0,o.setRequestHeader("Content-Type","application/json"),this.token!=null&&o.setRequestHeader("Authorization","Bearer "+this.token),o.send(n))},t}(nr)});var ve=d((Ro,cr)=>{cr.exports={Custom:se(),FacebookPixel:de(),FacebookConversions:le(),GoogleAdWords:pe(),GoogleAnalytics:he(),Native:B()}});var eo,ye=wr(()=>{eo=me({"./integrations/adroll.js":()=>Nt(),"./integrations/bing.js":()=>Dt(),"./integrations/custom.js":()=>se(),"./integrations/facebook-conversions.js":()=>le(),"./integrations/facebook-pixel.js":()=>de(),"./integrations/google-adwords.js":()=>pe(),"./integrations/google-analytics.js":()=>he(),"./integrations/heap.js":()=>Qt(),"./integrations/index.js":()=>ve(),"./integrations/native.js":()=>B()})});var pr=d((Jo,dr)=>{ye();var to,sr,lr,H,fr,E=[].slice;sr=v();fr=ce();lr=function(r){var t;return t=r.replace(/\s+/g,""),t[0].toLowerCase()+t.substring(1)};H=function(r,t){var e;return r==null&&(r={}),t==null&&(t=function(){}),typeof r=="function"&&(e=[{},t],r=e[0],t=e[1]),[r,t]};dr.exports=to=function(){function r(){var t;this.integrations=[],typeof location!="undefined"&&(this._debug=location.search.indexOf("v=1")!==-1),t=this,sr.prototype.log=function(){var e;return e=Array.prototype.slice.call(arguments),e.unshift(this.name()),t.log.apply(t,e)}}return r.prototype.debug=function(t){return t==null&&(t=!0),this._debug=t},r.prototype.log=function(){if(this._debug)return typeof console!="undefined"&&console!==null?console.log.apply(console,arguments):void 0},r.prototype.ready=function(t){return t==null&&(t=function(){}),this.log("ready"),t()},r.prototype.initialize=function(t){var e,n,i,o,a,u;for(i=(u=t.integrations)!=null?u:[],this.log("initialize",i),e=function(c){return function(s){var l,p;return l=eo("./integrations/"+s.type),p=new l(s),p.sample()?(p.init(),p.load(),c.integrations.push(p)):c.log("not sampling",p.name())}}(this),n=0,o=i.length;n<o;n++)a=i[n],e(a);this.referrer()},r.prototype.referrer=function(){return fr.referrer()},r.prototype.identity=function(){return M()},r.prototype.call=function(){var t,e,n,i,o,a,u,c,s;for(e=arguments[0],t=2<=arguments.length?E.call(arguments,1):[],this.log.apply(this,["call",e].concat(E.call(t))),a=lr(e),u=this.integrations,n=0,o=u.length;n<o;n++)i=u[n],i[a]!=null?(i.log.apply(i,[a].concat(E.call(t))),(c=i[a]).call.apply(c,[i].concat(E.call(t)))):i.track!=null&&(i.log.apply(i,["track",e].concat(E.call(t))),(s=i.track).call.apply(s,[i,e].concat(E.call(t))))},r.prototype.identify=function(t,e,n){var i;i=H(e,n),e=i[0],n=i[1],e.userId==null&&(e.userId=t),this.log("identify",e),this.call("identify",t,e,n)},r.prototype.track=function(t,e,n){var i;i=H(e,n),e=i[0],n=i[1],this.log("track",t,e),this.call("track",t,e,n)},r.prototype.page=function(t,e,n,i){var o;o=H(n,i),n=o[0],i=o[1],typeof t=="string"&&(n.category=t),typeof e=="string"&&(n.name=e),this.log("page",n),this.call("page",t,e,n,i)},r.prototype.alias=function(){},r.prototype.group=function(){},r.prototype.load=function(){},r.prototype.off=function(){},r.prototype.on=function(){},r.prototype.once=function(){},r.prototype.reset=function(){},r.prototype.trackClick=function(){},r.prototype.trackForm=function(){},r.prototype.trackLink=function(){},r.prototype.trackSubmit=function(){},r.prototype.user=function(){},r}()});var gr=d((Bo,hr)=>{hr.exports={Annotate:be(),Analytics:pr(),Integration:v(),Integrations:ve()}});var no=d((Ho,yr)=>{var K=gr(),vr=B(),ro={native:vr};K.Analytics.prototype.initialize=function(r){var t=r&&r.integrations||[],e=this;return e.log&&e.log("initialize",t),t.forEach(function(n){var i=ro[n&&n.type];if(!i){e.log&&e.log("unknown integration",n&&n.type);return}var o=new i(n);o.sample()?(o.init(),o.load(),e.integrations.push(o)):e.log&&e.log("not sampling",o.name())}),e.referrer&&e.referrer(),e};K.Native=vr;typeof window!="undefined"&&(window.HanzoTrack=K);yr.exports=K});return no();})();
|