hina-cloud-js-sdk 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
package/.eslintrc.js ADDED
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ root: true,
3
+ env: {
4
+ node: true,
5
+ browser: true,
6
+ es2021: true,
7
+ },
8
+ parserOptions: {
9
+ ecmaVersion: "latest",
10
+ sourceType: "module",
11
+ },
12
+ };
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,20 @@
1
+ sonarqube-check:
2
+ image:
3
+ name: sonarsource/sonar-scanner-cli:latest
4
+ entrypoint: [ "" ]
5
+ variables:
6
+ SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
7
+ GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
8
+ cache:
9
+ key: "${CI_JOB_NAME}"
10
+ paths:
11
+ - .sonar/cache
12
+ script:
13
+ - npm install
14
+ - npm run lint:report
15
+ - sonar-scanner
16
+ allow_failure: true
17
+ only:
18
+ - merge_requests
19
+ - master
20
+ - develop
@@ -0,0 +1 @@
1
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";var e=document.createElement("script");e.integrity="sha384-d7r7Q+K7p1zv6z7dX8fFn3u3pgGz1l4/eUgZGBnKU7gN3k6IjzR4b2q6s7s5+6+7",e.crossOrigin="anonymous",e.async="async",e.src="https://cdn.staticfile.org/jquery/3.0.0/jquery.min.js",e.type="text/javascript",e.addEventListener("load",function(){var e,n,t,k=!1,B=220,E=315,H=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,o='\n .hina-click-area:before{\n pointer-events: none;\n cursor: pointer;\n content: "";\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n background: rgba(56, 166, 251, 0.6);\n box-shadow: rgba(0, 0, 0, 0.6) 0px 2px 4px;\n cursor: pointer\n }\n .hina-click-area:after{\n pointer-events: none;\n height: 14px;\n line-height: 14px;\n margin: -7px 0 0 -28px;\n width: 56px;\n color: #fff;\n content: attr(data-click);\n font-size: 14px;\n font-weight: 700;\n left: 50%;\n line-height: 1em;\n position: absolute;\n text-align: center;\n text-indent: 0;\n text-shadow: 1px 1px 2px #000;\n top: 50%;\n z-index: 999;\n}\n',i=document.createElement("style");i.type="text/css";try{i.appendChild(document.createTextNode(o))}catch(e){i.styleSheet.cssText=o}var o=document.getElementsByTagName("head")[0],l=document.getElementsByTagName("script")[0];o?o.children.length?o.insertBefore(i,o.children[0]):o.appendChild(i):l.parentNode.insertBefore(i,l),window.addEventListener("message",function(n){var t,o,i,e=null==(e=n.data)?void 0:e.type;if("view"===e){var l=null==(g=n.data)?void 0:g.lastGraph;$("body > .shadeBoxWrap").remove();for(var a=0;a<(null==l?void 0:l.length);a++){var d=l[a].H_element_selector;$(d).removeClass("hina-click-area")}k=!1,window.removeEventListener("scroll",function(){},!0);for(var s=null==(g=n.data)||null==(g=g.viewData)?void 0:g[0],r=null==(g=[null==s?void 0:s.view100,null==s?void 0:s.view90,null==s?void 0:s.view80,null==s?void 0:s.view70,null==s?void 0:s.view60,null==s?void 0:s.view50,null==s?void 0:s.view40,null==s?void 0:s.view30,null==s?void 0:s.view20,null==s?void 0:s.view10])?void 0:g.map(function(e){return e+H}),c=new Array(10).fill(1).map(function(e,n){return 10*(n+1)}).reverse(),p=function(e){return"\n <span \n style='\n font-size:12px;\n position:absolute;\n padding: 0 12px;\n top: -24px;\n height: 26px;\n line-height: 26px;\n left: 0;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n '>\n ".concat(e,"%\n </span>\n ")},u=0;u<c.length;u++){var v=document.createElement("div"),h=(v.setAttribute("style","\n border-bottom: 1px dashed #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n top: 50px;\n z-index:999;\n "),v.setAttribute("class","viewBaseLineStyle"),s["view".concat(c[u])]);v.style.top="".concat(h+H,"px"),0!==u?26<s["view".concat(c[u])]-s["view".concat(c[u-1])]&&(v.innerHTML=p(c[u])):26<s["view".concat(c[u])]&&(v.innerHTML=p(c[u])),document.body.appendChild(v)}var x=document.createElement("div");x.setAttribute("style","\n border-bottom: 1px solid #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n z-index: 9999;\n top: 0;\n "),x.setAttribute("class","viewMoveLineStyle"),document.body.appendChild(x),$(document).on("mousemove",(t=function(e){x.style.top="".concat(e.pageY,"px");e=function(e,n){for(var t=0;t<e.length;t++)if(e[t]>n)return t}(r,e.pageY),e=c[e];x.innerHTML="\n <span \n style='\n font-size:12px;\n height:26px;\n line-height: 26px;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n left:50%;\n margin-left:-65px;\n position: absolute;\n top:-13px;\n padding: 0 5px;\n '>\n ".concat(e||0,"%的用户浏览到这里\n </span>\n ")},o=150,i=Date.now(),function(){var e=arguments,n=Date.now();o<=n-i&&(t.apply(this,e),i=Date.now())}))}else if("click"===e){k=!0,$("body > .viewBaseLineStyle").remove(),$("body > .viewMoveLineStyle").remove();var f=null==(g=n.data)?void 0:g.hotData,g=null==(e=n.data)?void 0:e.isResize,y=null==(e=n.data)?void 0:e.lastGraph;if(g&&$("body > .shadeBoxWrap").remove(),null!=f&&f.length){for(var b=function(){var e,n,t,o,i=f[m],l=(i.H_element_content,i.H_element_selector),a=(i.button_click_prop,i.button_click_rate),i=(i.button_click_times,i.button_click_users,i.his_H_element_content,document.createElement("div")),d=(i.setAttribute("style","position: relative;\n "),i.setAttribute("class","hina-click-area"),i=f[m],e=i.H_element_content,i.H_element_selector,n=i.button_click_prop,h=i.button_click_rate,t=i.button_click_times,o=i.button_click_users,i=i.his_H_element_content,e="\n <div style='padding: 8px;'>\n <div style='color: #CACACA'>当前内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>".concat(e||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <table style='width:100%;color:#fff;font-size:13px;background:#333;border:1px solid #333;'>\n <tr>\n <td>点击次数:</td>\n <td style='text-align:right;'>").concat(t,"</td>\n </tr>\n <tr>\n <td>点击人数:</td>\n <td style='text-align:right;'>").concat(o,"</td>\n </tr>\n <tr>\n <td>点击率:</td>\n <td style='text-align:right;'>").concat(h,"</td>\n </tr>\n <tr>\n <td>点击占比:</td>\n <td style='text-align:right;'>").concat(n,"</td>\n </tr>\n </table>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <div style='color: #CACACA;'>历史内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>").concat(i||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 6px 8px;' class='user-list' hina-tag-disable='true'>\n <p style='color:#2a90e2;text-decoration: none;'>查看用户列表</p>\n </div>\n "),t=document.createElement("div"),document.body.appendChild(t),t.setAttribute("class","shadeBoxWrap"),t.setAttribute("style","\n border-radius:3px;\n display: none;\n border:1px solid #000;\n cursor: pointer;\n position: absolute;\n left:0;\n top:0;\n background: #333;\n line-height:24px;\n font-size:13px;\n width:".concat(B,"px;\n height:").concat(E,"px;\n color: #fff;\n box-shadow: 0 2px 4px rgba(0,0,0,0.24);\n z-index:9999;\n ")),t.innerHTML=e,t),s=null==(o=$(l))||null==(h=o.offset())?void 0:h.left,r=window.scrollY,c=$(window).width(),p=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,u=null==(n=$(l))||null==(i=n.position())?void 0:i.top,v=null==(e=$(l))||null==(t=e.offset())?void 0:t.top,h=null==(o=$(l))?void 0:o.css("width"),x=null==(n=$(l))?void 0:n.css("height");$(l).addClass("hina-click-area"),$(l).css("position","relative"),$("".concat(l,":before")).css("position","absolute"),$(l).attr("data-click",a),[h,x,"undefined"].includes("0px")&&($(l).removeClass("display","inline-block"),$(l).css("width","15px"),$(l).css("height","15px")),$(l).mouseenter(function(){$("body > .shadeBoxWrap > .user-list > p").attr("drillSelector",l),v<50?$("body > .shadeBoxWrap").css("position","fixed"):$("body > .shadeBoxWrap").css("position","absolute"),d.style.display="block",c-s<B?(d.style.left="".concat(s-B,"px"),d.style.top="".concat(E<v?v+parseFloat(x)-E:v,"px")):(d.style.left="".concat(s,"px"),E<p-v?window.scrollY>E?d.style.top="".concat(u+parseFloat(x),"px"):d.style.top="".concat(v+parseFloat(x)-r,"px"):d.style.top="".concat(v-E,"px"))}),$(l).mouseleave(function(){$("body > .shadeBoxWrap").css("display","none")}),d.addEventListener("mouseenter",function(){d.style.display="block"}),d.addEventListener("mouseleave",function(){$("body > .shadeBoxWrap").css("display","none")})},m=0;m<(null==f?void 0:f.length);m++)b();$("body > .shadeBoxWrap > .user-list > p").on("click",function(e){n.stopPropagation(),window.parent.postMessage({eleSelector:null==e||null==(e=e.target)||null==(e=e.attributes)||null==(e=e.drillselector)?void 0:e.value},"*")})}else for(var w=0;w<(null==y?void 0:y.length);w++){var _=y[w].H_element_selector;$(_).removeClass("hina-click-area")}}},!1),window.addEventListener("scroll",(e=function(){k&&window.parent.postMessage({isRefush:!0},"*")},n=800,function(){null!==t&&clearTimeout(t),t=setTimeout(e,n)}),!(t=null))}),document.head.appendChild(e)});
@@ -0,0 +1,338 @@
1
+ /** @format */
2
+
3
+ !(function (e) {
4
+ "function" == typeof define && define.amd ? define(e) : e()
5
+ })(function () {
6
+ "use strict"
7
+ var e = document.createElement("script")
8
+ ;(e.integrity =
9
+ "sha384-d7r7Q+K7p1zv6z7dX8fFn3u3pgGz1l4/eUgZGBnKU7gN3k6IjzR4b2q6s7s5+6+7"),
10
+ (e.crossOrigin = "anonymous"),
11
+ (e.async = "async"),
12
+ (e.src = "https://cdn.staticfile.org/jquery/3.0.0/jquery.min.js"),
13
+ (e.type = "text/javascript"),
14
+ e.addEventListener("load", function () {
15
+ var e,
16
+ n,
17
+ t,
18
+ k = !1,
19
+ B = 220,
20
+ E = 315,
21
+ H =
22
+ window.innerHeight ||
23
+ document.documentElement.clientHeight ||
24
+ document.body.clientHeight ||
25
+ 0,
26
+ o =
27
+ '\n .hina-click-area:before{\n pointer-events: none;\n cursor: pointer;\n content: "";\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n background: rgba(56, 166, 251, 0.6);\n box-shadow: rgba(0, 0, 0, 0.6) 0px 2px 4px;\n cursor: pointer\n }\n .hina-click-area:after{\n pointer-events: none;\n height: 14px;\n line-height: 14px;\n margin: -7px 0 0 -28px;\n width: 56px;\n color: #fff;\n content: attr(data-click);\n font-size: 14px;\n font-weight: 700;\n left: 50%;\n line-height: 1em;\n position: absolute;\n text-align: center;\n text-indent: 0;\n text-shadow: 1px 1px 2px #000;\n top: 50%;\n z-index: 999;\n}\n',
28
+ i = document.createElement("style")
29
+ i.type = "text/css"
30
+ try {
31
+ i.appendChild(document.createTextNode(o))
32
+ } catch (e) {
33
+ i.styleSheet.cssText = o
34
+ }
35
+ var o = document.getElementsByTagName("head")[0],
36
+ l = document.getElementsByTagName("script")[0]
37
+ o
38
+ ? o.children.length
39
+ ? o.insertBefore(i, o.children[0])
40
+ : o.appendChild(i)
41
+ : l.parentNode.insertBefore(i, l),
42
+ window.addEventListener(
43
+ "message",
44
+ function (n) {
45
+ var t,
46
+ o,
47
+ i,
48
+ e = null == (e = n.data) ? void 0 : e.type
49
+ if ("view" === e) {
50
+ var l = null == (g = n.data) ? void 0 : g.lastGraph
51
+ $("body > .shadeBoxWrap").remove()
52
+ for (var a = 0; a < (null == l ? void 0 : l.length); a++) {
53
+ var d = l[a].H_element_selector
54
+ $(d).removeClass("hina-click-area")
55
+ }
56
+ ;(k = !1),
57
+ window.removeEventListener("scroll", function () {}, !0)
58
+ for (
59
+ var s =
60
+ null == (g = n.data) || null == (g = g.viewData)
61
+ ? void 0
62
+ : g[0],
63
+ r =
64
+ null ==
65
+ (g = [
66
+ null == s ? void 0 : s.view100,
67
+ null == s ? void 0 : s.view90,
68
+ null == s ? void 0 : s.view80,
69
+ null == s ? void 0 : s.view70,
70
+ null == s ? void 0 : s.view60,
71
+ null == s ? void 0 : s.view50,
72
+ null == s ? void 0 : s.view40,
73
+ null == s ? void 0 : s.view30,
74
+ null == s ? void 0 : s.view20,
75
+ null == s ? void 0 : s.view10,
76
+ ])
77
+ ? void 0
78
+ : g.map(function (e) {
79
+ return e + H
80
+ }),
81
+ c = new Array(10)
82
+ .fill(1)
83
+ .map(function (e, n) {
84
+ return 10 * (n + 1)
85
+ })
86
+ .reverse(),
87
+ p = function (e) {
88
+ return "\n <span \n style='\n font-size:12px;\n position:absolute;\n padding: 0 12px;\n top: -24px;\n height: 26px;\n line-height: 26px;\n left: 0;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n '>\n ".concat(
89
+ e,
90
+ "%\n </span>\n "
91
+ )
92
+ },
93
+ u = 0;
94
+ u < c.length;
95
+ u++
96
+ ) {
97
+ var v = document.createElement("div"),
98
+ h =
99
+ (v.setAttribute(
100
+ "style",
101
+ "\n border-bottom: 1px dashed #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n top: 50px;\n z-index:999;\n "
102
+ ),
103
+ v.setAttribute("class", "viewBaseLineStyle"),
104
+ s["view".concat(c[u])])
105
+ ;(v.style.top = "".concat(h + H, "px")),
106
+ 0 !== u
107
+ ? 26 <
108
+ s["view".concat(c[u])] - s["view".concat(c[u - 1])] &&
109
+ (v.innerHTML = p(c[u]))
110
+ : 26 < s["view".concat(c[u])] && (v.innerHTML = p(c[u])),
111
+ document.body.appendChild(v)
112
+ }
113
+ var x = document.createElement("div")
114
+ x.setAttribute(
115
+ "style",
116
+ "\n border-bottom: 1px solid #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n z-index: 9999;\n top: 0;\n "
117
+ ),
118
+ x.setAttribute("class", "viewMoveLineStyle"),
119
+ document.body.appendChild(x),
120
+ $(document).on(
121
+ "mousemove",
122
+ ((t = function (e) {
123
+ x.style.top = "".concat(e.pageY, "px")
124
+ ;(e = (function (e, n) {
125
+ for (var t = 0; t < e.length; t++) if (e[t] > n) return t
126
+ })(r, e.pageY)),
127
+ (e = c[e])
128
+ x.innerHTML =
129
+ "\n <span \n style='\n font-size:12px;\n height:26px;\n line-height: 26px;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n left:50%;\n margin-left:-65px;\n position: absolute;\n top:-13px;\n padding: 0 5px;\n '>\n ".concat(
130
+ e || 0,
131
+ "%的用户浏览到这里\n </span>\n "
132
+ )
133
+ }),
134
+ (o = 150),
135
+ (i = Date.now()),
136
+ function () {
137
+ var e = arguments,
138
+ n = Date.now()
139
+ o <= n - i && (t.apply(this, e), (i = Date.now()))
140
+ })
141
+ )
142
+ } else if ("click" === e) {
143
+ ;(k = !0),
144
+ $("body > .viewBaseLineStyle").remove(),
145
+ $("body > .viewMoveLineStyle").remove()
146
+ var f = null == (g = n.data) ? void 0 : g.hotData,
147
+ g = null == (e = n.data) ? void 0 : e.isResize,
148
+ y = null == (e = n.data) ? void 0 : e.lastGraph
149
+ if (
150
+ (g && $("body > .shadeBoxWrap").remove(), null != f && f.length)
151
+ ) {
152
+ for (
153
+ var b = function () {
154
+ var e,
155
+ n,
156
+ t,
157
+ o,
158
+ i = f[m],
159
+ l = (i.H_element_content, i.H_element_selector),
160
+ a = (i.button_click_prop, i.button_click_rate),
161
+ i =
162
+ (i.button_click_times,
163
+ i.button_click_users,
164
+ i.his_H_element_content,
165
+ document.createElement("div")),
166
+ d =
167
+ (i.setAttribute(
168
+ "style",
169
+ "position: relative;\n "
170
+ ),
171
+ i.setAttribute("class", "hina-click-area"),
172
+ (i = f[m]),
173
+ (e = i.H_element_content),
174
+ i.H_element_selector,
175
+ (n = i.button_click_prop),
176
+ (h = i.button_click_rate),
177
+ (t = i.button_click_times),
178
+ (o = i.button_click_users),
179
+ (i = i.his_H_element_content),
180
+ (e =
181
+ "\n <div style='padding: 8px;'>\n <div style='color: #CACACA'>当前内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>"
182
+ .concat(
183
+ e || "-",
184
+ "</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <table style='width:100%;color:#fff;font-size:13px;background:#333;border:1px solid #333;'>\n <tr>\n <td>点击次数:</td>\n <td style='text-align:right;'>"
185
+ )
186
+ .concat(
187
+ t,
188
+ "</td>\n </tr>\n <tr>\n <td>点击人数:</td>\n <td style='text-align:right;'>"
189
+ )
190
+ .concat(
191
+ o,
192
+ "</td>\n </tr>\n <tr>\n <td>点击率:</td>\n <td style='text-align:right;'>"
193
+ )
194
+ .concat(
195
+ h,
196
+ "</td>\n </tr>\n <tr>\n <td>点击占比:</td>\n <td style='text-align:right;'>"
197
+ )
198
+ .concat(
199
+ n,
200
+ "</td>\n </tr>\n </table>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <div style='color: #CACACA;'>历史内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>"
201
+ )
202
+ .concat(
203
+ i || "-",
204
+ "</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 6px 8px;' class='user-list' hina-tag-disable='true'>\n <p style='color:#2a90e2;text-decoration: none;'>查看用户列表</p>\n </div>\n "
205
+ )),
206
+ (t = document.createElement("div")),
207
+ document.body.appendChild(t),
208
+ t.setAttribute("class", "shadeBoxWrap"),
209
+ t.setAttribute(
210
+ "style",
211
+ "\n border-radius:3px;\n display: none;\n border:1px solid #000;\n cursor: pointer;\n position: absolute;\n left:0;\n top:0;\n background: #333;\n line-height:24px;\n font-size:13px;\n width:"
212
+ .concat(B, "px;\n height:")
213
+ .concat(
214
+ E,
215
+ "px;\n color: #fff;\n box-shadow: 0 2px 4px rgba(0,0,0,0.24);\n z-index:9999;\n "
216
+ )
217
+ ),
218
+ (t.innerHTML = e),
219
+ t),
220
+ s =
221
+ null == (o = $(l)) || null == (h = o.offset())
222
+ ? void 0
223
+ : h.left,
224
+ r = window.scrollY,
225
+ c = $(window).width(),
226
+ p =
227
+ window.innerHeight ||
228
+ document.documentElement.clientHeight ||
229
+ document.body.clientHeight ||
230
+ 0,
231
+ u =
232
+ null == (n = $(l)) || null == (i = n.position())
233
+ ? void 0
234
+ : i.top,
235
+ v =
236
+ null == (e = $(l)) || null == (t = e.offset())
237
+ ? void 0
238
+ : t.top,
239
+ h = null == (o = $(l)) ? void 0 : o.css("width"),
240
+ x = null == (n = $(l)) ? void 0 : n.css("height")
241
+ $(l).addClass("hina-click-area"),
242
+ $(l).css("position", "relative"),
243
+ $("".concat(l, ":before")).css("position", "absolute"),
244
+ $(l).attr("data-click", a),
245
+ [h, x, "undefined"].includes("0px") &&
246
+ ($(l).removeClass("display", "inline-block"),
247
+ $(l).css("width", "15px"),
248
+ $(l).css("height", "15px")),
249
+ $(l).mouseenter(function () {
250
+ $("body > .shadeBoxWrap > .user-list > p").attr(
251
+ "drillSelector",
252
+ l
253
+ ),
254
+ v < 50
255
+ ? $("body > .shadeBoxWrap").css(
256
+ "position",
257
+ "fixed"
258
+ )
259
+ : $("body > .shadeBoxWrap").css(
260
+ "position",
261
+ "absolute"
262
+ ),
263
+ (d.style.display = "block"),
264
+ c - s < B
265
+ ? ((d.style.left = "".concat(s - B, "px")),
266
+ (d.style.top = "".concat(
267
+ E < v ? v + parseFloat(x) - E : v,
268
+ "px"
269
+ )))
270
+ : ((d.style.left = "".concat(s, "px")),
271
+ E < p - v
272
+ ? window.scrollY > E
273
+ ? (d.style.top = "".concat(
274
+ u + parseFloat(x),
275
+ "px"
276
+ ))
277
+ : (d.style.top = "".concat(
278
+ v + parseFloat(x) - r,
279
+ "px"
280
+ ))
281
+ : (d.style.top = "".concat(v - E, "px")))
282
+ }),
283
+ $(l).mouseleave(function () {
284
+ $("body > .shadeBoxWrap").css("display", "none")
285
+ }),
286
+ d.addEventListener("mouseenter", function () {
287
+ d.style.display = "block"
288
+ }),
289
+ d.addEventListener("mouseleave", function () {
290
+ $("body > .shadeBoxWrap").css("display", "none")
291
+ })
292
+ },
293
+ m = 0;
294
+ m < (null == f ? void 0 : f.length);
295
+ m++
296
+ )
297
+ b()
298
+ $("body > .shadeBoxWrap > .user-list > p").on(
299
+ "click",
300
+ function (e) {
301
+ n.stopPropagation(),
302
+ window.parent.postMessage(
303
+ {
304
+ eleSelector:
305
+ null == e ||
306
+ null == (e = e.target) ||
307
+ null == (e = e.attributes) ||
308
+ null == (e = e.drillselector)
309
+ ? void 0
310
+ : e.value,
311
+ },
312
+ "*"
313
+ )
314
+ }
315
+ )
316
+ } else
317
+ for (var w = 0; w < (null == y ? void 0 : y.length); w++) {
318
+ var _ = y[w].H_element_selector
319
+ $(_).removeClass("hina-click-area")
320
+ }
321
+ }
322
+ },
323
+ !1
324
+ ),
325
+ window.addEventListener(
326
+ "scroll",
327
+ ((e = function () {
328
+ k && window.parent.postMessage({ isRefush: !0 }, "*")
329
+ }),
330
+ (n = 800),
331
+ function () {
332
+ null !== t && clearTimeout(t), (t = setTimeout(e, n))
333
+ }),
334
+ !(t = null)
335
+ )
336
+ }),
337
+ document.head.appendChild(e)
338
+ })
@@ -0,0 +1 @@
1
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";var e=document.createElement("script");e.integrity="sha384-d7r7Q+K7p1zv6z7dX8fFn3u3pgGz1l4/eUgZGBnKU7gN3k6IjzR4b2q6s7s5+6+7",e.crossOrigin="anonymous",e.async="async",e.src="https://cdn.staticfile.org/jquery/3.0.0/jquery.min.js",e.type="text/javascript",e.addEventListener("load",function(){var e,n,t,k=!1,B=220,E=315,H=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,o='\n .hina-click-area:before{\n pointer-events: none;\n cursor: pointer;\n content: "";\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n background: rgba(56, 166, 251, 0.6);\n box-shadow: rgba(0, 0, 0, 0.6) 0px 2px 4px;\n cursor: pointer\n }\n .hina-click-area:after{\n pointer-events: none;\n height: 14px;\n line-height: 14px;\n margin: -7px 0 0 -28px;\n width: 56px;\n color: #fff;\n content: attr(data-click);\n font-size: 14px;\n font-weight: 700;\n left: 50%;\n line-height: 1em;\n position: absolute;\n text-align: center;\n text-indent: 0;\n text-shadow: 1px 1px 2px #000;\n top: 50%;\n z-index: 999;\n}\n',i=document.createElement("style");i.type="text/css";try{i.appendChild(document.createTextNode(o))}catch(e){i.styleSheet.cssText=o}var o=document.getElementsByTagName("head")[0],l=document.getElementsByTagName("script")[0];o?o.children.length?o.insertBefore(i,o.children[0]):o.appendChild(i):l.parentNode.insertBefore(i,l),window.addEventListener("message",function(n){var t,o,i,e=null==(e=n.data)?void 0:e.type;if("view"===e){var l=null==(g=n.data)?void 0:g.lastGraph;$("body > .shadeBoxWrap").remove();for(var a=0;a<(null==l?void 0:l.length);a++){var d=l[a].H_element_selector;$(d).removeClass("hina-click-area")}k=!1,window.removeEventListener("scroll",function(){},!0);for(var s=null==(g=n.data)||null==(g=g.viewData)?void 0:g[0],r=null==(g=[null==s?void 0:s.view100,null==s?void 0:s.view90,null==s?void 0:s.view80,null==s?void 0:s.view70,null==s?void 0:s.view60,null==s?void 0:s.view50,null==s?void 0:s.view40,null==s?void 0:s.view30,null==s?void 0:s.view20,null==s?void 0:s.view10])?void 0:g.map(function(e){return e+H}),c=new Array(10).fill(1).map(function(e,n){return 10*(n+1)}).reverse(),p=function(e){return"\n <span \n style='\n font-size:12px;\n position:absolute;\n padding: 0 12px;\n top: -24px;\n height: 26px;\n line-height: 26px;\n left: 0;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n '>\n ".concat(e,"%\n </span>\n ")},u=0;u<c.length;u++){var v=document.createElement("div"),h=(v.setAttribute("style","\n border-bottom: 1px dashed #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n top: 50px;\n z-index:999;\n "),v.setAttribute("class","viewBaseLineStyle"),s["view".concat(c[u])]);v.style.top="".concat(h+H,"px"),0!==u?26<s["view".concat(c[u])]-s["view".concat(c[u-1])]&&(v.innerHTML=p(c[u])):26<s["view".concat(c[u])]&&(v.innerHTML=p(c[u])),document.body.appendChild(v)}var x=document.createElement("div");x.setAttribute("style","\n border-bottom: 1px solid #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n z-index: 9999;\n top: 0;\n "),x.setAttribute("class","viewMoveLineStyle"),document.body.appendChild(x),$(document).on("mousemove",(t=function(e){x.style.top="".concat(e.pageY,"px");e=function(e,n){for(var t=0;t<e.length;t++)if(e[t]>n)return t}(r,e.pageY),e=c[e];x.innerHTML="\n <span \n style='\n font-size:12px;\n height:26px;\n line-height: 26px;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n left:50%;\n margin-left:-65px;\n position: absolute;\n top:-13px;\n padding: 0 5px;\n '>\n ".concat(e||0,"%的用户浏览到这里\n </span>\n ")},o=150,i=Date.now(),function(){var e=arguments,n=Date.now();o<=n-i&&(t.apply(this,e),i=Date.now())}))}else if("click"===e){k=!0,$("body > .viewBaseLineStyle").remove(),$("body > .viewMoveLineStyle").remove();var f=null==(g=n.data)?void 0:g.hotData,g=null==(e=n.data)?void 0:e.isResize,y=null==(e=n.data)?void 0:e.lastGraph;if(g&&$("body > .shadeBoxWrap").remove(),null!=f&&f.length){for(var b=function(){var e,n,t,o,i=f[m],l=(i.H_element_content,i.H_element_selector),a=(i.button_click_prop,i.button_click_rate),i=(i.button_click_times,i.button_click_users,i.his_H_element_content,document.createElement("div")),d=(i.setAttribute("style","position: relative;\n "),i.setAttribute("class","hina-click-area"),i=f[m],e=i.H_element_content,i.H_element_selector,n=i.button_click_prop,h=i.button_click_rate,t=i.button_click_times,o=i.button_click_users,i=i.his_H_element_content,e="\n <div style='padding: 8px;'>\n <div style='color: #CACACA'>当前内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>".concat(e||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <table style='width:100%;color:#fff;font-size:13px;background:#333;border:1px solid #333;'>\n <tr>\n <td>点击次数:</td>\n <td style='text-align:right;'>").concat(t,"</td>\n </tr>\n <tr>\n <td>点击人数:</td>\n <td style='text-align:right;'>").concat(o,"</td>\n </tr>\n <tr>\n <td>点击率:</td>\n <td style='text-align:right;'>").concat(h,"</td>\n </tr>\n <tr>\n <td>点击占比:</td>\n <td style='text-align:right;'>").concat(n,"</td>\n </tr>\n </table>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <div style='color: #CACACA;'>历史内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>").concat(i||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 6px 8px;' class='user-list' hina-tag-disable='true'>\n <p style='color:#2a90e2;text-decoration: none;'>查看用户列表</p>\n </div>\n "),t=document.createElement("div"),document.body.appendChild(t),t.setAttribute("class","shadeBoxWrap"),t.setAttribute("style","\n border-radius:3px;\n display: none;\n border:1px solid #000;\n cursor: pointer;\n position: absolute;\n left:0;\n top:0;\n background: #333;\n line-height:24px;\n font-size:13px;\n width:".concat(B,"px;\n height:").concat(E,"px;\n color: #fff;\n box-shadow: 0 2px 4px rgba(0,0,0,0.24);\n z-index:9999;\n ")),t.innerHTML=e,t),s=null==(o=$(l))||null==(h=o.offset())?void 0:h.left,r=window.scrollY,c=$(window).width(),p=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,u=null==(n=$(l))||null==(i=n.position())?void 0:i.top,v=null==(e=$(l))||null==(t=e.offset())?void 0:t.top,h=null==(o=$(l))?void 0:o.css("width"),x=null==(n=$(l))?void 0:n.css("height");$(l).addClass("hina-click-area"),$(l).css("position","relative"),$("".concat(l,":before")).css("position","absolute"),$(l).attr("data-click",a),[h,x,"undefined"].includes("0px")&&($(l).removeClass("display","inline-block"),$(l).css("width","15px"),$(l).css("height","15px")),$(l).mouseenter(function(){$("body > .shadeBoxWrap > .user-list > p").attr("drillSelector",l),v<50?$("body > .shadeBoxWrap").css("position","fixed"):$("body > .shadeBoxWrap").css("position","absolute"),d.style.display="block",c-s<B?(d.style.left="".concat(s-B,"px"),d.style.top="".concat(E<v?v+parseFloat(x)-E:v,"px")):(d.style.left="".concat(s,"px"),E<p-v?window.scrollY>E?d.style.top="".concat(u+parseFloat(x),"px"):d.style.top="".concat(v+parseFloat(x)-r,"px"):d.style.top="".concat(v-E,"px"))}),$(l).mouseleave(function(){$("body > .shadeBoxWrap").css("display","none")}),d.addEventListener("mouseenter",function(){d.style.display="block"}),d.addEventListener("mouseleave",function(){$("body > .shadeBoxWrap").css("display","none")})},m=0;m<(null==f?void 0:f.length);m++)b();$("body > .shadeBoxWrap > .user-list > p").on("click",function(e){n.stopPropagation(),window.parent.postMessage({eleSelector:null==e||null==(e=e.target)||null==(e=e.attributes)||null==(e=e.drillselector)?void 0:e.value},"*")})}else for(var w=0;w<(null==y?void 0:y.length);w++){var _=y[w].H_element_selector;$(_).removeClass("hina-click-area")}}},!1),window.addEventListener("scroll",(e=function(){k&&window.parent.postMessage({isRefush:!0},"*")},n=800,function(){null!==t&&clearTimeout(t),t=setTimeout(e,n)}),!(t=null))}),document.head.appendChild(e)});