{"version":3,"sources":["spreads.min.js"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","_typeof","obj","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","Number","value","ForexBrokerSpreads","spreadsRoot","this","urls","GetBrokerSpreads","SpreadsUpdateHub","selectedSymbols","rawSpreads","standardSpreads","symbols","selectedSpread","brokerId","isCommission","broker","tabName","accountType","symbolId","locale","spreadTypes","name","str","urlSlug","id","symbolName","tab","myThis","$","ajax","url","Url","replace","type","success","find","x","spreads","forEach","symbolSpread","push","symbol","removeClass","addClass","entityType","css","title","desc","brokerName","window","spreadsString","chargedCommissionAccountType","notChargedCommissionAccountType","description","attr","html","show","UpdateChartBreadcrumb","CURRENT_LANG","CURRENT_CULTURE","InitializeTable","InitializeScrollTable","InitializeTableBody","error","console","log","text","langSlug","replaceWith","lastItem","append","breadcrumbSchema","JSON","parse","Array","isArray","items","@type","position","item","location","href","stringify","on","reload","document","currentTarget","classList","add","history","pushState","queryString","search","canonical","querySelector","b","toLowerCase","includes","val","timeVal","checked","hide","substring","textContent","spreadsConnection","signalR","HubConnectionBuilder","withUrl","configureLogging","LogLevel","Warning","withAutomaticReconnect","build","start","receivingSpreads","cbfBrokerId","rawSpread","rawSpreadVal","sp","standardSpread","standardSpreadVal","commission","symbolType","commissionUSD","toLocaleString","maximumFractionDigits","spread","spreadVal","remove","jQuery","clone","appendTo","width","tooltip","boundary","_default","2","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","minLen","_arrayLikeToArray","toString","slice","from","test","iter","len","arr2","ForexSpreads","jwtToken","tableId","InitialSpreads","initialSymbolNames","initialSelectedSymbols","ids","className","label","selectedBrokers","viewSpreads","brokers","rebateBrokers","premiumBrokers","superPremiumBrokers","sortedSymbol","order","scrollLeft","scrollTop","scrolling","topScrolling","charAt","contentUpdate","symbolIds","typeSymbols","apply","brokerIds","map","CbfBrokerId","data","traditional","GetViewSpreads","UpdateTableContent","ShuffleArray","sort","compA","compB","aSpread","bSpread","MakeFixedHeaderVisible","bros","BrokerName","inVal","s","Name","typeSymbol","Type","Id","filter","tempSpread","index","tsymbol","tspreads","typeSpreads","oneDayAverageSpread","tempSymbolSpread","currentSpread","fourHourAverageSpread","londonSessionAverageSpread","newyorkSessionAverageSpread","oneWeekAverageSpread","sydneySessionAverageSpread","tokyoSessionAverageSpread","reduce","total","next","vspid","findIndex","vspread","array","randomIndex","currentIndex","Math","floor","random","_ref","arguments","dir","screen","spreadInfo","logo","link","tooltipStr","toFixed","body","TableBodyContent","viewSpread","each","v","brokerIdStr","split","localStorage","setItem","InitializePage","modal","stickyTop","offset","top","stickyBottom","height","topOffsetElement","getElementById","offsetHeight","3","SymbolSpreads","refresh","currentUrl","APIHelper","SafeServiceAPICall","spreadA","spreadB","toggle","contains","newSpread","4","_interopRequireDefault","__esModule","default","_ForexSpreads","_ForexBrokerSpreads","_SymbolSpreads","../../includes/ForexBrokerSpreads.js","../../includes/ForexSpreads.js","../../includes/SymbolSpreads.js"],"mappings":"CAAA,WAAY,QAASA,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAE,kBAAmBC,UAASA,OAAQ,KAAIF,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGI,EAAE,MAAOA,GAAEJ,GAAE,EAAI,IAAIK,GAAE,GAAIC,OAAM,uBAAuBN,EAAE,IAAK,MAAMK,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEX,EAAEG,IAAIS,WAAYb,GAAEI,GAAG,GAAGU,KAAKF,EAAEC,QAAQ,SAASd,GAAoB,MAAOI,GAAlBH,EAAEI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AaZ,EAAOf,gBAAgB+N,QAAQ,GAAKpM,EAAaZ,EAAOf,gBAAgB+N,QAAQ,GAAiC,UAA5BpM,EAAaE,OAAOpB,MAAoBkB,EAAaZ,EAAOf,gBAAkB2B,EAAakF,YAAYkH,QAAQ,IAAMpM,EAAaZ,EAAOf,gBAAkB2B,EAAakF,YAAYkH,QAAQ,YAK3eqB,KAELzH,EAAWyH,CACftS,GAAiB,QAAI6K,OAEfmI,GAAG,SAAStT,EAAQU,EAAOJ,GACjC,YAKA,SAASiT,GAAuB3S,GAAO,MAAOA,IAAOA,EAAI4S,WAAa5S,GAAQ6S,QAAW7S,GAHzF,GAAI8S,GAAgBH,EAAuBvT,EAAQ,mCAC/C2T,EAAsBJ,EAAuBvT,EAAQ,yCACrD4T,EAAiBL,EAAuBvT,EAAQ,mCAEpD6F,QAAOuG,aAAesH,EAAuB,QAC7C7N,OAAO/C,mBAAqB6Q,EAA6B,QACzD9N,OAAO+M,cAAgBgB,EAAwB,UAE5CC,uCAAuC,EAAEC,iCAAiC,EAAEC,kCAAkC,SAAS","file":"../spreads.min.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i\");\n $('#symbol-spreads-link').show();\n }\n } else {\n if (tab == \"Commissions\") {\n $(\"#broker-spread-spread-select\").css('display', 'none');\n $(\"#broker-spread-session-select\").css('display', 'none');\n $(\"#commission-checkbox\").css('display', 'none');\n }\n title = myThis.broker.brokerName + \" \" + window.spreadsString[tab];\n desc = window.spreadsString[\"BrokerDetail\" + tab + \"Description\"].replace(\"{0}\", myThis.broker.brokerName);\n }\n $(\"title\").html(title);\n $(\"#broker-spread-name\").html(title);\n $(\"#broker-spread-description\").html(desc);\n myThis.UpdateChartBreadcrumb();\n if (window.CURRENT_LANG != \"ar\") myThis.locale = window.CURRENT_CULTURE;\n myThis.InitializeTable();\n InitializeScrollTable(\"#broker-spread-table\");\n myThis.InitializeTableBody();\n },\n error: function error() {\n console.log(\"Error occured\");\n }\n });\n }\n }, {\n key: \"UpdateChartBreadcrumb\",\n value: function UpdateChartBreadcrumb() {\n var myThis = this;\n var title = $(\"h1\").text();\n var langSlug = \"/\";\n if (window.CURRENT_LANG != 'en') langSlug = \"/\" + window.CURRENT_LANG + \"/\";\n $(\"#site-breadcrumb>.breadcrumb-item:nth-child(4)\").replaceWith('' + $(\"#site-breadcrumb>.breadcrumb-item:nth-child(4)\").text() + '');\n var lastItem = '';\n lastItem += title;\n lastItem += '';\n if ($(\"#site-breadcrumb>.breadcrumb-item:nth-child(5)\").length > 0) {\n $(\"#site-breadcrumb>.breadcrumb-item:nth-child(5)\").replaceWith(lastItem);\n } else {\n $(\"#site-breadcrumb\").append(lastItem);\n }\n if ($('script[type=\"application/ld+json\"]').length == 0) return;\n var breadcrumbSchema = JSON.parse($('script[type=\"application/ld+json\"]').html());\n if (breadcrumbSchema['itemListElement'] && Array.isArray(breadcrumbSchema['itemListElement'])) {\n var items = breadcrumbSchema['itemListElement'];\n if (items.length == 4) {\n items.push({\n '@type': 'ListItem',\n position: 5,\n name: title,\n item: window.location.href\n });\n } else if (items.length > 4) {\n items[4] = {\n '@type': 'ListItem',\n position: 5,\n name: title,\n item: window.location.href\n };\n }\n breadcrumbSchema['name'] = title;\n breadcrumbSchema['numberOfItems'] = 5;\n $('script[type=\"application/ld+json\"]').html(JSON.stringify(breadcrumbSchema));\n }\n }\n }, {\n key: \"InitializeEventTriggers\",\n value: function InitializeEventTriggers() {\n var myThis = this;\n $(window).on('popstate', function (e) {\n location.reload();\n });\n $(document).on('click', '#brokerSpreadsTab div', function (e) {\n $(\"#brokerSpreadsTab div\").removeClass('frn-tab-active');\n e.currentTarget.classList.add('frn-tab-active');\n var tabName = e.currentTarget.id;\n var title = \"\";\n if (tabName == \"spreads-tab\") {\n title = myThis.broker.brokerName + \" \" + window.spreadsString[\"Spreads\"];\n $(\"#broker-spread-name\").html(myThis.broker.brokerName + \" \" + window.spreadsString[\"Spreads\"]);\n $(\"#broker-spread-spread-select\").css('display', 'block');\n $(\"#broker-spread-session-select\").css('display', 'block');\n $(\"#commission-checkbox\").css('display', 'block');\n myThis.tabName = \"Spreads\";\n history.pushState({}, \"\", \"?tab=Spreads\");\n } else if (tabName == \"commissions-tab\") {\n title = myThis.broker.brokerName + \" \" + window.spreadsString[\"Commissions\"];\n $(\"#broker-spread-name\").html(myThis.broker.brokerName + \" \" + window.spreadsString[\"Commissions\"]);\n $(\"#broker-spread-spread-select\").css('display', 'none');\n $(\"#broker-spread-session-select\").css('display', 'none');\n $(\"#commission-checkbox\").css('display', 'none');\n myThis.tabName = \"Commissions\";\n history.pushState({}, \"\", \"?tab=Commissions\");\n } else {\n title = myThis.broker.brokerName + \" Overnight Fees (Swap Rates)\";\n $(\"#broker-spread-name\").html(myThis.broker.brokerName + \" Overnight Fees (Swap Rates)\");\n $(\"#broker-spread-spread-select\").css('display', 'none');\n $(\"#broker-spread-session-select\").css('display', 'none');\n $(\"#commission-checkbox\").css('display', 'none');\n myThis.tabName = \"Swap Rates\";\n history.pushState({}, \"\", \"?tab=SwapRates\");\n }\n var queryString = window.location.search;\n var canonical = document.querySelector(\"link[rel='canonical']\");\n if (canonical) {\n canonical.href = queryString;\n }\n $(\"title\").html(title);\n $(\"#broker-spread-description\").html(window.spreadsString[\"BrokerDetail\" + myThis.tabName + \"Description\"].replace(\"{0}\", myThis.broker.brokerName));\n myThis.UpdateChartBreadcrumb();\n myThis.InitializeTableBody();\n });\n $(document).on('change', 'input[name=query]', function (e) {\n myThis.selectedSymbols = [];\n myThis.symbols.forEach(function (b) {\n if (b.name.toLowerCase().includes(e.target.value.toLowerCase())) {\n myThis.selectedSymbols.push(b);\n }\n });\n if (e.target.value == \"\") {\n myThis.selectedSymbols = myThis.symbols;\n }\n myThis.InitializeTableBody();\n });\n $(document).on('change', 'select[name=time]', function (e) {\n var val = e.target.value;\n myThis.selectedSpread = val;\n myThis.InitializeTableBody();\n });\n $(document).on('change', 'select[name=session]', function (e) {\n var val = e.target.value;\n if (val == \"noSession\") {\n var timeVal = $(\"select[name=time]\").val();\n myThis.selectedSpread = timeVal;\n } else myThis.selectedSpread = val;\n myThis.InitializeTableBody();\n });\n $(document).on('change', '#commission', function (e) {\n myThis.isCommission = e.target.checked;\n myThis.InitializeTableBody();\n });\n $(document).on('click', '#GoToRaw', function (e) {\n history.pushState({}, \"\", \"?typ=1\");\n var queryString = window.location.search;\n var canonical = document.querySelector(\"link[rel='canonical']\");\n if (canonical) {\n canonical.href = queryString;\n }\n $('#meta-div').removeClass('bg-for-brokerspread');\n $('#brokerSpreadsTab').hide();\n $('#broker-spread-name').html(myThis.broker.brokerName + \" \" + (myThis.broker.chargedCommissionAccountType != null ? myThis.broker.chargedCommissionAccountType : \"Raw\") + \" \" + window.spreadsString[\"Spreads\"]);\n $(\"title\").html(myThis.broker.brokerName + \" \" + (myThis.broker.chargedCommissionAccountType != null ? myThis.broker.chargedCommissionAccountType : \"Raw\") + \" \" + window.spreadsString[\"Spreads\"]);\n $('#broker-spread-spread-select').show();\n $('#broker-spread-session-select').show();\n $('#symbol-spreads-link').hide();\n var type = myThis.broker.chargedCommissionAccountType != null ? myThis.broker.chargedCommissionAccountType : \"Raw\";\n var description = \"\";\n if (type != \"Raw\") {\n description = window.spreadsString[\"BrokerSpreadsDescription\"].replace(\"{0}\", myThis.broker.brokerName).replace(\"{1}\", type);\n } else description = window.spreadsString[\"BrokerRawSpreadsDescription\"].replace(\"{0}\", myThis.broker.brokerName);\n $(\"#broker-spread-description\").html(description);\n myThis.accountType = 1;\n myThis.UpdateChartBreadcrumb();\n myThis.InitializeTable();\n myThis.InitializeTableBody();\n });\n $(document).on('click', '#GoToStandard', function (e) {\n history.pushState({}, \"\", \"?typ=0\");\n var queryString = window.location.search;\n var canonical = document.querySelector(\"link[rel='canonical']\");\n if (canonical) {\n canonical.href = queryString;\n }\n $('#meta-div').removeClass('bg-for-brokerspread');\n $('#brokerSpreadsTab').hide();\n $('#broker-spread-name').html(myThis.broker.brokerName + \" \" + (myThis.broker.notChargedCommissionAccountType != null ? myThis.broker.notChargedCommissionAccountType : \"Standard\") + \" \" + window.spreadsString[\"Spreads\"]);\n $(\"title\").html(myThis.broker.brokerName + \" \" + (myThis.broker.notChargedCommissionAccountType != null ? myThis.broker.notChargedCommissionAccountType : \"Standard\") + \" \" + window.spreadsString[\"Spreads\"]);\n $('#broker-spread-spread-select').show();\n $('#broker-spread-session-select').show();\n $('#symbol-spreads-link').hide();\n var type = myThis.broker.notChargedCommissionAccountType != null ? myThis.broker.notChargedCommissionAccountType : \"Raw\";\n var description = \"\";\n if (type != \"Raw\") {\n description = window.spreadsString[\"BrokerSpreadsDescription\"].replace(\"{0}\", myThis.broker.brokerName).replace(\"{1}\", type);\n } else description = window.spreadsString[\"BrokerStandardSpreadsDescription\"].replace(\"{0}\", myThis.broker.brokerName);\n $(\"#broker-spread-description\").html(description);\n myThis.accountType = 0;\n myThis.UpdateChartBreadcrumb();\n myThis.InitializeTable();\n myThis.InitializeTableBody();\n });\n $(document).on('click', '[id^=\"symbol-link\"]', function (e) {\n var symbolId = e.target.id.substring(12);\n var symbolName = e.target.textContent;\n history.pushState({}, \"\", \"?sym=\" + symbolName);\n myThis.symbolId = symbolId;\n myThis.accountType = 2;\n $('#meta-div').removeClass('bg-for-brokerspread');\n $('#brokerSpreadsTab').hide();\n $('#broker-spread-name').html(myThis.broker.brokerName + \" \" + symbolName + \" \" + window.spreadsString[\"Spreads\"]);\n $(\"title\").html(myThis.broker.brokerName + \" \" + symbolName + \" \" + window.spreadsString[\"Spreads\"]);\n $('#broker-spread-spread-select').hide();\n $('#broker-spread-session-select').hide();\n if (myThis.broker.entityType == \"ForexBroker\") $('#symbol-spreads-link a').attr('href', '/tools/forex-broker-spreads/' + symbolName);else $('#symbol-spreads-link a').attr('href', '/tools/prop-firm-spreads/' + symbolName);\n var canonical = document.querySelector(\"link[rel='canonical']\");\n if (canonical) {\n canonical.href = canonical.href + \"?sym=\" + symbolName;\n }\n $('#symbol-spreads-link a').html(\"View all \" + symbolName + \" spreads >\");\n $('#symbol-spreads-link').show();\n $(\"#broker-spread-description\").html(window.spreadsString[\"BrokerSymbolSpreadsDescription\"].replace(\"{0}\", myThis.broker.brokerName).replace(\"{1}\", symbolName));\n myThis.UpdateChartBreadcrumb();\n myThis.InitializeTable();\n myThis.InitializeTableBody();\n });\n var spreadsConnection = new signalR.HubConnectionBuilder().withUrl(myThis.Url('SpreadsUpdateHub')).configureLogging(signalR.LogLevel.Warning).withAutomaticReconnect().build();\n spreadsConnection.start();\n spreadsConnection.on(\"UpdateSpread\", function (receivingSpreads) {\n myThis.rawSpreads = receivingSpreads.find(function (x) {\n return x.broker.cbfBrokerId == myThis.brokerId && x.accountType == 1;\n });\n myThis.standardSpreads = receivingSpreads.find(function (x) {\n return x.broker.cbfBrokerId == myThis.brokerId && x.accountType == 0;\n });\n myThis.InitializeTableBody();\n });\n }\n }, {\n key: \"InitializeTable\",\n value: function InitializeTable() {\n var myThis = this;\n var html = '';\n html += '';\n if (myThis.accountType == 2) {\n if (myThis.symbolId == 0) {\n html += '';\n if (myThis.rawSpreads != undefined) html += \"\";\n if (myThis.standardSpreads != undefined) html += \"\";\n } else {\n html += \"\";\n if (myThis.rawSpreads != undefined) html += \"\";\n if (myThis.standardSpreads != undefined) html += \"\";\n }\n } else {\n html += \"\\n \\n \";\n //html += `\n // \n // `;\n }\n\n html += '';\n html += \"\";\n html += '
' + window.spreadsString[\"Symbol\"] + '\" + (myThis.broker.chargedCommissionAccountType != null ? window.spreadsString[\"SpreadAccount\"].replace(\"{0}\", myThis.broker.chargedCommissionAccountType) : window.spreadsString[\"RawSpreadAccount\"]) + \"\" + (myThis.broker.notChargedCommissionAccountType != null ? window.spreadsString[\"SpreadAccount\"].replace(\"{0}\", myThis.broker.notChargedCommissionAccountType) : window.spreadsString[\"StandardAccount\"]) + \"\" + window.spreadsString[\"Timeframe\"] + \"\" + (myThis.broker.chargedCommissionAccountType != null ? window.spreadsString[\"SpreadAccount\"].replace(\"{0}\", myThis.broker.chargedCommissionAccountType) : window.spreadsString[\"RawSpreadAccount\"]) + \"\" + (myThis.broker.notChargedCommissionAccountType != null ? window.spreadsString[\"SpreadAccount\"].replace(\"{0}\", myThis.broker.notChargedCommissionAccountType) : window.spreadsString[\"StandardAccount\"]) + \"\" + window.spreadsString[\"Symbol\"] + \"\" + window.spreadsString[\"Spread\"] + \"\" + window.spreadsString[\"Commission\"] + \"Swap LongSwap ShortSwap Type
';\n $(\"#broker-spread-table-div\").html(html);\n }\n }, {\n key: \"InitializeTableBody\",\n value: function InitializeTableBody() {\n var myThis = this;\n var html = '';\n if (myThis.symbolId == 0) {\n if (myThis.tabName == \"Swap Rates\" && myThis.accountType == 2) {\n $(\".broker-spread-table thead tr th:not(:first-child)\").attr('colspan', 5);\n $(\"#broker-spread-table-body\").addClass(\"swap-rates-body\");\n html += \"Swap LongSwap ShortSwap Type\";\n html += \"Swap LongSwap ShortSwap Type\";\n } else {\n $(\".broker-spread-table thead tr th:not(:first-child)\").attr('colspan', 1);\n $(\"#broker-spread-table-body\").removeClass(\"swap-rates-body\");\n }\n myThis.selectedSymbols.forEach(function (symbol) {\n var rawSpread = null;\n var rawSpreadVal = -1;\n var brokerId = 0;\n if (myThis.rawSpreads != undefined) {\n brokerId = myThis.rawSpreads.broker.cbfBrokerId;\n var sp = myThis.rawSpreads.spreads.find(function (x) {\n return x.symbol.name == symbol.name;\n });\n rawSpread = sp;\n rawSpreadVal = sp[myThis.selectedSpread];\n }\n var standardSpread = null;\n var standardSpreadVal = -1;\n if (myThis.standardSpreads != undefined) {\n brokerId = myThis.standardSpreads.broker.cbfBrokerId;\n var sp = myThis.standardSpreads.spreads.find(function (x) {\n return x.symbol.name == symbol.name;\n });\n standardSpread = sp;\n standardSpreadVal = sp[myThis.selectedSpread];\n }\n if (standardSpreadVal < 0 && rawSpreadVal < 0) return;\n if (myThis.accountType == 0 && standardSpreadVal < 0) return;\n if (myThis.accountType == 1 && rawSpreadVal < 0) return;\n html += \"\";\n html += \"\" + symbol.name + \"\";\n if (myThis.accountType == 2) {\n if (myThis.tabName != \"Swap Rates\") {\n if (rawSpreadVal < 0) {\n if (myThis.rawSpreads != undefined) html += \"-\";\n } else {\n html += \"\";\n if (myThis.tabName == \"Spreads\") {\n html += \"\";\n } else if (myThis.tabName == \"Commissions\") {\n html += rawSpread.commissionUSD.toLocaleString(myThis.locale, {\n maximumFractionDigits: 2\n }) + \" USD\";\n }\n html += \"\";\n }\n if (standardSpreadVal < 0) {\n if (myThis.standardSpreads != undefined) html += \"-\";\n } else {\n html += \"\";\n if (myThis.tabName == \"Spreads\") {\n html += \"\";\n } else if (myThis.tabName == \"Commissions\") {\n html += \"0\";\n }\n html += \"\";\n }\n } else {\n html += \"---\";\n html += \"---\";\n }\n } else {\n var spread = null;\n var spreadVal = -1;\n if (myThis.accountType == 0) {\n spread = standardSpread;\n spreadVal = standardSpreadVal;\n } else if (myThis.accountType == 1) {\n spread = rawSpread;\n spreadVal = rawSpreadVal;\n }\n if (spreadVal < 0) {\n html += \"--\";\n /*html += `---`;*/\n } else {\n html += \"\";\n html += \"\";\n html += \"\";\n html += \"\" + spread.commissionUSD.toLocaleString(myThis.locale, {\n maximumFractionDigits: 2\n }) + \" USD\";\n /*html += `---`;*/\n }\n }\n\n html += \"\";\n });\n } else {\n var rawSpread = null;\n var brokerId = 0;\n if (myThis.rawSpreads != undefined) {\n brokerId = myThis.rawSpreads.broker.cbfBrokerId;\n var sp = myThis.rawSpreads.spreads.find(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n rawSpread = sp;\n }\n var standardSpread = null;\n if (myThis.standardSpreads != undefined) {\n brokerId = myThis.standardSpreads.broker.cbfBrokerId;\n var sp = myThis.standardSpreads.spreads.find(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n standardSpread = sp;\n }\n myThis.spreadTypes.forEach(function (type) {\n if (type.str == \"\" && type.name == \"\") {\n html += \"\";\n } else {\n html += \"\";\n html += '';\n if (type.code != \"\") {\n html += \"\";\n }\n html += type.str + '';\n if (rawSpread == null) {\n if (myThis.rawSpreads != undefined) html += \"-\";\n } else {\n html += \"\";\n html += \"\";\n html += \"\";\n }\n if (standardSpread == null) {\n if (myThis.standardSpreads != undefined) html += \"-\";\n } else {\n html += \"\";\n html += \"\";\n html += \"\";\n }\n html += \"\";\n }\n });\n }\n InitializeScrollTable(\"#broker-spread-table\");\n $('#broker-spread-table-body').html(html);\n $(\".clone\").remove();\n $(\".fixed-header\").remove();\n jQuery(\"#broker-spread-table\").clone(true).appendTo('.tablescroll').addClass('clone');\n $('.tablescroll').append('
');\n $('#broker-spread-table').clone(true).appendTo('.fixed-header').addClass('clone');\n $('.fixed-header').css('max-width', $('.tablescroll-wrap').width());\n $(\"#broker-spread-table-body [data-toggle=tooltip]\").tooltip('dispose').tooltip({\n boundary: 'window'\n });\n }\n }]);\n return ForexBrokerSpreads;\n}();\nvar _default = ForexBrokerSpreads;\nexports[\"default\"] = _default;\n\n},{}],2:[function(require,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar ForexSpreads = /*#__PURE__*/function () {\n function ForexSpreads(spreadsRoot, jwtToken, tableId) {\n _classCallCheck(this, ForexSpreads);\n this.jwtToken = jwtToken;\n this.spreadsRoot = spreadsRoot;\n this.tableId = tableId;\n this.urls = {\n InitialSpreads: \"/api/initialspreads\",\n GetBrokerSpreads: \"/api/spreads/{id}\",\n SpreadsUpdateHub: \"/spreadsUpdateHub\"\n };\n this.initialSymbolNames = [\"EURUSD\", \"USDJPY\", \"GBPJPY\", \"EURGBP\", \"AUDNZD\", \"CADCHF\", \"BTCUSD\", \"ETHUSD\", \"XAUUSD\", \"XAGUSD\"];\n this.initialSelectedSymbols = [{\n type: \"Crypto\",\n ids: [],\n className: \"crypto-header\",\n label: \"Crypto\"\n }, {\n type: \"Forex\",\n ids: [],\n className: \"forex-header\",\n label: \"Forex\"\n }, {\n type: \"Index\",\n ids: [],\n className: \"index-header\",\n label: \"Indices\"\n }, {\n type: \"Commodity\",\n ids: [],\n className: \"commodity-header\",\n label: \"Commodities\"\n }];\n this.selectedSymbols = [{\n type: \"Crypto\",\n ids: [],\n className: \"crypto-header\",\n label: \"Crypto\"\n }, {\n type: \"Forex\",\n ids: [],\n className: \"forex-header\",\n label: \"Forex\"\n }, {\n type: \"Index\",\n ids: [],\n className: \"index-header\",\n label: \"Indices\"\n }, {\n type: \"Commodity\",\n ids: [],\n className: \"commodity-header\",\n label: \"Commodities\"\n }];\n this.selectedBrokers = [];\n this.spreads = [];\n this.viewSpreads = [];\n this.symbols = [];\n this.brokers = {};\n this.rebateBrokers = [];\n this.premiumBrokers = [];\n this.superPremiumBrokers = [];\n this.selectedSpread = \"oneDayAverageSpread\";\n this.isCommission = true;\n this.sortedSymbol = {\n symbolId: -5,\n order: 1\n };\n this.scrollLeft = 0;\n this.scrollTop = 0;\n this.scrolling = false;\n this.topScrolling = false;\n this.entityType = \"ForexBroker\";\n }\n _createClass(ForexSpreads, [{\n key: \"Url\",\n value: function Url(key) {\n return this.spreadsRoot + this.urls[key];\n }\n }, {\n key: \"ToLowerFirstLetter\",\n value: function ToLowerFirstLetter(str) {\n if (!str) return str; // Handle empty or null strings\n return str.charAt(0).toLowerCase() + str.slice(1);\n }\n }, {\n key: \"InitializePage\",\n value: function InitializePage(entityType, contentUpdate) {\n var myThis = this;\n var symbolIds = [];\n myThis.selectedSymbols.forEach(function (typeSymbols) {\n symbolIds.push.apply(symbolIds, _toConsumableArray(typeSymbols.ids));\n });\n var brokerIds = [];\n brokerIds = myThis.selectedBrokers.map(function (x) {\n return x.CbfBrokerId;\n });\n $.ajax({\n url: myThis.Url('InitialSpreads'),\n data: {\n symbolIds: symbolIds,\n brokerIds: brokerIds,\n entityType: entityType\n },\n type: \"GET\",\n traditional: true,\n success: function success(res) {\n myThis.entityType = entityType;\n myThis.spreads = res;\n if (contentUpdate == 0) myThis.InitializeTable(contentUpdate);\n if ($('#spreads-table-body-' + myThis.tableId) && myThis.spreads.length > 0) {\n InitializeScrollTable(\"#spreads-table-\" + myThis.tableId);\n myThis.GetViewSpreads(contentUpdate);\n if (contentUpdate == 1) {\n myThis.UpdateTableContent();\n } else {\n if (myThis.sortedSymbol[\"symbolId\"] == -5 && contentUpdate == 0) {\n myThis.ShuffleArray(myThis.viewSpreads);\n } else if (myThis.sortedSymbol[\"symbolId\"] != -5) {\n myThis.viewSpreads.sort(function (a, b) {\n var compA = a.broker.brokerName;\n var compB = b.broker.brokerName;\n if (myThis.sortedSymbol[\"symbolId\"] != 0) {\n var aSpread = a.spreads.find(function (x) {\n return x.symbol.id == myThis.sortedSymbol[\"symbolId\"];\n });\n var bSpread = b.spreads.find(function (x) {\n return x.symbol.id == myThis.sortedSymbol[\"symbolId\"];\n });\n compA = aSpread[myThis.selectedSpread];\n compB = bSpread[myThis.selectedSpread];\n if (myThis.sortedSymbol[\"order\"] == 1) {\n if (compA < 0) compA = 10000000;\n if (compB < 0) compB = 10000000;\n }\n if (myThis.isCommission == true) {\n compA += aSpread.commission;\n compB += bSpread.commission;\n }\n }\n if (compA < compB) {\n return -1 * myThis.sortedSymbol[\"order\"];\n }\n if (compA > compB) {\n return 1 * myThis.sortedSymbol[\"order\"];\n }\n return 0;\n });\n }\n myThis.InitializeTableBody(myThis.viewSpreads);\n $(\"#spreads-table-\" + myThis.tableId + \".clone\").remove();\n $(\"#spreads-table-div-\" + myThis.tableId + \" .fixed-header\").remove();\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header\").remove();\n jQuery(\"#spreads-table-\" + myThis.tableId).clone(true).appendTo('#spreads-table-div-' + myThis.tableId + ' .tablescroll').addClass('clone');\n $('#spreads-table-div-' + myThis.tableId + ' .tablescroll').append('
');\n $('#spreads-table-' + myThis.tableId).clone(true).appendTo('#spreads-table-div-' + myThis.tableId + ' .fixed-header').addClass('clone');\n $('#spreads-table-div-' + myThis.tableId + ' .fixed-header').css('max-width', $('#spreads-table-div-' + myThis.tableId + ' .tablescroll-wrap').width());\n $('#spreads-table-div-' + myThis.tableId + ' .tablescroll').append('
');\n $('#spreads-table-' + myThis.tableId).clone(true).appendTo('#spreads-table-div-' + myThis.tableId + ' .scroll-fixed-header').addClass('clone');\n $('#spreads-table-div-' + myThis.tableId + ' .scroll-fixed-header').css('max-width', $('#spreads-table-div-' + myThis.tableId + ' .tablescroll-wrap').width());\n myThis.MakeFixedHeaderVisible();\n }\n }\n },\n error: function error() {\n console.log(\"Error occured\");\n }\n });\n }\n }, {\n key: \"InitializeEventTriggers\",\n value: function InitializeEventTriggers(entityType) {\n var myThis = this;\n $(document).on('change', '#spreads-query-form-' + myThis.tableId + ' input[name=search]', function (e) {\n var val = $(\"#spreads-query-form-\" + myThis.tableId + \" select[name=brokertype\").val();\n var bros = [];\n if (val == 0) bros = myThis.brokers;else bros = myThis.rebateBrokers;\n myThis.selectedBrokers = [];\n bros.forEach(function (b) {\n if (b.BrokerName.toLowerCase().includes(e.target.value.toLowerCase())) {\n myThis.selectedBrokers.push(b);\n }\n });\n if (e.target.value == \"\") {\n myThis.selectedBrokers = bros;\n }\n myThis.InitializeTable();\n });\n $(document).on('change', '#spreads-query-form-' + myThis.tableId + ' select[name=brokertype]', function (e) {\n var val = e.target.value;\n var bros = [];\n if (val == 0) bros = myThis.brokers;else bros = myThis.rebateBrokers;\n var inVal = $('#spreads-query-form-' + myThis.tableId + ' input[name=search]').val();\n if (inVal == \"\") {\n myThis.selectedBrokers = bros;\n } else {\n myThis.selectedBrokers = [];\n bros.forEach(function (b) {\n if (b.BrokerName.toLowerCase().includes(inVal.toLowerCase())) {\n myThis.selectedBrokers.push(b);\n }\n });\n }\n myThis.InitializeTable();\n });\n $(document).on('change', '#spreads-query-form-' + myThis.tableId + ' select[name=time]', function (e) {\n var val = e.target.value;\n myThis.selectedSpread = val;\n myThis.InitializeTable();\n });\n $(document).on('change', '#spreads-query-form-' + myThis.tableId + ' select[name=session]', function (e) {\n var val = e.target.value;\n if (val == \"noSession\") {\n var timeVal = $('#spreads-query-form-' + myThis.tableId + ' select[name=time]').val();\n myThis.selectedSpread = timeVal;\n } else myThis.selectedSpread = val;\n myThis.InitializeTable();\n });\n $(document).on('change', '#spreads-filter-dialog-' + myThis.tableId + ' #symbol-ul-' + myThis.tableId + ' li input[type=checkbox]', function (e) {\n if (e.target.checked == true) {\n var symbol = myThis.symbols.find(function (s) {\n return s.Name == e.target.name;\n });\n var typeSymbol = myThis.selectedSymbols.find(function (x) {\n return x.type == symbol.Type;\n });\n if (!typeSymbol.ids.includes(symbol.Id)) typeSymbol.ids.push(symbol.Id);\n } else {\n var symbol = myThis.symbols.find(function (s) {\n return s.Name == e.target.name;\n });\n var typeSymbols = myThis.selectedSymbols.find(function (x) {\n return x.type == symbol.Type;\n });\n typeSymbols.ids = typeSymbols.ids.filter(function (x) {\n return x != symbol.Id;\n });\n }\n });\n $(document).on('change', '#commission-' + myThis.tableId, function (e) {\n myThis.isCommission = e.target.checked;\n myThis.InitializeTable();\n });\n $(document).on('scroll', function (e) {\n myThis.MakeFixedHeaderVisible();\n });\n var spreadsConnection = new signalR.HubConnectionBuilder().withUrl(myThis.Url('SpreadsUpdateHub')).configureLogging(signalR.LogLevel.Warning).withAutomaticReconnect().build();\n spreadsConnection.start();\n spreadsConnection.on(\"UpdateSpread\", function (receivingSpreads) {\n myThis.spreads = receivingSpreads.filter(function (x) {\n return x.broker.entityType == myThis.entityType;\n });\n myThis.GetViewSpreads(1);\n myThis.UpdateTableContent();\n });\n }\n }, {\n key: \"GetViewSpreads\",\n value: function GetViewSpreads(contentUpdate) {\n var myThis = this;\n if (contentUpdate == 0) myThis.viewSpreads = [];\n myThis.spreads.forEach(function (spread) {\n var tempSpread = {};\n tempSpread.accountType = spread.accountType;\n tempSpread.broker = spread.broker;\n tempSpread.spreads = [];\n myThis.selectedSymbols.forEach(function (typeSymbols, index) {\n typeSymbols.ids.forEach(function (tsymbol) {\n var symbolSpread = spread.spreads.find(function (x) {\n return x.symbol.id == tsymbol;\n });\n if (symbolSpread) tempSpread.spreads.push(symbolSpread);\n });\n var symbolType = typeSymbols.type;\n var tspreads = tempSpread.spreads.filter(function (sp) {\n return sp.symbolType == symbolType;\n });\n if (tspreads.length == 0) return;\n var typeSpreads = tempSpread.spreads.filter(function (sp) {\n return sp.symbolType == symbolType && sp.oneDayAverageSpread >= 0;\n });\n var tempSymbolSpread = {\n accountType: spread.spreads[0].accountType,\n commission: -1,\n commissionUSD: -1,\n currentSpread: -1,\n fourHourAverageSpread: -1,\n londonSessionAverageSpread: -1,\n newyorkSessionAverageSpread: -1,\n oneDayAverageSpread: -1,\n oneWeekAverageSpread: -1,\n sydneySessionAverageSpread: -1,\n tokyoSessionAverageSpread: -1,\n symbol: {\n id: -1 * (index + 1),\n name: symbolType + \"Avg\",\n description: \"Average of \" + symbolType + \"s\",\n type: symbolType + \"Avg\"\n },\n symbolType: symbolType + \"Avg\"\n };\n if (typeSpreads.length == tspreads.length) {\n tempSymbolSpread = {\n accountType: spread.spreads[0].accountType,\n commission: typeSpreads.reduce(function (total, next) {\n return total + next.commission;\n }, 0) / typeSpreads.length,\n commissionUSD: typeSpreads.reduce(function (total, next) {\n return total + next.commissionUSD;\n }, 0) / typeSpreads.length,\n currentSpread: typeSpreads.reduce(function (total, next) {\n return total + next.currentSpread;\n }, 0) / typeSpreads.length,\n fourHourAverageSpread: typeSpreads.reduce(function (total, next) {\n return total + next.fourHourAverageSpread;\n }, 0) / typeSpreads.length,\n londonSessionAverageSpread: typeSpreads.reduce(function (total, next) {\n return total + next.londonSessionAverageSpread;\n }, 0) / typeSpreads.length,\n newyorkSessionAverageSpread: typeSpreads.reduce(function (total, next) {\n return total + next.newyorkSessionAverageSpread;\n }, 0) / typeSpreads.length,\n oneDayAverageSpread: typeSpreads.reduce(function (total, next) {\n return total + next.oneDayAverageSpread;\n }, 0) / typeSpreads.length,\n oneWeekAverageSpread: typeSpreads.reduce(function (total, next) {\n return total + next.oneWeekAverageSpread;\n }, 0) / typeSpreads.length,\n sydneySessionAverageSpread: typeSpreads.reduce(function (total, next) {\n return total + next.sydneySessionAverageSpread;\n }, 0) / typeSpreads.length,\n tokyoSessionAverageSpread: typeSpreads.reduce(function (total, next) {\n return total + next.tokyoSessionAverageSpread;\n }, 0) / typeSpreads.length,\n symbol: {\n id: -1 * (index + 1),\n name: symbolType + \"Avg\",\n description: \"Average of \" + symbolType + \"s\",\n type: symbolType + \"Avg\"\n },\n symbolType: symbolType + \"Avg\"\n };\n }\n tempSpread.spreads.push(tempSymbolSpread);\n });\n if (contentUpdate == 0) myThis.viewSpreads.push(tempSpread);else {\n var vspid = myThis.viewSpreads.findIndex(function (vspread) {\n return vspread.broker.cbfBrokerId == tempSpread.broker.cbfBrokerId && vspread.accountType == tempSpread.accountType;\n });\n myThis.viewSpreads[vspid] = tempSpread;\n }\n });\n }\n }, {\n key: \"ShuffleArray\",\n value: function ShuffleArray(array) {\n var currentIndex = array.length,\n randomIndex;\n\n // While there remain elements to shuffle.\n while (currentIndex > 0) {\n // Pick a remaining element.\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex--;\n\n // And swap it with the current element.\n var _ref = [array[randomIndex], array[currentIndex]];\n array[currentIndex] = _ref[0];\n array[randomIndex] = _ref[1];\n }\n return array;\n }\n }, {\n key: \"InitializeTable\",\n value: function InitializeTable() {\n var contentUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var dir = $('html').attr(\"dir\");\n var myThis = this;\n var html = \"\";\n html += \"\";\n myThis.selectedSymbols.forEach(function (typeSymbols, index) {\n if (typeSymbols.ids.length > 0) {\n html += \"\";\n }\n });\n html += \"\";\n myThis.selectedSymbols.forEach(function (typeSymbols, index) {\n typeSymbols.ids.forEach(function (tsymbol) {\n var symbol = myThis.symbols.find(function (x) {\n return x.Id == tsymbol;\n });\n html += \"\";\n });\n if (typeSymbols.ids.length > 0) html += \"\";\n });\n html += \"\";\n html += \"\";\n html += \"\";\n html += \"
\" + window.spreadsString[\"Brokers\"] + (myThis.sortedSymbol[\"symbolId\"] == 0 ? myThis.sortedSymbol[\"order\"] == 1 ? \"\" : \"\" : \"\") + \"\" + window.spreadsString[typeSymbols.label] + \"
\" + symbol.Name + (symbol.Id == myThis.sortedSymbol[\"symbolId\"] ? myThis.sortedSymbol[\"order\"] == 1 ? \"\" : \"\" : \"\") + \"\" + window.spreadsString[\"Average\"] + (-1 * (index + 1) == myThis.sortedSymbol[\"symbolId\"] ? myThis.sortedSymbol[\"order\"] == 1 ? \"\" : \"\" : \"\") + \"
\";\n $('#spreads-table-div-' + myThis.tableId).html(html);\n $('#spreads-table-loader-' + myThis.tableId).css('display', 'flex');\n if (myThis.spreads.length > 0) {\n myThis.GetViewSpreads(contentUpdate);\n if (myThis.sortedSymbol[\"symbolId\"] == -5) {\n myThis.ShuffleArray(myThis.viewSpreads);\n } else {\n myThis.viewSpreads.sort(function (a, b) {\n var compA = a.broker.brokerName;\n var compB = b.broker.brokerName;\n if (myThis.sortedSymbol[\"symbolId\"] != 0) {\n var aSpread = a.spreads.find(function (x) {\n return x.symbol.id == myThis.sortedSymbol[\"symbolId\"];\n });\n var bSpread = b.spreads.find(function (x) {\n return x.symbol.id == myThis.sortedSymbol[\"symbolId\"];\n });\n compA = aSpread[myThis.selectedSpread];\n compB = bSpread[myThis.selectedSpread];\n if (myThis.sortedSymbol[\"order\"] == 1) {\n if (compA < 0) compA = 10000000;\n if (compB < 0) compB = 10000000;\n }\n if (myThis.isCommission == true) {\n compA += aSpread.commission;\n compB += bSpread.commission;\n }\n }\n if (compA < compB) {\n return -1 * myThis.sortedSymbol[\"order\"];\n }\n if (compA > compB) {\n return 1 * myThis.sortedSymbol[\"order\"];\n }\n return 0;\n });\n }\n InitializeScrollTable(\"#spreads-table-\" + myThis.tableId);\n myThis.InitializeTableBody(myThis.viewSpreads);\n $(\"#spreads-table-\" + myThis.tableId + \".clone\").remove();\n $(\"#spreads-table-div-\" + myThis.tableId + \" .fixed-header\").remove();\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header\").remove();\n jQuery(\"#spreads-table-\" + myThis.tableId).clone(true).appendTo('#spreads-table-div-' + myThis.tableId + ' .tablescroll').addClass('clone');\n $('#spreads-table-div-' + myThis.tableId + ' .tablescroll').append('
');\n $('#spreads-table-' + myThis.tableId).clone(true).appendTo('#spreads-table-div-' + myThis.tableId + ' .fixed-header').addClass('clone');\n $('#spreads-table-div-' + myThis.tableId + ' .fixed-header').css('max-width', $('#spreads-table-div-' + myThis.tableId + ' .tablescroll-wrap').width());\n $('#spreads-table-div-' + myThis.tableId + ' .tablescroll').append('
');\n $('#spreads-table-' + myThis.tableId).clone(true).appendTo('#spreads-table-div-' + myThis.tableId + ' .scroll-fixed-header').addClass('clone');\n $('#spreads-table-div-' + myThis.tableId + ' .scroll-fixed-header').css('max-width', $('#spreads-table-div-' + myThis.tableId + ' .tablescroll-wrap').width());\n var dir = $(\"html\").attr(\"dir\");\n if (dir == \"rtl\" && screen.width < 425) {\n $('#spreads-table-div-' + myThis.tableId + ' .clone').css('right', $('#spreads-table-div-' + myThis.tableId + ' .clone').width() - $('#spreads-table-div-' + myThis.tableId + ' .tablescroll-wrap').width());\n }\n if (myThis.scrolling == true) {\n $('#spreads-table-div-' + myThis.tableId + ' .tablescroll-wrap').scrollLeft(myThis.scrollLeft);\n $('#spreads-table-div-' + myThis.tableId + ' .scroll-fixed-header').scrollLeft(myThis.scrollLeft);\n myThis.scrolling = false;\n }\n myThis.MakeFixedHeaderVisible();\n }\n }\n }, {\n key: \"TableBodyContent\",\n value: function TableBodyContent(brokerId, spreadInfo, className) {\n var dir = $(\"html\").attr(\"dir\");\n var langSlug = window.CURRENT_LANG == \"en\" ? \"\" : \"/\" + window.CURRENT_LANG;\n var myThis = this;\n var html = \"\";\n html += \"\";\n spreadInfo.spreads.forEach(function (symbolSpread) {\n var spread = symbolSpread[myThis.selectedSpread];\n var className = myThis.isCommission == true && symbolSpread.commission > 0 && spread >= 0 ? \"dotted-border-bottom\" : \"\";\n var tooltipStr = myThis.isCommission == true && symbolSpread.commission > 0 && spread >= 0 ? window.spreadsString[\"HasCommission\"].replace(\"{0}\", symbolSpread.commissionUSD.toFixed(2)) : window.spreadsString[\"NoCommission\"];\n html += \"\";\n html += \"\";\n });\n html += \"\";\n return html;\n }\n }, {\n key: \"InitializeTableBody\",\n value: function InitializeTableBody(body) {\n var myThis = this;\n $('#spreads-table-loader-' + myThis.tableId).css('display', 'none');\n var html = '';\n body.forEach(function (spreadInfo) {\n var brokerId = spreadInfo.broker.cbfBrokerId;\n if (myThis.selectedBrokers.findIndex(function (x) {\n return x.CbfBrokerId == brokerId;\n }) >= 0 && myThis.superPremiumBrokers.findIndex(function (x) {\n return x.CbfBrokerId == brokerId;\n }) >= 0) {\n html += myThis.TableBodyContent(brokerId, spreadInfo, \"superpremium\");\n }\n });\n body.forEach(function (spreadInfo) {\n var brokerId = spreadInfo.broker.cbfBrokerId;\n if (myThis.selectedBrokers.findIndex(function (x) {\n return x.CbfBrokerId == brokerId;\n }) >= 0 && myThis.superPremiumBrokers.findIndex(function (x) {\n return x.CbfBrokerId == brokerId;\n }) < 0 && myThis.premiumBrokers.findIndex(function (x) {\n return x.CbfBrokerId == brokerId;\n }) >= 0) {\n html += myThis.TableBodyContent(brokerId, spreadInfo, \"premium\");\n }\n });\n body.forEach(function (spreadInfo) {\n var brokerId = spreadInfo.broker.cbfBrokerId;\n if (myThis.selectedBrokers.findIndex(function (x) {\n return x.CbfBrokerId == brokerId;\n }) >= 0 && myThis.superPremiumBrokers.findIndex(function (x) {\n return x.CbfBrokerId == brokerId;\n }) < 0 && myThis.premiumBrokers.findIndex(function (x) {\n return x.CbfBrokerId == brokerId;\n }) < 0) {\n html += myThis.TableBodyContent(brokerId, spreadInfo, \"\");\n }\n });\n $('#spreads-table-body-' + myThis.tableId).html(html);\n $('#spreads-table-div-' + myThis.tableId + ' [data-toggle=tooltip]').tooltip({\n boundary: 'window'\n });\n if (myThis.topScrolling == true) {\n $(document).scrollTop(myThis.scrollTop);\n myThis.topScrolling = false;\n }\n }\n }, {\n key: \"UpdateTableContent\",\n value: function UpdateTableContent() {\n var myThis = this;\n myThis.viewSpreads.forEach(function (viewSpread) {\n var brokerId = viewSpread.broker.cbfBrokerId;\n var accountType = viewSpread.accountType;\n viewSpread.spreads.forEach(function (symbolSpread) {\n var symbolId = symbolSpread.symbol.id;\n $(\"#Broker\" + brokerId + \"-\" + accountType + \"Symbol\" + symbolId + \" label\").html(symbolSpread[myThis.selectedSpread] < -1e-7 ? \"-\" : myThis.isCommission == false ? symbolSpread.symbol.name == \"XAGUSD\" ? symbolSpread[myThis.selectedSpread].toFixed(3) : symbolSpread[myThis.selectedSpread].toFixed(2) : symbolSpread.symbol.name == \"XAGUSD\" ? (symbolSpread[myThis.selectedSpread] + symbolSpread.commission).toFixed(3) : (symbolSpread[myThis.selectedSpread] + symbolSpread.commission).toFixed(2));\n });\n });\n }\n }, {\n key: \"ApplySpreadsFilter\",\n value: function ApplySpreadsFilter(type) {\n var myThis = this;\n myThis.selectedBrokers = [];\n var brokers = $(\"#spreads-filter-dialog-\" + myThis.tableId + \" #broker-ul-\" + myThis.tableId + \" li input:checked\");\n brokers.each(function (i, v) {\n var b = {};\n var brokerIdStr = v.id.split('-');\n var cbfBrokerId = brokerIdStr[1];\n b[\"CbfBrokerId\"] = Number(cbfBrokerId);\n b[\"BrokerName\"] = v.name;\n myThis.selectedBrokers.push(b);\n });\n if (type == 'tool') {\n var uncheckedBrokers = $(\"#spreads-filter-dialog-\" + myThis.tableId + \" #broker-ul-\" + myThis.tableId + \" li input:not(:checked)\");\n if (uncheckedBrokers.length == 0) localStorage.setItem('selectedBrokers', 'All');else localStorage.setItem('selectedBrokers', JSON.stringify(myThis.selectedBrokers));\n localStorage.setItem('selectedSymbols', JSON.stringify(myThis.selectedSymbols));\n }\n myThis.InitializePage(myThis.entityType, 0);\n $('#spreads-filter-dialog-' + myThis.tableId).modal('hide');\n }\n }, {\n key: \"MakeFixedHeaderVisible\",\n value: function MakeFixedHeaderVisible() {\n var myThis = this;\n var scrollTop = $(document).scrollTop();\n if ($(\"#spreads-table-div-\" + myThis.tableId + \" .tablescroll-wrap\").length > 0) {\n var stickyTop = $(\"#spreads-table-div-\" + myThis.tableId + \" .tablescroll-wrap\").offset().top;\n var stickyBottom = $(\"#spreads-table-div-\" + myThis.tableId + \" .tablescroll-wrap\").offset().top + $(\"#spreads-table-div-\" + myThis.tableId + \" .tablescroll-wrap\").height();\n if (scrollTop > stickyTop + 42) {\n $(\"#spreads-table-div-\" + myThis.tableId + \" .fixed-header\").css('display', 'block');\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header\").css('display', 'block');\n var topOffsetElement = document.getElementById('topmenu-logo');\n if (topOffsetElement !== null) {\n $(\"#spreads-table-div-\" + myThis.tableId + \" .fixed-header\").css('top', topOffsetElement.offsetHeight);\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header\").css('top', topOffsetElement.offsetHeight);\n }\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header table thead tr:first-child th:not(:first-child)\").addClass('visible');\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header table thead tr:not(:first-child) th\").addClass('visible');\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header\").scrollLeft($(\"#spreads-table-div-\" + myThis.tableId + \" .tablescroll-wrap\").scrollLeft());\n } else {\n $(\"#spreads-table-div-\" + myThis.tableId + \" .fixed-header\").css('display', 'none');\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header\").css('display', 'none');\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header table thead tr:first-child th:not(:first-child)\").removeClass('visible');\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header table thead tr:not(:first-child) th\").removeClass('visible');\n }\n if (scrollTop > stickyBottom - 42) {\n $(\"#spreads-table-div-\" + myThis.tableId + \" .fixed-header\").css('display', 'none');\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header\").css('display', 'none');\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header table thead tr:first-child th:not(:first-child)\").removeClass('visible');\n $(\"#spreads-table-div-\" + myThis.tableId + \" .scroll-fixed-header table thead tr:not(:first-child) th\").removeClass('visible');\n }\n }\n }\n }]);\n return ForexSpreads;\n}();\nvar _default = ForexSpreads;\nexports[\"default\"] = _default;\n\n},{}],3:[function(require,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar SymbolSpreads = /*#__PURE__*/function () {\n function SymbolSpreads(spreadsRoot, symbolId) {\n _classCallCheck(this, SymbolSpreads);\n this.spreadsRoot = spreadsRoot;\n this.urls = {\n InitialSpreads: \"/api/initialspreads\",\n SpreadsUpdateHub: \"/spreadsUpdateHub\"\n };\n this.spreads = [];\n this.brokers = [];\n this.selectedSpread = \"oneDayAverageSpread\";\n this.isCommission = true;\n this.selectedBrokers = [];\n this.symbolId = symbolId;\n this.urlSlug = \"forex-broker-spreads\";\n this.sort = -1;\n }\n _createClass(SymbolSpreads, [{\n key: \"Url\",\n value: function Url(key) {\n return this.spreadsRoot + this.urls[key];\n }\n }, {\n key: \"InitializePage\",\n value: function InitializePage(refresh) {\n var currentUrl = window.location.href;\n var entityType = \"ForexBroker\";\n var myThis = this;\n if (currentUrl.includes(\"forex-broker-spreads\")) {\n entityType = \"ForexBroker\";\n myThis.urlSlug = \"forex-broker-spreads\";\n } else {\n entityType = \"ProprietaryTradingFirm\";\n myThis.urlSlug = \"prop-firm-spreads\";\n }\n window.APIHelper.SafeServiceAPICall({\n url: myThis.Url('InitialSpreads'),\n data: {\n symbolIds: [myThis.symbolId],\n brokerIds: [],\n entityType: entityType\n },\n traditional: true,\n type: \"GET\",\n success: function success(res) {\n myThis.spreads = res;\n res.forEach(function (spread) {\n myThis.brokers.push(spread.broker);\n });\n myThis.selectedBrokers = myThis.brokers;\n myThis.spreads.sort(function (a, b) {\n var spreadA = a.spreads.find(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n var spreadB = b.spreads.find(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n var compA = myThis.isCommission == false ? spreadA[myThis.selectedSpread] : spreadA[myThis.selectedSpread] + spreadA.commission;\n var compB = myThis.isCommission == false ? spreadB[myThis.selectedSpread] : spreadB[myThis.selectedSpread] + spreadB.commission;\n if (compA < compB) return 1 * myThis.sort;else if (compA > compB) return -1 * myThis.sort;\n return 0;\n });\n myThis.InitializeTableBody();\n },\n error: function error() {\n console.log(\"Error occured\");\n }\n });\n }\n }, {\n key: \"InitializeEventTriggers\",\n value: function InitializeEventTriggers() {\n var myThis = this;\n $(document).on('change', 'input[name=search]', function (e) {\n var bros = myThis.brokers;\n myThis.selectedBrokers = [];\n bros.forEach(function (b) {\n if (b.BrokerName.toLowerCase().includes(e.target.value.toLowerCase())) {\n myThis.selectedBrokers.push(b);\n }\n });\n if (e.target.value == \"\") {\n myThis.selectedBrokers = bros;\n }\n myThis.InitializeTableBody();\n });\n $(document).on('change', 'select[name=time]', function (e) {\n var val = e.target.value;\n myThis.selectedSpread = val;\n myThis.InitializeTableBody();\n });\n $(document).on('change', 'select[name=session]', function (e) {\n var val = e.target.value;\n if (val == \"noSession\") {\n var timeVal = $(\"select[name=time]\").val();\n myThis.selectedSpread = timeVal;\n } else myThis.selectedSpread = val;\n myThis.InitializeTableBody();\n });\n $(document).on('change', '#commission', function (e) {\n myThis.isCommission = e.target.checked;\n myThis.InitializeTableBody();\n });\n $(document).on('click', '#spreadTh', function (e) {\n if (e.target.classList.length == 1) {\n e.target.classList.add(\"asce\");\n myThis.sort = -1;\n } else {\n e.target.classList.toggle(\"desc\");\n e.target.classList.toggle(\"asce\");\n if (e.target.classList.contains(\"desc\")) myThis.sort = 1;else myThis.sort = -1;\n }\n myThis.spreads.sort(function (a, b) {\n var spreadA = a.spreads.find(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n var spreadB = b.spreads.find(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n var compA = myThis.isCommission == false ? spreadA[myThis.selectedSpread] : spreadA[myThis.selectedSpread] + spreadA.commission;\n var compB = myThis.isCommission == false ? spreadB[myThis.selectedSpread] : spreadB[myThis.selectedSpread] + spreadB.commission;\n if (compA < compB) return 1 * myThis.sort;else if (compA > compB) return -1 * myThis.sort;\n return 0;\n });\n myThis.InitializeTableBody();\n });\n var spreadsConnection = new signalR.HubConnectionBuilder().withUrl(myThis.Url('SpreadsUpdateHub')).configureLogging(signalR.LogLevel.Warning).withAutomaticReconnect().build();\n spreadsConnection.start();\n spreadsConnection.on(\"UpdateSpread\", function (receivingSpreads) {\n myThis.spreads.forEach(function (spread) {\n var newSpread = receivingSpreads.find(function (x) {\n return x.broker.cbfBrokerId == spread.broker.cbfBrokerId;\n });\n newSpread.spreads = newSpread.spreads.filter(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n if (newSpread != null) {\n spread.spreads = newSpread.spreads;\n }\n });\n myThis.UpdateTableContent();\n });\n }\n }, {\n key: \"InitializeTableBody\",\n value: function InitializeTableBody() {\n $('#spreads-table-loader').css('display', 'none');\n var myThis = this;\n var html = '';\n myThis.spreads.sort(function (a, b) {\n var spreadA = a.spreads.find(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n var spreadB = b.spreads.find(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n var compA = myThis.isCommission == false ? spreadA[myThis.selectedSpread] : spreadA[myThis.selectedSpread] + spreadA.commission;\n var compB = myThis.isCommission == false ? spreadB[myThis.selectedSpread] : spreadB[myThis.selectedSpread] + spreadB.commission;\n if (compA < compB) return 1 * myThis.sort;else if (compA > compB) return -1 * myThis.sort;\n return 0;\n });\n myThis.spreads.forEach(function (spreadInfo) {\n var brokerId = spreadInfo.broker.cbfBrokerId;\n if (myThis.selectedBrokers.findIndex(function (x) {\n return x.cbfBrokerId == brokerId;\n }) >= 0) {\n var spread = spreadInfo.spreads.find(function (x) {\n return x.symbol.id == myThis.symbolId;\n });\n html += \"\";\n html += \"
\" + spreadInfo.broker.brokerName + \"\" + \"
\";\n html += \"\";\n html += \"\";\n html += \"\";\n html += \"\";\n }\n });\n $('#symbol-spread-table-body').html(html);\n $(\"#spreads-table-div [data-toggle=tooltip]\").tooltip('dispose').tooltip({\n boundary: 'window'\n });\n }\n }, {\n key: \"UpdateTableContent\",\n value: function UpdateTableContent() {\n var myThis = this;\n myThis.spreads.forEach(function (spreadInfo) {\n var brokerId = spreadInfo.broker.cbfBrokerId;\n var accountType = spreadInfo.accountType;\n spreadInfo.spreads.forEach(function (symbolSpread) {\n var symbolId = symbolSpread.symbol.id;\n $(\"#Broker\" + brokerId + \"-\" + accountType + \"Symbol\" + symbolId + \" label\").html(symbolSpread[myThis.selectedSpread] < -1e-7 ? \"-\" : myThis.isCommission == false ? symbolSpread.symbol.name == \"XAGUSD\" ? symbolSpread[myThis.selectedSpread].toFixed(3) : symbolSpread[myThis.selectedSpread].toFixed(2) : symbolSpread.symbol.name == \"XAGUSD\" ? (symbolSpread[myThis.selectedSpread] + symbolSpread.commission).toFixed(3) : (symbolSpread[myThis.selectedSpread] + symbolSpread.commission).toFixed(2));\n });\n });\n }\n }]);\n return SymbolSpreads;\n}();\nvar _default = SymbolSpreads;\nexports[\"default\"] = _default;\n\n},{}],4:[function(require,module,exports){\n'use strict';\n\nvar _ForexSpreads = _interopRequireDefault(require(\"../../includes/ForexSpreads.js\"));\nvar _ForexBrokerSpreads = _interopRequireDefault(require(\"../../includes/ForexBrokerSpreads.js\"));\nvar _SymbolSpreads = _interopRequireDefault(require(\"../../includes/SymbolSpreads.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nwindow.ForexSpreads = _ForexSpreads[\"default\"];\nwindow.ForexBrokerSpreads = _ForexBrokerSpreads[\"default\"];\nwindow.SymbolSpreads = _SymbolSpreads[\"default\"];\n\n},{\"../../includes/ForexBrokerSpreads.js\":1,\"../../includes/ForexSpreads.js\":2,\"../../includes/SymbolSpreads.js\":3}]},{},[4]);\n"]}