1!function(d,_){"use strict";if("IntersectionObserver"in d&&"IntersectionObserverEntry"in d&&"intersectionRatio"in d.IntersectionObserverEntry.prototype)"isIntersecting"in d.IntersectionObserverEntry.prototype||Object.defineProperty(d.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return 0<this.intersectionRatio}});else{var e=[];t.prototype.THROTTLE_TIMEOUT=100,t.prototype.POLL_INTERVAL=null,t.prototype.USE_MUTATION_OBSERVER=!0,t.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},t.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},t.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},t.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},t.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||1<t)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},t.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},t.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(n(d,"resize",this._checkForIntersections,!0),n(_,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in d&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(_,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},t.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,o(d,"resize",this._checkForIntersections,!0),o(_,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},t.prototype._checkForIntersections=function(){var h=this._rootIsInDom(),c=h?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(t){var e=t.element,n=m(e),o=this._rootContainsTarget(e),i=t.entry,r=h&&o&&this._computeTargetAndRootIntersection(e,c),s=t.entry=new a({time:d.performance&&performance.now&&performance.now(),target:e,boundingClientRect:n,rootBounds:c,intersectionRect:r});i?h&&o?this._hasCrossedThreshold(i,s)&&this._queuedEntries.push(s):i&&i.isIntersecting&&this._queuedEntries.push(s):this._queuedEntries.push(s)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},t.prototype._computeTargetAndRootIntersection=function(t,e){if("none"!=d.getComputedStyle(t).display){for(var n,o,i,r,s,h,c,a,u=m(t),l=v(t),p=!1;!p;){var f=null,g=1==l.nodeType?d.getComputedStyle(l):{};if("none"==g.display)return;if(l==this.root||l==_?(p=!0,f=e):l!=_.body&&l!=_.documentElement&&"visible"!=g.overflow&&(f=m(l)),f&&(n=f,o=u,void 0,i=Math.max(n.top,o.top),r=Math.min(n.bottom,o.bottom),s=Math.max(n.left,o.left),h=Math.min(n.right,o.right),a=r-i,!(u=0<=(c=h-s)&&0<=a&&{top:i,bottom:r,left:s,right:h,width:c,height:a})))break;l=v(l)}return u}},t.prototype._getRootRect=function(){var t;if(this.root)t=m(this.root);else{var e=_.documentElement,n=_.body;t={top:0,left:0,right:e.clientWidth||n.clientWidth,width:e.clientWidth||n.clientWidth,bottom:e.clientHeight||n.clientHeight,height:e.clientHeight||n.clientHeight}}return this._expandRectByRootMargin(t)},t.prototype._expandRectByRootMargin=function(n){var t=this._rootMarginValues.map(function(t,e){return"px"==t.unit?t.value:t.value*(e%2?n.width:n.height)/100}),e={top:n.top-t[0],right:n.right+t[1],bottom:n.bottom+t[2],left:n.left-t[3]};return e.width=e.right-e.left,e.height=e.bottom-e.top,e},t.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var i=0;i<this.thresholds.length;i++){var r=this.thresholds[i];if(r==n||r==o||r<n!=r<o)return!0}},t.prototype._rootIsInDom=function(){return!this.root||i(_,this.root)},t.prototype._rootContainsTarget=function(t){return i(this.root||_,t)},t.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},t.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},d.IntersectionObserver=t,d.IntersectionObserverEntry=a}function a(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,o=this.intersectionRect,i=o.width*o.height;this.intersectionRatio=n?i/n:this.isIntersecting?1:0}function t(t,e){var n,o,i,r=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(r.root&&1!=r.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout(function(){n(),i=null},o))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(r.rootMargin),this.thresholds=this._initThresholds(r.threshold),this.root=r.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function n(t,e,n,o){"function"==typeof t.addEventListener?t.addEventListener(e,n,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function o(t,e,n,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,o||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function m(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function i(t,e){for(var n=e;n;){if(n==t)return!0;n=v(n)}return!1}function v(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e}}(window,document); 2 3if (typeof(stockdio_event) == "undefined") { 4 stockdio_event = true; 5 var stockdio_eventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; 6 var stockdio_eventer = window[stockdio_eventMethod]; 7 var stockdio_messageEvent = stockdio_eventMethod == "attachEvent" ? "onmessage" : "message"; 8 stockdio_eventer(stockdio_messageEvent, function (e) { 9 if (e.origin !== "https://api.stockdio.com") return; 10 if (typeof(e.data) != "undefined" && typeof(e.data.methodName) != "undefined") { 11 var methodName = e.data.methodName; 12 var params = e.data.methodParams; 13 switch (methodName) 14 { 15 case 'clickNews': 16 window.open(params[0]); 17 break; 18 case 'clickQuote': 19 if (params[1] === 'self') 20 window.location.href=params[0]; 21 else 22 window.open(params[0]); 23 break; 24 case 'adjustBorderHeight': 25 var stockdio_iframe = document.getElementById(params[0]); 26 if (stockdio_iframe != undefined && stockdio_iframe != null) 27 stockdio_iframe.height = params[1]; 28 break; 29 case 'adjustFinancialBorderHeight': 30 var stockdio_iframe = document.getElementById(params[0]); 31 if (stockdio_iframe != undefined && stockdio_iframe != null) { 32 stockdio_iframe.height = params[1];
33 stockdio_iframe.style.height = `${params[1]}px`; 34 } 35 break; 36 case 'cssLoaded': 37 var stockdio_iframe = document.getElementById(params[0]); 38 console.log('stockdio_iframe',params[1],stockdio_iframe); 39 if (stockdio_iframe != undefined && stockdio_iframe != null) 40 stockdio_iframe.height = params[1]; 41 break; 42 case 'setIframeHeight': 43 if (params[3] != 'Ticker') { 44 var stockdio_iframe = document.getElementById(params[0]); 45 if (stockdio_iframe != undefined && stockdio_iframe != null) { 46 stockdio_iframe.height = params[1]; 47 stockdio_iframe.style.height = `${params[1]}px`; 48 } 49 } 50 else { 51 var stockdio_iframe = document.getElementById(params[0]); 52 if (stockdio_iframe != undefined && stockdio_iframe != null) { 53 stockdio_iframe.height = params[1]; 54 stockdio_iframe.width = params[2]; 55 stockdio_iframe.scrolling = 'no' 56 } 57 } 58 59 if (params[0] === 'Ticker') { 60 if (typeof(recalculate_stockdio_width) === 'undefined') { 61 recalculate_stockdio_width = function(initial, iframeId) { 62 if (true || (/iPhone|iPad|iPod|Android|IEMobile|blackberry|Windows Phone|webOS|Tablet|Nexus 7|Nexus 10|fennec/i.test(navigator.userAgent))) { 63 var item = document.getElementById(iframeId); 64 if (item != null) { 65 var parent = item.parentElement; 66 var maxWidth = 10000000; 67 if (parent != null) 68 maxWidth = parent.offsetWidth; 69 if (initial!='') 70 item.style.width = initial; 71 var newWidth = Math.min(item.offsetWidth, maxWidth); 72 item.style.width = newWidth + 'px'; 73 } 74 } 75 } 76 } 77 if (typeof(orientationchange_stockdio) === 'undefined') { 78 orientationchange_stockdio = true; 79 window.addEventListener('orientationchange', function() { 80 var frames = document.getElementsByTagName('iframe'); 81 for(var i = 0;i < frames.length; i++) { 82 if (frames[i].src.toLowerCase().indexOf('api.stockdio.com') > 0) { 83 recalculate_stockdio_width('100%', frames[i].id); 84 } 85 } 86 }, false); 87 } 88 recalculate_stockdio_width('', params[0]); 89 } 90 break; 91 case 'displayResults': 92 var stockdio_iframe = document.getElementById(params[0]); 93 if (stockdio_iframe != undefined && stockdio_iframe != null) 94 stockdio_iframe.height = params[1]; 95 break; 96 default: 97 break; 98 } 99 } 100 },false); 101} 102 103(function () { 104 if (typeof(stockdio_events) == "undefined") { 105 stockdio_events = true; 106 107 stockdioOnloadFunction = function () { 108 if (window.IntersectionObserver) { 109 var elements = document.querySelectorAll('iframe[iframesrc]'); 110 var element; var i; 111 for (i=0; i< elements.length; i++){ 112 element = elements[i]; 113 if (element!=null && typeof(element) != "undefined") { 114 var observer = new IntersectionObserver(function(entries) { 115 //entries.forEach(function(entry) { 116 var entry;var j; 117 for (j=0; j< entries.length; j++){ 118 entry = entries[j]; 119 element = entry.target; 120 if (element.src != ""){ 121 observer.unobserve(element); 122 } 123 else { 124 if (entry.isIntersecting) { 125 if (entry.intersectionRatio > 0) { 126 element.src = element.getAttribute("iframesrc"); 127 } 128 } 129 } 130 //}); 131 } 132 }, { 133 rootMargin: "0px" 134 }); 135 observer.POLL_INTERVAL = 100; // Time in milliseconds. 136 observer.observe(element); 137 } 138 }; 139 } 140 else{ 141 //browser do not support IntersectionObserver 142 changeStockdioIframeSrc(); 143 } 144 } 145 146 window.addEventListener ? 147 window.addEventListener("load",stockdioOnloadFunction,false) : 148 window.attachEvent && window.attachEvent("onload",stockdioOnloadFunction); 149 150 changeStockdioIframeSrc = function(){ 151 setTimeout(function(){ 152 var elements = document.querySelectorAll('iframe[iframesrc]'); 153 var element;var i; 154 for (i=0; i< elements.length; i++){ 155 element = elements[i]; 156 var b = false; 157 if (element!=null && typeof(element) != "undefined" && element.src == "") { 158 if (checkVisible(element)) 159 element.src = element.getAttribute("iframesrc"); 160 else b = true; 161 } 162 if (b) changeStockdioIframeSrc(); 163 } 164 165 }, 100); 166 } 167 168 checkVisible = function(element) { 169 var rect = element.getBoundingClientRect(); 170 var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight); 171 return !(rect.bottom < 0 || rect.top - viewHeight >= 0); 172 } 173 } 174} ()); 175 176 177 178
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.