PageSourceSearch

https://www.suretybondquarterly.org/wp-content/plugins/wp-category…/jquery.tagcanvas.min.js?ver=1.7.1

js suretybondquarterly.org collected 2026-10-04 01:46:59 UTC 56,758 bytes, 1,647 lines download raw bytes

vendor: 24,019 bytes, lines 1-764
1/**
2 * Copyright (C) 2010-2014 Graham Breach
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17/**
18 * jQuery.tagcanvas 2.4
19 * For more information, please contact <[email protected]>
20 */
21(function (ah) {
22    var I, G, H = Math.abs, ab = Math.sin, u = Math.cos, q = Math.max, au = Math.min, ai = Math.ceil, B = Math.sqrt, ak = Math.pow, f = {}, h = {}, k = {0: "0,", 1: "17,", 2: "34,", 3: "51,", 4: "68,", 5: "85,", 6: "102,", 7: "119,", 8: "136,", 9: "153,", a: "170,", A: "170,", b: "187,", B: "187,", c: "204,", C: "204,", d: "221,", D: "221,", e: "238,", E: "238,", f: "255,", F: "255,"}, v, b, M, aw, D, ax, A = document, n, a = {};
23    for (I = 0; I < 256; ++I) {
24        G = I.toString(16);
25        if (I < 16) {
26            G = "0" + G
27        }
28        h[G] = h[G.toUpperCase()] = I.toString() + ","
29    }
30    function ac(i) {
31        return typeof i != "undefined"
32    }
33
34    function E(i) {
35        return typeof i == "object" && i != null
36    }
37
38    function am(i, j, ay) {
39        return isNaN(i) ? ay : au(ay, q(j, i))
40    }
41
42    function aq() {
43        return false
44    }
45
46    function C() {
47        return new Date().valueOf()
48    }
49
50    function y(ay, aB) {
51        var j = [], az = ay.length, aA;
52        for (aA = 0; aA < az; ++aA) {
53            j.push(ay[aA])
54        }
55        j.sort(aB);
56        return j
57    }
58
59    function ag(j) {
60        var az = j.length - 1, ay, aA;
61        while (az) {
62            aA = ~~(Math.random() * az);
63            ay = j[az];
64            j[az] = j[aA];
65            j[aA] = ay;
66            --az
67        }
68    }
69
70    function Y(i, ay, j) {
71        this.x = i;
72        this.y = ay;
73        this.z = j
74    }
75
76    D = Y.prototype;
77    D.length = function () {
78        return B(this.x * this.x + this.y * this.y + this.z * this.z)
79    };
80    D.dot = function (i) {
81        return this.x * i.x + this.y * i.y + this.z * i.z
82    };
83    D.cross = function (j) {
84        var i = this.y * j.z - this.z * j.y, az = this.z * j.x - this.x * j.z, ay = this.x * j.y - this.y * j.x;
85        return new Y(i, az, ay)
86    };
87    D.angle = function (j) {
88        var i = this.dot(j), ay;
89        if (i == 0) {
90            return Math.PI / 2
91        }
92        ay = i / (this.length() * j.length());
93        if (ay >= 1) {
94            return 0
95        }
96        if (ay <= -1) {
97            return Math.PI
98        }
99        return Math.acos(ay)
100    };
101    D.unit = function () {
102        var i = this.length();
103        return new Y(this.x / i, this.y / i, this.z / i)
104    };
105    function ad(ay, j) {
106        j = j * Math.PI / 180;
107        ay = ay * Math.PI / 180;
108        var i = ab(ay) * u(j), aA = -ab(j), az = -u(ay) * u(j);
109        return new Y(i, aA, az)
110    }
111
112    function N(i) {
113        this[1] = {1: i[0], 2: i[1], 3: i[2]};
114        this[2] = {1: i[3], 2: i[4], 3: i[5]};
115        this[3] = {1: i[6], 2: i[7], 3: i[8]}
116    }
117
118    aw = N.prototype;
119    N.Identity = function () {
120        return new N([1, 0, 0, 0, 1, 0, 0, 0, 1])
121    };
122    N.Rotation = function (az, i) {
123        var j = ab(az), ay = u(az), aA = 1 - ay;
124        return new N([ay + ak(i.x, 2) * aA, i.x * i.y * aA - i.z * j, i.x * i.z * aA + i.y * j, i.y * i.x * aA + i.z * j, ay + ak(i.y, 2) * aA, i.y * i.z * aA - i.x * j, i.z * i.x * aA - i.y * j, i.z * i.y * aA + i.x * j, ay + ak(i.z, 2) * aA])
125    };
126    aw.mul = function (ay) {
127        var az = [], aC, aB, aA = (ay.xform ? 1 : 0);
128        for (aC = 1; aC <= 3; ++aC) {
129            for (aB = 1; aB <= 3; ++aB) {
130                if (aA) {
131                    az.push(this[aC][1] * ay[1][aB] + this[aC][2] * ay[2][aB] + this[aC][3] * ay[3][aB])
132                } else {
133                    az.push(this[aC][aB] * ay)
134                }
135            }
136        }
137        return new N(az)
138    };
139    aw.xform = function (ay) {
140        var j = {}, i = ay.x, aA = ay.y, az = ay.z;
141        j.x = i * this[1][1] + aA * this[2][1] + az * this[3][1];
142        j.y = i * this[1][2] + aA * this[2][2] + az * this[3][2];
143        j.z = i * this[1][3] + aA * this[2][3] + az * this[3][3];
144        return j
145    };
146    function o(az, aB, aG, aD) {
147        var aC, aF, j, aE, aH = [], aA = Math.PI * (3 - B(5)), ay = 2 / az;
148        for (aC = 0; aC < az; ++aC) {
149            aF = aC * ay - 1 + (ay / 2);
150            j = B(1 - aF * aF);
151            aE = aC * aA;
152            aH.push([u(aE) * j * aB, aF * aG, ab(aE) * j * aD])
153        }
154        return aH
155    }
156
157    function R(aA, ay, aD, aJ, aH) {
158        var aI, aK = [], aB = Math.PI * (3 - B(5)), az = 2 / aA, aG, aF, aE, aC;
159        for (aG = 0; aG < aA; ++aG) {
160            aF = aG * az - 1 + (az / 2);
161            aI = aG * aB;
162            aE = u(aI);
163            aC = ab(aI);
164            aK.push(ay ? [aF * aD, aE * aJ, aC * aH] : [aE * aD, aF * aJ, aC * aH])
165        }
166        return aK
167    }
168
169    function J(ay, az, aC, aI, aG, aE) {
170        var aH, aJ = [], aA = Math.PI * 2 / az, aF, aD, aB;
171        for (aF = 0; aF < az; ++aF) {
172            aH = aF * aA;
173            aD = u(aH);
174            aB = ab(aH);
175            aJ.push(ay ? [aE * aC, aD * aI, aB * aG] : [aD * aC, aE * aI, aB * aG])
176        }
177        return aJ
178    }
179
180    function af(az, i, j, ay) {
181        return R(az, 0, i, j, ay)
182    }
183
184    function al(az, i, j, ay) {
185        return R(az, 1, i, j, ay)
186    }
187
188    function c(aA, i, j, ay, az) {
189        az = isNaN(az) ? 0 : az * 1;
190        return J(0, aA, i, j, ay, az)
191    }
192
193    function l(aA, i, j, ay, az) {
194        az = isNaN(az) ? 0 : az * 1;
195        return J(1, aA, i, j, ay, az)
196    }
197
198    function Q(aB, i) {
199        var aA = aB, az, ay, j = (i * 1).toPrecision(3) + ")";
200        if (aB[0] === "#") {
201            if (!f[aB]) {
202                if (aB.length === 4) {
203                    f[aB] = "rgba(" + k[aB[1]] + k[aB[2]] + k[aB[3]]
204                } else {
205                    f[aB] = "rgba(" + h[aB.substr(1, 2)] + h[aB.substr(3, 2)] + h[aB.substr(5, 2)]
206                }
207            }
208            aA = f[aB] + j
209        } else {
210            if (aB.substr(0, 4) === "rgb(" || aB.substr(0, 4) === "hsl(") {
211                aA = (aB.replace("(", "a(").replace(")", "," + j))
212            } else {
213                if (aB.substr(0, 5) === "rgba(" || aB.substr(0, 5) === "hsla(") {
214                    az = aB.lastIndexOf(",") + 1, ay = aB.indexOf(")");
215                    i *= parseFloat(aB.substring(az, ay));
216                    aA = aB.substr(0, az) + i.toPrecision(3) + ")"
217                }
218            }
219        }
220        return aA
221    }
222
223    function L(i, j) {
224        if (window.G_vmlCanvasManager) {
225            return null
226        }
227        var ay = A.createElement("canvas");
228        ay.width = i;
229        ay.height = j;
230        return ay
231    }
232
233    function ae() {
234        var j = L(3, 3), az, ay;
235        if (!j) {
236            return false
237        }
238        az = j.getContext("2d");
239        az.strokeStyle = "#000";
240        az.shadowColor = "#fff";
241        az.shadowBlur = 3;
242        az.globalAlpha = 0;
243        az.strokeRect(2, 2, 2, 2);
244        az.globalAlpha = 1;
245        ay = az.getImageData(2, 2, 1, 1);
246        j = null;
247        return(ay.data[0] > 0)
248    }
249
250    function g(aF, j) {
251        var ay = 1024, aB = aF.weightGradient, aA, aD, az, aE, aC;
252        if (aF.gCanvas) {
253            aD = aF.gCanvas.getContext("2d")
254        } else {
255            aF.gCanvas = aA = L(ay, 1);
256            if (!aA) {
257                return null
258            }
259            aD = aA.getContext("2d");
260            aE = aD.createLinearGradient(0, 0, ay, 0);
261            for (az in aB) {
262                aE.addColorStop(1 - az, aB[az])
263            }
264            aD.fillStyle = aE;
265            aD.fillRect(0, 0, ay, 1)
266        }
267        aC = aD.getImageData(~~((ay - 1) * j), 0, 1, 1).data;
268        return"rgba(" + aC[0] + "," + aC[1] + "," + aC[2] + "," + (aC[3] / 255) + ")"
269    }
270
271    function T(aH, aA, j, aJ, aB, aG, aC, az, aF, aI) {
272        var aE = aB + (aC || 0) + (az && az[0] < 0 ? H(az[0]) : 0), ay = aB + (aC || 0) + (az && az[1] < 0 ? H(az[1]) : 0), aD, aK;
273        aH.font = aA;
274        aH.textBaseline = "top";
275        aH.fillStyle = j;
276        aG && (aH.shadowColor = aG);
277        aC && (aH.shadowBlur = aC);
278        az && (aH.shadowOffsetX = az[0], aH.shadowOffsetY = az[1]);
279        for (aD = 0; aD < aJ.length; ++aD) {
280            aK = aI ? (aF - aI[aD]) / 2 : 0;
281            aH.fillText(aJ[aD], aE + aK, ay);
282            ay += parseInt(aA)
283        }
284    }
285
286    function aj(aC, i, aB, j, az, aA, ay) {
287        if (aA) {
288            aC.beginPath();
289            aC.moveTo(i, aB + az - aA);
290            aC.arcTo(i, aB, i + aA, aB, aA);
291            aC.arcTo(i + j, aB, i + j, aB + aA, aA);
292            aC.arcTo(i + j, aB + az, i + j - aA, aB + az, aA);
293            aC.arcTo(i, aB + az, i, aB + az - aA, aA);
294            aC.closePath();
295            aC[ay ? "stroke" : "fill"]()
296        } else {
297            aC[ay ? "strokeRect" : "fillRect"](i, aB, j, az)
298        }
299    }
300
301    function t(aC, aK, aE, aP, aF, aM, aD, aN, aL, aJ, i, aH, aB, aI, aR) {
302        var az = aE + H(i[0]) + 2 * (aJ + aH) + aN, aG = aP + H(i[1]) + 2 * (aJ + aH) + aN, aA, aS, aQ, aO, ay, j;
303        aA = L(az, aG);
304        if (!aA) {
305            return null
306        }
307        aQ = ay = aN / 2;
308        aO = az - aN;
309        j = aG - aN;
310        aH += aQ;
311        aS = aA.getContext("2d");
312        if (aM) {
313            aS.fillStyle = aM;
314            aj(aS, aQ, ay, aO, j, aB)
315        }
316        if (aN) {
317            aS.strokeStyle = aD;
318            aS.lineWidth = aN;
319            aj(aS, aQ, ay, aO, j, aB, true)
320        }
321        T(aS, aK, aF, aC, aH, aL, aJ, i, aI, aR);
322        return aA
323    }
324
325    function ar(aI, ay, aH, aC, aN, aJ, aD) {
326        var aE = aI.width + (2 * aN) + aH, j = aI.height + (2 * aN) + aH, aG = L(aE, j), aK, aA, aM, az, aL, aF, aB;
327        if (!aG) {
328            return null
329        }
330        aA = aM = aH / 2;
331        az = aE - aH;
332        aL = j - aH;
333        aN += aA;
334        aK = aG.getContext("2d");
335        if (ay) {
336            aK.fillStyle = ay;
337            aj(aK, aA, aM, az, aL, aJ)
338        }
339        if (aH) {
340            aK.strokeStyle = aC;
341            aK.lineWidth = aH;
342            aj(aK, aA, aM, az, aL, aJ, true)
343        }
344        if (aD) {
345            aF = L(aE, j);
346            aB = aF.getContext("2d");
347            aB.drawImage(aI, aN, aN, aI.width, aI.height);
348            aB.globalCompositeOperation = "source-in";
349            aB.fillStyle = aC;
350            aB.fillRect(0, 0, aE, j);
351            aB.globalCompositeOperation = "destination-over";
352            aB.drawImage(aG, 0, 0);
353            aB.globalCompositeOperation = "source-over";
354            aK.drawImage(aF, 0, 0)
355        } else {
356            aK.drawImage(aI, aN, aN, aI.width, aI.height)
357        }
358        return aG
359    }
360
361    function V(aD, aG, aH, az) {
362        var aI = H(az[0]), aE = H(az[1]), aA = aD.width + (aI > aH ? aI + aH : aH * 2), j = aD.height + (aE > aH ? aE + aH : aH * 2), aC = (aH || 0) + (az[0] < 0 ? aI : 0), ay = (aH || 0) + (az[1] < 0 ? aE : 0), aB, aF;
363        aB = L(aA, j);
364        if (!aB) {
365            return null
366        }
367        aF = aB.getContext("2d");
368        aG && (aF.shadowColor = aG);
369        aH && (aF.shadowBlur = aH);
370        az && (aF.shadowOffsetX = az[0], aF.shadowOffsetY = az[1]);
371        aF.drawImage(aD, aC, ay, aD.width, aD.height);
372        return aB
373    }
374
375    function r(aK, aC, aI) {
376        var aJ = parseInt(aK.toString().length * aI), aB = parseInt(aI * 2 * aK.length), az = L(aJ, aB), aF, j, aA, aE, aH, aG, ay, aD;
377        if (!az) {
378            return null
379        }
380        aF = az.getContext("2d");
381        aF.fillStyle = "#000";
382        aF.fillRect(0, 0, aJ, aB);
383        T(aF, aI + "px " + aC, "#fff", aK, 0, 0, 0, []);
384        j = aF.getImageData(0, 0, aJ, aB);
385        aA = j.width;
386        aE = j.height;
387        aD = {min: {x: aA, y: aE}, max: {x: -1, y: -1}};
388        for (aG = 0; aG < aE; ++aG) {
389            for (aH = 0; aH < aA; ++aH) {
390                ay = (aG * aA + aH) * 4;
391                if (j.data[ay + 1] > 0) {
392                    if (aH < aD.min.x) {
393                        aD.min.x = aH
394                    }
395                    if (aH > aD.max.x) {
396                        aD.max.x = aH
397                    }
398                    if (aG < aD.min.y) {
399                        aD.min.y = aG
400                    }
401                    if (aG > aD.max.y) {
402                        aD.max.y = aG
403                    }
404                }
405            }
406        }
407        if (aA != aJ) {
408            aD.min.x *= (aJ / aA);
409            aD.max.x *= (aJ / aA)
410        }
411        if (aE != aB) {
412            aD.min.y *= (aJ / aE);
413            aD.max.y *= (aJ / aE)
414        }
415        az = null;
416        return aD
417    }
418
419    function m(i) {
420        return"'" + i.replace(/(\'|\")/g, "").replace(/\s*,\s*/g, "', '") + "'"
421    }
422
423    function X(i, j, ay) {
424        ay = ay || A;
425        if (ay.addEventListener) {
426            ay.addEventListener(i, j, false)
427        } else {
428            ay.attachEvent("on" + i, j)
429        }
430    }
431
432    function an(aB, aE, aA, ay) {
433        var aC = ay.imageScale, j, aD, az;
434        if (!aE.complete) {
435            return X("load", function () {
436                an(aB, aE, aA, ay)
437            }, aE)
438        }
439        if (!aB.complete) {
440            return X("load", function () {
441                an(aB, aE, aA, ay)
442            }, aB)
443        }
444        aE.width = aE.width;
445        aE.height = aE.height;
446        if (aC) {
447            aB.width = aE.width * aC;
448            aB.height = aE.height * aC
449        }
450        aA.w = aB.width;
451        aA.h = aB.height;
452        if (ay.txtOpt) {
453            if (ay.shadow) {
454                j = V(aB, ay.shadow, ay.shadowBlur, ay.shadowOffset);
455                if (j) {
456                    aA.image = j;
457                    aA.w = j.width;
458                    aA.h = j.height
459                }
460            }
461            if (ay.bgColour || ay.bgOutlineThickness) {
462                aD = ay.bgColour == "tag" ? U(aA.a, "background-color") : ay.bgColour;
463                az = ay.bgOutline == "tag" ? U(aA.a, "color") : (ay.bgOutline || ay.textColour);
464                j = ar(aA.image, aD, ay.bgOutlineThickness, az, ay.padding, ay.bgRadius);
465                if (ay.outlineMethod == "colour") {
466                    aA.oimage = ar(aA.image, aD, ay.bgOutlineThickness, ay.outlineColour, ay.padding, ay.bgRadius, true)
467                }
468                if (j) {
469                    aA.image = j;
470                    aA.w = j.width;
471                    aA.h = j.height
472                }
473            }
474        }
475    }
476
477    function U(az, ay) {
478        var j = A.defaultView, i = ay.replace(/\-([a-z])/g, function (aA) {
479            return aA.charAt(1).toUpperCase()
480        });
481        return(j && j.getComputedStyle && j.getComputedStyle(az, null).getPropertyValue(ay)) || (az.currentStyle && az.currentStyle[i])
482    }
483
484    function s(ay, j) {
485        var i = 1, az;
486        if (ay.weightFrom) {
487            i = 1 * (j.getAttribute(ay.weightFrom) || ay.textHeight)
488        } else {
489            if (az = U(j, "font-size")) {
490                i = (az.indexOf("px") > -1 && az.replace("px", "") * 1) || (az.indexOf("pt") > -1 && az.replace("pt", "") * 1.25) || az * 3.3
491            } else {
492                ay.weight = false
493            }
494        }
495        return i
496    }
497
498    function e(i) {
499        return i.target && ac(i.target.id) ? i.target.id : i.srcElement.parentNode.id
500    }
501
502    function O(aA, aB) {
503        var az, ay, i = parseInt(U(aB, "width")) / aB.width, j = parseInt(U(aB, "height")) / aB.height;
504        if (ac(aA.offsetX)) {
505            az = {x: aA.offsetX, y: aA.offsetY}
506        } else {
507            ay = W(aB.id);
508            if (ac(aA.changedTouches)) {
509                aA = aA.changedTouches[0]
510            }
511            if (aA.pageX) {
512                az = {x: aA.pageX - ay.x, y: aA.pageY - ay.y}
513            }
514        }
515        if (az && i && j) {
516            az.x /= i;
517            az.y /= j
518        }
519        return az
520    }
521
522    function z(ay) {
523        var j = ay.target || ay.fromElement.parentNode, i = w.tc[j.id];
524        if (i) {
525            i.mx = i.my = -1;
526            i.UnFreeze();
527            i.EndDrag()
528        }
529    }
530
531    function Z(aC) {
532        var az, ay = w, j, aB, aA = e(aC);
533        for (az in ay.tc) {
534            j = ay.tc[az];
535            if (j.tttimer) {
536                clearTimeout(j.tttimer);
537                j.tttimer = null
538            }
539        }
540        if (aA && ay.tc[aA]) {
541            j = ay.tc[aA];
542            if (aB = O(aC, j.canvas)) {
543                j.mx = aB.x;
544                j.my = aB.y;
545                j.Drag(aC, aB)
546            }
547            j.drawn = 0
548        }
549    }
550
551    function x(az) {
552        var j = w, i = A.addEventListener ? 0 : 1, ay = e(az);
553        if (ay && az.button == i && j.tc[ay]) {
554            j.tc[ay].BeginDrag(az)
555        }
556    }
557
558    function av(aA) {
559        var ay = w, j = A.addEventListener ? 0 : 1, az = e(aA), i;
560        if (az && aA.button == j && ay.tc[az]) {
561            i = ay.tc[az];
562            Z(aA);
563            if (!i.EndDrag() && !i.touched) {
564                i.Clicked(aA)
565            }
566        }
567    }
568
569    function P(ay) {
570        var i = w, j = e(ay);
571        if (j && ay.changedTouches && i.tc[j]) {
572            i.tc[j].touched = 1;
573            i.tc[j].BeginDrag(ay)
574        }
575    }
576
577    function p(ay) {
578        var i = w, j = e(ay);
579        if (j && ay.changedTouches && i.tc[j]) {
580            ap(ay);
581            if (!i.tc[j].EndDrag()) {
582                i.tc[j].Draw();
583                i.tc[j].Clicked(ay)
584            }
585        }
586    }
587
588    function ap(aC) {
589        var az, ay = w, j, aB, aA = e(aC);
590        for (az in ay.tc) {
591            j = ay.tc[az];
592            if (j.tttimer) {
593                clearTimeout(j.tttimer);
594                j.tttimer = null
595            }
596        }
597        if (aA && ay.tc[aA] && aC.changedTouches) {
598            j = ay.tc[aA];
599            if (aB = O(aC, j.canvas)) {
600                j.mx = aB.x;
601                j.my = aB.y;
602                j.Drag(aC, aB)
603            }
604            j.drawn = 0
605        }
606    }
607
608    function aa(ay) {
609        var i = w, j = e(ay);
610        if (j && i.tc[j]) {
611            ay.cancelBubble = true;
612            ay.returnValue = false;
613            ay.preventDefault && ay.preventDefault();
614            i.tc[j].Wheel((ay.wheelDelta || ay.detail) > 0)
615        }
616    }
617
618    function K(aA) {
619        var j = w.tc, az, ay;
620        aA = aA || C();
621        for (az in j) {
622            ay = j[az].interval;
623            j[az].Draw(aA)
624        }
625        w.NextFrame(ay)
626    }
627
628    function W(ay) {
629        var aB = A.getElementById(ay), i = aB.getBoundingClientRect(), aE = A.documentElement, aC = A.body, aD = window, az = aD.pageXOffset || aE.scrollLeft, aF = aD.pageYOffset || aE.scrollTop, aA = aE.clientLeft || aC.clientLeft, j = aE.clientTop || aC.clientTop;
630        return{x: i.left + az - aA, y: i.top + aF - j}
631    }
632
633    function S(j, az, aA, ay) {
634        var i = j.radius * j.z1 / (j.z1 + j.z2 + az.z);
635        return{x: az.x * i * aA, y: az.y * i * ay, z: az.z, w: (j.z1 - az.z) / j.z2}
636    }
637
638    function at(i) {
639        this.e = i;
640        this.br = 0;
641        this.line = [];
642        this.text = [];
643        this.original = i.innerText || i.textContent
644    }
645
646    ax = at.prototype;
647    ax.Lines = function (aA) {
648        var az = aA ? 1 : 0, aB, j, ay;
649        aA = aA || this.e;
650        aB = aA.childNodes;
651        j = aB.length;
652        for (ay = 0; ay < j; ++ay) {
653            if (aB[ay].nodeName == "BR") {
654                this.text.push(this.line.join(" "));
655                this.br = 1
656            } else {
657                if (aB[ay].nodeType == 3) {
658                    if (this.br) {
659                        this.line = [aB[ay].nodeValue];
660                        this.br = 0
661                    } else {
662                        this.line.push(aB[ay].nodeValue)
663                    }
664                } else {
665                    this.Lines(aB[ay])
666                }
667            }
668        }
669        az || this.br || this.text.push(this.line.join(" "));
670        return this.text
671    };
672    ax.SplitWidth = function (ay, aF, aC, aB) {
673        var aA, az, aE, aD = [];
674        aF.font = aB + "px " + aC;
675        for (aA = 0; aA < this.text.length; ++aA) {
676            aE = this.text[aA].split(/\s+/);
677            this.line = [aE[0]];
678            for (az = 1; az < aE.length; ++az) {
679                if (aF.measureText(this.line.join(" ") + " " + aE[az]).width > ay) {
680                    aD.push(this.line.join(" "));
681                    this.line = [aE[az]]
682                } else {
683                    this.line.push(aE[az])
684                }
685            }
686            aD.push(this.line.join(" "))
687        }
688        return this.text = aD
689    };
690    function F(i, j) {
691        this.ts = C();
692        this.tc = i;
693        this.tag = j;
694        this.x = this.y = this.w = this.h = this.sc = 1;
695        this.z = 0;
696        this.Draw = i.pulsateTo < 1 && i.outlineMethod != "colour" ? this.DrawPulsate : this.DrawSimple;
697        this.radius = i.outlineRadius | 0;
698        this.SetMethod(i.outlineMethod)
699    }
700
701    v = F.prototype;
702    v.SetMethod = function (ay) {
703        var j = {block: ["PreDraw", "DrawBlock"], colour: ["PreDraw", "DrawColour"], outline: ["PostDraw", "DrawOutline"], classic: ["LastDraw", "DrawOutline"], none: ["LastDraw"]}, i = j[ay] || j.outline;
704        if (ay == "none") {
705            this.Draw = function () {
706                return 1
707            }
708        } else {
709            this.drawFunc = this[i[1]]
710        }
711        this[i[0]] = this.Draw
712    };
713    v.Update = function (aE, aD, aF, aA, aB, aC, az, i) {
714        var j = this.tc.outlineOffset, ay = 2 * j;
715        this.x = aB * aE + az - j;
716        this.y = aB * aD + i - j;
717        this.w = aB * aF + ay;
718        this.h = aB * aA + ay;
719        this.sc = aB;
720        this.z = aC
721    };
722    v.DrawOutline = function (aB, i, aA, j, ay, az) {
723        aB.strokeStyle = az;
724        aj(aB, i, aA, j, ay, this.radius, true)
725    };
726    v.DrawColour = function (az, aC, aA, aD, ay, i, aE, j, aB) {
727        if (aE.oimage) {
728            aE.alpha = 1;
729            aE.Draw(az, j, aB, aE.oimage);
730            return 1
731        }
732        return this[aE.image ? "DrawColourImage" : "DrawColourText"](az, aC, aA, aD, ay, i, aE, j, aB)
733    };
734    v.DrawColourText = function (aA, aD, aB, aE, ay, i, aF, j, aC) {
735        var az = aF.colour;
736        aF.colour = i;
737        aF.alpha = 1;
738        aF.Draw(aA, j, aC);
739        aF.colour = az;
740        return 1
741    };
742    v.DrawColourImage = function (aD, aG, aE, aH, aC, i, aK, j, aF) {
743        var aI = aD.canvas, aA = ~~q(aG, 0), az = ~~q(aE, 0), aB = au(aI.width - aA, aH) + 0.5 | 0, aJ = au(aI.height - az, aC) + 0.5 | 0, ay;
744        if (n) {
745            n.width = aB, n.height = aJ
746        } else {
747            n = L(aB, aJ)
748        }
749        if (!n) {
750            return this.SetMethod("outline")
751        }
752        ay = n.getContext("2d");
753        ay.drawImage(aI, aA, az, aB, aJ, 0, 0, aB, aJ);
754        aD.clearRect(aA, az, aB, aJ);
755        aK.alpha = 1;
756        aK.Draw(aD, j, aF);
757        aD.setTransform(1, 0, 0, 1, 0, 0);
758        aD.save();
759        aD.beginPath();
760        aD.rect(aA, az, aB, aJ);
761        aD.clip();
762        aD.globalCompositeOperation = "source-in";
763        aD.fillStyle = i;
764        aD.fillRect(aA, az, aB, aJ);
765        aD.restore();
766        aD.globalCompositeOperation = "destination-over";
767        aD.drawImage(n, 0, 0, aB, aJ, aA, az, aB, aJ);
768        aD.globalCompositeOperation = "source-over";
769        return 1
770    };
771    v.DrawBlock = function (aB, i, aA, j, ay, az) {
772        aB.fillStyle = az;
773        aj(aB, i, aA, j, ay, this.radius)
774    };
775    v.DrawSimple = function (aA, i, j, az) {
776        var ay = this.tc;
777        aA.setTransform(1, 0, 0, 1, 0, 0);
778        aA.strokeStyle = ay.outlineColour;
779        aA.lineWidth = ay.outlineThickness;
780        aA.shadowBlur = aA.shadowOffsetX = aA.shadowOffsetY = 0;
781        aA.globalAlpha = 1;
782        return this.drawFunc(aA, this.x, this.y, this.w, this.h, ay.outlineColour, i, j, az)
783    };
784    v.DrawPulsate = function (aB, i, j, az) {
785        var aA = C() - this.ts, ay = this.tc;
786        aB.setTransform(1, 0, 0, 1, 0, 0);
787        aB.strokeStyle = ay.outlineColour;
788        aB.lineWidth = ay.outlineThickness;
789        aB.shadowBlur = aB.shadowOffsetX = aB.shadowOffsetY = 0;
790        aB.globalAlpha = ay.pulsateTo + ((1 - ay.pulsateTo) * (0.5 + (u(2 * Math.PI * aA / (1000 * ay.pulsateTime)) / 2)));
791        return this.drawFunc(aB, this.x, this.y, this.w, this.h, ay.outlineColour, i, j, az)
792    };
793    v.Active = function (ay, i, j) {
794        return(i >= this.x && j >= this.y && i <= this.x + this.w && j <= this.y + this.h)
795    };
796    v.PreDraw = v.PostDraw = v.LastDraw = aq;
797    function d(az, aK, aG, aJ, aH, aA, ay, aC, aI, aB, aF, j, aE, i) {
798        var aD = az.ctxt;
799        this.tc = az;
800        this.image = aK.src ? aK : null;
801        this.text = aK.src ? [] : aK;
802        this.text_original = i;
803        this.line_widths = [];
804        this.title = aG.title || null;
805        this.a = aG;
806        this.position = new Y(aJ[0], aJ[1], aJ[2]);
807        this.x = this.y = this.z = 0;
808        this.w = aH;
809        this.h = aA;
810        this.colour = ay || az.textColour;
811        this.bgColour = aC || az.bgColour;
812        this.bgRadius = aI | 0;
813        this.bgOutline = aB || this.colour;
814        this.bgOutlineThickness = aF | 0;
815        this.textFont = j || az.textFont;
816        this.padding = aE | 0;
817        this.weight = this.sc = this.alpha = 1;
818        this.weighted = !az.weight;
819        this.outline = new F(az, this);
820        if (!this.image) {
821            this.textHeight = az.textHeight;
822            this.extents = r(this.text, this.textFont, this.textHeight);
823            this.Measure(aD, az)
824        }
825        this.SetShadowColour = az.shadowAlpha ? this.SetShadowColourAlpha : this.SetShadowColourFixed;
826        this.SetDraw(az)
827    }
828
829    b = d.prototype;
830    b.EqualTo = function (ay) {
831        var j = ay.getElementsByTagName("img");
832        if (this.a.href != ay.href) {
833            return 0
834        }
835        if (j.length) {
836            return this.image.src == j[0].src
837        }
838        return(ay.innerText || ay.textContent) == this.text_original
839    };
840    b.SetDraw = function (i) {
841        this.Draw = this.image ? (i.ie > 7 ? this.DrawImageIE : this.DrawImage) : this.DrawText;
842        i.noSelect && (this.CheckActive = aq)
843    };
844    b.MeasureText = function (aB) {
845        var az, ay = this.text.length, j = 0, aA;
846        for (az = 0; az < ay; ++az) {
847            this.line_widths[az] = aA = aB.measureText(this.text[az]).width;
848            j = q(j, aA)
849        }
850        return j
851    };
852    b.Measure = function (aC, j) {
853        this.h = this.extents ? this.extents.max.y + this.extents.min.y : this.textHeight;
854        aC.font = this.font = this.textHeight + "px " + this.textFont;
855        this.w = this.MeasureText(aC);
856        if (j.txtOpt) {
857            var az = j.txtScale, aA = az * this.textHeight, aB = aA + "px " + this.textFont, ay = [az * j.shadowOffset[0], az * j.shadowOffset[1]], i;
858            aC.font = aB;
859            i = this.MeasureText(aC);
860            this.image = t(this.text, aB, i + az, (az * this.h) + az, this.colour, this.bgColour, this.bgOutline, az * this.bgOutlineThickness, j.shadow, az * j.shadowBlur, ay, az * this.padding, az * this.bgRadius, i, this.line_widths);
861            if (j.outlineMethod == "colour") {
862                this.oimage = t(this.text, aB, i + az, (az * this.h) + az, j.outlineColour, this.bgColour, j.outlineColour, az * this.bgOutlineThickness, j.shadow, az * j.shadowBlur, ay, az * this.padding, az * this.bgRadius, i, this.line_widths)
863            }
864            if (this.image) {
865                this.w = this.image.width / az;
866                this.h = this.image.height / az
867            }
868            this.SetDraw(j);
869            j.txtOpt = !!this.image
870        }
871    };
872    b.SetFont = function (i, j) {
873        this.textFont = i;
874        this.colour = j;
875        this.extents = r(this.text, this.textFont, this.textHeight);
876        this.Measure(this.tc.ctxt, this.tc)
877    };
878    b.SetWeight = function (i) {
879        if (!this.text.length) {
880            return
881        }
882        this.weight = i;
883        this.Weight(this.tc.ctxt, this.tc);
884        this.Measure(this.tc.ctxt, this.tc)
885    };
886    b.Weight = function (az, ay) {
887        var j = this.weight, i = ay.weightMode;
888        this.weighted = true;
889        if (i == "colour" || i == "both") {
890            this.colour = g(ay, (j - ay.min_weight) / (ay.max_weight - ay.min_weight))
891        }
892        if (i == "size" || i == "both") {
893            if (ay.weightSizeMin > 0 && ay.weightSizeMax > ay.weightSizeMin) {
894                this.textHeight = ay.weightSize * (ay.weightSizeMin + (ay.weightSizeMax - ay.weightSizeMin) * (j - ay.min_weight) / (ay.max_weight - ay.min_weight))
895            } else {
896                this.textHeight = j * ay.weightSize
897            }
898        }
899        this.extents = r(this.text, this.textFont, this.textHeight)
900    };
901    b.SetShadowColourFixed = function (ay, j, i) {
902        ay.shadowColor = j
903    };
904    b.SetShadowColourAlpha = function (ay, j, i) {
905        ay.shadowColor = Q(j, i)
906    };
907    b.DrawText = function (aA, aD, az) {
908        var aE = this.tc, aC = this.x, aB = this.y, aF = this.sc, j, ay;
909        aA.globalAlpha = this.alpha;
910        aA.fillStyle = this.colour;
911        aE.shadow && this.SetShadowColour(aA, aE.shadow, this.alpha);
912        aA.font = this.font;
913        aC += aD / aF;
914        aB += (az / aF) - (this.h / 2);
915        for (j = 0; j < this.text.length; ++j) {
916            ay = aC - (this.line_widths[j] / 2);
917            aA.setTransform(aF, 0, 0, aF, aF * ay, aF * aB);
918            aA.fillText(this.text[j], 0, 0);
919            aB += this.textHeight
920        }
921    };
922    b.DrawImage = function (aA, aH, az, aC) {
923        var aE = this.x, aB = this.y, aI = this.sc, j = aC || this.image, aF = this.w, ay = this.h, aD = this.alpha, aG = this.shadow;
924        aA.globalAlpha = aD;
925        aG && this.SetShadowColour(aA, aG, aD);
vendor: 25,944 bytes, lines 926-1647
926        aE += (aH / aI) - (aF / 2);
927        aB += (az / aI) - (ay / 2);
928        aA.setTransform(aI, 0, 0, aI, aI * aE, aI * aB);
929        aA.drawImage(j, 0, 0, aF, ay)
930    };
931    b.DrawImageIE = function (aA, aE, az) {
932        var j = this.image, aF = this.sc, aD = j.width = this.w * aF, ay = j.height = this.h * aF, aC = (this.x * aF) + aE - (aD / 2), aB = (this.y * aF) + az - (ay / 2);
933        aA.setTransform(1, 0, 0, 1, 0, 0);
934        aA.globalAlpha = this.alpha;
935        aA.drawImage(j, aC, aB)
936    };
937    b.Calc = function (i, ay) {
938        var j, aB = this.tc, aA = aB.minBrightness, az = aB.maxBrightness, aC = aB.max_radius;
939        j = i.xform(this.position);
940        this.xformed = j;
941        j = S(aB, j, aB.stretchX, aB.stretchY);
942        this.x = j.x;
943        this.y = j.y;
944        this.z = j.z;
945        this.sc = j.w;
946        this.alpha = ay * am(aA + (az - aA) * (aC - this.z) / (2 * aC), 0, 1)
947    };
948    b.UpdateActive = function (aD, ay, aB) {
949        var aA = this.outline, j = this.w, az = this.h, i = this.x - j / 2, aC = this.y - az / 2;
950        aA.Update(i, aC, j, az, this.sc, this.z, ay, aB);
951        return aA
952    };
953    b.CheckActive = function (aA, i, az) {
954        var j = this.tc, ay = this.UpdateActive(aA, i, az);
955        return ay.Active(aA, j.mx, j.my) ? ay : null
956    };
957    b.Clicked = function (aB) {
958        var j = this.a, ay = j.target, az = j.href, i;
959        if (ay != "" && ay != "_self") {
960            if (self.frames[ay]) {
961                self.frames[ay].document.location = az
962            } else {
963                try {
964                    if (top.frames[ay]) {
965                        top.frames[ay].document.location = az;
966                        return
967                    }
968                } catch (aA) {
969                }
970                window.open(az, ay)
971            }
972            return
973        }
974        if (A.createEvent) {
975            i = A.createEvent("MouseEvents");
976            i.initMouseEvent("click", 1, 1, window, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null);
977            if (!j.dispatchEvent(i)) {
978                return
979            }
980        } else {
981            if (j.fireEvent) {
982                if (!j.fireEvent("onclick")) {
983                    return
984                }
985            }
986        }
987        A.location = az
988    };
989    function w(aD, j, az) {
990        var ay, aB, aC = A.getElementById(aD), aA = ["id", "class", "innerHTML"];
991        if (!aC) {
992            throw 0
993        }
994        if (ac(window.G_vmlCanvasManager)) {
995            aC = window.G_vmlCanvasManager.initElement(aC);
996            this.ie = parseFloat(navigator.appVersion.split("MSIE")[1])
997        }
998        if (aC && (!aC.getContext || !aC.getContext("2d").fillText)) {
999            aB = A.createElement("DIV");
1000            for (ay = 0; ay < aA.length; ++ay) {
1001                aB[aA[ay]] = aC[aA[ay]]
1002            }
1003            aC.parentNode.insertBefore(aB, aC);
1004            aC.parentNode.removeChild(aC);
1005            throw 0
1006        }
1007        for (ay in w.options) {
1008            this[ay] = az && ac(az[ay]) ? az[ay] : (ac(w[ay]) ? w[ay] : w.options[ay])
1009        }
1010        this.canvas = aC;
1011        this.ctxt = aC.getContext("2d");
1012        this.z1 = 250 / this.depth;
1013        this.z2 = this.z1 / this.zoom;
1014        this.radius = au(aC.height, aC.width) * 0.0075;
1015        this.max_weight = 0;
1016        this.min_weight = 200;
1017        this.textFont = this.textFont && m(this.textFont);
1018        this.textHeight *= 1;
1019        this.pulsateTo = am(this.pulsateTo, 0, 1);
1020        this.minBrightness = am(this.minBrightness, 0, 1);
1021        this.maxBrightness = am(this.maxBrightness, this.minBrightness, 1);
1022        this.ctxt.textBaseline = "top";
1023        this.lx = (this.lock + "").indexOf("x") + 1;
1024        this.ly = (this.lock + "").indexOf("y") + 1;
1025        this.frozen = this.dx = this.dy = this.fixedAnim = this.touched = 0;
1026        this.fixedAlpha = 1;
1027        this.source = j || aD;
1028        this.transform = N.Identity();
1029        this.startTime = this.time = C();
1030        this.Animate = this.dragControl ? this.AnimateDrag : this.AnimatePosition;
1031        this.animTiming = (typeof w[this.animTiming] == "function" ? w[this.animTiming] : w.Smooth);
1032        if (this.shadowBlur || this.shadowOffset[0] || this.shadowOffset[1]) {
1033            this.ctxt.shadowColor = this.shadow;
1034            this.shadow = this.ctxt.shadowColor;
1035            this.shadowAlpha = ae()
1036        } else {
1037            delete this.shadow
1038        }
1039        this.Load();
1040        if (j && this.hideTags) {
1041            (function (i) {
1042                if (w.loaded) {
1043                    i.HideTags()
1044                } else {
1045                    X("load", function () {
1046                        i.HideTags()
1047                    }, window)
1048                }
1049            })(this)
1050        }
1051        this.yaw = this.initial ? this.initial[0] * this.maxSpeed : 0;
1052        this.pitch = this.initial ? this.initial[1] * this.maxSpeed : 0;
1053        if (this.tooltip) {
1054            if (this.tooltip == "native") {
1055                this.Tooltip = this.TooltipNative
1056            } else {
1057                this.Tooltip = this.TooltipDiv;
1058                if (!this.ttdiv) {
1059                    this.ttdiv = A.createElement("div");
1060                    this.ttdiv.className = this.tooltipClass;
1061                    this.ttdiv.style.position = "absolute";
1062                    this.ttdiv.style.zIndex = aC.style.zIndex + 1;
1063                    X("mouseover", function (i) {
1064                        i.target.style.display = "none"
1065                    }, this.ttdiv);
1066                    A.body.appendChild(this.ttdiv)
1067                }
1068            }
1069        } else {
1070            this.Tooltip = this.TooltipNone
1071        }
1072        if (!this.noMouse && !a[aD]) {
1073            X("mousemove", Z, aC);
1074            X("mouseout", z, aC);
1075            X("mouseup", av, aC);
1076            X("touchstart", P, aC);
1077            X("touchend", p, aC);
1078            X("touchcancel", p, aC);
1079            X("touchmove", ap, aC);
1080            if (this.dragControl) {
1081                X("mousedown", x, aC);
1082                X("selectstart", aq, aC)
1083            }
1084            if (this.wheelZoom) {
1085                X("mousewheel", aa, aC);
1086                X("DOMMouseScroll", aa, aC)
1087            }
1088            a[aD] = 1
1089        }
1090        w.started || (w.started = setTimeout(K, this.interval))
1091    }
1092
1093    M = w.prototype;
1094    M.SourceElements = function () {
1095        if (A.querySelectorAll) {
1096            return A.querySelectorAll("#" + this.source)
1097        }
1098        return[A.getElementById(this.source)]
1099    };
1100    M.HideTags = function () {
1101        var ay = this.SourceElements(), j;
1102        for (j = 0; j < ay.length; ++j) {
1103            ay[j].style.display = "none"
1104        }
1105    };
1106    M.GetTags = function () {
1107        var aC = this.SourceElements(), aB, ay = [], aA, az;
1108        for (aA = 0; aA < aC.length; ++aA) {
1109            aB = aC[aA].getElementsByTagName("a");
1110            for (az = 0; az < aB.length; ++az) {
1111                ay.push(aB[az])
1112            }
1113        }
1114        return ay
1115    };
1116    M.CreateTag = function (aB, j) {
1117        var aE = aB.getElementsByTagName("img"), aA, aF, aD, ay, aC, az;
1118        j = j || [0, 0, 0];
1119        if (aE.length) {
1120            aA = new Image;
1121            aA.src = aE[0].src;
1122            aF = new d(this, aA, aB, j, 0, 0);
1123            an(aA, aE[0], aF, this);
1124            return aF
1125        }
1126        aD = new at(aB);
1127        aF = aD.Lines();
1128        ay = this.textFont || m(U(aB, "font-family"));
1129        if (this.splitWidth) {
1130            aF = aD.SplitWidth(this.splitWidth, this.ctxt, ay, this.textHeight)
1131        }
1132        aC = this.bgColour == "tag" ? U(aB, "background-color") : this.bgColour;
1133        az = this.bgOutline == "tag" ? U(aB, "color") : this.bgOutline;
1134        return new d(this, aF, aB, j, 2, this.textHeight + 2, this.textColour || U(aB, "color"), aC, this.bgRadius, az, this.bgOutlineThickness, ay, this.padding, aD.original)
1135    };
1136    M.UpdateTag = function (ay, i) {
1137        var az = this.textColour || U(i, "color"), j = this.textFont || m(U(i, "font-family"));
1138        ay.a = i;
1139        ay.title = i.title;
1140        if (ay.colour != az || ay.textFont != j) {
1141            ay.SetFont(j, az)
1142        }
1143    };
1144    M.Weight = function (az) {
1145        var ay = az.length, j, aA, aB = [];
1146        for (aA = 0; aA < ay; ++aA) {
1147            j = s(this, az[aA].a);
1148            if (j > this.max_weight) {
1149                this.max_weight = j
1150            }
1151            if (j < this.min_weight) {
1152                this.min_weight = j
1153            }
1154            aB.push(j)
1155        }
1156        if (this.max_weight > this.min_weight) {
1157            for (aA = 0; aA < ay; ++aA) {
1158                az[aA].SetWeight(aB[aA])
1159            }
1160        }
1161    };
1162    M.Load = function () {
1163        var aH = this.GetTags(), aD = [], aG, aC, az, ay, j, aA, aF, aB = [], aE = {sphere: o, vcylinder: af, hcylinder: al, vring: c, hring: l};
1164        if (aH.length) {
1165            aB.length = aH.length;
1166            for (aF = 0; aF < aH.length; ++aF) {
1167                aB[aF] = aF
1168            }
1169            this.shuffleTags && ag(aB);
1170            az = 100 * this.radiusx;
1171            ay = 100 * this.radiusy;
1172            j = 100 * this.radiusz;
1173            this.max_radius = q(az, q(ay, j));
1174            if (this.shapeArgs) {
1175                this.shapeArgs[0] = aH.length
1176            } else {
1177                aC = this.shape.toString().split(/[(),]/);
1178                aG = aC.shift();
1179                this.shape = aE[aG] || aE.sphere;
1180                this.shapeArgs = [aH.length, az, ay, j].concat(aC)
1181            }
1182            aA = this.shape.apply(this, this.shapeArgs);
1183            this.listLength = aH.length;
1184            for (aF = 0; aF < aH.length; ++aF) {
1185                aD.push(this.CreateTag(aH[aB[aF]], aA[aF]))
1186            }
1187            this.weight && this.Weight(aD, true)
1188        }
1189        this.taglist = aD
1190    };
1191    M.Update = function () {
1192        var aH = this.GetTags(), aG = [], aB = this.taglist, aI, aF = [], aD = [], az, aE, ay, aC, aA;
1193        if (!this.shapeArgs) {
1194            return this.Load()
1195        }
1196        if (aH.length) {
1197            ay = this.listLength = aH.length;
1198            aE = aB.length;
1199            for (aC = 0; aC < aE; ++aC) {
1200                aG.push(aB[aC]);
1201                aD.push(aC)
1202            }
1203            for (aC = 0; aC < ay; ++aC) {
1204                for (aA = 0, aI = 0; aA < aE; ++aA) {
1205                    if (aB[aA].EqualTo(aH[aC])) {
1206                        this.UpdateTag(aG[aA], aH[aC]);
1207                        aI = aD[aA] = -1
1208                    }
1209                }
1210                if (!aI) {
1211                    aF.push(aC)
1212                }
1213            }
1214            for (aC = 0, aA = 0; aC < aE; ++aC) {
1215                if (aD[aA] == -1) {
1216                    aD.splice(aA, 1)
1217                } else {
1218                    ++aA
1219                }
1220            }
1221            if (aD.length) {
1222                ag(aD);
1223                while (aD.length && aF.length) {
1224                    aC = aD.shift();
1225                    aA = aF.shift();
1226                    aG[aC] = this.CreateTag(aH[aA])
1227                }
1228                aD.sort(function (j, i) {
1229                    return j - i
1230                });
1231                while (aD.length) {
1232                    aG.splice(aD.pop(), 1)
1233                }
1234            }
1235            aA = aG.length / (aF.length + 1);
1236            aC = 0;
1237            while (aF.length) {
1238                aG.splice(ai(++aC * aA), 0, this.CreateTag(aH[aF.shift()]))
1239            }
1240            this.shapeArgs[0] = ay = aG.length;
1241            az = this.shape.apply(this, this.shapeArgs);
1242            for (aC = 0; aC < ay; ++aC) {
1243                aG[aC].position = new Y(az[aC][0], az[aC][1], az[aC][2])
1244            }
1245            this.weight && this.Weight(aG)
1246        }
1247        this.taglist = aG
1248    };
1249    M.SetShadow = function (i) {
1250        i.shadowBlur = this.shadowBlur;
1251        i.shadowOffsetX = this.shadowOffset[0];
1252        i.shadowOffsetY = this.shadowOffset[1]
1253    };
1254    M.Draw = function (aI) {
1255        if (this.paused) {
1256            return
1257        }
1258        var aC = this.canvas, aA = aC.width, aH = aC.height, aK = 0, az = (aI - this.time) * this.interval / 1000, aG = aA / 2 + this.offsetX, aF = aH / 2 + this.offsetY, aO = this.ctxt, aE, aP, aM, ay = -1, aB = this.taglist, aL = aB.length, j = this.frontSelect, aJ = (this.centreFunc == aq), aD;
1259        this.time = aI;
1260        if (this.frozen && this.drawn) {
1261            return this.Animate(aA, aH, az)
1262        }
1263        aD = this.AnimateFixed();
1264        aO.setTransform(1, 0, 0, 1, 0, 0);
1265        for (aM = 0; aM < aL; ++aM) {
1266            aB[aM].Calc(this.transform, this.fixedAlpha)
1267        }
1268        aB = y(aB, function (aQ, i) {
1269            return i.z - aQ.z
1270        });
1271        if (aD && this.fixedAnim.active) {
1272            aE = this.fixedAnim.tag.UpdateActive(aO, aG, aF)
1273        } else {
1274            this.active = null;
1275            for (aM = 0; aM < aL; ++aM) {
1276                aP = this.mx >= 0 && this.my >= 0 && this.taglist[aM].CheckActive(aO, aG, aF);
1277                if (aP && aP.sc > aK && (!j || aP.z <= 0)) {
1278                    aE = aP;
1279                    ay = aM;
1280                    aE.tag = this.taglist[aM];
1281                    aK = aP.sc
1282                }
1283            }
1284            this.active = aE
1285        }
1286        this.txtOpt || (this.shadow && this.SetShadow(aO));
1287        aO.clearRect(0, 0, aA, aH);
1288        for (aM = 0; aM < aL; ++aM) {
1289            if (!aJ && aB[aM].z <= 0) {
1290                try {
1291                    this.centreFunc(aO, aA, aH, aG, aF)
1292                } catch (aN) {
1293                    alert(aN);
1294                    this.centreFunc = aq
1295                }
1296                aJ = true
1297            }
1298            if (!(aE && aE.tag == aB[aM] && aE.PreDraw(aO, aB[aM], aG, aF))) {
1299                aB[aM].Draw(aO, aG, aF)
1300            }
1301            aE && aE.tag == aB[aM] && aE.PostDraw(aO)
1302        }
1303        if (this.freezeActive && aE) {
1304            this.Freeze()
1305        } else {
1306            this.UnFreeze();
1307            this.drawn = (aL == this.listLength)
1308        }
1309        if (this.fixedCallback) {
1310            this.fixedCallback(this, this.fixedCallbackTag);
1311            this.fixedCallback = null
1312        }
1313        aD || this.Animate(aA, aH, az);
1314        aE && aE.LastDraw(aO);
1315        aC.style.cursor = aE ? this.activeCursor : "";
1316        this.Tooltip(aE, this.taglist[ay])
1317    };
1318    M.TooltipNone = function () {
1319    };
1320    M.TooltipNative = function (j, i) {
1321        this.canvas.title = j && i.title ? i.title : ""
1322    };
1323    M.TooltipDiv = function (aA, j) {
1324        var i = this, az = i.ttdiv.style, aB = i.canvas.id, ay = "none";
1325        if (aA && j.title) {
1326            if (j.title != i.ttdiv.innerHTML) {
1327                az.display = ay
1328            }
1329            i.ttdiv.innerHTML = j.title;
1330            j.title = i.ttdiv.innerHTML;
1331            if (az.display == ay && !i.tttimer) {
1332                i.tttimer = setTimeout(function () {
1333                    var aC = W(aB);
1334                    az.display = "block";
1335                    az.left = aC.x + i.mx + "px";
1336                    az.top = aC.y + i.my + 24 + "px";
1337                    i.tttimer = null
1338                }, i.tooltipDelay)
1339            }
1340        } else {
1341            az.display = ay
1342        }
1343    };
1344    M.Transform = function (aB, i, aD) {
1345        if (i || aD) {
1346            var j = ab(i), aC = u(i), aE = ab(aD), aA = u(aD), ay = new N([aA, 0, aE, 0, 1, 0, -aE, 0, aA]), az = new N([1, 0, 0, 0, aC, -j, 0, j, aC]);
1347            aB.transform = aB.transform.mul(ay.mul(az))
1348        }
1349    };
1350    M.AnimateFixed = function () {
1351        var ay, j, aA, i, az;
1352        if (this.fadeIn) {
1353            j = C() - this.startTime;
1354            if (j >= this.fadeIn) {
1355                this.fadeIn = 0;
1356                this.fixedAlpha = 1
1357            } else {
1358                this.fixedAlpha = j / this.fadeIn
1359            }
1360        }
1361        if (this.fixedAnim) {
1362            if (!this.fixedAnim.transform) {
1363                this.fixedAnim.transform = this.transform
1364            }
1365            ay = this.fixedAnim, j = C() - ay.t0, aA = ay.angle, i, az = this.animTiming(ay.t, j);
1366            this.transform = ay.transform;
1367            if (j >= ay.t) {
1368                this.fixedCallbackTag = ay.tag;
1369                this.fixedCallback = ay.cb;
1370                this.fixedAnim = this.yaw = this.pitch = 0
1371            } else {
1372                aA *= az
1373            }
1374            i = N.Rotation(aA, ay.axis);
1375            this.transform = this.transform.mul(i);
1376            return(this.fixedAnim != 0)
1377        }
1378        return false
1379    };
1380    M.AnimatePosition = function (ay, aB, az) {
1381        var j = this, i = j.mx, aD = j.my, aA, aC;
1382        if (!j.frozen && i >= 0 && aD >= 0 && i < ay && aD < aB) {
1383            aA = j.maxSpeed, aC = j.reverse ? -1 : 1;
1384            j.lx || (j.yaw = aC * az * ((aA * 2 * i / ay) - aA));
1385            j.ly || (j.pitch = aC * az * -((aA * 2 * aD / aB) - aA));
1386            j.initial = null
1387        } else {
1388            if (!j.initial) {
1389                if (j.frozen && !j.freezeDecel) {
1390                    j.yaw = j.pitch = 0
1391                } else {
1392                    j.Decel(j)
1393                }
1394            }
1395        }
1396        this.Transform(j, j.pitch, j.yaw)
1397    };
1398    M.AnimateDrag = function (j, aA, az) {
1399        var i = this, ay = 100 * az * i.maxSpeed / i.max_radius / i.zoom;
1400        if (i.dx || i.dy) {
1401            i.lx || (i.yaw = i.dx * ay / i.stretchX);
1402            i.ly || (i.pitch = i.dy * -ay / i.stretchY);
1403            i.dx = i.dy = 0;
1404            i.initial = null
1405        } else {
1406            if (!i.initial) {
1407                i.Decel(i)
1408            }
1409        }
1410        this.Transform(i, i.pitch, i.yaw)
1411    };
1412    M.Freeze = function () {
1413        if (!this.frozen) {
1414            this.preFreeze = [this.yaw, this.pitch];
1415            this.frozen = 1;
1416            this.drawn = 0
1417        }
1418    };
1419    M.UnFreeze = function () {
1420        if (this.frozen) {
1421            this.yaw = this.preFreeze[0];
1422            this.pitch = this.preFreeze[1];
1423            this.frozen = 0
1424        }
1425    };
1426    M.Decel = function (i) {
1427        var az = i.minSpeed, aA = H(i.yaw), j = H(i.pitch);
1428        if (!i.lx && aA > az) {
1429            i.yaw = aA > i.z0 ? i.yaw * i.decel : 0
1430        }
1431        if (!i.ly && j > az) {
1432            i.pitch = j > i.z0 ? i.pitch * i.decel : 0
1433        }
1434    };
1435    M.Zoom = function (i) {
1436        this.z2 = this.z1 * (1 / i);
1437        this.drawn = 0
1438    };
1439    M.Clicked = function (ay) {
1440        var i = this.active;
1441        try {
1442            if (i && i.tag) {
1443                if (this.clickToFront === false || this.clickToFront === null) {
1444                    i.tag.Clicked(ay)
1445                } else {
1446                    this.TagToFront(i.tag, this.clickToFront, function () {
1447                        i.tag.Clicked(ay)
1448                    }, true)
1449                }
1450            }
1451        } catch (j) {
1452        }
1453    };
1454    M.Wheel = function (j) {
1455        var ay = this.zoom + this.zoomStep * (j ? 1 : -1);
1456        this.zoom = au(this.zoomMax, q(this.zoomMin, ay));
1457        this.Zoom(this.zoom)
1458    };
1459    M.BeginDrag = function (i) {
1460        this.down = O(i, this.canvas);
1461        i.cancelBubble = true;
1462        i.returnValue = false;
1463        i.preventDefault && i.preventDefault()
1464    };
1465    M.Drag = function (aA, az) {
1466        if (this.dragControl && this.down) {
1467            var ay = this.dragThreshold * this.dragThreshold, j = az.x - this.down.x, i = az.y - this.down.y;
1468            if (this.dragging || j * j + i * i > ay) {
1469                this.dx = j;
1470                this.dy = i;
1471                this.dragging = 1;
1472                this.down = az
1473            }
1474        }
1475    };
1476    M.EndDrag = function () {
1477        var i = this.dragging;
1478        this.dragging = this.down = null;
1479        return i
1480    };
1481    M.Pause = function () {
1482        this.paused = true
1483    };
1484    M.Resume = function () {
1485        this.paused = false
1486    };
1487    M.SetSpeed = function (j) {
1488        this.initial = j;
1489        this.yaw = j[0] * this.maxSpeed;
1490        this.pitch = j[1] * this.maxSpeed
1491    };
1492    M.FindTag = function (ay) {
1493        if (!ac(ay)) {
1494            return null
1495        }
1496        ac(ay.index) && (ay = ay.index);
1497        if (!E(ay)) {
1498            return this.taglist[ay]
1499        }
1500        var az, aA, j;
1501        if (ac(ay.id)) {
1502            az = "id", aA = ay.id
1503        } else {
1504            if (ac(ay.text)) {
1505                az = "innerText", aA = ay.text
1506            }
1507        }
1508        for (j = 0; j < this.taglist.length; ++j) {
1509            if (this.taglist[j].a[az] == aA) {
1510                return this.taglist[j]
1511            }
1512        }
1513    };
1514    M.RotateTag = function (aG, az, aF, i, aD, ay) {
1515        var aE = aG.xformed, aB = new Y(aE.x, aE.y, aE.z), aA = ad(aF, az), j = aB.angle(aA), aC = aB.cross(aA).unit();
1516        if (j == 0) {
1517            this.fixedCallbackTag = aG;
1518            this.fixedCallback = aD
1519        } else {
1520            this.fixedAnim = {angle: -j, axis: aC, t: i, t0: C(), cb: aD, tag: aG, active: ay}
1521        }
1522    };
1523    M.TagToFront = function (i, ay, az, j) {
1524        this.RotateTag(i, 0, 0, ay, az, j)
1525    };
1526    w.Start = function (ay, i, j) {
1527        w.tc[ay] = new w(ay, i, j)
1528    };
1529    function ao(i, j) {
1530        w.tc[j] && w.tc[j][i]()
1531    }
1532
1533    w.Linear = function (i, j) {
1534        return j / i
1535    };
1536    w.Smooth = function (i, j) {
1537        return 0.5 - u(j * Math.PI / i) / 2
1538    };
1539    w.Pause = function (i) {
1540        ao("Pause", i)
1541    };
1542    w.Resume = function (i) {
1543        ao("Resume", i)
1544    };
1545    w.Reload = function (i) {
1546        ao("Load", i)
1547    };
1548    w.Update = function (i) {
1549        ao("Update", i)
1550    };
1551    w.SetSpeed = function (j, i) {
1552        if (E(i) && w.tc[j] && !isNaN(i[0]) && !isNaN(i[1])) {
1553            w.tc[j].SetSpeed(i);
1554            return true
1555        }
1556        return false
1557    };
1558    w.TagToFront = function (j, i) {
1559        if (!E(i)) {
1560            return false
1561        }
1562        i.lat = i.lng = 0;
1563        return w.RotateTag(j, i)
1564    };
1565    w.RotateTag = function (ay, i) {
1566        if (E(i) && w.tc[ay]) {
1567            if (isNaN(i.time)) {
1568                i.time = 500
1569            }
1570            var j = w.tc[ay].FindTag(i);
1571            if (j) {
1572                w.tc[ay].RotateTag(j, i.lat, i.lng, i.time, i.callback, i.active);
1573                return true
1574            }
1575        }
1576        return false
1577    };
1578    w.Delete = function (i) {
1579        delete a[i];
1580        delete w.tc[i]
1581    };
1582    w.NextFrame = function (i) {
1583        var j = window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
1584        w.NextFrame = j ? w.NextFrameRAF : w.NextFrameTimeout;
1585        w.NextFrame(i)
1586    };
1587    w.NextFrameRAF = function () {
1588        requestAnimationFrame(K)
1589    };
1590    w.NextFrameTimeout = function (i) {
1591        setTimeout(K, i)
1592    };
1593    w.tc = {};
1594    w.options = {z1: 20000, z2: 20000, z0: 0.0002, freezeActive: false, freezeDecel: false, activeCursor: "pointer", pulsateTo: 1, pulsateTime: 3, reverse: false, depth: 0.5, maxSpeed: 0.05, minSpeed: 0, decel: 0.95, interval: 20, minBrightness: 0.1, maxBrightness: 1, outlineColour: "#ffff99", outlineThickness: 2, outlineOffset: 5, outlineMethod: "outline", outlineRadius: 0, textColour: "#ff99ff", textHeight: 15, textFont: "Helvetica, Arial, sans-serif", shadow: "#000", shadowBlur: 0, shadowOffset: [0, 0], initial: null, hideTags: true, zoom: 1, weight: false, weightMode: "size", weightFrom: null, weightSize: 1, weightSizeMin: null, weightSizeMax: null, weightGradient: {0: "#f00", 0.33: "#ff0", 0.66: "#0f0", 1: "#00f"}, txtOpt: true, txtScale: 2, frontSelect: false, wheelZoom: true, zoomMin: 0.3, zoomMax: 3, zoomStep: 0.05, shape: "sphere", lock: null, tooltip: null, tooltipDelay: 300, tooltipClass: "tctooltip", radiusx: 1, radiusy: 1, radiusz: 1, stretchX: 1, stretchY: 1, offsetX: 0, offsetY: 0, shuffleTags: false, noSelect: false, noMouse: false, imageScale: 1, paused: false, dragControl: false, dragThreshold: 4, centreFunc: aq, splitWidth: 0, animTiming: "Smooth", clickToFront: false, fadeIn: 0, padding: 0, bgColour: null, bgRadius: 0, bgOutline: null, bgOutlineThickness: 0};
1595    for (I in w.options) {
1596        w[I] = w.options[I]
1597    }
1598    window.TagCanvas = w;
1599    jQuery.fn.tagcanvas = function (j, i) {
1600        var ay = {pause: function () {
1601            ah(this).each(function () {
1602                ao("Pause", ah(this)[0].id)
1603            })
1604        }, resume: function () {
1605            ah(this).each(function () {
1606                ao("Resume", ah(this)[0].id)
1607            })
1608        }, reload: function () {
1609            ah(this).each(function () {
1610                ao("Load", ah(this)[0].id)
1611            })
1612        }, update: function () {
1613            ah(this).each(function () {
1614                ao("Update", ah(this)[0].id)
1615            })
1616        }, tagtofront: function () {
1617            ah(this).each(function () {
1618                w.TagToFront(ah(this)[0].id, i)
1619            })
1620        }, rotatetag: function () {
1621            ah(this).each(function () {
1622                w.RotateTag(ah(this)[0].id, i)
1623            })
1624        }, "delete": function () {
1625            ah(this).each(function () {
1626                w.Delete(ah(this)[0].id)
1627            })
1628        }, setspeed: function () {
1629            ah(this).each(function () {
1630                w.SetSpeed(ah(this)[0].id, i)
1631            })
1632        }};
1633        if (typeof j == "string" && ay[j]) {
1634            ay[j].apply(this);
1635            return this
1636        } else {
1637            w.jquery = 1;
1638            ah(this).each(function () {
1639                w.Start(ah(this)[0].id, i, j)
1640            });
1641            return w.started
1642        }
1643    };
1644    X("load", function () {
1645        w.loaded = 1
1646    }, window)
1647}
1647)(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.