Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@qihoo/fx-mp

Package Overview
Dependencies
Maintainers
5
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qihoo/fx-mp - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

2

dist/main.js

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

var e=function(){return(e=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var t={},r=function(e){t=e},n=function(r){var n={ep:(new Date).getTime()};!function(e,t,r){var n=qh&&qh.request;if(!n)return!1;n({method:"POST",url:e,data:t,header:{"content-type":"application/x-www-form-urlencoded"},timeout:3e3,success:function(e){return r&&r(null,e),!0},fail:function(e){return r&&r(e,null),!1}})}("https://s.union.360.cn/m.gif",e(e(e({},t),r),n))},o=function(e){return e.reverse().reduce((function(e,t,r){return e+=+t*Math.pow(10,r)}),0)},i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function c(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s={next:function(e){},error:function(e){throw new Error(e)},complete:function(){}},u=function(){function e(t,r,n){var o=Array.from(arguments).filter((function(e){return e})).length;switch(o){case 0:this.observer=this.safeObserver(s);break;case 1:this.observer=t instanceof e?t:this.safeObserver(t);break;default:this.observer=this.safeObserver(t,r,n)}}return e.prototype.safeObserver=function(e,t,r){var n;return"function"==typeof e?n=e:(n=e.next||s.next,t=e.error||s.error,r=e.complete||s.complete),{next:n,error:t,complete:r}},e.prototype.next=function(e){this.isStopped||this.observer.next(e)},e.prototype.error=function(e){this.isStopped||(this.observer.error(e),this.unsubscribe())},e.prototype.complete=function(){this.isStopped||(this.observer.complete(),this.unsubscribe())},e.prototype.unsubscribe=function(){this.isStopped=!0},e}(),a=function(e){function t(t,r){var n=e.call(this,t)||this;return n.callback=r,n.next=n.next.bind(n),n.complete=n.complete.bind(n),n}return c(t,e),t.prototype.next=function(e){try{this.observer.next(this.callback(e))}catch(e){this.observer.error(e)}},t.prototype.complete=function(){this.observer.complete()},t}(u),p=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.callback=r,o.result=n,o.next=o.next.bind(o),o.complete=o.complete.bind(o),o}return c(t,e),t.prototype.complete=function(){this.observer.next(this.result),this.observer.complete()},t.prototype.next=function(e){try{this.result=this.callback(this.result,e)}catch(e){this.observer.error(e)}},t}(u),f=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.subscribe=function(e,t,r){var n=new u(e,t,r);if(this.operator)this.operator.call(n,this.source);else{if(!this._subscribe)throw new Error("Observable class need subscribe function for creating!");this._subscribe(n)}return n},e.prototype.create=function(t){return new e(t)},e.prototype.map=function(t){var r=new e;return r.source=this,r.operator={call:function(e,r){var n=new a(e,t);return r.subscribe(n)}},r},e.prototype.reduce=function(t,r){var n=new e;return n.source=this,n.operator={call:function(e,n){var o=new p(e,t,r);return n.subscribe(o)}},n},e.prototype.fromEvent=function(t,r){return new e((function(e){var n=document.getElementsByTagName(t),o=document.getElementById(t)?[document.getElementById(t)]:[],i=document.getElementsByClassName(t),c=n.length&&n||o.length&&o||i.length&&i||[];Array.from(c).forEach((function(t){t.addEventListener(r,(function(t){e.next(t)}),!0)}))}))},e.prototype.fromDelegateClick=function(t){return new e((function(e){document.body.addEventListener("click",(function(r){var n=r.target.id&&r.target.id.includes(t),o=r.target.tagName&&r.target.tagName.includes(t.toLocaleUpperCase());(n||o)&&e.next(r)}),!0)}))},e.prototype.fromMpRouteChange=function(){return new e((function(e){window.addEventListener("routeChange",(function(t){e.next(t)}))}))},e.prototype.fromArray=function(t){if(!Array.isArray(t))throw new Error("params need to be an array");return new e((function(e){t.forEach((function(t){return e.next(t)})),e.complete()}))},e}(),l={next:function(e){var t=(new Date).getTime(),r=e.to.path,o=e.from.path,i=function(e,r){n({et:55,ptype:r,url:e,ep:t})};"/"!=o&&i(o,2),i(r,1)}},h={next:function(e){var t,r,o=(new Date).getTime(),i=w.filter((function(t){return t.id==e.target.id||t.id.toLocaleUpperCase()===e.target.tagName}))[0];if(i){var c={et:56,fxeid:null===(t=i)||void 0===t?void 0:t.id,ename:null===(r=i)||void 0===r?void 0:r.name,ep:o};n(c)}}},b={next:function(e){n({et:157})}},v={next:function(e){n(e)}},y=function(){return function(e){return(new f).create((function(){})).subscribe(e).observer}(v)},m=function(){return function(e){return(new f).fromEvent("body","click").subscribe(e).observer}(b)},d=function(){return function(e){return(new f).fromMpRouteChange().subscribe(e).observer}(l)},w=[],g=[],x=function(e){var t=e.id;g.includes(t)||(!function(e,t){(new f).fromDelegateClick(e).subscribe(t).observer}(t,h),g.push(t),w.push(e))},O=function(e){Array.isArray(e)?e.map((function(e){x(e)})):x(e)},k=function(){function t(){this.funcObserver=y(),this.pageChangeObserver=d()}return t.prototype.register=function(t){var r={et:53,type:2};this.funcObserver.next(e(e({},t),r))},t.prototype.form=function(t){var r={et:53,type:3};this.funcObserver.next(e(e({},t),r))},t.prototype.payment=function(t){var r={et:57,type:2};this.funcObserver.next(e(e({},t),r))},t.prototype.setClickTarget=function(e){O(e)},t.prototype.setPageClick=function(){this.clickObserver||(this.clickObserver=m())},t.prototype.set=function(e,t){switch(e){case"clickTarget":O(t);break;case"pageClick":this.clickObserver||(this.clickObserver=m())}},t.prototype.send=function(e){this.funcObserver.next(e)},t}(),E=window._qha;!function(){if(!window.qh)throw new Error("该功能只在小程序环境才生效~");if(E)throw new Error("实例已存在无须重复注册~");var e,t,n,i,c=qh.getSystemInfoSync().SDKVersion;if(e=c,t="1.9.3".split("."),n=e.split("."),i=o(t),!(o(n)>=i))throw new Error("The current SDK version is not supported. Please upgrade to version 1.9.3+");var s=function(){var e=(new Date).getTime(),t=qh.getAppBaseInfoSync();if("string"==typeof t)try{t=JSON.parse(qh.getAppBaseInfoSync())}catch(e){t={title:"",version:""}}return{mpn:t.title,mpv:t.version||"",si:qh.getAppIdSync(),mid:qh.getDMSync(),mxt:senative.callsync("getChannelQuerySync","mxt")||"",pt:"",flt:e,jstype:"npm"}}();r(s),window._qha=new k}();
var t=function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var e={},n=function(t){e=t},r=function(n){var r={ep:Date.now()};!function(t,e,n){var r=qh&&qh.request;if(!r)return!1;r({method:"POST",url:t,data:e,header:{"content-type":"application/x-www-form-urlencoded"},timeout:3e3,success:function(t){return n&&n(null,t),!0},fail:function(t){return n&&n(t,null),!1}})}("https://s.union.360.cn/m.gif",t(t(t({},e),n),r))},o=function(t){return t.reverse().reduce((function(t,e,n){return t+=+e*Math.pow(10,n)}),0)},i=function(t,e){var n=e.split("."),r=t.split("."),i=o(n);return o(r)>i},c=function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function u(t,e){function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var s={next:function(t){},error:function(t){},complete:function(){}},a=function(){function t(e,n,r){var o=Array.from(arguments).filter((function(t){return t})).length;switch(o){case 0:this.observer=this.safeObserver(s);break;case 1:this.observer=e instanceof t?e:this.safeObserver(e);break;default:this.observer=this.safeObserver(e,n,r)}}return t.prototype.safeObserver=function(t,e,n){var r;return"function"==typeof t?r=t:(r=t.next||s.next,e=t.error||s.error,n=t.complete||s.complete),{next:r,error:e,complete:n}},t.prototype.next=function(t){this.isStopped||this.observer.next(t)},t.prototype.error=function(t){this.isStopped||(this.observer.error(t),this.unsubscribe())},t.prototype.complete=function(){this.isStopped||(this.observer.complete(),this.unsubscribe())},t.prototype.unsubscribe=function(){this.isStopped=!0},t}(),p=function(t){function e(e,n){var r=t.call(this,e)||this;return r.callback=n,r.next=r.next.bind(r),r.complete=r.complete.bind(r),r}return u(e,t),e.prototype.next=function(t){try{this.observer.next(this.callback(t))}catch(t){this.observer.error(t)}},e.prototype.complete=function(){this.observer.complete()},e}(a),f=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.callback=n,o.result=r,o.next=o.next.bind(o),o.complete=o.complete.bind(o),o}return u(e,t),e.prototype.complete=function(){this.observer.next(this.result),this.observer.complete()},e.prototype.next=function(t){try{this.result=this.callback(this.result,t)}catch(t){this.observer.error(t)}},e}(a),h=function(){function t(t){this._subscribe=t||function(){}}return t.prototype.subscribe=function(t,e,n){var r=new a(t,e,n);return this.operator?this.operator.call(r,this.source):this._subscribe&&this._subscribe(r),r},t.prototype.create=function(e){return new t(e)},t.prototype.map=function(e){var n=new t;return n.source=this,n.operator={call:function(t,n){var r=new p(t,e);return n.subscribe(r)}},n},t.prototype.reduce=function(e,n){var r=new t;return r.source=this,r.operator={call:function(t,r){var o=new f(t,e,n);return r.subscribe(o)}},r},t.prototype.fromEvent=function(e,n){return new t((function(t){var r=document.getElementsByTagName(e),o=document.getElementById(e)?[document.getElementById(e)]:[],i=document.getElementsByClassName(e),c=r.length&&r||o.length&&o||i.length&&i||[];Array.from(c).forEach((function(e){e.addEventListener(n,(function(e){t.next(e)}),!0)}))}))},t.prototype.fromDelegateClick=function(e){return new t((function(t){document.body.addEventListener("click",(function(n){n.target.id&&n.target.id===e&&t.next(n)}),!0)}))},t.prototype.fromMpRouteChange=function(){return new t((function(t){window.addEventListener("routeChange",(function(e){t.next(e)}))}))},t.prototype.fromArray=function(e){return Array.isArray(e)?new t((function(t){e.forEach((function(e){return t.next(e)})),t.complete()})):new t},t}(),l={next:function(t){var e=Date.now(),n=t.to.path,o=t.from.path,i=function(t,n){r({et:55,ptype:n,url:t,ep:e})};"/"!=o&&i(o,2),i(n,1)}},v={next:function(t){var e=Date.now(),n=m.filter((function(e){return e.id===t.target.id}))[0],o=n.id,i=n.name;r({et:56,fxeid:o,ename:void 0===i?"":i,ep:e})}},y={next:function(t){r(t)}},b=function(){return function(t){return(new h).create((function(){})).subscribe(t)}(y)},d=function(){return function(t){return(new h).fromMpRouteChange().subscribe(t)}(l)},m=[],w=[],g=function(t){var e=t.id;w.includes(e)||(!function(t,e){(new h).fromDelegateClick(t).subscribe(e)}(e,v),w.push(e),m.push(t))},x=function(t){Array.isArray(t)?t.map((function(t){g(t)})):g(t)},_=function(){function e(t){void 0===t&&(t="0.0.0"),this.version=t,this.funcObserver=b(),this.pageChangeObserver=d()}return e.prototype.register=function(e){var n={et:53,type:2};this.funcObserver.next(t(t({},e),n))},e.prototype.form=function(e){var n={et:53,type:3};this.funcObserver.next(t(t({},e),n))},e.prototype.payment=function(e){var n={et:57,type:2};this.funcObserver.next(t(t({},e),n))},e.prototype.setClickTarget=function(t){x(t)},e.prototype.set=function(t,e){switch(t){case"clickTarget":x(e)}},e.prototype.send=function(t){this.funcObserver.next(t)},e}(),O=window._qha;!function(){if(!window.qh)return!1;var t=qh.getSystemInfoSync().SDKVersion;if(!i(t,"1.9.2"))return!1;O&&i("0.0.0",window._qha.version)?(window._qha.funcObserver.complete(),window._qha.pageChangeObserver.complete(),window.__qha__=new _("0.0.0")):O||(window.__qha__=new _("0.0.0"),window._qha=new Proxy({},{get:function(t,e){return window.__qha__[e]}}));var e=function(){var t=Date.now(),e=qh.getAppBaseInfoSync();if("string"==typeof e)try{e=JSON.parse(qh.getAppBaseInfoSync())}catch(t){e={title:"",version:""}}return{mpn:e.title,mpv:e.version||"",si:qh.getAppIdSync(),mid:qh.getDMSync(),mxt:senative.callsync("getChannelQuerySync","mxt")||"",pt:"",flt:t,jstype:"npm",jsversion:window._qha.version}}();n(e)}();
{
"name": "@qihoo/fx-mp",
"version": "0.0.0",
"version": "0.0.1",
"description": "fenxi for 360 small program",

@@ -21,2 +21,2 @@ "main": "dist/main.js",

}
}
}

@@ -71,3 +71,3 @@ ## 360分析-小程序

```javascript
_qha.setClickTarget'({
_qha.setClickTarget({
id: 'Target的ID', /*必填项, string*/

@@ -74,0 +74,0 @@ name: '自定义事件名称' /* 必填项,主要用于数据分析,查看其转化数据*/

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc