{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'OCR模型免费转Markdown' && linkText !== 'OCR模型免费转Markdown' ) { link.textContent = 'OCR模型免费转Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== '模型下载攻略' ) { link.textContent = '模型下载攻略'; link.href = '/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); ');\n top.consoleRef.document.close();\n }","function makeSettings() {\n\t\tvar i,\n\t\t\tdata = $.data(element, colorbox);\n\t\t\n\t\tif (data == null) {\n\t\t\tsettings = $.extend({}, defaults);\n\t\t\tif (console && console.log) {\n\t\t\t\tconsole.log('Error: cboxElement missing settings object')\n\t\t\t}\n\t\t} else {\n\t\t\tsettings = $.extend({}, data); \t\t\n\t\t}\n\t\t\n\t\tfor (i in settings) {\n\t\t\tif ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.\n\t\t\t\tsettings[i] = settings[i].call(element);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsettings.rel = settings.rel || element.rel || 'nofollow';\n\t\tsettings.href = settings.href || $(element).attr('href');\n\t\tsettings.title = settings.title || element.title;\n\t\t\n\t\tif (typeof settings.href === \"string\") {\n\t\t\tsettings.href = $.trim(settings.href);\n\t\t}\n\t}","function main() {\r\n initFlags();\r\n fixMarkup();\r\n changeLayout();\r\n initConfiguration();\r\n}","function saveSettingsValues() {\n browser.storage.local.set({delayBeforeClean: document.getElementById(\"delayBeforeCleanInput\").value});\n\n browser.storage.local.set({activeMode: document.getElementById(\"activeModeSwitch\").checked});\n\n browser.storage.local.set({statLoggingSetting: document.getElementById(\"statLoggingSwitch\").checked});\n\n browser.storage.local.set({showNumberOfCookiesInIconSetting: document.getElementById(\"showNumberOfCookiesInIconSwitch\").checked});\n\n browser.storage.local.set({notifyCookieCleanUpSetting: document.getElementById(\"notifyCookieCleanUpSwitch\").checked});\n\n browser.storage.local.set({contextualIdentitiesEnabledSetting: document.getElementById(\"contextualIdentitiesEnabledSwitch\").checked});\n\n page.onStartUp();\n}","function setupPage() {\n clearAlerts();\n loadOptions();\n document.getElementById('save').addEventListener('click', saveOptions);\n document.getElementById('defaults').addEventListener('click', saveDefaultOptions);\n}","function ggr2Settings()\n{ \n this.save = saveSettingToDisk;\n this.load = loadSettingFromDisk;\n this.car_model = '';\n this.car_color = '';\n}","function saveConfig() {\r\n\tvar err=0;\r\n\t\r\n\ttrace(\"saveConfig() storing the settings\");\r\n\r\n\ted2kDlMethod = GM_config.get('ed2kDlMethod');\r\n\r\n\temuleUrl = GM_config.get('emuleUrl');\r\n\tif(emuleUrl.charAt(emuleUrl.length-1) != '/') {\r\n\t\tGM_config.set(\"emuleUrl\", emuleUrl + '/');\r\n\t\temuleUrl += '/';\r\n\t}\r\n\r\n\temulePwd = GM_config.get('emulePwd');\r\n\tif(emulePwd=='' && ed2kDlMethod=='emule') {\r\n\t\talert(\"A password is mandatory to submit new link to emule via web URL.\\nPlease choose another method or specify the password.\");\r\n\t\tGM_config.set(\"emulePwd\",\"something\");\r\n\t\temulePwd = GM_config.get('emulePwd');\r\n\t\terr=-1;\r\n\t}\r\n\r\n\temuleCat = strToCat(GM_config.get('emuleCat'));\r\n\tif(emuleCat==-1) {\r\n\t\talert(\"Category value invalid. Reverting back to the default value (*default=0)\");\r\n\t\tGM_config.set('emuleCat', '*default=0');\r\n\t\temuleCat = strToCat('*default=0');\r\n\t}\r\n\r\n\tpopupPos = GM_config.get('popupPos');\r\n\r\n\tpopupHeight = GM_config.get('popupHeight');\r\n\tif (popupHeight > 0 && popupHeight < 40 ) {\r\n\t\talert(\"With a 'Max Popup Height' beetween 0 < x < 40px, you won't be able to press the Settings button. So we consider this value as 0 (unlimited)\");\r\n\t\tGM_config.set(\"popupHeight\",0);\r\n\t\tpopupHeight = 0;\r\n\t}\r\n\r\n\tpopupWidth = GM_config.get('popupWidth');\r\n\tif (popupWidth > 0 && popupWidth < 100 ) {\r\n\t\talert(\"With a 'Max Popup Width' beetween 0 < x < 100 px, you won't be able to press the Settings button. So we consider this value as 0 (unlimited)\");\r\n\t\tGM_config.set(\"popupWidth\",0);\r\n\t\tpopupWidth = 0;\r\n\t}\r\n\r\n\teditCol = GM_config.get('editCol');\r\n\teditRow = GM_config.get('editRow');\r\n\r\n\tif (GM_config.get('editMaxLength') < editMaxLength) {\r\n\t\talert(\"MaxLength must be superior to \" + editMaxLength);\r\n\t\tGM_config.set(\"editMaxLength\",editMaxLength);\r\n\t}\r\n\telse {\r\n\t\teditMaxLength = GM_config.get('editMaxLength');\r\n\t}\r\n\r\n\tif (err<0) {\r\n\t\tGM_config.open();\r\n\t\tsaveConfig();\r\n\t}\r\n\r\n\treturn err;\r\n}","function ConfigurationWithID() {\r\n\tif(!Form.checkCurrentMode(0, true)) return;\r\n\tForm.addForm();\r\n\tForm.all_or_this = 1;\t// this ****** pages\r\n\tForm.main_or_sub = 0;\t// main pages\r\n\tForm.option_check = false;\r\n\tLoadCurrentConf();\r\n\tSetCurrentConf();\r\n\tForm.option_check = true;\r\n\tForm.openForm();\r\n}","function restore_options() {\n // Use default value color = 'red' and likesColor = true.\n chrome.storage.sync.get({\n wpt_base_url: \"http://www.webpagetest.org/\"\n }, function(items) {\n document.getElementById('wpt_base_url').value = items.wpt_base_url;\n document.getElementById('wpt_base_url').disabled = false;\n });\n}","function injectSettings() {\r\n\t\tvar menu = document.getElementById(\"top\");\r\n\t\tmenu = (menu ? menu.getElementsByTagName(\"menu\")[0] : undefined);\r\n\r\n\t\tif (!menu) {\r\n\t\t\tdanbNotice(\"Better Better Booru: The settings panel link could not be created.\", \"error\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar link = document.createElement(\"a\");\r\n\t\tlink.href = \"#\";\r\n\t\tlink.innerHTML = \"BBB Settings\";\r\n\t\tlink.addEventListener(\"click\", function(event) {\r\n\t\t\tif (!bbb.el.menu.window) {\r\n\t\t\t\tloadSettings();\r\n\t\t\t\tcreateMenu();\r\n\t\t\t}\r\n\r\n\t\t\tevent.preventDefault();\r\n\t\t}, false);\r\n\r\n\t\tvar item = document.createElement(\"li\");\r\n\t\titem.appendChild(link);\r\n\r\n\t\tvar menuItems = menu.getElementsByTagName(\"li\");\r\n\t\tmenu.insertBefore(item, menuItems[menuItems.length - 1]);\r\n\r\n\t\twindow.addEventListener(\"resize\", adjustMenuTimer, false);\r\n\t}","function loadSettings()\n {\n if (typeof localStorage.unit != 'undefined') {\n my.settings.unit = localStorage.unit\n }\n }","function toggleDevOptions() {\n returnURL.val('auto#');\n lang.val('default');\n lang.parent().parent().toggle();\n referer.parent().parent().toggle();\n returnURL.parent().parent().toggle();\n oauthState.parent().parent().hide();\n}","function configureSettings() {\n // Load all the saved settings into the preferences object.\n PREF_OBJ.load();\n return true;\n}","function settings() {\n\n\t$('.slimScrollDiv').hide();\n\t$('#back-top').hide();\n\t$('#sidebar-top').show();\n\t$('#delete-message').hide();\n\t$('#compose-message').show();\n\t$('#process-send').hide();\n\n\t//flag currrent page as LIST\n\t$('.message-elem').hide();\n\t$('.current-page').attr('id', 'list');\t\n\t$('#folder-name').html('Settings');\n\t$('.loading-messages').hide();\n\t$('#message-settings').show();\n\n\t//get settings variables from local storage\n\twindow.url \t\t= localStorage.getItem('url');\n \twindow.interval = parseInt(localStorage.getItem('interval'));\n\t//populate fields, URL\n\t$('#settings-url').val(window.url);\n\n\t//populate fields, INTERVAL\n\t$('#settings-interval option').\n\t\tremoveAttr('selected').\n\t\tfilter('[value='+window.interval+']').\n\t\tattr('selected', true);\n\t\n\t$('#settings-interval-button span').html(window.interval);\n\n\t//on click save settings button\n\t$('#save-settings').click(function() {\n\t\t//save new settigns to local storage\n\t\tlocalStorage.setItem('url', \t\t$('#settings-url').val());\n\t\tlocalStorage.setItem('interval', \t$('#settings-interval').val());\n\t\t//then update the GLOBAL VARIABLES\n\t\twindow.url \t\t= localStorage.getItem('url');\n \t\twindow.interval = localStorage.getItem('interval');\n \t\tSOAP_URL \t\t= window.url; \n \t\t\n \t\tcheckInbox();\n\n\t\tnotification('Settings successfully saved');\t\n\t});\n\n\treturn false;\n}","function loadUserSettings(){\n\t\tvar user = wialon.core.Session.getInstance().getCurrUser();\n\t\tvar settings = user.getCustomProperty('__app__logbook_settings', '{}');\n\t\tsettings = JSON.parse(settings);\n\t\thome = office = {\n\t\t\t'name': '',\n\t\t\t'id': ''\n\t\t};\n\t\thoh = payment = false;\n\t\theader_tmpl = footer_tmpl = 1;\n\t\tpayment_less = payment_more = payment_mileage = 0;\n\n\t\tif (settings['geofences']) {\n\t\t\tif (settings['geofences']['home']) {\n\t\t\t\thome = settings['geofences']['home'];\n\t\t\t}\n\n\t\t\tif (settings['geofences']['office']) {\n\t\t\t\toffice = settings['geofences']['office'];\n\t\t\t}\n\t\t}\n\t\tif (settings['print']) {\n\t\t\tif (settings['print']['hoh']) {\n\t\t\t\thoh = settings['print']['hoh'];\n\t\t\t}\n\t\t\tif (settings['print']['payment']) {\n\t\t\t\tpayment = settings['print']['payment'];\n\t\t\t}\n\t\t\tif (settings['print']['header_tmpl']) {\n\t\t\t\theader_tmpl = settings['print']['header_tmpl'];\n\t\t\t}\n\t\t\tif (settings['print']['footer_tmpl']) {\n\t\t\t\tfooter_tmpl = settings['print']['footer_tmpl'];\n\t\t\t}\n\t\t\tif (settings['print']['payment_less']) {\n\t\t\t\tpayment_less = parseFloat(settings['print']['payment_less']);\n\t\t\t}\n\t\t\tif (settings['print']['payment_more']) {\n\t\t\t\tpayment_more = parseFloat(settings['print']['payment_more']);\n\t\t\t}\n\t\t\tif (settings['print']['payment_mileage']) {\n\t\t\t\tpayment_mileage = parseInt(settings['print']['payment_mileage']);\n\t\t\t}\n\t\t}\n\t\t// ui settings\n\t\tif (settings['ui_flags']) {\n\t\t\tui_flags = settings['ui_flags'];\n\t\t}\n\t\t// mileage\n\t\tif (settings['mileage_values']) {\n\t\t\tmileage_values = settings['mileage_values'];\n\t\t}\n\t}","function restoreOptions() {\n\tchrome.storage.sync.get(['savedOnce', 'displayType', 'increment', 'contentIsVisible', 'staticView', 'secretMenu'], function(data) {\n\t\tsavedOnce = data.savedOnce;\n\t\tdisplayType = data.displayType;\n\t\tincrement = data.increment;\n\t\tcontentIsVisible = data.contentIsVisible;\n\t\tstaticView = data.staticView;\n\t\tsecretMenu = data.secretMenu;\n\n\t\tif (displayType == \"fill\") { document.getElementById(\"fillRadio\").checked=true;\n\t\t\t} else { document.getElementById(\"fillRadio\").checked=false; }\n\t\tif (displayType == \"hybrid\") { document.getElementById(\"hybridRadio\").checked=true;\n\t\t\t} else { document.getElementById(\"hybridRadio\").checked=false; }\n\t\tif (displayType == \"none\") { document.getElementById(\"noneRadio\").checked=true;\n\t\t\t} else { document.getElementById(\"noneRadio\").checked=false; }\n\t\tif (displayType == \"yellowHybrid\") { document.getElementById(\"yellowHybridRadio\").checked=true;\n\t\t\t} else { document.getElementById(\"yellowHybridRadio\").checked=false; }\n\t\tif (displayType == \"blackHybrid\") { document.getElementById(\"blackHybridRadio\").checked=true;\n\t\t\t} else { document.getElementById(\"blackHybridRadio\").checked=false; }\n\n\t\tif (isNaN(increment)) { document.getElementById(\"incrementField\").value = 50;\n\t\t} else { document.getElementById(\"incrementField\").value = increment;\n\t\t}\n\n\t\tif (contentIsVisible) { \n\t\t\tdocument.getElementById(\"showArticleContentCheckbox\").checked=true;\n\t\t} else { \n\t\t\tdocument.getElementById(\"showArticleContentCheckbox\").checked=false; \n\t\t\thideWikiContent();\n\t\t}\n\n\t\tif (staticView) { \n\t\t\tdocument.getElementById(\"staticViewCheckbox\").checked=true;\n\t\t} else { \n\t\t\tdocument.getElementById(\"staticViewCheckbox\").checked=false; \n\n\t\t\t// If staticView is false, then turn on bind parallax effect to scroll\n\t\t\t$(document).ready(function() {\t\n\t\t\t $(window).bind('scroll',function(e){\n\t\t\t \tscrolled = $(window).scrollTop();\n\t\t\t\t\t// Go through each wikilink...\n\t\t\t\t\tfor (index = 0; index < wikilinks.length; index++) {\n\t\t\t\t\t\tmoveCircles(index);\n\t\t\t\t }\n\t\t\t });\n\t\t\t});\n\n\t\t}\n\n\t\tif (secretMenu) { $(\"#displayChoicesHidden\").css(\"display\",\"inline-block\"); }\n\n\t\t// If settings have never been saved, automatically set fill = true, increment = 50, contentIsVisible = true, staticView = false\n\t\tif (!savedOnce) {\n\t\t\tchrome.storage.sync.set({\"displayType\": \"hybrid\"}, function() {});\n\t\t\tchrome.storage.sync.set({\"increment\": 50}, function() {});\n\t\t\tdisplayType = \"hybrid\";\n\t\t\tdocument.getElementById(\"hybridRadio\").checked=true;\n\t\t\t$(\"#optionsForm\").slideToggle();\n\t\t\tincrement = 50;\n\t\t\tcontentIsVisible = true;\n\t\t\tstaticView = false;\n\t\t} \n\n\t});\n}","function addSettings() {\n if (!$(\".gt2-settings\").length) {\n let elem = `\n
\n
\n
\n ${getSvg(\"arrow\")}\n
\n ${SCRIPT_NAME} v${GM_info.script.version}\n
\n
\n
${getLocStr(\"settingsHeaderTimeline\")}
\n ${getSettingTogglePart(\"forceLatest\")}\n ${getSettingTogglePart(\"disableAutoRefresh\")}\n ${getSettingTogglePart(\"keepTweetsInTL\")}\n ${getSettingTogglePart(\"biggerPreviews\")}\n
\n\n
${getLocStr(\"statsTweets\")}
\n ${getSettingTogglePart(\"hideTranslateTweetButton\")}\n ${getSettingTogglePart(\"tweetIconsPullLeft\")}\n
\n\n
${getLocStr(\"settingsHeaderSidebars\")}
\n ${getSettingTogglePart(\"stickySidebars\")}\n ${getSettingTogglePart(\"smallSidebars\")}\n ${getSettingTogglePart(\"hideTrends\")}\n ${getSettingTogglePart(\"leftTrends\")}\n ${getSettingTogglePart(\"show10Trends\")}\n
\n\n
${getLocStr(\"navProfile\")}
\n ${getSettingTogglePart(\"legacyProfile\")}\n ${getSettingTogglePart(\"squareAvatars\")}\n ${getSettingTogglePart(\"enableQuickBlock\")}\n ${getSettingTogglePart(\"leftMedia\")}\n
\n\n
${getLocStr(\"settingsHeaderGlobalLook\")}
\n ${getSettingTogglePart(\"hideFollowSuggestions\", `\n
\n ${[\"topics\", \"users\", \"navLists\"].map((e, i) => {\n let x = Math.pow(2, i)\n return `
\n ${getLocStr(e)}\n
\n
\n
${getSvg(\"tick\")}
\n
\n
\n `}).join(\"\")}\n
\n `)}\n ${getSettingTogglePart(\"fontOverride\", `\n
\n \n
\n `)}\n ${getSettingTogglePart(\"colorOverride\", `
`)}\n ${getSettingTogglePart(\"hideMessageBox\")}\n ${getSettingTogglePart(\"rosettaIcons\")}\n ${getSettingTogglePart(\"favoriteLikes\")}\n
\n\n
${getLocStr(\"settingsHeaderOther\")}
\n ${getSettingTogglePart(\"updateNotifications\")}\n ${getSettingTogglePart(\"expandTcoShortlinks\")}\n
\n `\n let $s = $(\"main section[aria-labelledby=detail-header]\")\n if ($s.length) {\n $s.prepend(elem)\n } else {\n $(\"main > div > div > div\").append(`\n
${elem}
\n `)\n }\n // add color pickr\n Pickr.create({\n el: \".gt2-pickr\",\n theme: \"classic\",\n lockOpacity: true,\n useAsButton: true,\n appClass: \"gt2-color-override-pickr\",\n inline: true,\n default: `rgb(${GM_getValue(\"opt_gt2\").colorOverrideValue})`,\n components: {\n preview: true,\n hue: true,\n interaction: {\n hex: true,\n rgba: true,\n hsla: true,\n hsva: true,\n cmyk: true,\n input: true\n }\n }\n })\n .on(\"change\", e => {\n let val = e.toRGBA().toString(0).slice(5, -4)\n GM_setValue(\"opt_gt2\", Object.assign(GM_getValue(\"opt_gt2\"), { colorOverrideValue: val}))\n document.documentElement.style.setProperty(\"--color-override\", val)\n })\n disableTogglesIfNeeded()\n }\n }","function goToSettings(){\n\tif(SOUNDS_MODE){\n\t\taudioClick.play();\t\n\t}\n\t\n\t//load data\n\tvar player = getCurrentPlayer();\n\t\n\tmtbImport(\"settings.js\");\n\tbuildSettingsView();\n\tviewSettings.fireEvent('updateSettingsUI', {player:player});\n\tviewSettings.animate(anim_in);\n}","function ac_showConfigPanel() {\n\tac_switchTool(\"cfg\");\n}","function makeSettings() {\n\t\tvar i,\n\t\t\tdata = $.data(element, colorbox);\n\t\t\n\t\tif (data == null) {\n\t\t\tsettings = $.extend({}, defaults);\n\t\t\tif (console && console.log) {\n\t\t\t\tconsole.log('Error: cboxElement missing settings object');\n\t\t\t}\n\t\t} else {\n\t\t\tsettings = $.extend({}, data);\n\t\t}\n\t\t\n\t\tfor (i in settings) {\n\t\t\tif ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.\n\t\t\t\tsettings[i] = settings[i].call(element);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsettings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow';\n\t\tsettings.href = settings.href || $(element).attr('href');\n\t\tsettings.title = settings.title || element.title;\n\t\t\n\t\tif (typeof settings.href === \"string\") {\n\t\t\tsettings.href = $.trim(settings.href);\n\t\t}\n\t}","function loadPageVariables() {\r\n \"use strict\";\r\n var tmp = JSON.parse(localStorage.getItem('TrimpzSettings'));\r\n if (tmp !== null) {\r\n trimpzSettings = tmp;\r\n }\r\n}","function saveOptions() {\n\tlocalStorage[\"default_folder_id\"] = $('#folder_list :selected').val();\n\tlocalStorage[\"dial_columns\"] = $('#dial_columns :selected').val();\n\tlocalStorage[\"dial_width\"] = $('#dial_width :selected').val();\n\tsaveCheckbox('drag_and_drop');\n\tsaveCheckbox('force_http');\n\tsaveCheckbox('show_advanced');\n\tsaveCheckbox('show_new_entry');\n\tsaveCheckbox('show_folder_list');\n\tsaveCheckbox('show_subfolder_icons');\n\tlocalStorage[\"thumbnail_url\"] = $('#thumbnail_url').val();\n\n\twindow.location = \"newtab.html\";\n}","function startup_checks(quiet)\n {\n\tvar start_page = \"https://github.com/lemonsqueeze/scriptweeder/wiki/scriptweeder-userjs-installed-!\";\t\n\tif (in_iframe()) // don't redirect to start page in iframes.\n\t return;\n\t\n // first run, send to start page\n if (global_setting('mode') == '') // will work with old settings\t\n {\n\t // userjs_only: can't wait until we get there, userjs on https may not be enabled ...\t \n set_global_setting('version_number', version_number);\n set_global_setting('version_type', version_type);\n set_global_setting('mode', default_mode);\n\t default_filter_settings();\t \n\n\t if (!quiet)\n\t\tlocation.href = start_page;\t \n }\n\t\n\t// userjs_only: upgrade from 1.44 or before\n\tif (global_setting('version_number') == '')\n\t{\n\t set_global_setting('version_number', version_number);\n\t set_global_setting('version_type', version_type);\n\t // didn't exist:\n\t set_global_setting('helper_blacklist',\tserialize_name_hash(default_helper_blacklist) );\n\t}\n\n\t// upgrade from previous version\n\tif (global_setting('version_number') != version_number)\n\t{\n\t var from = global_setting('version_number');\n\t set_global_setting('version_number', version_number);\n\n\t // 1.5.2 style upgrade\n\t if (cmp_versions(from, \"1.5.2\") && global_setting('style') != '')\n\t {\n\t\tset_global_setting('style', '');\n\t\talert(\"ScriptWeeder 1.5.2 upgrade notice:\\n\\n\" +\n\t\t \"The interface changed a bit, updated custom styles are available on the wiki page.\");\n\t }\n\t}\n\n\t// convert pre 1.5.1 list settings format\n\tif (global_setting('whitelist')[0] == '.')\n\t convert_old_list_settings();\n }","function saveSettings() {\n localStorage.setItem(\"emailToggle\", emailToggleButton.checked);\n localStorage.setItem(\"privacyToggle\", privacyToggleButton.checked);\n localStorage.setItem(\"timezone\", select.value);\n}","function restoreOptions() {\n\tdocument.getElementById(\"mail\").value = chrome.extension.getBackgroundPage().settings.getMail();\n\tdocument.getElementById(\"url\").value = chrome.extension.getBackgroundPage().settings.getURL();\n\tdocument.getElementById(\"contextMenu\").checked = chrome.extension.getBackgroundPage().settings.isContextMenu();\n\tdocument.getElementById(\"insertIntoPage\").checked = chrome.extension.getBackgroundPage().settings.isInsertIntoPage();\n\tdocument.getElementById(\"copyToClipboard\").checked = chrome.extension.getBackgroundPage().settings.isCopyToClipboard();\n\tdocument.getElementById(\"dateFormat\").value = chrome.extension.getBackgroundPage().settings.getDateFormat();\n }","function saveconfig() {\n // sauvegarde des options de la fenêtre de configuration\n display_button = npn_cb_button.checked;\n GM.setValue(\"display_button\", display_button);\n button_icon = npn_in_button.value.trim();\n if(button_icon === \"\") {\n button_icon = default_icon;\n }\n GM.setValue(\"button_icon\", button_icon);\n mass_opener = npn_cb_mass.checked;\n GM.setValue(\"mass_opener\", mass_opener);\n max_tab = parseInt(npn_in_maxtab.value.trim(), 10);\n max_tab = Math.max(max_tab, 1);\n max_tab = Math.min(max_tab, 99);\n if(isNaN(max_tab)) max_tab = default_max_tab;\n GM.setValue(\"max_tab\", max_tab);\n reverse_order = npn_cb_reverseorder.checked;\n GM.setValue(\"reverse_order\", reverse_order);\n color_gradient = npn_cb_gradient.checked;\n GM.setValue(\"color_gradient\", color_gradient);\n color_start_type = npn_rd_color_start_auto.checked ? \"auto\" :\n npn_rd_color_start_trans.checked ? \"trans\" : \"perso\";\n GM.setValue(\"color_start_type\", color_start_type);\n color_start_perso = npn_co_color_start_perso.value.toLowerCase();\n GM.setValue(\"color_start_perso\", color_start_perso);\n color_end_type = npn_rd_color_end_auto.checked ? \"auto\" :\n npn_rd_color_end_trans.checked ? \"trans\" : \"perso\";\n GM.setValue(\"color_end_type\", color_end_type);\n color_end_perso = npn_co_color_end_perso.value.toLowerCase();\n GM.setValue(\"color_end_perso\", color_end_perso);\n limit_type = npn_rd_limit_fixed.checked ? \"fixed\" : \"auto\";\n GM.setValue(\"limit_type\", limit_type);\n fixed_limit = parseInt(npn_in_limit_fixed.value.trim(), 10);\n fixed_limit = Math.max(fixed_limit, 1);\n fixed_limit = Math.min(fixed_limit, 99999);\n if(isNaN(fixed_limit)) fixed_limit = default_fixed_limit;\n GM.setValue(\"fixed_limit\", fixed_limit);\n progress_type = npn_rd_progress_lin.checked ? \"lin\" : \"log\";\n GM.setValue(\"progress_type\", progress_type);\n smaller_text = npn_cb_smallertext.checked;\n GM.setValue(\"smaller_text\", smaller_text);\n go_top = npn_cb_gotop.checked;\n hash_haut = go_top ? \"#haut\" : \"\";\n GM.setValue(\"go_top\", go_top);\n refresh_click = npn_cb_refreshclick.checked;\n GM.setValue(\"refresh_click\", refresh_click);\n delay_click = parseInt(npn_in_refreshclick.value.trim(), 10);\n delay_click = Math.max(delay_click, 1);\n delay_click = Math.min(delay_click, 99);\n if(isNaN(delay_click)) delay_click = default_delay_click;\n GM.setValue(\"delay_click\", delay_click);\n display_totals = npn_cb_displaytotals.checked;\n GM.setValue(\"display_totals\", display_totals);\n refresh_page = npn_cb_refreshpage.checked;\n GM.setValue(\"refresh_page\", refresh_page);\n delay_page = parseInt(npn_in_refreshpage.value.trim(), 10);\n delay_page = Math.max(delay_page, 1);\n delay_page = Math.min(delay_page, 99);\n if(isNaN(delay_page)) delay_page = default_delay_page;\n GM.setValue(\"delay_page\", delay_page);\n // réinitialisation des computed colors\n computed_colors = {};\n // masquage de la fenêtre de configuration\n hideconfig();\n // application des nouveaux paramètres\n apply_config();\n}","function setPage() {\n setNavigation();\n $('#tabs').tabs();\n resetGeneralDetailsForm();\n resetReportBugsForm();\n getAdminDetails();\n loadTermsOfUseDetails();\n}","function settings(path, url, options) {\n // A. URL fill material\n preURL = \"\\\"\"\n postURL = \"\\\"\"\n var urlComp = preURL + url + postURL;\n // B. put date as folder name\n // command \"-O\" determines the a target folder\n // here relative path e.g. = \"./2016-12-24\"\n var preFolder = \"-O \\\"./\";\n // Daten -> look \"Workaround TIMESTAMP\" -> basic format is \"YYYY-MM-DD\"\n var date = fnToISO();\n var postFolder = \"\\\"\";\n var folder = preFolder + date + postFolder;\n // C. Options\n // value \"options\" is a parameter from above and won't be changed in this function\n\n // D. Return the terminal command as a strings\n return specifics = path + \" \" + urlComp + \" \" + folder + \" \" + options;\n}","function openSettingsWindow() { //Create settings window\r\n\t\r\n //Define html for settings window\r\n var settingsHTML=\"\\n\\n\\n\\n \\n wTorrent Options\\n \\n\\n\\n\\n\\n\t
\\n\\n\t\t
\\n\t\t\t

wTorrent Options

\\n\t\t
\\n\\n\t\t
\\n\t \\n\t\t
\\n\t\t
\\n\\n\t\t
\\n\t\t
\\n\t\t\\n\t\t\\n\t\t

Checking this will cause you to use an SSL (https) connection for wTorrent.

\\n\\n\t\t
\\n\t\t
\\n\t\t\\n\t\t
\\n\t\t
\\n\t\t\\n\t\t
\\n\t\t
\\n\t\t

Download directory should be set to \\\"default\\\" to accept the default setting configured in wTorrent, or changed to an absolute path. You must allow files to be saved to a non-standard source when not using \\\"default\\\".

\\n\t\t\\n\t\t\\n\t\t

This takes precedence over \\\"Show links for private mode add\\\" preference. If this is checked only the wTorrent icon will show and it will always add in private mode

\\n\\n\t\t\\n\t\t

Checking this will show a \\\"lock\\\" icon for adding torrents in private mode.

\\n\\n\t\t
\\n\\n\t\t
\\n\t\t
\\n\t\t\\n\\n\t\t\\n\t
\\n\\n\";\r\n\r\n //Add default variable values to settins window html\r\n settingsHTML=settingsHTML.replace(/id=\"wtorrent_host\" value=\"\"/,'id=\"wtorrent_host\" value=\"'+wtorrent_host+'\"')\r\n settingsHTML=settingsHTML.replace(/id=\"wtorrent_port\" value=\"\"/,'id=\"wtorrent_port\" value=\"'+wtorrent_port+'\"')\r\n settingsHTML=settingsHTML.replace(/id=\"wtorrent_username\" value=\"\"/,'id=\"wtorrent_username\" value=\"'+wtorrent_username+'\"')\r\n settingsHTML=settingsHTML.replace(/id=\"wtorrent_password\" value=\"\"/,'id=\"wtorrent_password\" value=\"'+wtorrent_password+'\"')\r\n settingsHTML=settingsHTML.replace(/id=\"wtorrent_downloaddirectory\" value=\"\"/,'id=\"wtorrent_downloaddirectory\" value=\"'+wtorrent_downloaddirectory+'\"')\r\n\t\t\r\n\t\tif (wtorrent_ssl) { settingsHTML=settingsHTML.replace(/id=\"wtorrent_ssl\"/,'id=\"wtorrent_ssl\" checked=\"checked\"'); }\r\n if (wtorrent_alwaysdownloadprivate) { settingsHTML=settingsHTML.replace(/id=\"wtorrent_alwaysdownloadprivate\"/,'id=\"wtorrent_alwaysdownloadprivate\" checked=\"checked\"'); }\r\n if (wtorrent_showprivatelinks) { settingsHTML=settingsHTML.replace(/id=\"wtorrent_showprivatelinks\"/,'id=\"wtorrent_showprivatelinks\" checked=\"checked\"'); }\r\n if (wtorrent_autostarttorrents) { settingsHTML=settingsHTML.replace(/id=\"wtorrent_autostarttorrents\"/,'id=\"wtorrent_autostarttorrents\" checked=\"checked\"'); }\r\n \r\n //Open Settings window\r\n settingsWindow=window.open(\"\",\"settingsWindow\",\"height=520,width=298,left=100,top=100,resizable=yes,scrollbars=no,toolbar=no,status=no\")\r\n settingsWindow.document.write(settingsHTML) //Write html to window\r\n settingsWindow.document.close() //Close document to writing\r\n\r\n //Add Settings Window Listeners\r\n settingsWindow.document.getElementById(\"save\").addEventListener(\"click\", saveSettings, false); //Add click event listener to Save Settings button, calls saveSettings()\r\n settingsWindow.addEventListener(\"unload\", cleanupSettingsListeners, false); //Add unload event listener to window, calls cleanupListeners()\r\n }","function saveSettings() {\n $('#settings').removeClass('opensettings');\n}","function _onEveryPage() {\n _updateConfig();\n\t_defineCookieDomain();\n\t_defineAgencyCDsValues();\n}","function init() {\n\t\tif (!localStorage.getItem(SETTINGS_NAME)){\n\t\t\tlocalStorage.setItem(SETTINGS_NAME, JSON.stringify({}))\n\t\t}\n\n\t\t$('#importButton').click(() => {\n\t\t\tlet importSuccess = importSettingsHanlder($('textarea#importExportTextarea').val())\n\t\t\tif (importSuccess) {\n\t\t\t\tmarkProblem('textarea#importExportTextarea', false)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmarkProblem('textarea#importExportTextarea', true)\n\t\t\t}\n\t\t})\n\n\t\t$('#exportButton').click(() => {\n\t\t\t$('textarea#importExportTextarea').val(exportSettings())\n\t\t})\n\n\t\t$('#downloadSettingsLink').click(() => {\n\t\t\tlet link = document.getElementById('downloadSettingsLink');\n\t\t\tlink.href = makeTextFile(localStorage.getItem(SETTINGS_NAME))\n\t\t\t$('#downloadSettingsLink').attr('download', `rph-tools-settings.txt`)\n\t\t})\n\n\t\t$('#importFileInput').change(() => {\n\t\t\tlet file = $(\"#importFileInput\")[0].files[0];\n\t\t\t(async () => {\n\t\t\t\tfileContent = await file.text();\n\t\t\t\tlet successfulImport = importSettingsHanlder(fileContent)\n\n\t\t\t\tif (successfulImport === false) {\n\t\t\t\t\t$('#importSettingsStatus').first().text('There was a problem with the import')\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$('#importSettingsStatus').first().text('Import successful')\n\t\t\t\t}\n\t\t\t})();\n\t\t})\n\t\n\n\t\t$('#printSettingsButton').click(() => {\n\t\t\tprintSettings()\n\t\t})\n\n\t\t$('#deleteSettingsButton').click(() => {\n\t\t\tdeleteSettingsHanlder()\n\t\t})\n\t}","function addDefaultSettings(action, settings) {\n if (action == \"com.vantdev.r3sd.toggleboxoptionbutton\")\n {\n if (!settings.hasOwnProperty(\"box_option\")) {\n settings.box_option = BOX_OPTIONS.DO_NOTHING;\n }\n }\n else if (action == \"com.vantdev.r3sd.requestboxbutton\")\n {\n if (!settings.hasOwnProperty(\"serve_penalty\")) settings.serve_penalty = false;\n if (!settings.hasOwnProperty(\"driver_change\")) settings.driver_change = false;\n if (!settings.hasOwnProperty(\"front_tires\")) settings.front_tires = false;\n if (!settings.hasOwnProperty(\"rear_tires\")) settings.rear_tires = false;\n if (!settings.hasOwnProperty(\"fix_bodywork\")) settings.fix_bodywork = false;\n if (!settings.hasOwnProperty(\"fix_front_aero\")) settings.fix_front_aero = false;\n if (!settings.hasOwnProperty(\"fix_rear_aero\")) settings.fix_rear_aero = false;\n if (!settings.hasOwnProperty(\"fix_suspension\")) settings.fix_suspension = false;\n if (!settings.hasOwnProperty(\"refuel_option\")) settings.refuel_option = BOX_OPTIONS.DO_NOTHING;\n if (!settings.hasOwnProperty(\"use_toggle_buttons_only\")) settings.use_toggle_buttons_only = false;\n if (!settings.hasOwnProperty(\"request_box\")) settings.request_box = false;\n if (!settings.hasOwnProperty(\"close_pit_menu\")) settings.close_pit_menu = false;\n }\n\n return settings;\n}","function saveExtSettings() {\n var settings = {\n \"showFoldersInList\": showFoldersInList,\n \"showSortDataInList\": showSortDataInList,\n \"numberOfFiles\": numberOfFiles,\n \"zoomFactor\": zoomFactor,\n \"orderBy\": orderBy\n };\n localStorage.setItem('perpectiveGridSettings', JSON.stringify(settings));\n }","function restore_options() {\n chrome.storage.sync.get(\n\t\tchrome.extension.getBackgroundPage().defaultSettings, \n \t\tfunction (settings) {\n \t\t\tdocument.getElementById(settings.o_theme).checked = true;\n \t\t\tdocument.getElementById(settings.o_live_output).checked = true;\n \t\t\tfor (let i = 0; i < settings.o_live_direction.length; i++) {\n \t\t\t\tdocument.getElementById(settings.o_live_direction[i]).checked = true;\n \t\t\t}\n \t\t\tfor (let i = 0; i < settings.o_live_type.length; i++) {\n \t\t\t\tdocument.getElementById(settings.o_live_type[i]).checked = true;\n \t\t\t}\n \t\t\tdocument.getElementById(settings.o_live_donation).checked = true;\n\n \t\t\tchrome.extension.getBackgroundPage().currentSettings = settings;\n \t\t}\n \t);\n}","_initializeDefaultSettings(settings) {\r\n for (let name in argvOptions) {\r\n let option = argvOptions[name];\r\n\r\n let realName = name;\r\n if (option.name) {\r\n realName = option.name;\r\n }\r\n\r\n if (!_.has(settings, realName)) {\r\n if (realName == 'paths') {\r\n settings['paths'] = { '' : path.resolve('') };\r\n }\r\n else if (_.has(option, 'default')) {\r\n settings[realName] = option['default'];\r\n }\r\n else if (option.type == 'flag') {\r\n // Flags default to false\r\n settings[realName] = false;\r\n }\r\n else if (option.type == 'array') {\r\n settings[realName] = [];\r\n }\r\n }\r\n }\r\n }","function setupDefault() {\n}","_ensureClientSettings() {\n if (!this.settings.autoboard) { this.toggleSetting(\"autoboard\"); }\n if (this.settings.bell) { this.toggleSetting(\"bell\"); }\n if (!this.settings.moreboards) { this.toggleSetting(\"moreboards\"); }\n if (!this.settings.notify) { this.toggleSetting(\"notify\"); }\n if (!this.settings.report) { this.toggleSetting(\"report\"); }\n this.setBoardstyle(3); // we don't get this to check w/ the other settings (although we could pull it)\n }","function setDefaultCurrentSettings(settings) {\r\n\t\tdebug('setDefaultCurrentSettings');\r\n\t\tcurrentSettings = $.extend(true, {}, $.fn.nyroModal.settings, settings);\r\n\t\tcurrentSettings.selector = '';\r\n\t\tcurrentSettings.borderW = 0;\r\n\t\tcurrentSettings.borderH = 0;\r\n\t\tcurrentSettings.resizable = true;\r\n\t\tsetMargin();\r\n\t}","function save_options() {\n\tsetLocal(\"sense_facebook\");\n\tsetLocal(\"sense_google\");\n\tsetLocal(\"sense_twitter\");\n\tsetLocal(\"sense_youtube\");\n\tsetLocal(\"sense_4Chan\");\n\tsetLocal(\"sense_selector\");\n\tsetLocal(\"sense_color\");\n\tcheckAPI();\n}","function showGlobalConfig() {\n $(\"#global-setting\").show();\n $(\"#global-setting .modal-body\").html(\"\");\n settingTextarea = monaco.editor.create($(\"#global-setting .modal-body\")[0], {\n language: 'json',\n value:formatJson(JSON.stringify(rocketUser.setting)),\n wordWrap: 'on', //自行换行\n verticalHasArrows: true,\n horizontalHasArrows: true,\n scrollBeyondLastLine: false,\n contextmenu:false,\n automaticLayout: true,\n fontSize:13,\n minimap: {\n enabled: false // 关闭小地图\n }\n\n });\n}","function updateSettingsFile() {\r\n\tvar fileId = BumpTop.openFile(\"sharingTemp.json\", \"w\");\r\n\tvar settings = $.map(tabArray, function (tab) { \r\n\t\treturn tab.dropAccessParams; \r\n\t});\r\n\tvar fileContents = JSON.stringify(settings);\r\n\tBumpTop.writeFile(fileId, fileContents);\r\n\tBumpTop.renameAndCloseFile(fileId, \"sharing.json\");\r\n}","function scriptConfig() {\r\n\ttrace(\"scriptConfig() configuring the dialog\");\r\n\t\r\n\t// Configure Settings dialog\r\n\tGM_config.init('Emule Linker Settings dialog', {\r\n\t\t'section1' : { section: ['ed2k download mode', 'Please refer to your emule/amule/mldonkey configuration'], label: '', type: 'hidden'},\r\n\t\t/*'ed2kDlMethod': { label: 'Ed2k Download Method', title: 'local: local application that handle ed2k links (default)\\nemule: remote emule (via web frontend)\\namule: remote amule (via web frontend)\\nmldonkey: remote mldonkey (via web frontend)\\ncustom: custom server implementation (experimental)', type:'radio', options:['local','emule','amule','mldonkey','custom'], default: ed2kDlMethod },*/\r\n\t\t'ed2kDlMethod': { label: 'Ed2k Download Method', title: 'local: local application that handle ed2k links (default)\\nemule: remote emule (via web frontend)\\namule: remote amule (via web frontend)\\nmldonkey: remote mldonkey (via web frontend)\\ncustom: custom server implementation (experimental)', type:'select', options:{'local':'your system default','emule':'(remote) emule','amule':'(remote) amule','mldonkey':'(remote) mldonkey','custom':'custom (experimental)'}, default: ed2kDlMethod}, // default value doesn't work with a dropdown menu => see bugfix in the lib\r\n\t\t'emuleUrl': { label: 'Emule Url', title : 'The complete url of your emule web server ending by a / (example: http://127.0.0.1:4711/)', type: 'text', default: emuleUrl },\r\n\t\t'emulePwd': { label: 'Emule Password', title : 'the password you choose to access your emule web server', type: 'text', default: emulePwd },\r\n\t\t'emuleCat': { label: 'Category', title : 'categories available in your emule/amule application. You can add categories using the following template:\\ncategory_name1=corresponding_index_in_emule;category_name2=...\\nAdding a * before the name specify the default choice.\\nIf you don\\'t know what you are doing just specify this: *default=0', type: 'text', default: catToStr(emuleCat) },\r\n\t\t'section2' : { section: ['Popup Configuration', 'modify how the popup is displayed'], label: '', type: 'hidden'},\r\n\t\t'popupPos': { label: 'Popup Position', title : 'choosing \\'absolute\\', the popup will stay at the top. Choosing fixed, the popup will follow as you scroll within the page', type: 'radio', options:['absolute','fixed'], default: popupPos },\r\n\t\t'popupHeight': { label: 'Max Popup Height in px (0=unlimited)', title : 'Max height of the popup in pixels (0=unlimited)', type: 'int', default: popupHeight },\r\n\t\t'popupWidth': { label: 'Max Popup Width in px (0=unlimited)', title : 'Max width of the popup in pixels (0=unlimited)', type: 'int', default: popupWidth },\r\n\t\t'section3' : { section: ['Edit box Configuration', 'modify how the edit box is displayed'], label: '', type: 'hidden'},\r\n\t\t'editCol': { label: 'Number of columns', title : 'number of columns', type: 'radio', type: 'int', default: editCol },\r\n\t\t'editRow': { label: 'Number of rows', title : 'Number of rows', type: 'int', default: editRow },\r\n\t\t'editMaxLength': { label: 'MaxLength', title : 'Max number of char in the text area', type: 'int', 'default': editMaxLength },\r\n\t\t}, \r\n\t\t{\r\n\t\t//open: function() { GM_config.sections2tabs(); }, // not working (not included into the library)\r\n\t\tsave: function() { location.reload(); } // reload the page when configuration was changed\r\n\t\t}\r\n\t);\r\n\t\r\n\t// invoke the dialog\r\n\tif (GM_getValue(\"emule_config\", 0)<1)\r\n\t{\r\n\t\ttrace(\"scriptConfig() invoking the dialog\");\r\n\t\tGM_config.open();\r\n\t\tGM_setValue(\"emule_config\",1);\r\n\t}\r\n\r\n\t// store the settings\r\n\tsaveConfig();\r\n\r\n}","function getSettingsAndStart() {\n chrome.storage.local.get(null, function (settings) {\n // Begin parsing and injecting views\n if (window.location.href.indexOf('spryker-simplicity') !== -1) {\n if (window.location.href.indexOf('merge_requests') !== -1) {\n if ($.isNumeric(window.location.pathname.split('/')[4])) {\n addPipelineButton()\n addEnvironmentButton()\n }\n }\n }\n })\n}","function setOptions() {\n if(typeof window.dev === 'undefined' || typeof window.dev.i18n === 'undefined') {\n importScriptPage('MediaWiki:I18n-js/code.js', 'dev');\n }\n mw.hook('dev.i18n').add(function(i18no) {\n i18no.loadMessages('u:soap:MediaWiki:Custom-Reports/i18n.json').done(function(i18n) {\n options = {\n\n /* \n //BEGIN EXAMPLE\n example: {\n page: 'Page name the form is for',\n buttonText: 'Text for button to open form',\n form: 'HTML form for reporting users. Each input/textarea should have an id. any optional inputs should be marked with the `optional` class. If any attributes need URI encoding, the relevant inputs should have the `data-encode` attribute set to `true`.',\n // this is where the input ids in the form are matched to numbers\n // for use in the summary/submitted text\n formParams: {\n '$1': 'foo',\n '$2': 'bar'\n },\n submitText: 'Text to submit to the page. Any form parameters can be inserted via the key names in `formParams`',\n summary: 'Text used for the edit summary. Any form parameters can be inserted via the key names in `formParams`',\n sectionTitle: 'Text used as the section title. Any form parameters can be inserted via the key names in `formParams`'\n },\n // END EXAMPLE\n */\n\n profile: {\n page: 'Report:User_profile_headers',\n buttonText: i18n.msg(\"buttonProfile\").escape(),\n form: '
' +\n '
' +\n '
' +\n '
' + i18n.msg(\"formSocial\").escape() + '
' +\n '
' + i18n.msg(\"formWikiName\").escape() + '
' +\n '' +\n '
' + \n '
' + i18n.msg(\"formWikiURL\").escape() + '
' +\n '' +\n '
' +\n '
' + i18n.msg(\"formUsername\").escape() + ' ' + i18n.msg(\"formOfBadUser\").escape() + ' (' + i18n.msg(\"formMultipleUsers\").escape() + ')
' +\n '' +\n '
' +\n '
' + i18n.msg(\"formReason\").escape() + '
' +\n '' +\n '
' +\n '
' +\n '
' + \n '
' + i18n.msg(\"formUsername\").escape() + ' ' + i18n.msg(\"formOfSock\").escape() +\n '' +\n '
' +\n '
' +\n '
' + \n '
' + i18n.msg(\"formAnon\").escape() + '
' +\n '
' +\n '
' +\n '
',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$3': 'user',\n '$4': 'comment',\n '$5': 'user', // for different styling\n '$7': 'socks',\n '$8': 'sockusers'\n },\n submitText: '{{Report profile|$1\\n' +\n '|$4\\n' +\n '|$3\\n' +\n '$7$8' +\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New profile report ($2, $5)',\n sectionTitle: '$2'\n },\n vandalism: {\n page: 'Report:Vandalism',\n buttonText: i18n.msg(\"buttonVandalism\").escape(),\n form: '
' +\n '
' +\n '
' +\n '
' + i18n.msg(\"formWikiName\").escape() + '
' +\n '' +\n '
' + \n '
' + i18n.msg(\"formWikiURL\").escape() + '
' +\n '' +\n '
' +\n '
' + i18n.msg(\"formUsername\").escape() + ' ' + i18n.msg(\"formOfBadUser\").escape() + ' (' + i18n.msg(\"formMultipleUsers\").escape() + ')
' +\n '' +\n '
' +\n '
' + i18n.msg(\"formReason\").escape() + '
' +\n '' +\n '
' +\n '
' +\n '
' +\n '
' + \n '
' +\n '
' + \n '
' + i18n.msg(\"formUsername\").escape() + ' ' + i18n.msg(\"formOfSock\").escape() +\n '' +\n '
' +\n '
' +\n '
' + \n '
' + i18n.msg(\"formAnon\").escape() + '
' +\n '
' +\n '
' +\n '
',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$3': 'user',\n '$4': 'comment',\n '$5': 'user', // for different styling\n '$6': 'crosswiki',\n '$7': 'socks',\n '$8': 'sockusers'\n },\n submitText: '{{Report vandalism|$1\\n' +\n '|$4\\n' +\n '|$3\\n' +\n '$6$7$8' +\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New vandalism report ($1, $5)',\n sectionTitle: '$5 at $2'\n },\n spam: {\n page: 'Report:Spam',\n buttonText: i18n.msg(\"buttonSpam\").escape(),\n form: '
' +\n '
' +\n '
' +\n '
' + i18n.msg(\"formWikiName\").escape() + '
' +\n '' +\n '
' + \n '
' + i18n.msg(\"formWikiURL\").escape() + '
' +\n '' +\n '
' +\n '
' + i18n.msg(\"formUsername\").escape() + ' ' + i18n.msg(\"formOfBadUser\").escape() + ' (' + i18n.msg(\"formMultipleUsers\").escape() + ')
' +\n '' +\n '
' +\n '
' + i18n.msg(\"formReason\").escape() + '
' +\n '' +\n '
' +\n '
' +\n '
' +\n '
' + \n '
' + i18n.msg(\"formAnon\").escape() + '
' +\n '
' +\n '
' +\n '
',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$3': 'user',\n '$4': 'comment',\n '$5': 'user', // for different styling\n '$6': 'crosswiki',\n },\n submitText: '{{Report spam|$1\\n' +\n '|$4\\n' +\n '|$3\\n' +\n '$6' +\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New spam report ($1, $5)',\n sectionTitle: '$5 at $2'\n },\n phalanx: {\n page: 'Report:Spam_filter_problems',\n buttonText: i18n.msg(\"buttonFalsePositive\").escape(),\n form: '
' +\n '
' +\n '
' +\n '
' + i18n.msg(\"formWikiName\").escape() + '
' +\n '' +\n '
' + \n '
' + i18n.msg(\"formWikiPage\").escape() + '
' +\n '' +\n '/wiki/' +\n '' +\n '
' +\n '
' + i18n.msg(\"formBlockID\").escape() + '
' +\n '' +\n '
' +\n '
' + i18n.msg(\"formPhalanxReason\").escape() + '
' +\n '' +\n '
' +\n '
' + i18n.msg(\"formAnon\").escape() + '
' +\n '
' +\n '
' +\n '
',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$5': 'wikipage',\n '$3': 'blockid',\n '$4': 'comment'\n },\n submitText: '{{Report filter|$1\\n' +\n '|$5\\n' +\n '|$3\\n' + \n '|$4\\n' + \n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New filter report ($2, #$3)',\n sectionTitle: 'Block #$3 on $2'\n },\n wiki: {\n page: 'Report:Wiki',\n buttonText: i18n.msg(\"buttonWiki\").escape(),\n form: '
' +\n '
' +\n '
' +\n '
' + i18n.msg(\"formWikiName\").escape() + '
' +\n '' +\n '
' + \n '
' + i18n.msg(\"formWikiURL\").escape() + '
' +\n '' +\n '
' +\n '
' + i18n.msg(\"formReason\").escape() + '
' +\n '' +\n '
' +\n '
' + i18n.msg(\"GuidelinesTitle\").plain() + '
' +\n i18n.msg(\"GuidelinesText\").plain() +\n '
' +\n '
' + i18n.msg(\"formAnon\").escape() + '
' +\n '
' +\n '
' +\n '
',\n formParams: {\n '$1': 'wikiname',\n '$2': 'wikiurl',\n '$3': 'comment'\n },\n submitText: '{{badwiki|$2|$3}}',\n summary: 'New bad wiki report ([[w:c:$2|$1]], comment: $3)',\n sectionTitle: ''\n },\n };\n reportDropdown = '
' + \n '
' + \n '' + i18n.msg(\"buttonReport\").escape() + '' + \n '' + \n '
' + \n '
' + \n '
    ' + \n '
' + \n '
' + \n '
'\n }).done(init);\n });\n }","function restore_prev_settings() {\n tagpro.group.socket.emit(\"setting\", {\"name\": \"map\", \"value\": settings.get('map')});\n tagpro.group.socket.emit(\"setting\", {\"name\": \"time\", \"value\": settings.get('time')});\n tagpro.group.socket.emit(\"setting\", {\"name\": \"caps\", \"value\": settings.get('caps')});\n\n /* var settings = GM_getValue('ELTP_settings');\n for(var i = 0; i < settings.length; i++) {\n tagpro.group.socket.emit(\"setting\", {\"name\": settings[i].name, \"value\": GM_getValue('ELTP_' + settings[i])});\n }*/\n}","function toggleConfKeepLayout(){\n\ttoggleConfBool('layout', keepLayout);\n\tredirect(link[posActual]);\n}","function setUpPage() {\n\t\"use strict\";\n\tremoveSelectDefault();\n\tcreateEventListeners();\n\tgeneratePlaceholder();\n}","getSettings () {\r\n\t\tvar defaultSettings = {\r\n\t\t\tenableEmojiHovering: true,\r\n\t\t\tenableEmojiStatisticsButton: true\r\n\t\t};\r\n\t\tvar settings = BDfunctionsDevilBro.loadAllData(this.getName(), \"settings\");\r\n\t\tvar saveSettings = false;\r\n\t\tfor (var key in defaultSettings) {\r\n\t\t\tif (settings[key] == null) {\r\n\t\t\t\tsettings[key] = settings[key] ? settings[key] : defaultSettings[key];\r\n\t\t\t\tsaveSettings = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (saveSettings) {\r\n\t\t\tBDfunctionsDevilBro.saveAllData(settings, this.getName(), \"settings\");\r\n\t\t}\r\n\t\treturn settings;\r\n\t}","function initSettings() {\n const PUBLIC_CONFIGURE_SETTINGS = [\n {\n key: SETTING_KEYS.TOOLTIP_POSITION,\n settings: {\n name: i18n('settings.TOOLTIP_POSITION.name'),\n hint: i18n('settings.TOOLTIP_POSITION.hint'),\n type: String,\n config: true,\n default: 'right',\n choices: {\n top: i18n('settings.TOOLTIP_POSITION.choices.top'),\n right: i18n('settings.TOOLTIP_POSITION.choices.right'),\n bottom: i18n('settings.TOOLTIP_POSITION.choices.bottom'),\n left: i18n('settings.TOOLTIP_POSITION.choices.left'),\n overlay: i18n('settings.TOOLTIP_POSITION.choices.overlay'),\n surprise: i18n('settings.TOOLTIP_POSITION.choices.surprise'),\n doubleSurprise: i18n('settings.TOOLTIP_POSITION.choices.doubleSurprise'),\n },\n },\n },\n {\n key: SETTING_KEYS.FONT_SIZE,\n settings: {\n name: i18n('settings.FONT_SIZE.name'),\n hint: i18n('settings.FONT_SIZE.hint'),\n type: Number,\n config: true,\n range: {\n min: 1,\n step: 0.1,\n max: 2.5,\n },\n default: 1.2,\n },\n },\n {\n key: SETTING_KEYS.MAX_ROWS,\n settings: {\n name: i18n('settings.MAX_ROWS.name'),\n hint: i18n('settings.MAX_ROWS.hint'),\n type: Number,\n config: true,\n range: {\n min: 1,\n step: 1,\n max: 20,\n },\n default: 5,\n },\n },\n {\n key: SETTING_KEYS.DATA_SOURCE,\n settings: {\n name: i18n('settings.DATA_SOURCE.name'),\n hint: i18n('settings.DATA_SOURCE.hint'),\n type: String,\n scope: 'world',\n config: true,\n restricted: true,\n default: 'actor.data.data',\n },\n },\n {\n key: SETTING_KEYS.DARK_THEME,\n settings: {\n name: i18n('settings.DARK_THEME.name'),\n hint: i18n('settings.DARK_THEME.hint'),\n type: Boolean,\n config: true,\n default: false,\n },\n },\n {\n key: SETTING_KEYS.SHOW_ALL_ON_ALT,\n settings: {\n name: i18n('settings.SHOW_ALL_ON_ALT.name'),\n hint: i18n('settings.SHOW_ALL_ON_ALT.hint'),\n type: Boolean,\n scope: 'world',\n config: true,\n restricted: true,\n default: true,\n },\n },\n {\n key: SETTING_KEYS.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS,\n settings: {\n name: i18n('settings.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS.name'),\n hint: i18n('settings.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS.hint'),\n type: Boolean,\n scope: 'world',\n config: true,\n restricted: true,\n default: false,\n },\n },\n {\n key: SETTING_KEYS.DEBUG_OUTPUT,\n settings: {\n name: i18n('settings.DEBUG_OUTPUT.name'),\n hint: i18n('settings.DEBUG_OUTPUT.hint'),\n type: Boolean,\n scope: 'world',\n config: true,\n restricted: true,\n default: false,\n },\n },\n ];\n const HIDDEN_CONFIGURE_SETTINGS = [\n {\n key: SETTING_KEYS.GM_SETTINGS,\n settings: {\n type: Object,\n scope: 'world',\n restricted: true,\n default: {},\n },\n },\n {\n key: SETTING_KEYS.PLAYER_SETTINGS,\n settings: {\n type: Object,\n scope: 'world',\n restricted: true,\n default: {},\n },\n },\n {\n key: SETTING_KEYS.ACTORS,\n settings: {\n type: Object,\n scope: 'world',\n restricted: true,\n default: [],\n },\n },\n {\n key: SETTING_KEYS.CLIPBOARD,\n settings: {\n type: Object,\n default: [],\n },\n },\n ];\n\n registerTooltipManager();\n registerSettings([...PUBLIC_CONFIGURE_SETTINGS, ...HIDDEN_CONFIGURE_SETTINGS]);\n}","function mostrarSettings(){\n\ttry{\n\t\tif(get('wcr_settings')) return; //if the screen is already open, do nothing\n\n\t\tdataCache = null; //force q to load everything again, in case they changed something in another tab\n\n\t\t//editable properties of site settings\n\t\tvar propsSitio = {\n\t\t\turl:{ desc: 'URL', title: \"Define what sites will use these settings\",\n\t\t\t\ttipos:{\n\t\t\t\t\tstr:{ desc: 'Beginning of URL',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Beginning of the url without the http://www.\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: \"RegExp\",\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that matches the url\", size: 60 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\timg:{ desc:'Image', title:\"Method for obtaining the main image\",\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;img&gt; that is the only one with a \"src\" containing one of the following strings: \"/comics/\", \"/comic/\", \"/strips/\", \"/strip/\", \"/archives/\", \"/archive/\", \"/wp-content/uploads/\", \"comics\", \"comic\", \"strips\", \"strip\", \"archives\", \"archive\", \"/manga/\"' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Beginning of src',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Beginning of the &quot;src&quot; attribute of the &lt;img&gt;\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the whole &lt;img&gt; (or at least the &quot;src&quot; and &quot;title&quot; attributes)\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the &lt;img&gt;\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the &lt;img&gt;\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;img&gt;\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html, pos)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the &lt;img&gt; element (either as string or object)\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tback:{ desc: 'Back', title: 'Method for obtaining the link to the previous page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \"back\" or \"prev\" somewhere in its innerHTML or one of its attributes' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath condition',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the URL of the previous page\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the URL\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the URL of the previous page, or the &lt;a&gt; element that links to it\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;a&gt; element that links to the previous page\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html, pos)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the URL of the previous page\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tnext:{ desc: 'Next', title: 'Method for obtaining the link to the next page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \"next\" somewhere in its innerHTML or one of its attributes' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath condition',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the URL of the next page\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the URL\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the URL of the next page, or the &lt;a&gt; element that links to it\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;a&gt; element that links to the next page\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html, pos)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the URL of the next page\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tfirst:{ desc: 'First', title: 'Method for obtaining the link to the first page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \"first\" somewhere in its innerHTML or one of its attributes' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath condition',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the URL of the first page\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the URL\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the URL of the first page, or the &lt;a&gt; element that links to it\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;a&gt; element that links to the first page\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and returns the URL of the first page\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tlast:{ desc: 'Last', title: 'Method for obtaining the link to the last page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \"last\", \"latest\", \"newest\" or \"today\" somewhere in its innerHTML or one of its attributes' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath condition',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the URL of the last page\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the URL\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the URL of the last page, or the &lt;a&gt; element that links to it\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the &lt;a&gt; element that links to the last page\", size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and returns the URL of the last page\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tfixurl:{ desc: 'Fix URL', title: 'Fix URLs coming from a link or img.src for sites that may need it (like relative URLs that don\\'t behave normally, or links from http://something.com to http://www.something.com that wouldn\\'t work because of cross site request limitations)',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Do nothing' }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(url, img, link, pos)',\n\t\t\t\t\t\tval: { elem: 'textarea', title: 'Function that receives an URL, and flags telling if it came from an img.src or link to another page, and returns the fixed url', rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\textra:{ desc: 'Extra Content', title: 'Other content besides the main image to get from each page',\n\t\t\t\ttipos:{\n\t\t\t\t\tstr:{ desc: 'Literal string',\n\t\t\t\t\t\tval:{ elem: 'input', title: 'HTML string, this will be output literally', size: 60 }\n\t\t\t\t\t},\n\t\t\t\t\tre:{ desc: 'RegExp',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"Regular expression that captures the desired content\", size: 50 },\n\t\t\t\t\t\tgrp:{ elem: 'input', title: \"Number of the group that captured the content\", size: 1 }\n\t\t\t\t\t},\n\t\t\t\t\txp:{ desc: 'XPath',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"XPath query that returns the desired content\", size: 60 },\n\t\t\t\t\t\tarr:{ elem: 'select', html: ''},\n\t\t\t\t\t\tglue:{ elem: 'input', title: 'String to put between each pair of elements returned', size: 20},\n\t\t\t\t\t\tfirst:{ elem: 'input', title: 'Index of the first element to return (starting from 0, negative means counting from the last)', size: 1},\n\t\t\t\t\t\tlast:{ elem: 'input', title: 'Index of the last element to return (starting from 0, negative means counting from the last)', size: 1}\n\t\t\t\t\t},\n\t\t\t\t\tcss:{ desc: 'CSS selector',\n\t\t\t\t\t\tval:{ elem: 'input', title: \"CSS query that returns the desired content\", size: 60 },\n\t\t\t\t\t\tarr:{ elem: 'select', html: ''},\n\t\t\t\t\t\tglue:{ elem: 'input', title: 'String to put between each pair of elements returned', size: 20},\n\t\t\t\t\t\tfirst:{ elem: 'input', title: 'Index of the first element to return (starting from 0, negative means counting from the last)', size: 1},\n\t\t\t\t\t\tlast:{ elem: 'input', title: 'Index of the last element to return (starting from 0, negative means counting from the last)', size: 1}\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(html, pos)',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the desired content\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\txelem:{ desc: 'Extras Container', title: 'Element for placing the extra content when using the full layout',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Inside the WCR container (between the image and the back/next buttons)' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath',\n\t\t\t\t\t\tval: { elem: 'input', title: 'XPath query that returns the element where the extra content will be placed as its innerHTML', size:60 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tlayelem:{ desc: 'Layout Container', title: 'Element for placing the image and the rest of the script content when using the full layout',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Where the original image was' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'XPath',\n\t\t\t\t\t\tval: { elem: 'input', title: 'XPath query that returns the element where the content will be placed as its innerHTML', size:60 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tjs:{ desc: 'Custom Action', title: 'Custom function to execute after each page change',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Do nothing' }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function(dir)',\n\t\t\t\t\t\tval: { elem: 'textarea', title: 'Function that receives the direction in which the page was changed (0 when the starting page is loaded, 1 when going forward and -1 when going backwards)', rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tstyle:{ desc: 'Custom CSS', title: 'Custom CSS styles',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Don\\'t change anything' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'CSS rules',\n\t\t\t\t\t\tval: { elem: 'textarea', title: 'CSS rules', rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tbgcol:{ desc: 'Background Color',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Keep original' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Custom',\n\t\t\t\t\t\tval: { elem: 'input', title: '#RRGGBB or #RGB', size:6 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\ttxtcol:{ desc: 'Text Color',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Keep original' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Custom',\n\t\t\t\t\t\tval: { elem: 'input', title: '#RRGGBB or #RGB', size:6 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tscrollx:{ desc: 'Default Horizontal Autoscroll', title: 'Scroll to this position of the image each time you change the page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Left' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Relative to image',\n\t\t\t\t\t\tval: { elem: 'select', html: '' }\n\t\t\t\t\t},\n\t\t\t\t\tnum:{ desc: 'Pixels',\n\t\t\t\t\t\tval: { elem: 'input', title: 'X coordinate in pixels', size: 5 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function()',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that returns the numbers of pixels to scroll\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tscrolly:{ desc: 'Default Vertical Autoscroll', title: 'Scroll to this position of the image each time you change the page',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Top' }\n\t\t\t\t\t},\n\t\t\t\t\tstr:{ desc: 'Relative to image',\n\t\t\t\t\t\tval: { elem: 'select', html: '' }\n\t\t\t\t\t},\n\t\t\t\t\tnum:{ desc: 'Pixels',\n\t\t\t\t\t\tval: { elem: 'input', title: 'Y coordinate in pixels', size: 5 }\n\t\t\t\t\t},\n\t\t\t\t\tfn:{ desc: 'function()',\n\t\t\t\t\t\tval:{ elem: 'textarea', title: \"Function that returns the numbers of pixels to scroll\", rows:3, cols:45 }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tlayout:{ desc: 'Default Layout', title: 'Layout to use when no custom layout settings are defined for this site',\n\t\t\t\ttipos:{\n\t\t\t\t\tdef:{ desc: 'Default',\n\t\t\t\t\t\tval:{ elem: 'span', html: 'Use default settings' }\n\t\t\t\t\t},\n\t\t\t\t\tbool:{ desc: 'Custom',\n\t\t\t\t\t\tval: { elem: 'select', html: '' }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t//types of updates\n\t\tvar listaTipos = [\n\t\t\t'Bug fixes (Firefox)',\n\t\t\t'Bug fixes (Other browsers)',\n\t\t\t'New features',\n\t\t\t'New sites',\n\t\t\t'Fixes for old sites',\n\t\t\t'Graphic changes',\n\t\t\t'New options'];\n\t\tvar t, tiposUp = {};\n\t\tfor(t=0; t 100) to which the image should be expanded (leave blank for no limit)'},\n\t\t\tminScale:{ desc:'Min scale', title: 'Minimum scale (as a percentage, < 100) to which the image should be shrunk (leave blank for no limit)'},\n\t\t\tmaxScaleReset:{ desc:'Over max scale', title: 'Action to be taken when the AutoZoom would expand the image over the max scale',\n\t\t\t\tdef: '0',\n\t\t\t\tvals: {\n\t\t\t\t\t'0': 'Keep the max scale',\n\t\t\t\t\t'1': 'Reset to original size'\n\t\t\t\t}\n\t\t\t},\n\t\t\tminScaleReset:{ desc:'Under min scale', title: 'Action to be taken when the AutoZoom would shrink the image over the min scale',\n\t\t\t\tdef: '0',\n\t\t\t\tvals: {\n\t\t\t\t\t'0': 'Keep the min scale',\n\t\t\t\t\t'1': 'Reset to original size'\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_grp_scroll:{ desc: 'AutoScroll', title:'Scroll to this position of the image each time you change the page' },\n\t\t\tscrollx:{ desc:'Horizontal', title:'Scroll to this position of the image each time you change the page',\n\t\t\t\tvals:{\n\t\t\t\t\t'L':'Left',\n\t\t\t\t\t'R':'Right',\n\t\t\t\t\t'M':'Middle'\n\t\t\t\t}\n\t\t\t},\n\t\t\tscrolly:{ desc:'Vertical', title:'Scroll to this position of the image each time you change the page',\n\t\t\t\tvals:{\n\t\t\t\t\t'U':'Top',\n\t\t\t\t\t'D':'Bottom',\n\t\t\t\t\t'M':'Middle'\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_grp_prefetch:{ desc:'Page Preloading', title:'Adjust the number of pages to preload in each direction' },\n\t\t\tprefetch_der:{ desc:'Forward', title:'The number of next pages to preload (>0)',\n\t\t\t\tdef:defaultSettings.prefetchNext},\n\t\t\tprefetch_izq:{ desc:'Backwards', title:'The number of previous pages to preload (>0)',\n\t\t\t\tdef:defaultSettings.prefetchBack},\n\t\t\tprefetch_start_der:{ desc:'Initial forward', title:'The number of next pages to preload (>0) when the page is first loaded (to avoid wasting bandwith if you only wanted to see that page)',\n\t\t\t\tdef:defaultSettings.prefetchNextStart},\n\t\t\tprefetch_start_izq:{ desc:'Initial backwards', title:'The number of previous pages to preload (>0) when the page is first loaded (to avoid wasting bandwith if you only wanted to see that page)',\n\t\t\t\tdef:defaultSettings.prefetchBackStart},\n\t\t\tprefetchNoNext:{ desc:'Prefetch when no next page', title:'Disable this to stop preloading the previous page when visiting the last page (ie, the next page was not found)',\n\t\t\t\tdef:defaultSettings.prefetchNoNext ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}}\n\t\t};\n\n\t\t//visual options\n\t\tvar opsLayout = {\n\t\t\tlayout:{ desc:'Layout', title:'Minimalistic layout will show only the image, the defined extra content, and this script\\'s buttons. Keeping the original layout will stuff that same content in the place where the image used to be, leaving the rest of the page untouched. This setting can also be toggled for this site with a keyboard shortcut (- by default)',\n\t\t\t\tdef: defaultSettings.fullLayout ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Minimalistic',\n\t\t\t\t\t'1':'Keep original'\n\t\t\t\t}\n\t\t\t},\n\t\t\tbotones:{ desc:'Buttons', title:'Show or hide all the script\\'s buttons (back/next, bookmarks, settings, etc...). This setting can also be toggled for this site with a keyboard shortcut (Shift + - by default)',\n\t\t\t\tdef: defaultSettings.showButtons ? '1' : '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Hide',\n\t\t\t\t\t'1':'Show'\n\t\t\t\t}\n\t\t\t},\n\t\t\tdim:{ desc:'Screen Dimmer', title:'Add a shadow to the rest of the site so the image (or script content) gets a better focus',\n\t\t\t\tdef: '0',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'S':'Focus script content',\n\t\t\t\t\t'I':'Focus image'\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_grp_border:{ desc: 'Border', title:'Space to leave around the image (affects AutoScroll and AutoZoom)' },\n\t\t\tbordex:{ desc:'Horizontal border', title:'Extra pixels to the left/right of the image',\n\t\t\t\tdef: defaultSettings.borderLR },\n\t\t\tbordey:{ desc:'Vertical border', title:'Extra pixels to the top/bottom of the image',\n\t\t\t\tdef: defaultSettings.borderUD },\n\n\t\t\t_grp_cursor:{ desc:'Cursors', title:'Change the cursor according to the current state' },\n\t\t\tchcursor_img:{ desc:'Change over image', title:'Enable/Disable this to see a different cursor over the image depending on the state, or always the same one',\n\t\t\t\tdef:'1',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tchcursor_btns:{ desc:'Change over buttons', title:'Enable/Disable this to see a different cursor over the back/next buttons depending on the state, or always the same one',\n\t\t\t\tdef:'1',\n\t\t\t\tvals:{\n\t\t\t\t\t'0':'Disabled',\n\t\t\t\t\t'1':'Enabled'\n\t\t\t\t}\n\t\t\t},\n\t\t\tcursor_back:{ desc:'Previous page', title:'Cursor for the previous page', def:'1', vals: cursores },\n\t\t\tcursor_next:{ desc:'Next page', title:'Cursor for the next page', def:'2', vals: cursores },\n\t\t\tcursor_loading:{ desc:'Loading', title:'Cursor for when the next page is loading', def:'progress', vals: cursores },\n\t\t\tcursor_nolink:{ desc:'No link', title:'Cursor for when there is no next page', def:'not-allowed', vals: cursores },\n\t\t\tcursor_noimg:{ desc:'No image', title:'Cursor for when there is a next page but it has no image', def:'pointer', vals: cursores },\n\t\t\tcursor_custom_3:{ desc:'Custom cursor #1', title:'Custom image to use in the above options, either as an url or base64 (suggested size of 32x32 px, hotspot is at 16,16)'},\n\t\t\tcursor_custom_4:{ desc:'Custom cursor #2', title:'Custom image to use in the above options, either as an url or base64 (suggested size of 32x32 px, hotspot is at 16,16)'}\n\t\t};\n\n\t\tvar divsets = document.createElement('div');\n\t\tdivsets.id = 'wcr_settings';\n\t\tdivsets.style.textAlign = 'center';\n\t\tdivsets.innerHTML =\n\t\t\t'
'+\n\t\t\t'
'+\n\t\t\t\t'
'+\n\t\t\t\t\t'General | '+\n\t\t\t\t\t'Graphic settings | '+\n\t\t\t\t\t'Site settings | '+\n\t\t\t\t\t'Keyboard shortcuts'+\n\t\t\t\t'

'+\n\t\t\t\t'
'+\n\t\t\t\t\t'
'+htmlLayout(opsGeneral, 'general')+'
'+\n\t\t\t\t\t'
'+htmlLayout(opsLayout, 'layout')+'
'+\n\t\t\t\t\t'
'+htmlSitio(propsSitio)+'
'+\n\t\t\t\t\t'
'+htmlTeclas(teclas)+'
'+\n\t\t\t\t'

'+\n\t\t\t\t'
'+\n\t\t\t\t\t'Import / Export '+\n\t\t\t\t\t' '+\n\t\t\t\t\t'
'+\n\t\t\t\t\t'Reset '+\n\t\t\t\t\t' '+\n\t\t\t\t\t''+\n\t\t\t\t'

'+\n\t\t\t\t'
'+\n\t\t\t\t\t' '+\n\t\t\t\t\t' '+\n\t\t\t\t\t''+\n\t\t\t\t'
'+\n\t\t\t'
'+\n\t\t\t'';\n\t\tdocument.body.appendChild(divsets);\n\n\t\tinitLayout(opsGeneral, 'general');\n\t\tinitLayout(opsLayout, 'layout');\n\t\tinitSitio(propsSitio);\n\t\tinitTeclas(teclas);\n\n\t\t//set events for tabs / save / cancel\n\t\tvar tabs = xpath('//div[@id=\"wcr_settings_links\"]/span', document, true);\n\t\tfor(var i=0; i\\\";\\n \\tgeneratedCode.paragraphLink = \\\"\\\";\\n \\tgeneratedCode.username = user.username;\\n\\t}\",\n \"function initSettings() {\\n\\t\\tns.settings.exampleSetting = 1337;\\n\\t}\",\n \"function saveSettings() {\\n var settings = [];\\n if (options.orderby != defaults.orderby) {\\n settings.push('\\\"orderby\\\":\\\"' + options.orderby + '\\\"');\\n }\\n if (options.thsize != defaults.thsize) {\\n settings.push('\\\"thsize\\\":\\\"' + options.thsize + '\\\"');\\n }\\n if (options.extended != defaults.extended) {\\n settings.push('\\\"extended\\\":' + (options.extended ? 'true' : 'false'));\\n }\\n if (options.proxy != defaults.proxy) {\\n settings.push('\\\"proxy\\\":' + (options.proxy ? 'true' : 'false'));\\n }\\n if (settings.length > 0) {\\n settings = '{' + settings.join(',') + '}';\\n $.cookie('4cat', settings, {\\n expires: 30,\\n path: options.cookiePath,\\n domain: options.cookieDomain\\n });\\n }\\n else {\\n $.cookie('4cat', null, {\\n path: options.cookiePath,\\n domain: options.cookieDomain\\n });\\n }\\n }\",\n \"function Configuration() {\\r\\n\\tif(!Form.checkCurrentMode(0, true)) return;\\r\\n\\tForm.addForm();\\r\\n\\tForm.all_or_this = 0;\\t// all ****** pages\\r\\n\\tForm.main_or_sub = 0;\\t// main pages\\r\\n\\tForm.option_check = false;\\r\\n\\tLoadCurrentConf();\\r\\n\\tSetCurrentConf();\\r\\n\\tForm.option_check = true;\\r\\n\\tForm.openForm();\\r\\n}\",\n \"function settings(){\\n window.location = \\\"./settings.html\\\";\\n}\",\n \"function set_basic_settings(){ \\r\\n var saved_settings=[\\\"USERNAME\\\", \\\"RACE\\\",\\r\\n \\r\\n \\\"SPECIAL_LOCATIONS\\\",\\\"VILLAGES\\\",\\\"USE_TIMELINE\\\",\\\"USE_ALLY_LINES\\\",\\r\\n \\\"USE_CUSTOM_SIDEBAR\\\",\\\"USE_MARKET_COLORS\\\",\\\"USE_ENHANCED_RESOURCE_INFO\\\",\\r\\n \\\"USE_EXTRA_VILLAGE\\\",\\\"USE_SERVER_TIME\\\",\\\"USE_DEBUG_MODE\\\", \\r\\n \\\"SHOW_TIMELINE_REPORT_INFO\\\", \\\"COLLAPSE_TIMELINE\\\",\\r\\n \\r\\n \\\"TIMELINE_SIZES_HISTORY\\\",\\\"TIMELINE_SIZES_FUTURE\\\", \\\"TIMELINE_DISTANCE_HISTORY\\\",\\r\\n \\\"TIMELINE_SIZES_HEIGHT\\\", \\\"TIMELINE_SIZES_WIDTH\\\", \\\"TIME_DIFFERENCE\\\",\\r\\n \\\"TIMELINE_COLLAPSED_WIDTH\\\", \\\"TIMELINE_COLOR\\\", \\\"KEEP_TIMELINE_UPDATED\\\",\\r\\n \\\"TIMELINE_SCALE_WARP\\\",\\r\\n\\r\\n \\\"BUILDING_COLOR\\\", \\\"ATTACK_COLOR\\\", \\\"REPORT_COLOR\\\",\\r\\n \\\"MARKET_COLOR\\\", \\\"RESEARCH_COLOR\\\", \\\"PARTY_COLOR\\\"\\r\\n ];\\r\\n\\r\\n for (i in saved_settings) {\\r\\n var v = saved_settings[i];\\r\\n x = GM_getValue(prefix(v)); \\r\\n if (x!==undefined && x!==\\\"\\\") {\\r\\n try {\\r\\n eval(v+\\\"=\\\"+x);\\r\\n } catch (e) {\\r\\n eval(v+\\\"=x\\\"); \\r\\n }\\r\\n }\\r\\n }\\r\\n TIMELINE_EVENT_COLORS = [BUILDING_COLOR, ATTACK_COLOR, REPORT_COLOR, MARKET_COLOR, RESEARCH_COLOR, PARTY_COLOR];\\r\\n }\",\n \"function settings()\\r\\n\\t\\t{\\r\\n\\t\\t\\tdocument.getElementById('menu').style.display = \\\"none\\\";\\r\\n\\t\\t\\tdocument.getElementById('settings').style.display = \\\"initial\\\";\\r\\n\\t\\t}\",\n \"function open_settings() {\\n var dialog = new wkof.Settings({\\n script_id: 'doublecheck',\\n title: 'Double-Check Settings',\\n on_save: init_ui,\\n pre_open: settings_preopen,\\n content: {\\n tabAnswers: {type:'page',label:'Answers',content:{\\n grpChangeAnswers: {type:'group',label:'Change Answer',content:{\\n allow_retyping: {type:'checkbox',label:'Allow retyping answer',default:true,hover_tip:'When enabled, you can retype your answer by pressing Escape or Backspace.'},\\n allow_change_incorrect: {type:'checkbox',label:'Allow changing to \\\"incorrect\\\"',default:true,hover_tip:'When enabled, you can change your answer\\\\nto \\\"incorrect\\\" by pressing the \\\"-\\\" key.'},\\n allow_change_correct: {type:'checkbox',label:'Allow changing to \\\"correct\\\"',default:true,hover_tip:'When enabled, you can change your answer\\\\nto \\\"correct\\\" by pressing the \\\"+\\\" key.'},\\n show_corrected_answer: {type:'checkbox',label:'Show corrected answer',default:false,hover_tip:'When enabled, pressing \\\\'+\\\\' to correct your answer puts the\\\\ncorrected answer in the input field. Pressing \\\\'+\\\\' multiple\\\\ntimes cycles through all acceptable answers.'},\\n }},\\n grpCarelessMistakes: {type:'group',label:'Careless Mistakes',content:{\\n typo_action: {type:'dropdown',label:'Typos in meaning',default:'ignore',content:{ignore:'Ignore',warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when meaning contains typos.'},\\n wrong_answer_type_action: {type:'dropdown',label:'Wrong answer type',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when reading was entered instead of meaning, or vice versa.'},\\n wrong_number_n_action: {type:'dropdown',label:'Wrong number of n\\\\'s',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when you type the wrong number of n\\\\'s in certain reading questions.'},\\n small_kana_action: {type:'dropdown',label:'Big kana instead of small',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when you type a big kana instead of small (e.g. ゆ instead of ゅ).'},\\n kanji_reading_for_vocab_action: {type:'dropdown',label:'Kanji reading instead of vocab',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when the reading of a kanji is entered for a single character vocab word instead of the correct vocab reading.'},\\n kanji_meaning_for_vocab_action: {type:'dropdown',label:'Kanji meaning instead of vocab',default:'warn',content:{warn:'Warn/shake',wrong:'Mark wrong'},hover_tip:'Choose an action to take when the meaning of a kanji is entered for a single character vocab word instead of the correct vocab meaning.'},\\n }},\\n }},\\n tabMistakeDelay: {type:'page',label:'Mistake Delay',content:{\\n grpDelay: {type:'group',label:'Delay Next Question',content:{\\n delay_wrong: {type:'checkbox',label:'Delay when wrong',default:true,refresh_on_change:true,hover_tip:'If your answer is wrong, you cannot advance\\\\nto the next question for at least N seconds.'},\\n delay_multi_meaning: {type:'checkbox',label:'Delay when multiple meanings',default:false,hover_tip:'If the item has multiple meanings, you cannot advance\\\\nto the next question for at least N seconds.'},\\n delay_slightly_off: {type:'checkbox',label:'Delay when answer has typos',default:false,hover_tip:'If your answer contains typos, you cannot advance\\\\nto the next question for at least N seconds.'},\\n delay_period: {type:'number',label:'Delay period (in seconds)',default:1.5,hover_tip:'Number of seconds to delay before allowing\\\\nyou to advance to the next question.'},\\n }},\\n }},\\n tabBurnReviews: {type:'page',label:'Burn Reviews',content:{\\n grpBurnReviews: {type:'group',label:'Burn Reviews',content:{\\n warn_burn: {type:'dropdown',label:'Warn before burning',default:'never',content:{never:'Never',cheated:'If you changed answer',always:'Always'},hover_tip:'Choose when to warn before burning an item.'},\\n burn_delay_period: {type:'number',label:'Delay after warning (in seconds)',default:1.5,hover_tip:'Number of seconds to delay before allowing\\\\nyou to advance to the next question after seeing a burn warning.'},\\n }},\\n }},\\n tabLightning: {type:'page',label:'Lightning',content:{\\n grpLightning: {type:'group',label:'Lightning Mode',content:{\\n show_lightning_button: {type:'checkbox',label:'Show \\\"Lightning Mode\\\" button',default:true,hover_tip:'Show the \\\"Lightning Mode\\\" toggle\\\\nbutton on the review screen.'},\\n lightning_enabled: {type:'checkbox',label:'Enable \\\"Lightning Mode\\\"',default:true,refresh_on_change:true,hover_tip:'Enable \\\"Lightning Mode\\\", which automatically advances to\\\\nthe next question if you answer correctly.'},\\n srs_msg_period: {type:'number',label:'SRS popup time (in seconds)',default:1.2,min:0,hover_tip:'How long to show SRS up/down popup when in lightning mode. (0 = don\\\\'t show)'},\\n }},\\n }},\\n tabAutoInfo: {type:'page',label:'Item Info',content:{\\n grpAutoInfo: {type:'group',label:'Show Item Info',content:{\\n autoinfo_correct: {type:'checkbox',label:'After correct answer',default:false,hover_tip:'Automatically show the Item Info after correct answers.', validate:validate_autoinfo_correct},\\n autoinfo_incorrect: {type:'checkbox',label:'After incorrect answer',default:false,hover_tip:'Automatically show the Item Info after incorrect answers.', validate:validate_autoinfo_incorrect},\\n autoinfo_multi_meaning: {type:'checkbox',label:'When multiple meanings',default:false,hover_tip:'Automatically show the Item Info when an item has multiple meanings.', validate:validate_autoinfo_correct},\\n autoinfo_slightly_off: {type:'checkbox',label:'When answer has typos',default:false,hover_tip:'Automatically show the Item Info when your answer has typos.', validate:validate_autoinfo_correct},\\n }},\\n }},\\n }\\n });\\n dialog.open();\\n }\",\n \"function resetSettings()\\n {\\n my.settings.unit = my.UNIT.MAIN\\n }\",\n \"function setPageSetting(setting,value) {\\n if (autoTrimpSettings.hasOwnProperty(setting) == false) {\\n return false;\\n }\\n if (autoTrimpSettings[setting].type == 'boolean') {\\n // debug('found a boolean');\\n autoTrimpSettings[setting].enabled = value;\\n document.getElementById(setting).setAttribute('class', 'settingsBtn settingBtn' + autoTrimpSettings[setting].enabled);\\n } else if (autoTrimpSettings[setting].type == 'value') {\\n // debug('found a value');\\n autoTrimpSettings[setting].value = value;\\n } else if (autoTrimpSettings[setting].type == 'dropdown') {\\n autoTrimpSettings[setting].selected = value;\\n }\\n updateCustomButtons();\\n saveSettings();\\n checkSettings();\\n}\",\n \"function restoreSettings()\\n{\\n var tmp = System.Gadget.Settings.readString(\\\"user_name\\\");\\n\\tif (tmp != \\\"\\\") userName = tmp;\\n\\ttmp = System.Gadget.Settings.readString(\\\"api_key\\\");\\n\\tif (tmp != \\\"\\\") apiKey = tmp;\\n\\ttmp = System.Gadget.Settings.readString(\\\"poll_freq\\\");\\n\\tif (tmp != \\\"\\\") pollFreq = tmp;\\n\\tvar nameField = document.getElementById(\\\"user_name\\\");\\n\\tnameField.value = userName;\\n\\tvar keyField = document.getElementById(\\\"api_key\\\");\\n\\tkeyField.value = apiKey;\\n\\tvar pollField = document.getElementById(\\\"poll_freq\\\");\\n\\tpollField.value = pollFreq;\\n\\tSystem.Gadget.onSettingsClosing = SettingsClosing;\\n}\",\n \"function mainPageSetupRepeat() {\\n hideGenres(globalUserSettings);\\n handleContinueWatching(globalUserSettings);\\n}\",\n \"static _getSettings(page) {\\n // Util.purgeSettings();\\n const allValues = GM_listValues();\\n if (MP.DEBUG) {\\n console.log('_getSettings(', page, ')\\\\nStored GM keys:', allValues);\\n }\\n Object.keys(page).forEach((scope) => {\\n Object.keys(page[Number(scope)]).forEach((setting) => {\\n const pref = page[Number(scope)][Number(setting)];\\n if (MP.DEBUG) {\\n console.log('Pref:', pref.title, '| Set:', GM_getValue(`${pref.title}`), '| Value:', GM_getValue(`${pref.title}_val`));\\n }\\n if (pref !== null && typeof pref === 'object') {\\n const elem = (document.getElementById(pref.title));\\n const cases = {\\n checkbox: () => {\\n elem.setAttribute('checked', 'checked');\\n },\\n textbox: () => {\\n elem.value = GM_getValue(`${pref.title}_val`);\\n },\\n dropdown: () => {\\n elem.value = GM_getValue(pref.title);\\n },\\n };\\n if (cases[pref.type] && GM_getValue(pref.title))\\n cases[pref.type]();\\n }\\n });\\n });\\n }\",\n \"function generateSettings (done) {\\n nconf.argv()\\n .env()\\n .file({\\n file: 'www/build/js/settings.js',\\n format: {\\n stringify: function (obj, replacer, spacing) {\\n return 'window.Settings = ' + JSON.stringify(obj, replacer || null, spacing || 2);\\n },\\n parse: function(value) {\\n return JSON.parse(value.replace('window.Settings = ', ''));\\n }\\n }\\n });\\n\\n nconf.set('apiEndpoint', nconf.get('TANGO_API_ENDPOINT'));\\n nconf.set('apiToken', nconf.get('TANGO_API_TOKEN'));\\n nconf.set('awsAccessKeyId', nconf.get('AWS_ACCESS_KEY'));\\n nconf.set('awsSecretAccessKey', nconf.get('AWS_SECRET_KEY'));\\n nconf.set('awsRegion', nconf.get('AWS_REGION'));\\n nconf.set('oneSignalKey', nconf.get('ONE_SIGNAL_KEY'));\\n nconf.set('googleProjectNumber', nconf.get('GOOGLE_PROJECT_NUMBER'));\\n nconf.set('facebookAppId', nconf.get('FACEBOOK_APP_ID'));\\n\\n nconf.save(function (err) {\\n if (err) console.log(err);\\n else done();\\n });\\n}\",\n \"function deliriumkit(settings){\\r\\n\\t/**\\r\\n\\t * Incluir el archivo con las funciones basicas\\r\\n\\t */\\r\\n\\tif (settings) {\\r\\n\\t\\tfor (option in settings){ \\r\\n\\t\\t\\tthis.settings[option] = settings[option]; \\r\\n\\t\\t}\\r\\n\\t}\\t\\r\\n}\",\n \"function setSavedOptions() {\\n log('Getting saved options.');\\n GM_setValue(\\\"opt_loggingEnabled\\\", opt_loggingEnabled);\\n GM_setValue(\\\"opt_hidefedded\\\", opt_hidefedded);\\n GM_setValue(\\\"opt_hidefallen\\\", opt_hidefallen);\\n GM_setValue(\\\"opt_hidetravel\\\", opt_hidetravel);\\n GM_setValue(\\\"opt_showcaymans\\\", opt_showcaymans);\\n GM_setValue(\\\"opt_hidehosp\\\", opt_hidehosp);\\n GM_setValue(\\\"opt_disabled\\\", opt_disabled);\\n }\",\n \"function postSetGUIConfig() {\\n\\tvar values = null;\\n\\tif (values != null) {\\n\\t\\t// initialize defaults\\n\\t\\tbulk_value_edit = false;\\n\\t\\tcell_value_edit = false;\\n\\t\\t$('#enableEdit').css('display', 'none');\\n\\t\\tfile_download = false;\\n\\t\\tview_tags = false;\\n\\t\\tview_URL = false;\\n\\t\\t\\n\\t\\tif (values.contains('bulk_value_edit')) {\\n\\t\\t\\tbulk_value_edit = true;\\n\\t\\t}\\n\\t\\tif (values.contains('cell_value_edit')) {\\n\\t\\t\\tcell_value_edit = true;\\n\\t\\t\\t$('#enableEdit').css('display', '');\\n\\t\\t}\\n\\t\\tif (values.contains('file_download')) {\\n\\t\\t\\tfile_download = true;\\n\\t\\t}\\n\\t\\tif (values.contains('view_tags')) {\\n\\t\\t\\tview_tags = true;\\n\\t\\t}\\n\\t\\tif (values.contains('view_URL')) {\\n\\t\\t\\tview_URL = true;\\n\\t\\t}\\n\\t} else {\\n\\t\\tbulk_value_edit = true;\\n\\t\\tcell_value_edit = true;\\n\\t\\t$('#enableEdit').css('display', '');\\n\\t\\tfile_download = true;\\n\\t\\tview_tags = true;\\n\\t\\tview_URL = true;\\n\\t}\\n}\",\n \"function save_options(){\\r\\n var _url = doc[$elem]('custom-url');\\r\\n var url = _url[_val];\\r\\n if (url == \\\"\\\") {\\r\\n url = aboutPages[0];\\r\\n }\\r\\n\\r\\n save(true, url);\\r\\n}\",\n \"function restore_options() {\\n $(\\\"#theme\\\").val(\\\"blue\\\");\\n $(\\\"#font_size\\\").val(\\\"0.9em\\\");\\n $(\\\"#popup_width\\\").val(\\\"610\\\");\\n $(\\\"#popup_height\\\").val(\\\"620\\\");\\n $(\\\"#bookmark_url\\\").val(\\\"http://www.google.com/bookmarks/\\\");\\n $(\\\"#sig_url\\\").val(\\\"http://www.google.com/bookmarks/find\\\");\\n}\",\n \"function _setup()\\n{\\n // Load all settings.\\n var variables = GM_listValues();\\n for (var i=0; i 0) {\\n $(\\\"#txtPass\\\").attr(\\\"disabled\\\", \\\"disabled\\\").hide();\\n $(\\\"#txtPassDummy\\\").show();\\n }\\n $(\\\"#selDebug\\\").val(`${cfg.Debug}`);\\n $(\\\"#settings\\\").fadeIn();\\n }\",\n \"function restore_options() {\\n\\ntry\\n {\\n\\tvar servers = getLocalStorage(\\\"teamcitysettings\\\");\\n\\tvar server = servers[0]||{};\\n\\t\\n setOptionFromElement(\\\"host\\\",server.host||\\\"\\\");\\n setOptionFromElement(\\\"username\\\",server.username||\\\"\\\");\\n setOptionFromElement(\\\"password\\\",server.password||\\\"\\\");\\n showBuildTypeIds(server);\\n }catch(err){\\n\\tconsole.log(\\\"Error exception\\\");\\n }\\n}\",\n \"function settingsInit() {\\r\\n\\tvar settingsCookie = cookieRead('settings');\\r\\n\\t\\r\\n\\t// If the cookie exists, read it into settings, otherwise load the defaults\\r\\n\\ttry {\\r\\n\\t\\tsettings = JSON.parse( decodeURIComponent(settingsCookie) );\\r\\n\\t\\t\\r\\n\\t\\tif ( settingsUpdate() )\\r\\n\\t\\t\\tsettingsSave();\\r\\n\\t\\t\\t\\r\\n\\t} catch (err) {\\r\\n\\t\\talert('Your saved settings are corrupt, so the defaults have been loaded instead.\\\\nIf you have saved your settings, try to import them.\\\\nError: '+err);\\r\\n\\t\\tcookieDelete('settings');\\r\\n\\t\\tindexReload();\\r\\n\\t}\\r\\n\\t\\r\\n\\tsettingsElements = {};\\t\\t\\r\\n}\",\n \"CONFIG_PAGE_COPY_SETTINGS(state) {\\n state.settingsCopy = Object.assign({}, state.settings);\\n }\",\n \"function settingsUpdate() {\\r\\n\\t// 0.8 >> 0.9\\r\\n\\tif ( typeof(settings.motw) != 'undefined' ) {\\r\\n\\t\\tsettings.style.disable_motw = settings.motw;\\r\\n\\t\\tdelete settings.motw;\\r\\n\\t\\treturn true;\\r\\n\\t}\\r\\n\\t\\r\\n\\t// 1.1 >> 1.2\\r\\n\\tif ( typeof(settings.style.hide_time_created) == 'undefined' ) {\\r\\n\\t\\tsettings.style.hide_time_created = true;\\r\\n\\t\\treturn true;\\r\\n\\t}\\r\\n\\t\\r\\n\\treturn false;\\r\\n}\",\n \"function setup() {\\n wkof.Menu.insert_script_link({name:'doublecheck',submenu:'Settings',title:'Double-Check',on_click:open_settings});\\n\\n var defaults = {\\n allow_retyping: true,\\n allow_change_correct: false,\\n show_corrected_answer: false,\\n allow_change_incorrect: false,\\n typo_action: 'ignore',\\n wrong_answer_type_action: 'warn',\\n wrong_number_n_action: 'warn',\\n small_kana_action: 'warn',\\n kanji_reading_for_vocab_action: 'warn',\\n kanji_meaning_for_vocab_action: 'warn',\\n delay_wrong: true,\\n delay_multi_meaning: false,\\n delay_slightly_off: false,\\n delay_period: 1.5,\\n warn_burn: 'never',\\n burn_delay_period: 1.5,\\n show_lightning_button: true,\\n lightning_enabled: false,\\n srs_msg_period: 1.2,\\n autoinfo_correct: false,\\n autoinfo_incorrect: false,\\n autoinfo_multi_meaning: false,\\n autoinfo_slightly_off: false\\n }\\n return wkof.Settings.load('doublecheck', defaults)\\n .then(init_ui.bind(null, true /* first_time */));\\n }\",\n \"function ConfigurationSubPage() {\\r\\n\\tif(!Form.checkCurrentMode(0, true)) return;\\r\\n\\tForm.addForm();\\r\\n\\tForm.all_or_this = 0;\\t// all ****** pages\\r\\n\\tForm.main_or_sub = 1;\\t// sub pages\\r\\n\\tForm.option_check = false;\\r\\n\\tLoadCurrentConf();\\r\\n\\tSetCurrentConf();\\r\\n\\tForm.option_check = true;\\r\\n\\tForm.openForm();\\r\\n}\",\n \"function defaultsClick() {\\n Common.defaultSettings();\\n setControlValues();\\n Common.setTheme(document.getElementById('theme').value);\\n}\",\n \"function startSettings() {\\n alert('I don\\\\'t do anything yet.');\\n }\",\n \"function restore_options() {\\n\\trestore_local(\\\"sense_facebook\\\");\\n\\trestore_local(\\\"sense_google\\\");\\n\\trestore_local(\\\"sense_twitter\\\");\\n\\trestore_local(\\\"sense_youtube\\\");\\n\\trestore_local(\\\"sense_4Chan\\\");\\n\\trestore_local(\\\"sense_selector\\\");\\n\\trestore_local(\\\"sense_color\\\");\\n\\trestore_local(\\\"api_key\\\");\\n\\tsave_options();\\n}\",\n \"writeConfig(title, config) {\\n return; // fix later\\n }\",\n \"function aboutSetup(){\\n\\n}\",\n \"function setDefaults() {\\n\\tconfig.all = {\\n\\t\\ttitleStyle: {\\n\\t\\t\\t'font-src': 'http://fonts.googleapis.com/css?family=Chango',\\n\\t\\t\\t'font-family': 'Chango, cursive',\\n\\t\\t\\t'color': '#000000',\\n\\t\\t\\t'font-size': '48px'\\n\\t\\t},\\n\\t\\ttimerStyle: {\\n\\t\\t\\t'background-color': '#32cd32',\\n\\t\\t\\t'font-src': 'http://fonts.googleapis.com/css?family=Chango',\\n\\t\\t\\t'font-family': 'Chango, cursive',\\n\\t\\t\\t'color': '#000000',\\n\\t\\t\\t'font-size': '48px'\\n\\t\\t},\\n\\t\\ttimers: [],\\n\\t\\twindowSettings: {\\n\\t\\t\\twidth: 650,\\n\\t\\t\\theight: 350\\n\\t\\t},\\n\\t\\tusername: '',\\n\\t\\tpassword: '',\\n\\t\\tchannel: '',\\n\\t\\tidInc: 0,\\n\\t\\tactiveID: null\\n\\t}\\n}\",\n \"function settings(e) {\\n e.detail.applicationcommands = {\\n \\\"divAccount\\\": { href: \\\"accountSettings.html\\\", title: \\\"Account\\\" },\\n \\\"divPrivacy\\\": { href: \\\"privacySettings.html\\\", title: \\\"Privacy\\\" },\\n };\\n WinJS.UI.SettingsFlyout.populateSettings(e);\\n }\",\n \"function save_options() {\\n\\tif (!woas.config.permit_edits) {\\n\\t\\talert(woas.i18n.READ_ONLY);\\n\\t\\treturn false;\\n\\t}\\n\\twoas.cfg_commit();\\n\\twoas.set_current(\\\"Special::Advanced\\\", true);\\n}\",\n \"function setSettings(obj) {\\n Setting_AddToTop = (obj.Set_AddToTop !== undefined && obj.Set_AddToTop !== null && obj.Set_AddToTop !== \\\"\\\") ? obj.Set_AddToTop : Setting_AddToTop;\\n Setting_IncludeUpDown = (obj.Set_IncludeUpDown !== undefined && obj.Set_IncludeUpDown !== null && obj.Set_IncludeUpDown !== \\\"\\\") ? obj.Set_IncludeUpDown : Setting_IncludeUpDown;\\n Setting_IncludeEdit = (obj.Set_IncludeEdit !== undefined && obj.Set_IncludeEdit !== null && obj.Set_IncludeEdit !== \\\"\\\") ? obj.Set_IncludeEdit : Setting_IncludeEdit;\\n Setting_IncludeDelete = (obj.Set_IncludeDelete !== undefined && obj.Set_IncludeDelete !== null && obj.Set_IncludeDelete !== \\\"\\\") ? obj.Set_IncludeDelete : Setting_IncludeDelete;\\n Setting_UseNgBlur = (obj.Set_UseNgBlur !== undefined && obj.Set_UseNgBlur !== null && obj.Set_UseNgBlur !== \\\"\\\") ? obj.Set_UseNgBlur : Setting_UseNgBlur;\\n Setting_PointToOriginalArr = (obj.Set_PointToOriginalArr !== undefined && obj.Set_PointToOriginalArr !== null && obj.Set_PointToOriginalArr !== \\\"\\\") ? obj.Set_PointToOriginalArr : Setting_PointToOriginalArr;\\n Setting_UseInputBoxForEditable = (obj.Set_UseInputBoxForEditable !== undefined && obj.Set_UseInputBoxForEditable !== null && obj.Set_UseInputBoxForEditable !== \\\"\\\") ? obj.Set_UseInputBoxForEditable : Setting_UseInputBoxForEditable;\\n }\",\n \"function qll_system_settings_import()\\r\\n{\\r\\n\\tsett=$('#QLLMenuSettingsField').attr('value').split(\\\";\\\");\\r\\n\\t\\r\\n\\tif(sett.length<=1)\\r\\n\\t{\\t\\r\\n\\t\\tqll_fun_showAlertBox('ALARM', qll_lang[40]);\\r\\n\\t\\treturn;\\r\\n\\t}\\r\\n\\t\\r\\n\\tvar line= new Array();\\r\\n\\t\\r\\n\\tfor(var k in sett)\\r\\n\\t{\\r\\n\\t\\tif(sett[k].length==0)\\r\\n\\t\\t{\\tcontinue;\\t}\\r\\n\\r\\n\\t\\tline[k]=sett[k].split(\\\"=\\\");\\r\\n\\t\\t\\r\\n\\t\\tif(line[k].length!==2)\\r\\n\\t\\t{\\r\\n\\t\\t\\talert(qll_lang[40]);\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\t\\tline[k][0]=qll_fun_unsafe(line[k][0]);\\r\\n\\t\\tline[k][1]=qll_fun_unsafe(line[k][1]);\\r\\n\\t}\\r\\n\\t\\r\\n\\tif(line[0][0]!='QLLVersion' || parseInt(line[0][1])!=GM_getValue(\\\"QLLVersion\\\",qll_version*10000000))\\r\\n\\t{\\r\\n\\t\\talert(qll_lang[40]);\\r\\n\\t\\treturn;\\r\\n\\t}\\r\\n\\t\\r\\n\\tqll_system_settings_delete();\\r\\n\\t\\r\\n\\tfor(k in line)\\r\\n\\t{\\r\\n\\t\\tif(line[k][1].length==0)\\r\\n\\t\\t{\\tcontinue;\\t}\\r\\n\\t\\t\\r\\n\\t\\tswitch(line[k][1])\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase 'true': line[k][1]=true; break;\\r\\n\\t\\t\\tcase 'false': line[k][1]=false; break;\\r\\n\\t\\t\\tdefault: if(isFinite(parseInt(line[k][1]))) line[k][1]=parseInt(line[k][1]); break;\\r\\n\\t\\t}\\r\\n\\t\\tGM_setValue(line[k][0],line[k][1]);\\r\\n\\t}\\r\\n\\t\\r\\n\\talert(qll_lang[39]);\\r\\n}\",\n \"function roomSettings() {\\n\\t// output: Gold%20Coast\\n\\n\\t// window.location = \\\"settings/roomSettings.html\\\";\\n}\",\n \"function setup() {\\n\\t\\t type = getCookie(\\\"practical\\\");\\n\\t\\t option = document.getElementById(\\\"types\\\");\\n\\t\\t window.location = type;\\n\\n\\t\\t}\",\n \"function exportSettings(content) {\\n top.consoleRef=window.open('','settings-export',\\n 'width=500,height=850'\\n +',menubar=0'\\n +',toolbar=0'\\n +',status=0'\\n +',scrollbars=1'\\n +',resizable=1', true);\\n top.consoleRef.document.writeln(\\n 'ditbi Settings Export'\\n +''\\n +content\\n +'');\\n top.consoleRef.document.close();\\n }\",\n \"function makeSettings() {\\n\\t\\tvar i,\\n\\t\\t\\tdata = $.data(element, colorbox);\\n\\t\\t\\n\\t\\tif (data == null) {\\n\\t\\t\\tsettings = $.extend({}, defaults);\\n\\t\\t\\tif (console && console.log) {\\n\\t\\t\\t\\tconsole.log('Error: cboxElement missing settings object')\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\tsettings = $.extend({}, data); \\t\\t\\n\\t\\t}\\n\\t\\t\\n\\t\\tfor (i in settings) {\\n\\t\\t\\tif ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.\\n\\t\\t\\t\\tsettings[i] = settings[i].call(element);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\tsettings.rel = settings.rel || element.rel || 'nofollow';\\n\\t\\tsettings.href = settings.href || $(element).attr('href');\\n\\t\\tsettings.title = settings.title || element.title;\\n\\t\\t\\n\\t\\tif (typeof settings.href === \\\"string\\\") {\\n\\t\\t\\tsettings.href = $.trim(settings.href);\\n\\t\\t}\\n\\t}\",\n \"function main() {\\r\\n initFlags();\\r\\n fixMarkup();\\r\\n changeLayout();\\r\\n initConfiguration();\\r\\n}\",\n \"function saveSettingsValues() {\\n browser.storage.local.set({delayBeforeClean: document.getElementById(\\\"delayBeforeCleanInput\\\").value});\\n\\n browser.storage.local.set({activeMode: document.getElementById(\\\"activeModeSwitch\\\").checked});\\n\\n browser.storage.local.set({statLoggingSetting: document.getElementById(\\\"statLoggingSwitch\\\").checked});\\n\\n browser.storage.local.set({showNumberOfCookiesInIconSetting: document.getElementById(\\\"showNumberOfCookiesInIconSwitch\\\").checked});\\n\\n browser.storage.local.set({notifyCookieCleanUpSetting: document.getElementById(\\\"notifyCookieCleanUpSwitch\\\").checked});\\n\\n browser.storage.local.set({contextualIdentitiesEnabledSetting: document.getElementById(\\\"contextualIdentitiesEnabledSwitch\\\").checked});\\n\\n page.onStartUp();\\n}\",\n \"function setupPage() {\\n clearAlerts();\\n loadOptions();\\n document.getElementById('save').addEventListener('click', saveOptions);\\n document.getElementById('defaults').addEventListener('click', saveDefaultOptions);\\n}\",\n \"function ggr2Settings()\\n{ \\n this.save = saveSettingToDisk;\\n this.load = loadSettingFromDisk;\\n this.car_model = '';\\n this.car_color = '';\\n}\",\n \"function saveConfig() {\\r\\n\\tvar err=0;\\r\\n\\t\\r\\n\\ttrace(\\\"saveConfig() storing the settings\\\");\\r\\n\\r\\n\\ted2kDlMethod = GM_config.get('ed2kDlMethod');\\r\\n\\r\\n\\temuleUrl = GM_config.get('emuleUrl');\\r\\n\\tif(emuleUrl.charAt(emuleUrl.length-1) != '/') {\\r\\n\\t\\tGM_config.set(\\\"emuleUrl\\\", emuleUrl + '/');\\r\\n\\t\\temuleUrl += '/';\\r\\n\\t}\\r\\n\\r\\n\\temulePwd = GM_config.get('emulePwd');\\r\\n\\tif(emulePwd=='' && ed2kDlMethod=='emule') {\\r\\n\\t\\talert(\\\"A password is mandatory to submit new link to emule via web URL.\\\\nPlease choose another method or specify the password.\\\");\\r\\n\\t\\tGM_config.set(\\\"emulePwd\\\",\\\"something\\\");\\r\\n\\t\\temulePwd = GM_config.get('emulePwd');\\r\\n\\t\\terr=-1;\\r\\n\\t}\\r\\n\\r\\n\\temuleCat = strToCat(GM_config.get('emuleCat'));\\r\\n\\tif(emuleCat==-1) {\\r\\n\\t\\talert(\\\"Category value invalid. Reverting back to the default value (*default=0)\\\");\\r\\n\\t\\tGM_config.set('emuleCat', '*default=0');\\r\\n\\t\\temuleCat = strToCat('*default=0');\\r\\n\\t}\\r\\n\\r\\n\\tpopupPos = GM_config.get('popupPos');\\r\\n\\r\\n\\tpopupHeight = GM_config.get('popupHeight');\\r\\n\\tif (popupHeight > 0 && popupHeight < 40 ) {\\r\\n\\t\\talert(\\\"With a 'Max Popup Height' beetween 0 < x < 40px, you won't be able to press the Settings button. So we consider this value as 0 (unlimited)\\\");\\r\\n\\t\\tGM_config.set(\\\"popupHeight\\\",0);\\r\\n\\t\\tpopupHeight = 0;\\r\\n\\t}\\r\\n\\r\\n\\tpopupWidth = GM_config.get('popupWidth');\\r\\n\\tif (popupWidth > 0 && popupWidth < 100 ) {\\r\\n\\t\\talert(\\\"With a 'Max Popup Width' beetween 0 < x < 100 px, you won't be able to press the Settings button. So we consider this value as 0 (unlimited)\\\");\\r\\n\\t\\tGM_config.set(\\\"popupWidth\\\",0);\\r\\n\\t\\tpopupWidth = 0;\\r\\n\\t}\\r\\n\\r\\n\\teditCol = GM_config.get('editCol');\\r\\n\\teditRow = GM_config.get('editRow');\\r\\n\\r\\n\\tif (GM_config.get('editMaxLength') < editMaxLength) {\\r\\n\\t\\talert(\\\"MaxLength must be superior to \\\" + editMaxLength);\\r\\n\\t\\tGM_config.set(\\\"editMaxLength\\\",editMaxLength);\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\teditMaxLength = GM_config.get('editMaxLength');\\r\\n\\t}\\r\\n\\r\\n\\tif (err<0) {\\r\\n\\t\\tGM_config.open();\\r\\n\\t\\tsaveConfig();\\r\\n\\t}\\r\\n\\r\\n\\treturn err;\\r\\n}\",\n \"function ConfigurationWithID() {\\r\\n\\tif(!Form.checkCurrentMode(0, true)) return;\\r\\n\\tForm.addForm();\\r\\n\\tForm.all_or_this = 1;\\t// this ****** pages\\r\\n\\tForm.main_or_sub = 0;\\t// main pages\\r\\n\\tForm.option_check = false;\\r\\n\\tLoadCurrentConf();\\r\\n\\tSetCurrentConf();\\r\\n\\tForm.option_check = true;\\r\\n\\tForm.openForm();\\r\\n}\",\n \"function restore_options() {\\n // Use default value color = 'red' and likesColor = true.\\n chrome.storage.sync.get({\\n wpt_base_url: \\\"http://www.webpagetest.org/\\\"\\n }, function(items) {\\n document.getElementById('wpt_base_url').value = items.wpt_base_url;\\n document.getElementById('wpt_base_url').disabled = false;\\n });\\n}\",\n \"function injectSettings() {\\r\\n\\t\\tvar menu = document.getElementById(\\\"top\\\");\\r\\n\\t\\tmenu = (menu ? menu.getElementsByTagName(\\\"menu\\\")[0] : undefined);\\r\\n\\r\\n\\t\\tif (!menu) {\\r\\n\\t\\t\\tdanbNotice(\\\"Better Better Booru: The settings panel link could not be created.\\\", \\\"error\\\");\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\tvar link = document.createElement(\\\"a\\\");\\r\\n\\t\\tlink.href = \\\"#\\\";\\r\\n\\t\\tlink.innerHTML = \\\"BBB Settings\\\";\\r\\n\\t\\tlink.addEventListener(\\\"click\\\", function(event) {\\r\\n\\t\\t\\tif (!bbb.el.menu.window) {\\r\\n\\t\\t\\t\\tloadSettings();\\r\\n\\t\\t\\t\\tcreateMenu();\\r\\n\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t}, false);\\r\\n\\r\\n\\t\\tvar item = document.createElement(\\\"li\\\");\\r\\n\\t\\titem.appendChild(link);\\r\\n\\r\\n\\t\\tvar menuItems = menu.getElementsByTagName(\\\"li\\\");\\r\\n\\t\\tmenu.insertBefore(item, menuItems[menuItems.length - 1]);\\r\\n\\r\\n\\t\\twindow.addEventListener(\\\"resize\\\", adjustMenuTimer, false);\\r\\n\\t}\",\n \"function loadSettings()\\n {\\n if (typeof localStorage.unit != 'undefined') {\\n my.settings.unit = localStorage.unit\\n }\\n }\",\n \"function toggleDevOptions() {\\n returnURL.val('auto#');\\n lang.val('default');\\n lang.parent().parent().toggle();\\n referer.parent().parent().toggle();\\n returnURL.parent().parent().toggle();\\n oauthState.parent().parent().hide();\\n}\",\n \"function configureSettings() {\\n // Load all the saved settings into the preferences object.\\n PREF_OBJ.load();\\n return true;\\n}\",\n \"function settings() {\\n\\n\\t$('.slimScrollDiv').hide();\\n\\t$('#back-top').hide();\\n\\t$('#sidebar-top').show();\\n\\t$('#delete-message').hide();\\n\\t$('#compose-message').show();\\n\\t$('#process-send').hide();\\n\\n\\t//flag currrent page as LIST\\n\\t$('.message-elem').hide();\\n\\t$('.current-page').attr('id', 'list');\\t\\n\\t$('#folder-name').html('Settings');\\n\\t$('.loading-messages').hide();\\n\\t$('#message-settings').show();\\n\\n\\t//get settings variables from local storage\\n\\twindow.url \\t\\t= localStorage.getItem('url');\\n \\twindow.interval = parseInt(localStorage.getItem('interval'));\\n\\t//populate fields, URL\\n\\t$('#settings-url').val(window.url);\\n\\n\\t//populate fields, INTERVAL\\n\\t$('#settings-interval option').\\n\\t\\tremoveAttr('selected').\\n\\t\\tfilter('[value='+window.interval+']').\\n\\t\\tattr('selected', true);\\n\\t\\n\\t$('#settings-interval-button span').html(window.interval);\\n\\n\\t//on click save settings button\\n\\t$('#save-settings').click(function() {\\n\\t\\t//save new settigns to local storage\\n\\t\\tlocalStorage.setItem('url', \\t\\t$('#settings-url').val());\\n\\t\\tlocalStorage.setItem('interval', \\t$('#settings-interval').val());\\n\\t\\t//then update the GLOBAL VARIABLES\\n\\t\\twindow.url \\t\\t= localStorage.getItem('url');\\n \\t\\twindow.interval = localStorage.getItem('interval');\\n \\t\\tSOAP_URL \\t\\t= window.url; \\n \\t\\t\\n \\t\\tcheckInbox();\\n\\n\\t\\tnotification('Settings successfully saved');\\t\\n\\t});\\n\\n\\treturn false;\\n}\",\n \"function loadUserSettings(){\\n\\t\\tvar user = wialon.core.Session.getInstance().getCurrUser();\\n\\t\\tvar settings = user.getCustomProperty('__app__logbook_settings', '{}');\\n\\t\\tsettings = JSON.parse(settings);\\n\\t\\thome = office = {\\n\\t\\t\\t'name': '',\\n\\t\\t\\t'id': ''\\n\\t\\t};\\n\\t\\thoh = payment = false;\\n\\t\\theader_tmpl = footer_tmpl = 1;\\n\\t\\tpayment_less = payment_more = payment_mileage = 0;\\n\\n\\t\\tif (settings['geofences']) {\\n\\t\\t\\tif (settings['geofences']['home']) {\\n\\t\\t\\t\\thome = settings['geofences']['home'];\\n\\t\\t\\t}\\n\\n\\t\\t\\tif (settings['geofences']['office']) {\\n\\t\\t\\t\\toffice = settings['geofences']['office'];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tif (settings['print']) {\\n\\t\\t\\tif (settings['print']['hoh']) {\\n\\t\\t\\t\\thoh = settings['print']['hoh'];\\n\\t\\t\\t}\\n\\t\\t\\tif (settings['print']['payment']) {\\n\\t\\t\\t\\tpayment = settings['print']['payment'];\\n\\t\\t\\t}\\n\\t\\t\\tif (settings['print']['header_tmpl']) {\\n\\t\\t\\t\\theader_tmpl = settings['print']['header_tmpl'];\\n\\t\\t\\t}\\n\\t\\t\\tif (settings['print']['footer_tmpl']) {\\n\\t\\t\\t\\tfooter_tmpl = settings['print']['footer_tmpl'];\\n\\t\\t\\t}\\n\\t\\t\\tif (settings['print']['payment_less']) {\\n\\t\\t\\t\\tpayment_less = parseFloat(settings['print']['payment_less']);\\n\\t\\t\\t}\\n\\t\\t\\tif (settings['print']['payment_more']) {\\n\\t\\t\\t\\tpayment_more = parseFloat(settings['print']['payment_more']);\\n\\t\\t\\t}\\n\\t\\t\\tif (settings['print']['payment_mileage']) {\\n\\t\\t\\t\\tpayment_mileage = parseInt(settings['print']['payment_mileage']);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t// ui settings\\n\\t\\tif (settings['ui_flags']) {\\n\\t\\t\\tui_flags = settings['ui_flags'];\\n\\t\\t}\\n\\t\\t// mileage\\n\\t\\tif (settings['mileage_values']) {\\n\\t\\t\\tmileage_values = settings['mileage_values'];\\n\\t\\t}\\n\\t}\",\n \"function restoreOptions() {\\n\\tchrome.storage.sync.get(['savedOnce', 'displayType', 'increment', 'contentIsVisible', 'staticView', 'secretMenu'], function(data) {\\n\\t\\tsavedOnce = data.savedOnce;\\n\\t\\tdisplayType = data.displayType;\\n\\t\\tincrement = data.increment;\\n\\t\\tcontentIsVisible = data.contentIsVisible;\\n\\t\\tstaticView = data.staticView;\\n\\t\\tsecretMenu = data.secretMenu;\\n\\n\\t\\tif (displayType == \\\"fill\\\") { document.getElementById(\\\"fillRadio\\\").checked=true;\\n\\t\\t\\t} else { document.getElementById(\\\"fillRadio\\\").checked=false; }\\n\\t\\tif (displayType == \\\"hybrid\\\") { document.getElementById(\\\"hybridRadio\\\").checked=true;\\n\\t\\t\\t} else { document.getElementById(\\\"hybridRadio\\\").checked=false; }\\n\\t\\tif (displayType == \\\"none\\\") { document.getElementById(\\\"noneRadio\\\").checked=true;\\n\\t\\t\\t} else { document.getElementById(\\\"noneRadio\\\").checked=false; }\\n\\t\\tif (displayType == \\\"yellowHybrid\\\") { document.getElementById(\\\"yellowHybridRadio\\\").checked=true;\\n\\t\\t\\t} else { document.getElementById(\\\"yellowHybridRadio\\\").checked=false; }\\n\\t\\tif (displayType == \\\"blackHybrid\\\") { document.getElementById(\\\"blackHybridRadio\\\").checked=true;\\n\\t\\t\\t} else { document.getElementById(\\\"blackHybridRadio\\\").checked=false; }\\n\\n\\t\\tif (isNaN(increment)) { document.getElementById(\\\"incrementField\\\").value = 50;\\n\\t\\t} else { document.getElementById(\\\"incrementField\\\").value = increment;\\n\\t\\t}\\n\\n\\t\\tif (contentIsVisible) { \\n\\t\\t\\tdocument.getElementById(\\\"showArticleContentCheckbox\\\").checked=true;\\n\\t\\t} else { \\n\\t\\t\\tdocument.getElementById(\\\"showArticleContentCheckbox\\\").checked=false; \\n\\t\\t\\thideWikiContent();\\n\\t\\t}\\n\\n\\t\\tif (staticView) { \\n\\t\\t\\tdocument.getElementById(\\\"staticViewCheckbox\\\").checked=true;\\n\\t\\t} else { \\n\\t\\t\\tdocument.getElementById(\\\"staticViewCheckbox\\\").checked=false; \\n\\n\\t\\t\\t// If staticView is false, then turn on bind parallax effect to scroll\\n\\t\\t\\t$(document).ready(function() {\\t\\n\\t\\t\\t $(window).bind('scroll',function(e){\\n\\t\\t\\t \\tscrolled = $(window).scrollTop();\\n\\t\\t\\t\\t\\t// Go through each wikilink...\\n\\t\\t\\t\\t\\tfor (index = 0; index < wikilinks.length; index++) {\\n\\t\\t\\t\\t\\t\\tmoveCircles(index);\\n\\t\\t\\t\\t }\\n\\t\\t\\t });\\n\\t\\t\\t});\\n\\n\\t\\t}\\n\\n\\t\\tif (secretMenu) { $(\\\"#displayChoicesHidden\\\").css(\\\"display\\\",\\\"inline-block\\\"); }\\n\\n\\t\\t// If settings have never been saved, automatically set fill = true, increment = 50, contentIsVisible = true, staticView = false\\n\\t\\tif (!savedOnce) {\\n\\t\\t\\tchrome.storage.sync.set({\\\"displayType\\\": \\\"hybrid\\\"}, function() {});\\n\\t\\t\\tchrome.storage.sync.set({\\\"increment\\\": 50}, function() {});\\n\\t\\t\\tdisplayType = \\\"hybrid\\\";\\n\\t\\t\\tdocument.getElementById(\\\"hybridRadio\\\").checked=true;\\n\\t\\t\\t$(\\\"#optionsForm\\\").slideToggle();\\n\\t\\t\\tincrement = 50;\\n\\t\\t\\tcontentIsVisible = true;\\n\\t\\t\\tstaticView = false;\\n\\t\\t} \\n\\n\\t});\\n}\",\n \"function addSettings() {\\n if (!$(\\\".gt2-settings\\\").length) {\\n let elem = `\\n
\\n
\\n
\\n ${getSvg(\\\"arrow\\\")}\\n
\\n ${SCRIPT_NAME} v${GM_info.script.version}\\n
\\n
\\n
${getLocStr(\\\"settingsHeaderTimeline\\\")}
\\n ${getSettingTogglePart(\\\"forceLatest\\\")}\\n ${getSettingTogglePart(\\\"disableAutoRefresh\\\")}\\n ${getSettingTogglePart(\\\"keepTweetsInTL\\\")}\\n ${getSettingTogglePart(\\\"biggerPreviews\\\")}\\n
\\n\\n
${getLocStr(\\\"statsTweets\\\")}
\\n ${getSettingTogglePart(\\\"hideTranslateTweetButton\\\")}\\n ${getSettingTogglePart(\\\"tweetIconsPullLeft\\\")}\\n
\\n\\n
${getLocStr(\\\"settingsHeaderSidebars\\\")}
\\n ${getSettingTogglePart(\\\"stickySidebars\\\")}\\n ${getSettingTogglePart(\\\"smallSidebars\\\")}\\n ${getSettingTogglePart(\\\"hideTrends\\\")}\\n ${getSettingTogglePart(\\\"leftTrends\\\")}\\n ${getSettingTogglePart(\\\"show10Trends\\\")}\\n
\\n\\n
${getLocStr(\\\"navProfile\\\")}
\\n ${getSettingTogglePart(\\\"legacyProfile\\\")}\\n ${getSettingTogglePart(\\\"squareAvatars\\\")}\\n ${getSettingTogglePart(\\\"enableQuickBlock\\\")}\\n ${getSettingTogglePart(\\\"leftMedia\\\")}\\n
\\n\\n
${getLocStr(\\\"settingsHeaderGlobalLook\\\")}
\\n ${getSettingTogglePart(\\\"hideFollowSuggestions\\\", `\\n
\\n ${[\\\"topics\\\", \\\"users\\\", \\\"navLists\\\"].map((e, i) => {\\n let x = Math.pow(2, i)\\n return `
\\n ${getLocStr(e)}\\n
\\n
\\n
${getSvg(\\\"tick\\\")}
\\n
\\n
\\n `}).join(\\\"\\\")}\\n
\\n `)}\\n ${getSettingTogglePart(\\\"fontOverride\\\", `\\n
\\n \\n
\\n `)}\\n ${getSettingTogglePart(\\\"colorOverride\\\", `
`)}\\n ${getSettingTogglePart(\\\"hideMessageBox\\\")}\\n ${getSettingTogglePart(\\\"rosettaIcons\\\")}\\n ${getSettingTogglePart(\\\"favoriteLikes\\\")}\\n
\\n\\n
${getLocStr(\\\"settingsHeaderOther\\\")}
\\n ${getSettingTogglePart(\\\"updateNotifications\\\")}\\n ${getSettingTogglePart(\\\"expandTcoShortlinks\\\")}\\n
\\n `\\n let $s = $(\\\"main section[aria-labelledby=detail-header]\\\")\\n if ($s.length) {\\n $s.prepend(elem)\\n } else {\\n $(\\\"main > div > div > div\\\").append(`\\n
${elem}
\\n `)\\n }\\n // add color pickr\\n Pickr.create({\\n el: \\\".gt2-pickr\\\",\\n theme: \\\"classic\\\",\\n lockOpacity: true,\\n useAsButton: true,\\n appClass: \\\"gt2-color-override-pickr\\\",\\n inline: true,\\n default: `rgb(${GM_getValue(\\\"opt_gt2\\\").colorOverrideValue})`,\\n components: {\\n preview: true,\\n hue: true,\\n interaction: {\\n hex: true,\\n rgba: true,\\n hsla: true,\\n hsva: true,\\n cmyk: true,\\n input: true\\n }\\n }\\n })\\n .on(\\\"change\\\", e => {\\n let val = e.toRGBA().toString(0).slice(5, -4)\\n GM_setValue(\\\"opt_gt2\\\", Object.assign(GM_getValue(\\\"opt_gt2\\\"), { colorOverrideValue: val}))\\n document.documentElement.style.setProperty(\\\"--color-override\\\", val)\\n })\\n disableTogglesIfNeeded()\\n }\\n }\",\n \"function goToSettings(){\\n\\tif(SOUNDS_MODE){\\n\\t\\taudioClick.play();\\t\\n\\t}\\n\\t\\n\\t//load data\\n\\tvar player = getCurrentPlayer();\\n\\t\\n\\tmtbImport(\\\"settings.js\\\");\\n\\tbuildSettingsView();\\n\\tviewSettings.fireEvent('updateSettingsUI', {player:player});\\n\\tviewSettings.animate(anim_in);\\n}\",\n \"function ac_showConfigPanel() {\\n\\tac_switchTool(\\\"cfg\\\");\\n}\",\n \"function makeSettings() {\\n\\t\\tvar i,\\n\\t\\t\\tdata = $.data(element, colorbox);\\n\\t\\t\\n\\t\\tif (data == null) {\\n\\t\\t\\tsettings = $.extend({}, defaults);\\n\\t\\t\\tif (console && console.log) {\\n\\t\\t\\t\\tconsole.log('Error: cboxElement missing settings object');\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\tsettings = $.extend({}, data);\\n\\t\\t}\\n\\t\\t\\n\\t\\tfor (i in settings) {\\n\\t\\t\\tif ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.\\n\\t\\t\\t\\tsettings[i] = settings[i].call(element);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\tsettings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow';\\n\\t\\tsettings.href = settings.href || $(element).attr('href');\\n\\t\\tsettings.title = settings.title || element.title;\\n\\t\\t\\n\\t\\tif (typeof settings.href === \\\"string\\\") {\\n\\t\\t\\tsettings.href = $.trim(settings.href);\\n\\t\\t}\\n\\t}\",\n \"function loadPageVariables() {\\r\\n \\\"use strict\\\";\\r\\n var tmp = JSON.parse(localStorage.getItem('TrimpzSettings'));\\r\\n if (tmp !== null) {\\r\\n trimpzSettings = tmp;\\r\\n }\\r\\n}\",\n \"function saveOptions() {\\n\\tlocalStorage[\\\"default_folder_id\\\"] = $('#folder_list :selected').val();\\n\\tlocalStorage[\\\"dial_columns\\\"] = $('#dial_columns :selected').val();\\n\\tlocalStorage[\\\"dial_width\\\"] = $('#dial_width :selected').val();\\n\\tsaveCheckbox('drag_and_drop');\\n\\tsaveCheckbox('force_http');\\n\\tsaveCheckbox('show_advanced');\\n\\tsaveCheckbox('show_new_entry');\\n\\tsaveCheckbox('show_folder_list');\\n\\tsaveCheckbox('show_subfolder_icons');\\n\\tlocalStorage[\\\"thumbnail_url\\\"] = $('#thumbnail_url').val();\\n\\n\\twindow.location = \\\"newtab.html\\\";\\n}\",\n \"function startup_checks(quiet)\\n {\\n\\tvar start_page = \\\"https://github.com/lemonsqueeze/scriptweeder/wiki/scriptweeder-userjs-installed-!\\\";\\t\\n\\tif (in_iframe()) // don't redirect to start page in iframes.\\n\\t return;\\n\\t\\n // first run, send to start page\\n if (global_setting('mode') == '') // will work with old settings\\t\\n {\\n\\t // userjs_only: can't wait until we get there, userjs on https may not be enabled ...\\t \\n set_global_setting('version_number', version_number);\\n set_global_setting('version_type', version_type);\\n set_global_setting('mode', default_mode);\\n\\t default_filter_settings();\\t \\n\\n\\t if (!quiet)\\n\\t\\tlocation.href = start_page;\\t \\n }\\n\\t\\n\\t// userjs_only: upgrade from 1.44 or before\\n\\tif (global_setting('version_number') == '')\\n\\t{\\n\\t set_global_setting('version_number', version_number);\\n\\t set_global_setting('version_type', version_type);\\n\\t // didn't exist:\\n\\t set_global_setting('helper_blacklist',\\tserialize_name_hash(default_helper_blacklist) );\\n\\t}\\n\\n\\t// upgrade from previous version\\n\\tif (global_setting('version_number') != version_number)\\n\\t{\\n\\t var from = global_setting('version_number');\\n\\t set_global_setting('version_number', version_number);\\n\\n\\t // 1.5.2 style upgrade\\n\\t if (cmp_versions(from, \\\"1.5.2\\\") && global_setting('style') != '')\\n\\t {\\n\\t\\tset_global_setting('style', '');\\n\\t\\talert(\\\"ScriptWeeder 1.5.2 upgrade notice:\\\\n\\\\n\\\" +\\n\\t\\t \\\"The interface changed a bit, updated custom styles are available on the wiki page.\\\");\\n\\t }\\n\\t}\\n\\n\\t// convert pre 1.5.1 list settings format\\n\\tif (global_setting('whitelist')[0] == '.')\\n\\t convert_old_list_settings();\\n }\",\n \"function saveSettings() {\\n localStorage.setItem(\\\"emailToggle\\\", emailToggleButton.checked);\\n localStorage.setItem(\\\"privacyToggle\\\", privacyToggleButton.checked);\\n localStorage.setItem(\\\"timezone\\\", select.value);\\n}\",\n \"function restoreOptions() {\\n\\tdocument.getElementById(\\\"mail\\\").value = chrome.extension.getBackgroundPage().settings.getMail();\\n\\tdocument.getElementById(\\\"url\\\").value = chrome.extension.getBackgroundPage().settings.getURL();\\n\\tdocument.getElementById(\\\"contextMenu\\\").checked = chrome.extension.getBackgroundPage().settings.isContextMenu();\\n\\tdocument.getElementById(\\\"insertIntoPage\\\").checked = chrome.extension.getBackgroundPage().settings.isInsertIntoPage();\\n\\tdocument.getElementById(\\\"copyToClipboard\\\").checked = chrome.extension.getBackgroundPage().settings.isCopyToClipboard();\\n\\tdocument.getElementById(\\\"dateFormat\\\").value = chrome.extension.getBackgroundPage().settings.getDateFormat();\\n }\",\n \"function saveconfig() {\\n // sauvegarde des options de la fenêtre de configuration\\n display_button = npn_cb_button.checked;\\n GM.setValue(\\\"display_button\\\", display_button);\\n button_icon = npn_in_button.value.trim();\\n if(button_icon === \\\"\\\") {\\n button_icon = default_icon;\\n }\\n GM.setValue(\\\"button_icon\\\", button_icon);\\n mass_opener = npn_cb_mass.checked;\\n GM.setValue(\\\"mass_opener\\\", mass_opener);\\n max_tab = parseInt(npn_in_maxtab.value.trim(), 10);\\n max_tab = Math.max(max_tab, 1);\\n max_tab = Math.min(max_tab, 99);\\n if(isNaN(max_tab)) max_tab = default_max_tab;\\n GM.setValue(\\\"max_tab\\\", max_tab);\\n reverse_order = npn_cb_reverseorder.checked;\\n GM.setValue(\\\"reverse_order\\\", reverse_order);\\n color_gradient = npn_cb_gradient.checked;\\n GM.setValue(\\\"color_gradient\\\", color_gradient);\\n color_start_type = npn_rd_color_start_auto.checked ? \\\"auto\\\" :\\n npn_rd_color_start_trans.checked ? \\\"trans\\\" : \\\"perso\\\";\\n GM.setValue(\\\"color_start_type\\\", color_start_type);\\n color_start_perso = npn_co_color_start_perso.value.toLowerCase();\\n GM.setValue(\\\"color_start_perso\\\", color_start_perso);\\n color_end_type = npn_rd_color_end_auto.checked ? \\\"auto\\\" :\\n npn_rd_color_end_trans.checked ? \\\"trans\\\" : \\\"perso\\\";\\n GM.setValue(\\\"color_end_type\\\", color_end_type);\\n color_end_perso = npn_co_color_end_perso.value.toLowerCase();\\n GM.setValue(\\\"color_end_perso\\\", color_end_perso);\\n limit_type = npn_rd_limit_fixed.checked ? \\\"fixed\\\" : \\\"auto\\\";\\n GM.setValue(\\\"limit_type\\\", limit_type);\\n fixed_limit = parseInt(npn_in_limit_fixed.value.trim(), 10);\\n fixed_limit = Math.max(fixed_limit, 1);\\n fixed_limit = Math.min(fixed_limit, 99999);\\n if(isNaN(fixed_limit)) fixed_limit = default_fixed_limit;\\n GM.setValue(\\\"fixed_limit\\\", fixed_limit);\\n progress_type = npn_rd_progress_lin.checked ? \\\"lin\\\" : \\\"log\\\";\\n GM.setValue(\\\"progress_type\\\", progress_type);\\n smaller_text = npn_cb_smallertext.checked;\\n GM.setValue(\\\"smaller_text\\\", smaller_text);\\n go_top = npn_cb_gotop.checked;\\n hash_haut = go_top ? \\\"#haut\\\" : \\\"\\\";\\n GM.setValue(\\\"go_top\\\", go_top);\\n refresh_click = npn_cb_refreshclick.checked;\\n GM.setValue(\\\"refresh_click\\\", refresh_click);\\n delay_click = parseInt(npn_in_refreshclick.value.trim(), 10);\\n delay_click = Math.max(delay_click, 1);\\n delay_click = Math.min(delay_click, 99);\\n if(isNaN(delay_click)) delay_click = default_delay_click;\\n GM.setValue(\\\"delay_click\\\", delay_click);\\n display_totals = npn_cb_displaytotals.checked;\\n GM.setValue(\\\"display_totals\\\", display_totals);\\n refresh_page = npn_cb_refreshpage.checked;\\n GM.setValue(\\\"refresh_page\\\", refresh_page);\\n delay_page = parseInt(npn_in_refreshpage.value.trim(), 10);\\n delay_page = Math.max(delay_page, 1);\\n delay_page = Math.min(delay_page, 99);\\n if(isNaN(delay_page)) delay_page = default_delay_page;\\n GM.setValue(\\\"delay_page\\\", delay_page);\\n // réinitialisation des computed colors\\n computed_colors = {};\\n // masquage de la fenêtre de configuration\\n hideconfig();\\n // application des nouveaux paramètres\\n apply_config();\\n}\",\n \"function setPage() {\\n setNavigation();\\n $('#tabs').tabs();\\n resetGeneralDetailsForm();\\n resetReportBugsForm();\\n getAdminDetails();\\n loadTermsOfUseDetails();\\n}\",\n \"function settings(path, url, options) {\\n // A. URL fill material\\n preURL = \\\"\\\\\\\"\\\"\\n postURL = \\\"\\\\\\\"\\\"\\n var urlComp = preURL + url + postURL;\\n // B. put date as folder name\\n // command \\\"-O\\\" determines the a target folder\\n // here relative path e.g. = \\\"./2016-12-24\\\"\\n var preFolder = \\\"-O \\\\\\\"./\\\";\\n // Daten -> look \\\"Workaround TIMESTAMP\\\" -> basic format is \\\"YYYY-MM-DD\\\"\\n var date = fnToISO();\\n var postFolder = \\\"\\\\\\\"\\\";\\n var folder = preFolder + date + postFolder;\\n // C. Options\\n // value \\\"options\\\" is a parameter from above and won't be changed in this function\\n\\n // D. Return the terminal command as a strings\\n return specifics = path + \\\" \\\" + urlComp + \\\" \\\" + folder + \\\" \\\" + options;\\n}\",\n \"function openSettingsWindow() { //Create settings window\\r\\n\\t\\r\\n //Define html for settings window\\r\\n var settingsHTML=\\\"\\\\n\\\\n\\\\n\\\\n \\\\n wTorrent Options\\\\n \\\\n\\\\n\\\\n\\\\n\\\\n\\t
\\\\n\\\\n\\t\\t
\\\\n\\t\\t\\t

wTorrent Options

\\\\n\\t\\t
\\\\n\\\\n\\t\\t
\\\\n\\t \\\\n\\t\\t
\\\\n\\t\\t
\\\\n\\\\n\\t\\t
\\\\n\\t\\t
\\\\n\\t\\t\\\\n\\t\\t\\\\n\\t\\t

Checking this will cause you to use an SSL (https) connection for wTorrent.

\\\\n\\\\n\\t\\t
\\\\n\\t\\t
\\\\n\\t\\t\\\\n\\t\\t
\\\\n\\t\\t
\\\\n\\t\\t\\\\n\\t\\t
\\\\n\\t\\t
\\\\n\\t\\t

Download directory should be set to \\\\\\\"default\\\\\\\" to accept the default setting configured in wTorrent, or changed to an absolute path. You must allow files to be saved to a non-standard source when not using \\\\\\\"default\\\\\\\".

\\\\n\\t\\t\\\\n\\t\\t\\\\n\\t\\t

This takes precedence over \\\\\\\"Show links for private mode add\\\\\\\" preference. If this is checked only the wTorrent icon will show and it will always add in private mode

\\\\n\\\\n\\t\\t\\\\n\\t\\t

Checking this will show a \\\\\\\"lock\\\\\\\" icon for adding torrents in private mode.

\\\\n\\\\n\\t\\t
\\\\n\\\\n\\t\\t
\\\\n\\t\\t
\\\\n\\t\\t\\\\n\\\\n\\t\\t\\\\n\\t
\\\\n\\\\n\\\";\\r\\n\\r\\n //Add default variable values to settins window html\\r\\n settingsHTML=settingsHTML.replace(/id=\\\"wtorrent_host\\\" value=\\\"\\\"/,'id=\\\"wtorrent_host\\\" value=\\\"'+wtorrent_host+'\\\"')\\r\\n settingsHTML=settingsHTML.replace(/id=\\\"wtorrent_port\\\" value=\\\"\\\"/,'id=\\\"wtorrent_port\\\" value=\\\"'+wtorrent_port+'\\\"')\\r\\n settingsHTML=settingsHTML.replace(/id=\\\"wtorrent_username\\\" value=\\\"\\\"/,'id=\\\"wtorrent_username\\\" value=\\\"'+wtorrent_username+'\\\"')\\r\\n settingsHTML=settingsHTML.replace(/id=\\\"wtorrent_password\\\" value=\\\"\\\"/,'id=\\\"wtorrent_password\\\" value=\\\"'+wtorrent_password+'\\\"')\\r\\n settingsHTML=settingsHTML.replace(/id=\\\"wtorrent_downloaddirectory\\\" value=\\\"\\\"/,'id=\\\"wtorrent_downloaddirectory\\\" value=\\\"'+wtorrent_downloaddirectory+'\\\"')\\r\\n\\t\\t\\r\\n\\t\\tif (wtorrent_ssl) { settingsHTML=settingsHTML.replace(/id=\\\"wtorrent_ssl\\\"/,'id=\\\"wtorrent_ssl\\\" checked=\\\"checked\\\"'); }\\r\\n if (wtorrent_alwaysdownloadprivate) { settingsHTML=settingsHTML.replace(/id=\\\"wtorrent_alwaysdownloadprivate\\\"/,'id=\\\"wtorrent_alwaysdownloadprivate\\\" checked=\\\"checked\\\"'); }\\r\\n if (wtorrent_showprivatelinks) { settingsHTML=settingsHTML.replace(/id=\\\"wtorrent_showprivatelinks\\\"/,'id=\\\"wtorrent_showprivatelinks\\\" checked=\\\"checked\\\"'); }\\r\\n if (wtorrent_autostarttorrents) { settingsHTML=settingsHTML.replace(/id=\\\"wtorrent_autostarttorrents\\\"/,'id=\\\"wtorrent_autostarttorrents\\\" checked=\\\"checked\\\"'); }\\r\\n \\r\\n //Open Settings window\\r\\n settingsWindow=window.open(\\\"\\\",\\\"settingsWindow\\\",\\\"height=520,width=298,left=100,top=100,resizable=yes,scrollbars=no,toolbar=no,status=no\\\")\\r\\n settingsWindow.document.write(settingsHTML) //Write html to window\\r\\n settingsWindow.document.close() //Close document to writing\\r\\n\\r\\n //Add Settings Window Listeners\\r\\n settingsWindow.document.getElementById(\\\"save\\\").addEventListener(\\\"click\\\", saveSettings, false); //Add click event listener to Save Settings button, calls saveSettings()\\r\\n settingsWindow.addEventListener(\\\"unload\\\", cleanupSettingsListeners, false); //Add unload event listener to window, calls cleanupListeners()\\r\\n }\",\n \"function saveSettings() {\\n $('#settings').removeClass('opensettings');\\n}\",\n \"function _onEveryPage() {\\n _updateConfig();\\n\\t_defineCookieDomain();\\n\\t_defineAgencyCDsValues();\\n}\",\n \"function init() {\\n\\t\\tif (!localStorage.getItem(SETTINGS_NAME)){\\n\\t\\t\\tlocalStorage.setItem(SETTINGS_NAME, JSON.stringify({}))\\n\\t\\t}\\n\\n\\t\\t$('#importButton').click(() => {\\n\\t\\t\\tlet importSuccess = importSettingsHanlder($('textarea#importExportTextarea').val())\\n\\t\\t\\tif (importSuccess) {\\n\\t\\t\\t\\tmarkProblem('textarea#importExportTextarea', false)\\n\\t\\t\\t}\\n\\t\\t\\telse {\\n\\t\\t\\t\\tmarkProblem('textarea#importExportTextarea', true)\\n\\t\\t\\t}\\n\\t\\t})\\n\\n\\t\\t$('#exportButton').click(() => {\\n\\t\\t\\t$('textarea#importExportTextarea').val(exportSettings())\\n\\t\\t})\\n\\n\\t\\t$('#downloadSettingsLink').click(() => {\\n\\t\\t\\tlet link = document.getElementById('downloadSettingsLink');\\n\\t\\t\\tlink.href = makeTextFile(localStorage.getItem(SETTINGS_NAME))\\n\\t\\t\\t$('#downloadSettingsLink').attr('download', `rph-tools-settings.txt`)\\n\\t\\t})\\n\\n\\t\\t$('#importFileInput').change(() => {\\n\\t\\t\\tlet file = $(\\\"#importFileInput\\\")[0].files[0];\\n\\t\\t\\t(async () => {\\n\\t\\t\\t\\tfileContent = await file.text();\\n\\t\\t\\t\\tlet successfulImport = importSettingsHanlder(fileContent)\\n\\n\\t\\t\\t\\tif (successfulImport === false) {\\n\\t\\t\\t\\t\\t$('#importSettingsStatus').first().text('There was a problem with the import')\\t\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse {\\n\\t\\t\\t\\t\\t$('#importSettingsStatus').first().text('Import successful')\\n\\t\\t\\t\\t}\\n\\t\\t\\t})();\\n\\t\\t})\\n\\t\\n\\n\\t\\t$('#printSettingsButton').click(() => {\\n\\t\\t\\tprintSettings()\\n\\t\\t})\\n\\n\\t\\t$('#deleteSettingsButton').click(() => {\\n\\t\\t\\tdeleteSettingsHanlder()\\n\\t\\t})\\n\\t}\",\n \"function addDefaultSettings(action, settings) {\\n if (action == \\\"com.vantdev.r3sd.toggleboxoptionbutton\\\")\\n {\\n if (!settings.hasOwnProperty(\\\"box_option\\\")) {\\n settings.box_option = BOX_OPTIONS.DO_NOTHING;\\n }\\n }\\n else if (action == \\\"com.vantdev.r3sd.requestboxbutton\\\")\\n {\\n if (!settings.hasOwnProperty(\\\"serve_penalty\\\")) settings.serve_penalty = false;\\n if (!settings.hasOwnProperty(\\\"driver_change\\\")) settings.driver_change = false;\\n if (!settings.hasOwnProperty(\\\"front_tires\\\")) settings.front_tires = false;\\n if (!settings.hasOwnProperty(\\\"rear_tires\\\")) settings.rear_tires = false;\\n if (!settings.hasOwnProperty(\\\"fix_bodywork\\\")) settings.fix_bodywork = false;\\n if (!settings.hasOwnProperty(\\\"fix_front_aero\\\")) settings.fix_front_aero = false;\\n if (!settings.hasOwnProperty(\\\"fix_rear_aero\\\")) settings.fix_rear_aero = false;\\n if (!settings.hasOwnProperty(\\\"fix_suspension\\\")) settings.fix_suspension = false;\\n if (!settings.hasOwnProperty(\\\"refuel_option\\\")) settings.refuel_option = BOX_OPTIONS.DO_NOTHING;\\n if (!settings.hasOwnProperty(\\\"use_toggle_buttons_only\\\")) settings.use_toggle_buttons_only = false;\\n if (!settings.hasOwnProperty(\\\"request_box\\\")) settings.request_box = false;\\n if (!settings.hasOwnProperty(\\\"close_pit_menu\\\")) settings.close_pit_menu = false;\\n }\\n\\n return settings;\\n}\",\n \"function saveExtSettings() {\\n var settings = {\\n \\\"showFoldersInList\\\": showFoldersInList,\\n \\\"showSortDataInList\\\": showSortDataInList,\\n \\\"numberOfFiles\\\": numberOfFiles,\\n \\\"zoomFactor\\\": zoomFactor,\\n \\\"orderBy\\\": orderBy\\n };\\n localStorage.setItem('perpectiveGridSettings', JSON.stringify(settings));\\n }\",\n \"function restore_options() {\\n chrome.storage.sync.get(\\n\\t\\tchrome.extension.getBackgroundPage().defaultSettings, \\n \\t\\tfunction (settings) {\\n \\t\\t\\tdocument.getElementById(settings.o_theme).checked = true;\\n \\t\\t\\tdocument.getElementById(settings.o_live_output).checked = true;\\n \\t\\t\\tfor (let i = 0; i < settings.o_live_direction.length; i++) {\\n \\t\\t\\t\\tdocument.getElementById(settings.o_live_direction[i]).checked = true;\\n \\t\\t\\t}\\n \\t\\t\\tfor (let i = 0; i < settings.o_live_type.length; i++) {\\n \\t\\t\\t\\tdocument.getElementById(settings.o_live_type[i]).checked = true;\\n \\t\\t\\t}\\n \\t\\t\\tdocument.getElementById(settings.o_live_donation).checked = true;\\n\\n \\t\\t\\tchrome.extension.getBackgroundPage().currentSettings = settings;\\n \\t\\t}\\n \\t);\\n}\",\n \"_initializeDefaultSettings(settings) {\\r\\n for (let name in argvOptions) {\\r\\n let option = argvOptions[name];\\r\\n\\r\\n let realName = name;\\r\\n if (option.name) {\\r\\n realName = option.name;\\r\\n }\\r\\n\\r\\n if (!_.has(settings, realName)) {\\r\\n if (realName == 'paths') {\\r\\n settings['paths'] = { '' : path.resolve('') };\\r\\n }\\r\\n else if (_.has(option, 'default')) {\\r\\n settings[realName] = option['default'];\\r\\n }\\r\\n else if (option.type == 'flag') {\\r\\n // Flags default to false\\r\\n settings[realName] = false;\\r\\n }\\r\\n else if (option.type == 'array') {\\r\\n settings[realName] = [];\\r\\n }\\r\\n }\\r\\n }\\r\\n }\",\n \"function setupDefault() {\\n}\",\n \"_ensureClientSettings() {\\n if (!this.settings.autoboard) { this.toggleSetting(\\\"autoboard\\\"); }\\n if (this.settings.bell) { this.toggleSetting(\\\"bell\\\"); }\\n if (!this.settings.moreboards) { this.toggleSetting(\\\"moreboards\\\"); }\\n if (!this.settings.notify) { this.toggleSetting(\\\"notify\\\"); }\\n if (!this.settings.report) { this.toggleSetting(\\\"report\\\"); }\\n this.setBoardstyle(3); // we don't get this to check w/ the other settings (although we could pull it)\\n }\",\n \"function setDefaultCurrentSettings(settings) {\\r\\n\\t\\tdebug('setDefaultCurrentSettings');\\r\\n\\t\\tcurrentSettings = $.extend(true, {}, $.fn.nyroModal.settings, settings);\\r\\n\\t\\tcurrentSettings.selector = '';\\r\\n\\t\\tcurrentSettings.borderW = 0;\\r\\n\\t\\tcurrentSettings.borderH = 0;\\r\\n\\t\\tcurrentSettings.resizable = true;\\r\\n\\t\\tsetMargin();\\r\\n\\t}\",\n \"function save_options() {\\n\\tsetLocal(\\\"sense_facebook\\\");\\n\\tsetLocal(\\\"sense_google\\\");\\n\\tsetLocal(\\\"sense_twitter\\\");\\n\\tsetLocal(\\\"sense_youtube\\\");\\n\\tsetLocal(\\\"sense_4Chan\\\");\\n\\tsetLocal(\\\"sense_selector\\\");\\n\\tsetLocal(\\\"sense_color\\\");\\n\\tcheckAPI();\\n}\",\n \"function showGlobalConfig() {\\n $(\\\"#global-setting\\\").show();\\n $(\\\"#global-setting .modal-body\\\").html(\\\"\\\");\\n settingTextarea = monaco.editor.create($(\\\"#global-setting .modal-body\\\")[0], {\\n language: 'json',\\n value:formatJson(JSON.stringify(rocketUser.setting)),\\n wordWrap: 'on', //自行换行\\n verticalHasArrows: true,\\n horizontalHasArrows: true,\\n scrollBeyondLastLine: false,\\n contextmenu:false,\\n automaticLayout: true,\\n fontSize:13,\\n minimap: {\\n enabled: false // 关闭小地图\\n }\\n\\n });\\n}\",\n \"function updateSettingsFile() {\\r\\n\\tvar fileId = BumpTop.openFile(\\\"sharingTemp.json\\\", \\\"w\\\");\\r\\n\\tvar settings = $.map(tabArray, function (tab) { \\r\\n\\t\\treturn tab.dropAccessParams; \\r\\n\\t});\\r\\n\\tvar fileContents = JSON.stringify(settings);\\r\\n\\tBumpTop.writeFile(fileId, fileContents);\\r\\n\\tBumpTop.renameAndCloseFile(fileId, \\\"sharing.json\\\");\\r\\n}\",\n \"function scriptConfig() {\\r\\n\\ttrace(\\\"scriptConfig() configuring the dialog\\\");\\r\\n\\t\\r\\n\\t// Configure Settings dialog\\r\\n\\tGM_config.init('Emule Linker Settings dialog', {\\r\\n\\t\\t'section1' : { section: ['ed2k download mode', 'Please refer to your emule/amule/mldonkey configuration'], label: '', type: 'hidden'},\\r\\n\\t\\t/*'ed2kDlMethod': { label: 'Ed2k Download Method', title: 'local: local application that handle ed2k links (default)\\\\nemule: remote emule (via web frontend)\\\\namule: remote amule (via web frontend)\\\\nmldonkey: remote mldonkey (via web frontend)\\\\ncustom: custom server implementation (experimental)', type:'radio', options:['local','emule','amule','mldonkey','custom'], default: ed2kDlMethod },*/\\r\\n\\t\\t'ed2kDlMethod': { label: 'Ed2k Download Method', title: 'local: local application that handle ed2k links (default)\\\\nemule: remote emule (via web frontend)\\\\namule: remote amule (via web frontend)\\\\nmldonkey: remote mldonkey (via web frontend)\\\\ncustom: custom server implementation (experimental)', type:'select', options:{'local':'your system default','emule':'(remote) emule','amule':'(remote) amule','mldonkey':'(remote) mldonkey','custom':'custom (experimental)'}, default: ed2kDlMethod}, // default value doesn't work with a dropdown menu => see bugfix in the lib\\r\\n\\t\\t'emuleUrl': { label: 'Emule Url', title : 'The complete url of your emule web server ending by a / (example: http://127.0.0.1:4711/)', type: 'text', default: emuleUrl },\\r\\n\\t\\t'emulePwd': { label: 'Emule Password', title : 'the password you choose to access your emule web server', type: 'text', default: emulePwd },\\r\\n\\t\\t'emuleCat': { label: 'Category', title : 'categories available in your emule/amule application. You can add categories using the following template:\\\\ncategory_name1=corresponding_index_in_emule;category_name2=...\\\\nAdding a * before the name specify the default choice.\\\\nIf you don\\\\'t know what you are doing just specify this: *default=0', type: 'text', default: catToStr(emuleCat) },\\r\\n\\t\\t'section2' : { section: ['Popup Configuration', 'modify how the popup is displayed'], label: '', type: 'hidden'},\\r\\n\\t\\t'popupPos': { label: 'Popup Position', title : 'choosing \\\\'absolute\\\\', the popup will stay at the top. Choosing fixed, the popup will follow as you scroll within the page', type: 'radio', options:['absolute','fixed'], default: popupPos },\\r\\n\\t\\t'popupHeight': { label: 'Max Popup Height in px (0=unlimited)', title : 'Max height of the popup in pixels (0=unlimited)', type: 'int', default: popupHeight },\\r\\n\\t\\t'popupWidth': { label: 'Max Popup Width in px (0=unlimited)', title : 'Max width of the popup in pixels (0=unlimited)', type: 'int', default: popupWidth },\\r\\n\\t\\t'section3' : { section: ['Edit box Configuration', 'modify how the edit box is displayed'], label: '', type: 'hidden'},\\r\\n\\t\\t'editCol': { label: 'Number of columns', title : 'number of columns', type: 'radio', type: 'int', default: editCol },\\r\\n\\t\\t'editRow': { label: 'Number of rows', title : 'Number of rows', type: 'int', default: editRow },\\r\\n\\t\\t'editMaxLength': { label: 'MaxLength', title : 'Max number of char in the text area', type: 'int', 'default': editMaxLength },\\r\\n\\t\\t}, \\r\\n\\t\\t{\\r\\n\\t\\t//open: function() { GM_config.sections2tabs(); }, // not working (not included into the library)\\r\\n\\t\\tsave: function() { location.reload(); } // reload the page when configuration was changed\\r\\n\\t\\t}\\r\\n\\t);\\r\\n\\t\\r\\n\\t// invoke the dialog\\r\\n\\tif (GM_getValue(\\\"emule_config\\\", 0)<1)\\r\\n\\t{\\r\\n\\t\\ttrace(\\\"scriptConfig() invoking the dialog\\\");\\r\\n\\t\\tGM_config.open();\\r\\n\\t\\tGM_setValue(\\\"emule_config\\\",1);\\r\\n\\t}\\r\\n\\r\\n\\t// store the settings\\r\\n\\tsaveConfig();\\r\\n\\r\\n}\",\n \"function getSettingsAndStart() {\\n chrome.storage.local.get(null, function (settings) {\\n // Begin parsing and injecting views\\n if (window.location.href.indexOf('spryker-simplicity') !== -1) {\\n if (window.location.href.indexOf('merge_requests') !== -1) {\\n if ($.isNumeric(window.location.pathname.split('/')[4])) {\\n addPipelineButton()\\n addEnvironmentButton()\\n }\\n }\\n }\\n })\\n}\",\n \"function setOptions() {\\n if(typeof window.dev === 'undefined' || typeof window.dev.i18n === 'undefined') {\\n importScriptPage('MediaWiki:I18n-js/code.js', 'dev');\\n }\\n mw.hook('dev.i18n').add(function(i18no) {\\n i18no.loadMessages('u:soap:MediaWiki:Custom-Reports/i18n.json').done(function(i18n) {\\n options = {\\n\\n /* \\n //BEGIN EXAMPLE\\n example: {\\n page: 'Page name the form is for',\\n buttonText: 'Text for button to open form',\\n form: 'HTML form for reporting users. Each input/textarea should have an id. any optional inputs should be marked with the `optional` class. If any attributes need URI encoding, the relevant inputs should have the `data-encode` attribute set to `true`.',\\n // this is where the input ids in the form are matched to numbers\\n // for use in the summary/submitted text\\n formParams: {\\n '$1': 'foo',\\n '$2': 'bar'\\n },\\n submitText: 'Text to submit to the page. Any form parameters can be inserted via the key names in `formParams`',\\n summary: 'Text used for the edit summary. Any form parameters can be inserted via the key names in `formParams`',\\n sectionTitle: 'Text used as the section title. Any form parameters can be inserted via the key names in `formParams`'\\n },\\n // END EXAMPLE\\n */\\n\\n profile: {\\n page: 'Report:User_profile_headers',\\n buttonText: i18n.msg(\\\"buttonProfile\\\").escape(),\\n form: '
' +\\n '
' +\\n '
' +\\n '
' + i18n.msg(\\\"formSocial\\\").escape() + '
' +\\n '
' + i18n.msg(\\\"formWikiName\\\").escape() + '
' +\\n '' +\\n '
' + \\n '
' + i18n.msg(\\\"formWikiURL\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formUsername\\\").escape() + ' ' + i18n.msg(\\\"formOfBadUser\\\").escape() + ' (' + i18n.msg(\\\"formMultipleUsers\\\").escape() + ')
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formReason\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' +\\n '
' + \\n '
' + i18n.msg(\\\"formUsername\\\").escape() + ' ' + i18n.msg(\\\"formOfSock\\\").escape() +\\n '' +\\n '
' +\\n '
' +\\n '
' + \\n '
' + i18n.msg(\\\"formAnon\\\").escape() + '
' +\\n '
' +\\n '
' +\\n '
',\\n formParams: {\\n '$1': 'wikiurl',\\n '$2': 'wikiname',\\n '$3': 'user',\\n '$4': 'comment',\\n '$5': 'user', // for different styling\\n '$7': 'socks',\\n '$8': 'sockusers'\\n },\\n submitText: '{{Report profile|$1\\\\n' +\\n '|$4\\\\n' +\\n '|$3\\\\n' +\\n '$7$8' +\\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\\n summary: 'New profile report ($2, $5)',\\n sectionTitle: '$2'\\n },\\n vandalism: {\\n page: 'Report:Vandalism',\\n buttonText: i18n.msg(\\\"buttonVandalism\\\").escape(),\\n form: '
' +\\n '
' +\\n '
' +\\n '
' + i18n.msg(\\\"formWikiName\\\").escape() + '
' +\\n '' +\\n '
' + \\n '
' + i18n.msg(\\\"formWikiURL\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formUsername\\\").escape() + ' ' + i18n.msg(\\\"formOfBadUser\\\").escape() + ' (' + i18n.msg(\\\"formMultipleUsers\\\").escape() + ')
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formReason\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' +\\n '
' +\\n '
' + \\n '
' +\\n '
' + \\n '
' + i18n.msg(\\\"formUsername\\\").escape() + ' ' + i18n.msg(\\\"formOfSock\\\").escape() +\\n '' +\\n '
' +\\n '
' +\\n '
' + \\n '
' + i18n.msg(\\\"formAnon\\\").escape() + '
' +\\n '
' +\\n '
' +\\n '
',\\n formParams: {\\n '$1': 'wikiurl',\\n '$2': 'wikiname',\\n '$3': 'user',\\n '$4': 'comment',\\n '$5': 'user', // for different styling\\n '$6': 'crosswiki',\\n '$7': 'socks',\\n '$8': 'sockusers'\\n },\\n submitText: '{{Report vandalism|$1\\\\n' +\\n '|$4\\\\n' +\\n '|$3\\\\n' +\\n '$6$7$8' +\\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\\n summary: 'New vandalism report ($1, $5)',\\n sectionTitle: '$5 at $2'\\n },\\n spam: {\\n page: 'Report:Spam',\\n buttonText: i18n.msg(\\\"buttonSpam\\\").escape(),\\n form: '
' +\\n '
' +\\n '
' +\\n '
' + i18n.msg(\\\"formWikiName\\\").escape() + '
' +\\n '' +\\n '
' + \\n '
' + i18n.msg(\\\"formWikiURL\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formUsername\\\").escape() + ' ' + i18n.msg(\\\"formOfBadUser\\\").escape() + ' (' + i18n.msg(\\\"formMultipleUsers\\\").escape() + ')
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formReason\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' +\\n '
' +\\n '
' + \\n '
' + i18n.msg(\\\"formAnon\\\").escape() + '
' +\\n '
' +\\n '
' +\\n '
',\\n formParams: {\\n '$1': 'wikiurl',\\n '$2': 'wikiname',\\n '$3': 'user',\\n '$4': 'comment',\\n '$5': 'user', // for different styling\\n '$6': 'crosswiki',\\n },\\n submitText: '{{Report spam|$1\\\\n' +\\n '|$4\\\\n' +\\n '|$3\\\\n' +\\n '$6' +\\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\\n summary: 'New spam report ($1, $5)',\\n sectionTitle: '$5 at $2'\\n },\\n phalanx: {\\n page: 'Report:Spam_filter_problems',\\n buttonText: i18n.msg(\\\"buttonFalsePositive\\\").escape(),\\n form: '
' +\\n '
' +\\n '
' +\\n '
' + i18n.msg(\\\"formWikiName\\\").escape() + '
' +\\n '' +\\n '
' + \\n '
' + i18n.msg(\\\"formWikiPage\\\").escape() + '
' +\\n '' +\\n '/wiki/' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formBlockID\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formPhalanxReason\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formAnon\\\").escape() + '
' +\\n '
' +\\n '
' +\\n '
',\\n formParams: {\\n '$1': 'wikiurl',\\n '$2': 'wikiname',\\n '$5': 'wikipage',\\n '$3': 'blockid',\\n '$4': 'comment'\\n },\\n submitText: '{{Report filter|$1\\\\n' +\\n '|$5\\\\n' +\\n '|$3\\\\n' + \\n '|$4\\\\n' + \\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\\n summary: 'New filter report ($2, #$3)',\\n sectionTitle: 'Block #$3 on $2'\\n },\\n wiki: {\\n page: 'Report:Wiki',\\n buttonText: i18n.msg(\\\"buttonWiki\\\").escape(),\\n form: '
' +\\n '
' +\\n '
' +\\n '
' + i18n.msg(\\\"formWikiName\\\").escape() + '
' +\\n '' +\\n '
' + \\n '
' + i18n.msg(\\\"formWikiURL\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"formReason\\\").escape() + '
' +\\n '' +\\n '
' +\\n '
' + i18n.msg(\\\"GuidelinesTitle\\\").plain() + '
' +\\n i18n.msg(\\\"GuidelinesText\\\").plain() +\\n '
' +\\n '
' + i18n.msg(\\\"formAnon\\\").escape() + '
' +\\n '
' +\\n '
' +\\n '
',\\n formParams: {\\n '$1': 'wikiname',\\n '$2': 'wikiurl',\\n '$3': 'comment'\\n },\\n submitText: '{{badwiki|$2|$3}}',\\n summary: 'New bad wiki report ([[w:c:$2|$1]], comment: $3)',\\n sectionTitle: ''\\n },\\n };\\n reportDropdown = '
' + \\n '
' + \\n '' + i18n.msg(\\\"buttonReport\\\").escape() + '' + \\n '' + \\n '
' + \\n '
' + \\n '
    ' + \\n '
' + \\n '
' + \\n '
'\\n }).done(init);\\n });\\n }\",\n \"function restore_prev_settings() {\\n tagpro.group.socket.emit(\\\"setting\\\", {\\\"name\\\": \\\"map\\\", \\\"value\\\": settings.get('map')});\\n tagpro.group.socket.emit(\\\"setting\\\", {\\\"name\\\": \\\"time\\\", \\\"value\\\": settings.get('time')});\\n tagpro.group.socket.emit(\\\"setting\\\", {\\\"name\\\": \\\"caps\\\", \\\"value\\\": settings.get('caps')});\\n\\n /* var settings = GM_getValue('ELTP_settings');\\n for(var i = 0; i < settings.length; i++) {\\n tagpro.group.socket.emit(\\\"setting\\\", {\\\"name\\\": settings[i].name, \\\"value\\\": GM_getValue('ELTP_' + settings[i])});\\n }*/\\n}\",\n \"function toggleConfKeepLayout(){\\n\\ttoggleConfBool('layout', keepLayout);\\n\\tredirect(link[posActual]);\\n}\",\n \"function setUpPage() {\\n\\t\\\"use strict\\\";\\n\\tremoveSelectDefault();\\n\\tcreateEventListeners();\\n\\tgeneratePlaceholder();\\n}\",\n \"getSettings () {\\r\\n\\t\\tvar defaultSettings = {\\r\\n\\t\\t\\tenableEmojiHovering: true,\\r\\n\\t\\t\\tenableEmojiStatisticsButton: true\\r\\n\\t\\t};\\r\\n\\t\\tvar settings = BDfunctionsDevilBro.loadAllData(this.getName(), \\\"settings\\\");\\r\\n\\t\\tvar saveSettings = false;\\r\\n\\t\\tfor (var key in defaultSettings) {\\r\\n\\t\\t\\tif (settings[key] == null) {\\r\\n\\t\\t\\t\\tsettings[key] = settings[key] ? settings[key] : defaultSettings[key];\\r\\n\\t\\t\\t\\tsaveSettings = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif (saveSettings) {\\r\\n\\t\\t\\tBDfunctionsDevilBro.saveAllData(settings, this.getName(), \\\"settings\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn settings;\\r\\n\\t}\",\n \"function initSettings() {\\n const PUBLIC_CONFIGURE_SETTINGS = [\\n {\\n key: SETTING_KEYS.TOOLTIP_POSITION,\\n settings: {\\n name: i18n('settings.TOOLTIP_POSITION.name'),\\n hint: i18n('settings.TOOLTIP_POSITION.hint'),\\n type: String,\\n config: true,\\n default: 'right',\\n choices: {\\n top: i18n('settings.TOOLTIP_POSITION.choices.top'),\\n right: i18n('settings.TOOLTIP_POSITION.choices.right'),\\n bottom: i18n('settings.TOOLTIP_POSITION.choices.bottom'),\\n left: i18n('settings.TOOLTIP_POSITION.choices.left'),\\n overlay: i18n('settings.TOOLTIP_POSITION.choices.overlay'),\\n surprise: i18n('settings.TOOLTIP_POSITION.choices.surprise'),\\n doubleSurprise: i18n('settings.TOOLTIP_POSITION.choices.doubleSurprise'),\\n },\\n },\\n },\\n {\\n key: SETTING_KEYS.FONT_SIZE,\\n settings: {\\n name: i18n('settings.FONT_SIZE.name'),\\n hint: i18n('settings.FONT_SIZE.hint'),\\n type: Number,\\n config: true,\\n range: {\\n min: 1,\\n step: 0.1,\\n max: 2.5,\\n },\\n default: 1.2,\\n },\\n },\\n {\\n key: SETTING_KEYS.MAX_ROWS,\\n settings: {\\n name: i18n('settings.MAX_ROWS.name'),\\n hint: i18n('settings.MAX_ROWS.hint'),\\n type: Number,\\n config: true,\\n range: {\\n min: 1,\\n step: 1,\\n max: 20,\\n },\\n default: 5,\\n },\\n },\\n {\\n key: SETTING_KEYS.DATA_SOURCE,\\n settings: {\\n name: i18n('settings.DATA_SOURCE.name'),\\n hint: i18n('settings.DATA_SOURCE.hint'),\\n type: String,\\n scope: 'world',\\n config: true,\\n restricted: true,\\n default: 'actor.data.data',\\n },\\n },\\n {\\n key: SETTING_KEYS.DARK_THEME,\\n settings: {\\n name: i18n('settings.DARK_THEME.name'),\\n hint: i18n('settings.DARK_THEME.hint'),\\n type: Boolean,\\n config: true,\\n default: false,\\n },\\n },\\n {\\n key: SETTING_KEYS.SHOW_ALL_ON_ALT,\\n settings: {\\n name: i18n('settings.SHOW_ALL_ON_ALT.name'),\\n hint: i18n('settings.SHOW_ALL_ON_ALT.hint'),\\n type: Boolean,\\n scope: 'world',\\n config: true,\\n restricted: true,\\n default: true,\\n },\\n },\\n {\\n key: SETTING_KEYS.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS,\\n settings: {\\n name: i18n('settings.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS.name'),\\n hint: i18n('settings.SHOW_TOOLTIP_FOR_HIDDEN_TOKENS.hint'),\\n type: Boolean,\\n scope: 'world',\\n config: true,\\n restricted: true,\\n default: false,\\n },\\n },\\n {\\n key: SETTING_KEYS.DEBUG_OUTPUT,\\n settings: {\\n name: i18n('settings.DEBUG_OUTPUT.name'),\\n hint: i18n('settings.DEBUG_OUTPUT.hint'),\\n type: Boolean,\\n scope: 'world',\\n config: true,\\n restricted: true,\\n default: false,\\n },\\n },\\n ];\\n const HIDDEN_CONFIGURE_SETTINGS = [\\n {\\n key: SETTING_KEYS.GM_SETTINGS,\\n settings: {\\n type: Object,\\n scope: 'world',\\n restricted: true,\\n default: {},\\n },\\n },\\n {\\n key: SETTING_KEYS.PLAYER_SETTINGS,\\n settings: {\\n type: Object,\\n scope: 'world',\\n restricted: true,\\n default: {},\\n },\\n },\\n {\\n key: SETTING_KEYS.ACTORS,\\n settings: {\\n type: Object,\\n scope: 'world',\\n restricted: true,\\n default: [],\\n },\\n },\\n {\\n key: SETTING_KEYS.CLIPBOARD,\\n settings: {\\n type: Object,\\n default: [],\\n },\\n },\\n ];\\n\\n registerTooltipManager();\\n registerSettings([...PUBLIC_CONFIGURE_SETTINGS, ...HIDDEN_CONFIGURE_SETTINGS]);\\n}\",\n \"function mostrarSettings(){\\n\\ttry{\\n\\t\\tif(get('wcr_settings')) return; //if the screen is already open, do nothing\\n\\n\\t\\tdataCache = null; //force q to load everything again, in case they changed something in another tab\\n\\n\\t\\t//editable properties of site settings\\n\\t\\tvar propsSitio = {\\n\\t\\t\\turl:{ desc: 'URL', title: \\\"Define what sites will use these settings\\\",\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tstr:{ desc: 'Beginning of URL',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"Beginning of the url without the http://www.\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tre:{ desc: \\\"RegExp\\\",\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"Regular expression that matches the url\\\", size: 60 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\timg:{ desc:'Image', title:\\\"Method for obtaining the main image\\\",\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: '&lt;img&gt; that is the only one with a \\\"src\\\" containing one of the following strings: \\\"/comics/\\\", \\\"/comic/\\\", \\\"/strips/\\\", \\\"/strip/\\\", \\\"/archives/\\\", \\\"/archive/\\\", \\\"/wp-content/uploads/\\\", \\\"comics\\\", \\\"comic\\\", \\\"strips\\\", \\\"strip\\\", \\\"archives\\\", \\\"archive\\\", \\\"/manga/\\\"' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'Beginning of src',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"Beginning of the &quot;src&quot; attribute of the &lt;img&gt;\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tre:{ desc: 'RegExp',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"Regular expression that captures the whole &lt;img&gt; (or at least the &quot;src&quot; and &quot;title&quot; attributes)\\\", size: 50 },\\n\\t\\t\\t\\t\\t\\tgrp:{ elem: 'input', title: \\\"Number of the group that captured the &lt;img&gt;\\\", size: 1 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\txp:{ desc: 'XPath',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"XPath query that returns the &lt;img&gt;\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tcss:{ desc: 'CSS selector',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"CSS query that returns the &lt;img&gt;\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function(html, pos)',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'textarea', title: \\\"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the &lt;img&gt; element (either as string or object)\\\", rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tback:{ desc: 'Back', title: 'Method for obtaining the link to the previous page',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \\\"back\\\" or \\\"prev\\\" somewhere in its innerHTML or one of its attributes' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'XPath condition',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tre:{ desc: 'RegExp',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"Regular expression that captures the URL of the previous page\\\", size: 50 },\\n\\t\\t\\t\\t\\t\\tgrp:{ elem: 'input', title: \\\"Number of the group that captured the URL\\\", size: 1 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\txp:{ desc: 'XPath',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"XPath query that returns the URL of the previous page, or the &lt;a&gt; element that links to it\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tcss:{ desc: 'CSS selector',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"CSS query that returns the &lt;a&gt; element that links to the previous page\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function(html, pos)',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'textarea', title: \\\"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the URL of the previous page\\\", rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tnext:{ desc: 'Next', title: 'Method for obtaining the link to the next page',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \\\"next\\\" somewhere in its innerHTML or one of its attributes' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'XPath condition',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tre:{ desc: 'RegExp',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"Regular expression that captures the URL of the next page\\\", size: 50 },\\n\\t\\t\\t\\t\\t\\tgrp:{ elem: 'input', title: \\\"Number of the group that captured the URL\\\", size: 1 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\txp:{ desc: 'XPath',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"XPath query that returns the URL of the next page, or the &lt;a&gt; element that links to it\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tcss:{ desc: 'CSS selector',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"CSS query that returns the &lt;a&gt; element that links to the next page\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function(html, pos)',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'textarea', title: \\\"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the URL of the next page\\\", rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tfirst:{ desc: 'First', title: 'Method for obtaining the link to the first page',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \\\"first\\\" somewhere in its innerHTML or one of its attributes' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'XPath condition',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tre:{ desc: 'RegExp',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"Regular expression that captures the URL of the first page\\\", size: 50 },\\n\\t\\t\\t\\t\\t\\tgrp:{ elem: 'input', title: \\\"Number of the group that captured the URL\\\", size: 1 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\txp:{ desc: 'XPath',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"XPath query that returns the URL of the first page, or the &lt;a&gt; element that links to it\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tcss:{ desc: 'CSS selector',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"CSS query that returns the &lt;a&gt; element that links to the first page\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function(html)',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'textarea', title: \\\"Function that receives the html of the page and returns the URL of the first page\\\", rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tlast:{ desc: 'Last', title: 'Method for obtaining the link to the last page',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: '&lt;a&gt; that has the word \\\"last\\\", \\\"latest\\\", \\\"newest\\\" or \\\"today\\\" somewhere in its innerHTML or one of its attributes' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'XPath condition',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: 'Condition for the following XPath query: //a[condition]/@href', size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tre:{ desc: 'RegExp',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"Regular expression that captures the URL of the last page\\\", size: 50 },\\n\\t\\t\\t\\t\\t\\tgrp:{ elem: 'input', title: \\\"Number of the group that captured the URL\\\", size: 1 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\txp:{ desc: 'XPath',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"XPath query that returns the URL of the last page, or the &lt;a&gt; element that links to it\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tcss:{ desc: 'CSS selector',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"CSS query that returns the &lt;a&gt; element that links to the last page\\\", size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function(html)',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'textarea', title: \\\"Function that receives the html of the page and returns the URL of the last page\\\", rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tfixurl:{ desc: 'Fix URL', title: 'Fix URLs coming from a link or img.src for sites that may need it (like relative URLs that don\\\\'t behave normally, or links from http://something.com to http://www.something.com that wouldn\\\\'t work because of cross site request limitations)',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Do nothing' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function(url, img, link, pos)',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'textarea', title: 'Function that receives an URL, and flags telling if it came from an img.src or link to another page, and returns the fixed url', rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\textra:{ desc: 'Extra Content', title: 'Other content besides the main image to get from each page',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tstr:{ desc: 'Literal string',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: 'HTML string, this will be output literally', size: 60 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tre:{ desc: 'RegExp',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"Regular expression that captures the desired content\\\", size: 50 },\\n\\t\\t\\t\\t\\t\\tgrp:{ elem: 'input', title: \\\"Number of the group that captured the content\\\", size: 1 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\txp:{ desc: 'XPath',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"XPath query that returns the desired content\\\", size: 60 },\\n\\t\\t\\t\\t\\t\\tarr:{ elem: 'select', html: ''},\\n\\t\\t\\t\\t\\t\\tglue:{ elem: 'input', title: 'String to put between each pair of elements returned', size: 20},\\n\\t\\t\\t\\t\\t\\tfirst:{ elem: 'input', title: 'Index of the first element to return (starting from 0, negative means counting from the last)', size: 1},\\n\\t\\t\\t\\t\\t\\tlast:{ elem: 'input', title: 'Index of the last element to return (starting from 0, negative means counting from the last)', size: 1}\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tcss:{ desc: 'CSS selector',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'input', title: \\\"CSS query that returns the desired content\\\", size: 60 },\\n\\t\\t\\t\\t\\t\\tarr:{ elem: 'select', html: ''},\\n\\t\\t\\t\\t\\t\\tglue:{ elem: 'input', title: 'String to put between each pair of elements returned', size: 20},\\n\\t\\t\\t\\t\\t\\tfirst:{ elem: 'input', title: 'Index of the first element to return (starting from 0, negative means counting from the last)', size: 1},\\n\\t\\t\\t\\t\\t\\tlast:{ elem: 'input', title: 'Index of the last element to return (starting from 0, negative means counting from the last)', size: 1}\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function(html, pos)',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'textarea', title: \\\"Function that receives the html of the page and its position relative to the starting page (0 being where you started reading), and returns the desired content\\\", rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\txelem:{ desc: 'Extras Container', title: 'Element for placing the extra content when using the full layout',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Inside the WCR container (between the image and the back/next buttons)' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'XPath',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'input', title: 'XPath query that returns the element where the extra content will be placed as its innerHTML', size:60 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tlayelem:{ desc: 'Layout Container', title: 'Element for placing the image and the rest of the script content when using the full layout',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Where the original image was' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'XPath',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'input', title: 'XPath query that returns the element where the content will be placed as its innerHTML', size:60 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tjs:{ desc: 'Custom Action', title: 'Custom function to execute after each page change',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Do nothing' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function(dir)',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'textarea', title: 'Function that receives the direction in which the page was changed (0 when the starting page is loaded, 1 when going forward and -1 when going backwards)', rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tstyle:{ desc: 'Custom CSS', title: 'Custom CSS styles',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Don\\\\'t change anything' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'CSS rules',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'textarea', title: 'CSS rules', rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tbgcol:{ desc: 'Background Color',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Keep original' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'Custom',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'input', title: '#RRGGBB or #RGB', size:6 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\ttxtcol:{ desc: 'Text Color',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Keep original' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'Custom',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'input', title: '#RRGGBB or #RGB', size:6 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tscrollx:{ desc: 'Default Horizontal Autoscroll', title: 'Scroll to this position of the image each time you change the page',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Left' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'Relative to image',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'select', html: '' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tnum:{ desc: 'Pixels',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'input', title: 'X coordinate in pixels', size: 5 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function()',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'textarea', title: \\\"Function that returns the numbers of pixels to scroll\\\", rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tscrolly:{ desc: 'Default Vertical Autoscroll', title: 'Scroll to this position of the image each time you change the page',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Top' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tstr:{ desc: 'Relative to image',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'select', html: '' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tnum:{ desc: 'Pixels',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'input', title: 'Y coordinate in pixels', size: 5 }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tfn:{ desc: 'function()',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'textarea', title: \\\"Function that returns the numbers of pixels to scroll\\\", rows:3, cols:45 }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tlayout:{ desc: 'Default Layout', title: 'Layout to use when no custom layout settings are defined for this site',\\n\\t\\t\\t\\ttipos:{\\n\\t\\t\\t\\t\\tdef:{ desc: 'Default',\\n\\t\\t\\t\\t\\t\\tval:{ elem: 'span', html: 'Use default settings' }\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\tbool:{ desc: 'Custom',\\n\\t\\t\\t\\t\\t\\tval: { elem: 'select', html: '' }\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t};\\n\\n\\t\\t//types of updates\\n\\t\\tvar listaTipos = [\\n\\t\\t\\t'Bug fixes (Firefox)',\\n\\t\\t\\t'Bug fixes (Other browsers)',\\n\\t\\t\\t'New features',\\n\\t\\t\\t'New sites',\\n\\t\\t\\t'Fixes for old sites',\\n\\t\\t\\t'Graphic changes',\\n\\t\\t\\t'New options'];\\n\\t\\tvar t, tiposUp = {};\\n\\t\\tfor(t=0; t 100) to which the image should be expanded (leave blank for no limit)'},\\n\\t\\t\\tminScale:{ desc:'Min scale', title: 'Minimum scale (as a percentage, < 100) to which the image should be shrunk (leave blank for no limit)'},\\n\\t\\t\\tmaxScaleReset:{ desc:'Over max scale', title: 'Action to be taken when the AutoZoom would expand the image over the max scale',\\n\\t\\t\\t\\tdef: '0',\\n\\t\\t\\t\\tvals: {\\n\\t\\t\\t\\t\\t'0': 'Keep the max scale',\\n\\t\\t\\t\\t\\t'1': 'Reset to original size'\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tminScaleReset:{ desc:'Under min scale', title: 'Action to be taken when the AutoZoom would shrink the image over the min scale',\\n\\t\\t\\t\\tdef: '0',\\n\\t\\t\\t\\tvals: {\\n\\t\\t\\t\\t\\t'0': 'Keep the min scale',\\n\\t\\t\\t\\t\\t'1': 'Reset to original size'\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\n\\t\\t\\t_grp_scroll:{ desc: 'AutoScroll', title:'Scroll to this position of the image each time you change the page' },\\n\\t\\t\\tscrollx:{ desc:'Horizontal', title:'Scroll to this position of the image each time you change the page',\\n\\t\\t\\t\\tvals:{\\n\\t\\t\\t\\t\\t'L':'Left',\\n\\t\\t\\t\\t\\t'R':'Right',\\n\\t\\t\\t\\t\\t'M':'Middle'\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tscrolly:{ desc:'Vertical', title:'Scroll to this position of the image each time you change the page',\\n\\t\\t\\t\\tvals:{\\n\\t\\t\\t\\t\\t'U':'Top',\\n\\t\\t\\t\\t\\t'D':'Bottom',\\n\\t\\t\\t\\t\\t'M':'Middle'\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\n\\t\\t\\t_grp_prefetch:{ desc:'Page Preloading', title:'Adjust the number of pages to preload in each direction' },\\n\\t\\t\\tprefetch_der:{ desc:'Forward', title:'The number of next pages to preload (>0)',\\n\\t\\t\\t\\tdef:defaultSettings.prefetchNext},\\n\\t\\t\\tprefetch_izq:{ desc:'Backwards', title:'The number of previous pages to preload (>0)',\\n\\t\\t\\t\\tdef:defaultSettings.prefetchBack},\\n\\t\\t\\tprefetch_start_der:{ desc:'Initial forward', title:'The number of next pages to preload (>0) when the page is first loaded (to avoid wasting bandwith if you only wanted to see that page)',\\n\\t\\t\\t\\tdef:defaultSettings.prefetchNextStart},\\n\\t\\t\\tprefetch_start_izq:{ desc:'Initial backwards', title:'The number of previous pages to preload (>0) when the page is first loaded (to avoid wasting bandwith if you only wanted to see that page)',\\n\\t\\t\\t\\tdef:defaultSettings.prefetchBackStart},\\n\\t\\t\\tprefetchNoNext:{ desc:'Prefetch when no next page', title:'Disable this to stop preloading the previous page when visiting the last page (ie, the next page was not found)',\\n\\t\\t\\t\\tdef:defaultSettings.prefetchNoNext ? '1' : '0',\\n\\t\\t\\t\\tvals:{\\n\\t\\t\\t\\t\\t'0':'Disabled',\\n\\t\\t\\t\\t\\t'1':'Enabled'\\n\\t\\t\\t\\t}}\\n\\t\\t};\\n\\n\\t\\t//visual options\\n\\t\\tvar opsLayout = {\\n\\t\\t\\tlayout:{ desc:'Layout', title:'Minimalistic layout will show only the image, the defined extra content, and this script\\\\'s buttons. Keeping the original layout will stuff that same content in the place where the image used to be, leaving the rest of the page untouched. This setting can also be toggled for this site with a keyboard shortcut (- by default)',\\n\\t\\t\\t\\tdef: defaultSettings.fullLayout ? '1' : '0',\\n\\t\\t\\t\\tvals:{\\n\\t\\t\\t\\t\\t'0':'Minimalistic',\\n\\t\\t\\t\\t\\t'1':'Keep original'\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tbotones:{ desc:'Buttons', title:'Show or hide all the script\\\\'s buttons (back/next, bookmarks, settings, etc...). This setting can also be toggled for this site with a keyboard shortcut (Shift + - by default)',\\n\\t\\t\\t\\tdef: defaultSettings.showButtons ? '1' : '0',\\n\\t\\t\\t\\tvals:{\\n\\t\\t\\t\\t\\t'0':'Hide',\\n\\t\\t\\t\\t\\t'1':'Show'\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tdim:{ desc:'Screen Dimmer', title:'Add a shadow to the rest of the site so the image (or script content) gets a better focus',\\n\\t\\t\\t\\tdef: '0',\\n\\t\\t\\t\\tvals:{\\n\\t\\t\\t\\t\\t'0':'Disabled',\\n\\t\\t\\t\\t\\t'S':'Focus script content',\\n\\t\\t\\t\\t\\t'I':'Focus image'\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\n\\t\\t\\t_grp_border:{ desc: 'Border', title:'Space to leave around the image (affects AutoScroll and AutoZoom)' },\\n\\t\\t\\tbordex:{ desc:'Horizontal border', title:'Extra pixels to the left/right of the image',\\n\\t\\t\\t\\tdef: defaultSettings.borderLR },\\n\\t\\t\\tbordey:{ desc:'Vertical border', title:'Extra pixels to the top/bottom of the image',\\n\\t\\t\\t\\tdef: defaultSettings.borderUD },\\n\\n\\t\\t\\t_grp_cursor:{ desc:'Cursors', title:'Change the cursor according to the current state' },\\n\\t\\t\\tchcursor_img:{ desc:'Change over image', title:'Enable/Disable this to see a different cursor over the image depending on the state, or always the same one',\\n\\t\\t\\t\\tdef:'1',\\n\\t\\t\\t\\tvals:{\\n\\t\\t\\t\\t\\t'0':'Disabled',\\n\\t\\t\\t\\t\\t'1':'Enabled'\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tchcursor_btns:{ desc:'Change over buttons', title:'Enable/Disable this to see a different cursor over the back/next buttons depending on the state, or always the same one',\\n\\t\\t\\t\\tdef:'1',\\n\\t\\t\\t\\tvals:{\\n\\t\\t\\t\\t\\t'0':'Disabled',\\n\\t\\t\\t\\t\\t'1':'Enabled'\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tcursor_back:{ desc:'Previous page', title:'Cursor for the previous page', def:'1', vals: cursores },\\n\\t\\t\\tcursor_next:{ desc:'Next page', title:'Cursor for the next page', def:'2', vals: cursores },\\n\\t\\t\\tcursor_loading:{ desc:'Loading', title:'Cursor for when the next page is loading', def:'progress', vals: cursores },\\n\\t\\t\\tcursor_nolink:{ desc:'No link', title:'Cursor for when there is no next page', def:'not-allowed', vals: cursores },\\n\\t\\t\\tcursor_noimg:{ desc:'No image', title:'Cursor for when there is a next page but it has no image', def:'pointer', vals: cursores },\\n\\t\\t\\tcursor_custom_3:{ desc:'Custom cursor #1', title:'Custom image to use in the above options, either as an url or base64 (suggested size of 32x32 px, hotspot is at 16,16)'},\\n\\t\\t\\tcursor_custom_4:{ desc:'Custom cursor #2', title:'Custom image to use in the above options, either as an url or base64 (suggested size of 32x32 px, hotspot is at 16,16)'}\\n\\t\\t};\\n\\n\\t\\tvar divsets = document.createElement('div');\\n\\t\\tdivsets.id = 'wcr_settings';\\n\\t\\tdivsets.style.textAlign = 'center';\\n\\t\\tdivsets.innerHTML =\\n\\t\\t\\t'
'+\\n\\t\\t\\t'
'+\\n\\t\\t\\t\\t'
'+\\n\\t\\t\\t\\t\\t'General | '+\\n\\t\\t\\t\\t\\t'Graphic settings | '+\\n\\t\\t\\t\\t\\t'Site settings | '+\\n\\t\\t\\t\\t\\t'Keyboard shortcuts'+\\n\\t\\t\\t\\t'

'+\\n\\t\\t\\t\\t'
'+\\n\\t\\t\\t\\t\\t'
'+htmlLayout(opsGeneral, 'general')+'
'+\\n\\t\\t\\t\\t\\t'
'+htmlLayout(opsLayout, 'layout')+'
'+\\n\\t\\t\\t\\t\\t'
'+htmlSitio(propsSitio)+'
'+\\n\\t\\t\\t\\t\\t'
'+htmlTeclas(teclas)+'
'+\\n\\t\\t\\t\\t'

'+\\n\\t\\t\\t\\t'
'+\\n\\t\\t\\t\\t\\t'Import / Export '+\\n\\t\\t\\t\\t\\t' '+\\n\\t\\t\\t\\t\\t'
'+\\n\\t\\t\\t\\t\\t'Reset '+\\n\\t\\t\\t\\t\\t' '+\\n\\t\\t\\t\\t\\t''+\\n\\t\\t\\t\\t'

'+\\n\\t\\t\\t\\t'
'+\\n\\t\\t\\t\\t\\t' '+\\n\\t\\t\\t\\t\\t' '+\\n\\t\\t\\t\\t\\t''+\\n\\t\\t\\t\\t'
'+\\n\\t\\t\\t'
'+\\n\\t\\t\\t'';\\n\\t\\tdocument.body.appendChild(divsets);\\n\\n\\t\\tinitLayout(opsGeneral, 'general');\\n\\t\\tinitLayout(opsLayout, 'layout');\\n\\t\\tinitSitio(propsSitio);\\n\\t\\tinitTeclas(teclas);\\n\\n\\t\\t//set events for tabs / save / cancel\\n\\t\\tvar tabs = xpath('//div[@id=\\\"wcr_settings_links\\\"]/span', document, true);\\n\\t\\tfor(var i=0; i {\n renderBookmarks(pagination.currentPage);\n cancelEdit();\n });\n }","addAnchor() {\n const data = {\n action: 'addAnchor',\n value: null\n };\n this.postMessage(data);\n }","function editEndpointAnchorsHref($node) {\n // Get data\n var pluginData = getElasticSearchData($node);\n // Loop trough links\n $(pluginData.settings.endpointAnchorTarget).each(function () {\n // Store element\n $anchor = $(this);\n // If not active\n var anchorEndpoint = getQueryString(pluginData.settings.endpointQueryParam, $anchor.attr(\"href\"));\n if (anchorEndpoint !== endpoint) {\n // Check for cookie\n var cookieValue = getElasticSearchCookie(pluginData.settings.cookiePrefix + anchorEndpoint);\n // If cookie value is defined\n if (cookieValue !== null && cookieValue !== \"\") {\n // Update href\n $anchor.attr(\"href\", $anchor.attr(\"href\") + cookieValue);\n }\n }\n });\n }","get anchor() { return this.$anchor.pos }","onClickAdvanced() {\n location.hash = '/content/json/' + this.model.id;\n }","function update_link() {\r\n\t$('#side_navi').append('

Update '+SCRIPT.name+'

');\r\n}","function alterAnchor(e){\n\t// Prevent native scroll event.\n\te.preventDefault();\n\tvar destination = document.getElementById(e.target.classList[0]);\n\t// Find distance from top of page.\n\tvar body = document.body.getBoundingClientRect().top;\n\t// Find distance from top of element to scroll to.\n\tvar element = destination.getBoundingClientRect().top;\n\t// Find difference.\n\tvar newLoc = element - body - 25;\n\t// Go there.\n\t// window.scrollTo(0, newLoc);\n\tsmoothScroll(-body, newLoc);\n}","function anchorLink(element) {\n // Prevent default behaviour\n event.preventDefault();\n\n // Setting variables\n var original_target = element,\n target = $(original_target),\n scrollTopAmount = Math.ceil(target.offset().top),\n scrollUntilHeight2 = 0,\n scrollUntilHeight = 0;\n\n // Add or reduce height from scrollTop\n $('.sticky-parent').each(function () {\n // Add height\n if ( target.isAfter( $(this) ) ) {\n scrollUntilHeight2 += $(this).outerHeight();\n }\n scrollUntilHeight = scrollUntilHeight2;\n })\n scrollTopAmount -= scrollUntilHeight;\n window.location.hash = original_target;\n $('html,body').animate({scrollTop: scrollTopAmount }, plugin.settings.scrollTopDuration);\n }","function update(){\r\n //needs to update server with link/navigation information\r\n //ajax\r\n}","function reloadAndGotoAnchor() {\n window.location.href='/#statistics';\n window.location.reload();\n}","function $anchor(parent, id, cl, text, href) {\n\tlet a = $new(parent, 'a', id, cl, text);\n\tif (href) a.href = href;\n\treturn a;\n}","changeAnchorPart( arg_map ) {\n var\n anchor_map_revise = this.copyAnchorMap(),\n bool_return = true,\n key_name, key_name_dep;\n\n // Begin merge changes into anchor map\n KEYVAL:\n for ( key_name in arg_map ) {\n if ( arg_map.hasOwnProperty( key_name ) ) {\n\n // skip dependent keys during iteration\n if ( key_name.indexOf( '_' ) === 0 ) { continue KEYVAL; }\n\n // update independent key value\n anchor_map_revise[key_name] = arg_map[key_name];\n\n // update matching dependent key\n key_name_dep = '_' + key_name;\n if ( arg_map[key_name_dep] ) {\n anchor_map_revise[key_name_dep] = arg_map[key_name_dep];\n }\n else {\n delete anchor_map_revise[key_name_dep];\n delete anchor_map_revise['_s' + key_name_dep];\n }\n }\n }\n // End merge changes into anchor map\n\n // Begin attempt to update URI; revert if not successful\n try {\n $.uriAnchor.setAnchor( anchor_map_revise );\n }\n catch ( error ) {\n // replace URI with existing state\n $.uriAnchor.setAnchor( this.stateMap.anchor_map,null,true );\n bool_return = false;\n }\n // End attempt to update URI...\n\n return bool_return;\n }","function anchor(url){\n\twindow.location.href= url;\n}","get anchor() {\n return this.$anchor.pos;\n }","function onClick(target){\n updateTitle(target);\n updatePage(target);\n}","function enableAnchor(anchor) {\n anchor.style.pointerEvents = \"all\";\n anchor.style.cursor = \"pointer\";\n anchor.className = \"button game-mode-button back-color-1\";\n}","function setHref(lnk,q){\n\turl = DBEDIT_MODULE_URL +\"&dba=118\";\n\tDBEDIT_TABLE_NAME = (dbObject.tableName)?dbObject.tableName:DBEDIT_TABLE_NAME;\n\tif(!DBEDIT_TABLE_NAME && !DBEDIT_DB_ID) return false;\n\turl+= (DBEDIT_DB_ID)?'&db='+DBEDIT_DB_ID:'';\n\turl+= (DBEDIT_TABLE_NAME) ? '&tbl='+DBEDIT_TABLE_NAME : '';\n\turl+= q;\n\tlnk.set({'href':url});\n}","function scrollTo_anchor(action) {\n if (action.target.nodeName === \"A\") {\n const allSecId = action.target.getAttribute(\"data-id\");\n const allSec = document.getElementById(allSecId);\n allSec.scrollIntoView({ behavior: \"smooth\" });\n }\n}","_update() {\n window.location.pathname = this._current().url;\n }","function getAnchor(e) {\n let el = e.target;\n while (el && !el.href) {\n el = el.parentNode;\n }\n if (el) {\n e.preventDefault();\n history.pushState(null, null, el.href); // Modify current url to become url of link.\n changePage();\n }\n }","function offsetAnchor() {\r\n\tif (location.hash.length !== 0) {\r\n\t\twindow.scrollTo(window.scrollX, window.scrollY - 100);\r\n\t}\r\n}","anchorClick(){\n \n var app = this;\n var anchor = $('#ul-scroll').find('a');\n\n anchor.on('click', function(){\n\n var idom = $(this).children().attr('id');\n var ctp = idom.replace(\"divpage-\", \"\");\n\n app.counter = parseInt(ctp);\n app.currentPage = app.counter;\n\n app.hoverList(app.counter);\n\n console.log(app.hoverList(app.counter));\n\n // var divanchor = app.$divanchor;\n\n // if (divanchor.hasClass('actual-Session')) {\n \n // $('.actual-Session').css({\n // \"background-color\" : \"rgba(255, 255, 255, 0)\"\n // });\n \n // divanchor.removeClass('actual-Session');\n // }\n \n // $('#divpage-' + app.counter).addClass('actual-Session');\n \n // $('.actual-Session').css({\n // \"background-color\" : \"white\"\n // });\n });\n }","function offsetAnchor() {\n if (location.hash.length !== 0) {\n // window.scrollTo(window.scrollX, window.scrollY - 140);\n $(\"html\").animate({ scrollTop: $(location.hash).offset().top - 160 }, 500);\n }\n }","function offsetAnchor() {\n if (location.hash.length !== 0) {\n window.scrollTo(window.scrollX, window.scrollY - 100);\n }\n}","function linkUpdate ( flag ) {\r\n\r\n\t\tvar trigger = $.inArray(flag, triggerPos);\r\n\r\n\t\t// The API might not have been set yet.\r\n\t\tif ( $Target[0].linkAPI && $Target[0].linkAPI[flag] ) {\r\n\t\t\t$Target[0].linkAPI[flag].change(\r\n\t\t\t\t$Values[trigger],\r\n\t\t\t\t$Handles[trigger].children(),\r\n\t\t\t\t$Target\r\n\t\t\t);\r\n\t\t}\r\n\t}","function offsetAnchor() {\n if (location.hash.length !== 0) {\n window.scrollTo(window.scrollX, window.scrollY - 100);\n }\n}","function offsetAnchor() {\n if (location.hash.length !== 0) {\n window.scrollTo(window.scrollX, window.scrollY - 100);\n }\n}","function scrollToAnchor(){\n\n //getting the anchor link in the URL and deleting the `#`\n var value = window.location.hash.replace('#', '').split('/');\n var section = decodeURIComponent(value[0]);\n var slide = decodeURIComponent(value[1]);\n /* nectar addition */ \n if(section && $('.vc_row[data-fullscreen-anchor-id=\"'+section+'\"]').length > 0){ //if theres any #\n /* nectar addition end */ \n if(options.animateAnchor){\n scrollPageAndSlide(section, slide);\n }else{\n FP.silentMoveTo(section, slide);\n }\n }\n }","function offsetAnchor() {\n if (location.hash.length !== 0) {\n window.scrollTo(window.scrollX, window.scrollY - 100)\n }\n}","function href(editor, v) {\n\t\tvar a = getFirstAnchor(editor);\n\t\tif (!v)\n\t\t\treturn a ? a.href : '';\n\t\telse if (a)\n\t\t\ta.href = v;\n\t}","function goToAnchor(anchor) {\n if (anchor) {\n window.scrollTo(0, $('a[name=' + anchor + ']').offset().top - 120);\n }\n }","function offsetAnchor() {\n if (location.hash.length !== 0) {\n window.scrollTo(window.scrollX, window.scrollY - 110);\n }\n}","function linkUpdate ( flag ) {\n\n\t\tvar trigger = $.inArray(flag, triggerPos);\n\n\t\t// The API might not have been set yet.\n\t\tif ( $Target[0].linkAPI && $Target[0].linkAPI[flag] ) {\n\t\t\t$Target[0].linkAPI[flag].change(\n\t\t\t\t$Values[trigger],\n\t\t\t\t$Handles[trigger].children(),\n\t\t\t\t$Target\n\t\t\t);\n\t\t}\n\t}","function anchorClick() {\n var marker = markerForUrl( this.href );\n if( marker ) {\n if( /\\bZOOM\\b/.exec( this.className ) ) {\n var mapType = marker.mapType || marker.ezmap.map.getCurrentMapType();\n var zoomLevel;\n if( marker.span ) {\n zoomLevel = mapType.getSpanZoomLevel(\n marker.point, marker.span, marker.ezmap.viewsize );\n }\n else {\n zoomLevel = marker.ezmap.map.getZoom();\n }\n marker.ezmap.map.setCenter( marker.point, zoomLevel, mapType );\n }\n marker.doOpen();\n return false;\n }\n else {\n return true;\n }\n }","function setup_queue_link(element)\n{\n element.addEvent(\"click\", function(event) {\n var id = event.target.get('id');\n var name = id.substr(6);\n\n location.href = mlisturl + \"/\" + name;\n });\n}","function updateRoute() {\n\n}","if (this.props.anchorRef) {\n const {height, width} = this.props.anchorRef.getBoundingClientRect();\n\n if (this.anchorHeight !== height || this.anchorWidth !== width) {\n this.anchorHeight = height;\n this.anchorWidth = width;\n this.popper && this.popper.scheduleUpdate();\n }\n }","function _adminLink(href, table, id, callback, anchor) {\n anchor = _createElement('a');\n if (id) anchor.id = table + id;\n // href will always be appended with id\n anchor.href = href + id;\n _setInnerHTML(anchor, table);\n if (callback) gU.on(anchor, 'click', callback);\n return anchor;\n }","function ajxUpdateLinkDone() { \n document.location.href=\"index.php\";\n }","scrollAnchor(e, respond = null) {\n let targetID;\n if (e) {\n e.preventDefault();\n targetID = respond ? respond.getAttribute('href') : this.getAttribute('href');\n targetID = `#${targetID.split('#').pop()}`;\n } else {\n targetID = '#' + respond;\n }\n\n const targetAnchor = document.querySelector(targetID);\n if (!targetAnchor) return;\n targetAnchor.scrollIntoView({\n behavior: 'smooth'\n });\n }","function scrollToAnchor(aid) {\n\t\tvar aName = $(\"a[name='\"+ aid +\"']\");\n\t\t$(\"html,body\").animate({scrollTop: aName.offset().top}, 'slow');\n\t}","function updateURL() {\n var link = baseUrl,\n delim = \"?\";\n\n /* Appends all the query parameters to the link (a query parameter can be\n * excluded by setting it to null) */\n UtilDict.forEachEntry(parameters, function (key, value) {\n if (value) { // Value cannot be null or the empty String\n link += delim + value;\n if (delim === \"?\") {\n //first param has a question mark in front of it. all others have an &\n delim = \"&\";\n }\n }\n });\n\n // Need to add an extra \"&\" to the query if we have an anchor, otherwise\n // the last query will contain the anchors\n if (!UtilDict.isEmpty(anchors)) {\n link += \"&\";\n }\n\n // Anchors have to be at the end\n UtilDict.forEachEntry(anchors, function (key, value) {\n link += \"#\" + value;\n });\n\n if (isShortLinkMode) {\n if (linkPaneTextbox.is(\":visible\")) {\n getlinkloadinganimation.show();\n\n jQuery.urlShortener({\n longUrl: link,\n success: function (shortUrl) {\n setNewUrl(shortUrl);\n getlinkloadinganimation.hide();\n },\n error: function (err) {\n console.error(JSON.stringify(err));\n getlinkloadinganimation.hide();\n }\n });\n }\n } else {\n setNewUrl(link);\n }\n\n //update lang href with current bookmark url\n updateLangHref(link);\n\n //trigger event indicating bookmark is complete. pass bookmark as arg\n topic.publish(EventManager.BookmarkLink.BOOKMARK_GENERATED, {\n link: link\n });\n }","buildAnchors() {\r\n this.buildPointAnchors();\r\n }","function setUrl(nextAnchor) {\n status.currentUrl = status.nextUrl || window.location.href;\n status.nextUrl = nextAnchor ? nextAnchor.attr('href') : $(options.link).attr('href');\n }","function updateAnchorItemsPositions() {\n for (var k = 0; k < anchorBlocks.length; k++) {\n var item = anchorBlocks[k];\n var blockTop = 0;\n var blockH = _utility.wndH;\n if (item.$block.length) {\n blockTop = item.$block.offset().top;\n blockH = item.$block.innerHeight();\n }\n item.activate = blockTop - _utility.wndH / 2;\n item.deactivate = blockTop + blockH - _utility.wndH / 2;\n }\n }","renderAnchor() {\n return html `\n \n `;\n }","['click .method-container a'](e, $el) {\n\t\tToc.goToHash($el.attr('href'));\n\t}","function scrollToAnchor(aid){\n\t\tvar aTag = $(\"a[name='\"+ aid +\"']\");\n\t\t$('html,body').animate({scrollTop: aTag.offset().top},'slow');\n\t}","function scrollToAnchor(aid){\n\t\tvar aTag = $(\"a[name='\"+ aid +\"']\");\n\t\t$('html,body').animate({scrollTop: aTag.offset().top},'slow');\n\t}","function updateAnchorItemsPositions() {\n for (var k = 0; k < anchorBlocks.length; k++) {\n var item = anchorBlocks[k];\n var blockTop = 0;\n var blockH = wndH;\n if (item.$block.length) {\n blockTop = item.$block.offset().top;\n blockH = item.$block.innerHeight();\n }\n item.activate = blockTop - wndH / 2;\n item.deactivate = blockTop + blockH - wndH / 2;\n }\n }","function swapAnchor (whichLayer, newAnchor) {\n\n\t\t// Layer Transform Group\n\tvar layerTransformGrp = whichLayer.property(\"ADBE Transform Group\");\n\n\t\t// Position Layer Anchor Point\n\tvar theLayerAnchor = layerTransformGrp.property(\"ADBE Anchor Point\");\n\ttheLayerAnchor.setValue(newAnchor);\n\n}","render() {\n let anchorAttributes = {\n class: {\n [this.activeClass]: this.match !== null,\n },\n onClick: this.handleClick.bind(this)\n };\n if (this.anchorClass) {\n anchorAttributes.class[this.anchorClass] = true;\n }\n if (this.custom === 'a') {\n anchorAttributes = Object.assign(Object.assign({}, anchorAttributes), { href: this.url, title: this.anchorTitle, role: this.anchorRole, tabindex: this.anchorTabIndex, 'aria-haspopup': this.ariaHaspopup, id: this.anchorId, 'aria-posinset': this.ariaPosinset, 'aria-setsize': this.ariaSetsize, 'aria-label': this.ariaLabel });\n }\n return (index.h(this.custom, Object.assign({}, anchorAttributes), index.h(\"slot\", null)));\n }","function updateLink(node, opts) {\n \tlet href = opts.href || node.getAttribute(\"href\");\n\n \t// Destination must start with '/' or '#/'\n \tif (href && href.charAt(0) == \"/\") {\n \t\t// Add # to the href attribute\n \t\thref = \"#\" + href;\n \t} else if (!href || href.length < 2 || href.slice(0, 2) != \"#/\") {\n \t\tthrow Error(\"Invalid value for \\\"href\\\" attribute: \" + href);\n \t}\n\n \tnode.setAttribute(\"href\", href);\n\n \tnode.addEventListener(\"click\", event => {\n \t\t// Prevent default anchor onclick behaviour\n \t\tevent.preventDefault();\n\n \t\tif (!opts.disabled) {\n \t\t\tscrollstateHistoryHandler(event.currentTarget.getAttribute(\"href\"));\n \t\t}\n \t});\n }","function look_ruby_scroll_update_url() {\r\n var single = $('.single');\r\n if (single.length > 0) {\r\n var post_outer = single.find('.single-post-outer');\r\n if (post_outer.length > 1) {\r\n post_outer.each(function() {\r\n var post_outer_el = $(this);\r\n var url = post_outer_el.data('post_url');\r\n var title = post_outer_el.data('post_title');\r\n\r\n new Waypoint.Inview({\r\n element: post_outer_el,\r\n enter: function() {\r\n look_ruby_update_url(url, title);\r\n }\r\n });\r\n })\r\n }\r\n }\r\n }","function updatePage(pair, forceback) {\n var loc = window.location;\n var newhash = pair.large.attr(params.anchorName);\n var curhash = loc.pathname.replace(\"/\",\"\");\n //dlog(\"Updating hash - current: \"+curhash+ \" new: \"+newhash);\n if (newhash == curhash) {\n //dlog(\"No need to update\");\n return;\n }\n if (\"pushState\" in history) {\n if (!curhash || forceback) {\n //dlog(\"new location to \"+newhash);\n history.pushState({state: 1}, document.title, newhash);\n } else {\n //dlog(\"update location to \"+newhash);\n history.replaceState({state: 1}, document.title, newhash);\n }\n }\n }","updateRoute() {\n this.props.updateRoute(this.props.index,\n this.agency, this.line, this.direction, this.time);\n }","function clickActiveLink() {\r\n var splitID = this.id.split(\"_\");\r\n replaceContent(splitID[1] + \"/\" + splitID[2], this.title);\r\n if (boxStatus == 0) {\r\n showBox();\r\n } \r\n}","function scrollToAnchor(aid){\n var aTag = $(aid);\n $('html,body').animate({scrollTop: (aTag.offset().top-100)},'slow');\n }","updateActiveLink() {\n if (!this._items) {\n return;\n }\n const items = this._items.toArray();\n for (let i = 0; i < items.length; i++) {\n if (items[i].active) {\n this.selectedIndex = i;\n this._changeDetectorRef.markForCheck();\n return;\n }\n }\n // The ink bar should hide itself if no items are active.\n this.selectedIndex = -1;\n this._inkBar.hide();\n }","function scrollToAnchor(){\r\n var anchors = getAnchorsURL();\r\n var sectionAnchor = anchors.section;\r\n var slideAnchor = anchors.slide;\r\n\r\n if(sectionAnchor){ //if theres any #\r\n if(options.animateAnchor){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else{\r\n silentMoveTo(sectionAnchor, slideAnchor);\r\n }\r\n }\r\n }","function scrollToAnchor(){\r\n var anchors = getAnchorsURL();\r\n var sectionAnchor = anchors.section;\r\n var slideAnchor = anchors.slide;\r\n\r\n if(sectionAnchor){ //if theres any #\r\n if(options.animateAnchor){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else{\r\n silentMoveTo(sectionAnchor, slideAnchor);\r\n }\r\n }\r\n }","function scrollToAnchor(){\r\n var anchors = getAnchorsURL();\r\n var sectionAnchor = anchors.section;\r\n var slideAnchor = anchors.slide;\r\n\r\n if(sectionAnchor){ //if theres any #\r\n if(options.animateAnchor){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else{\r\n silentMoveTo(sectionAnchor, slideAnchor);\r\n }\r\n }\r\n }","function scrollTo(anchor) {\n event.preventDefault();\n\n // Get offset from top of anchor point\n topY = anchor.offsetTop;\n\n // Tween to anchor point\n TweenLite.to(window, 1, {\n scrollTo: {\n y: topY,\n offsetY: 10\n },\n force3D: true\n });\n }","function updateLink(node, opts) {\n \tlet href = opts.href || node.getAttribute('href');\n\n \t// Destination must start with '/' or '#/'\n \tif (href && href.charAt(0) == '/') {\n \t\t// Add # to the href attribute\n \t\thref = '#' + href;\n \t} else if (!href || href.length < 2 || href.slice(0, 2) != '#/') {\n \t\tthrow Error('Invalid value for \"href\" attribute: ' + href);\n \t}\n\n \tnode.setAttribute('href', href);\n\n \tnode.addEventListener('click', event => {\n \t\t// Prevent default anchor onclick behaviour\n \t\tevent.preventDefault();\n\n \t\tif (!opts.disabled) {\n \t\t\tscrollstateHistoryHandler(event.currentTarget.getAttribute('href'));\n \t\t}\n \t});\n }","update(){}","update(){}","update(){}","function activateLink(e){\n // remove/add .active\n let activeLink = document.getElementsByClassName('active')[0] ? \n document.getElementsByClassName('active')[0] : \n null;\n\n if(activeLink){\n activeLink.removeAttribute('class');\n }\n e.target.setAttribute('class', 'active');\n\n // get the paragraph\n let content = new Content();\n content.getParagraphByIndex(e.target.id);\n\n // change the url in the address bar\n window.history.pushState(\"\", \"\", e.target.id);\n}","function goToAnchor(mixAnchor)\n{\n if (empty(mixAnchor))\n return;\n window.location.href = window.location.href + '#' + mixAnchor;\n}","function onHashChange() {\n\t\tupdateActiveTab();\n\t\tupdateActiveSection();\n\t}","function scrollToAnchor(){\n //getting the anchor link in the URL and deleting the `#`\n var value = window.location.hash.replace('#', '').split('/');\n var section = decodeURIComponent(value[0]);\n var slide = decodeURIComponent(value[1]);\n\n if(section){ //if theres any #\n if(options.animateAnchor){\n scrollPageAndSlide(section, slide);\n }else{\n FP.silentMoveTo(section, slide);\n }\n }\n }","function addAnchorR() {\n var pole = addStreetPostsR();\n\n pole.lightPost.position.z = -4770;\n pole.light.position.z = -4770;\n}","updateURL (to, from) {\n this.$emit('updateURL', to, from, this)\n }","function scrollToAnchor(){\n var anchors = getAnchorsURL();\n var sectionAnchor = anchors.section;\n var slideAnchor = anchors.slide;\n\n if(sectionAnchor){ //if theres any #\n if(options.animateAnchor){\n scrollPageAndSlide(sectionAnchor, slideAnchor);\n }else{\n silentMoveTo(sectionAnchor, slideAnchor);\n }\n }\n }","function scrollToAnchor(){\n var anchors = getAnchorsURL();\n var sectionAnchor = anchors.section;\n var slideAnchor = anchors.slide;\n\n if(sectionAnchor){ //if theres any #\n if(options.animateAnchor){\n scrollPageAndSlide(sectionAnchor, slideAnchor);\n }else{\n silentMoveTo(sectionAnchor, slideAnchor);\n }\n }\n }","function scrollToAnchor(){\n var anchors = getAnchorsURL();\n var sectionAnchor = anchors.section;\n var slideAnchor = anchors.slide;\n\n if(sectionAnchor){ //if theres any #\n if(options.animateAnchor){\n scrollPageAndSlide(sectionAnchor, slideAnchor);\n }else{\n silentMoveTo(sectionAnchor, slideAnchor);\n }\n }\n }","function deriveAnchor(edge, index, ep, conn) {\n return options.anchor ? options.anchor : options.deriveAnchor(edge, index, ep, conn);\n }","function updateHashInUrl(href) {\n var hashInUrl = href;\n if (href.indexOf('/feature/') !== -1) {\n hashInUrl = href.substring(18);\n }\n\n lastClickElementHref = hashInUrl;\n window.location.hash = '#' + hashInUrl;\n}","function scrollToAnchor() {\n var anchors = getAnchorsURL();\n var sectionAnchor = anchors.section;\n var slideAnchor = anchors.slide;\n\n if (sectionAnchor) { //if theres any #\n if (options.animateAnchor) {\n scrollPageAndSlide(sectionAnchor, slideAnchor);\n } else {\n silentMoveTo(sectionAnchor, slideAnchor);\n }\n }\n }","function setAnchorAsButton(anchor){anchor.setAttribute(\"role\",\"button\");anchor.tabIndex=0;}// eslint-disable-next-line es/no-object-assign -- safe","function updateSectionLocation(node, anchorTag) {\n return dispatchSectionLocations({\n action: 'update',\n payload: {\n node,\n anchorTag,\n },\n });\n }","function updateLink() {\n\tif(document.getElementById(\"link_span\").childElementCount > 0) {\n\t\tvar url = parseURL(document.getElementById(\"link_span\").firstChild.href);\n\t\turl.params[\"lat\"] = unsafeWindow._c09.getCenter().lat();\n\t\turl.params[\"lng\"] = unsafeWindow._c09.getCenter().lng();\n\t\turl.params[\"zoom\"] = unsafeWindow._c09.getZoom();\n\t\tvar newUrl = url.protocol+\"://\"+url.host+\"/?\";\n\t\tfor(key in url.params) {\n\t\t\tnewUrl += key+\"=\"+url.params[key]+\"&\";\n\t\t}\n\t\tconsole.log(newUrl);\n\t\tdocument.getElementById(\"link_span\").firstChild.href = newUrl;\n\t}\n}","function scrollToAnchor(aid){\n var aTag = $(aid);\n var offSet = aTag.offset().top - 50;\n $('html,body').animate({scrollTop: offSet},'fast');\n }","function scrollToAnchor(){\r\n //getting the anchor link in the URL and deleting the `#`\r\n var value = window.location.hash.replace('#', '').split('/');\r\n var sectionAnchor = decodeURIComponent(value[0]);\r\n var slideAnchor = decodeURIComponent(value[1]);\r\n\r\n if(sectionAnchor){ //if theres any #\r\n if(options.animateAnchor){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else{\r\n silentMoveTo(sectionAnchor, slideAnchor);\r\n }\r\n }\r\n }","function scrollToAnchor(){\r\n //getting the anchor link in the URL and deleting the `#`\r\n var value = window.location.hash.replace('#', '').split('/');\r\n var sectionAnchor = decodeURIComponent(value[0]);\r\n var slideAnchor = decodeURIComponent(value[1]);\r\n\r\n if(sectionAnchor){ //if theres any #\r\n if(options.animateAnchor){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else{\r\n silentMoveTo(sectionAnchor, slideAnchor);\r\n }\r\n }\r\n }","click(e){\r\n if ( this.url ){\r\n bbn.fn.link(this.url);\r\n }\r\n else{\r\n this.$emit('click', e);\r\n }\r\n }","function updateA(gallery) {\n function createKeyValue(key, value, isURL = false) {\n function addLink(link) {\n const linkElem = document.createElement('a');\n linkElem.setAttribute('href', link);\n linkElem.appendChild(document.createTextNode(link));\n return linkElem;\n }\n const keyElem = document.createElement('strong');\n keyElem.appendChild(document.createTextNode(key+\": \"));\n const valueElem = document.createElement('span');\n if(isURL)\n valueElem.appendChild(addLink(value));\n else \n valueElem.appendChild(document.createTextNode(value));\n const liTag = document.createElement('li');\n liTag.appendChild(keyElem);\n liTag.appendChild(valueElem);\n return liTag;\n }\n const aDiv = document.querySelector(\".a\");\n clearDiv(aDiv);\n const list = document.createElement('ul');\n list.appendChild(createKeyValue(\"Gallery Name\", gallery.nameEn));\n list.appendChild(createKeyValue(\"Link\", gallery.link, true));\n list.appendChild(createKeyValue(\"Address\", `${gallery.location.address}, ${gallery.location.city} ${gallery.location.country}`));\n aDiv.appendChild(list);\n}","function attachPageTargetForClickToScroll(pageTarget,anchor) {\n\n const idAttribute = pageTarget.getAttribute(\"id\");\n anchor.setAttribute('id','navlink'+idAttribute);\n //anchor.setAttribute('href',`#${idAttribute}`);\n}","get anchor() {\n return new FudgeCore.Vector3(this.jointAnchor.x, this.jointAnchor.y, this.jointAnchor.z);\n }"],"string":"[\n \"function UpdateAnchorsHandler() { }\",\n \"set anchor(value) {}\",\n \"get anchor() {}\",\n \"anchor() {\\n this.__anchors++;\\n }\",\n \"anchor() {\\n this.__anchors++;\\n }\",\n \"anchor() {\\n this.__anchors++;\\n }\",\n \"anchor() {\\n this.__anchors++;\\n }\",\n \"update() {\\n\\tlet usp = new search.URLSearchParams(location.hash)\\n\\tfor (let node of this.anchors) {\\n\\t let params = new search.URLSearchParams(node.hash)\\n\\t usp.set('m', params.get('m'))\\n\\t node.href = '#?' + usp.toString()\\n\\t}\\n }\",\n \"setAnchorPostion(anchor, newX, newY) {\\n anchor.html.attr(\\\"cx\\\", newX).attr(\\\"cy\\\", newY);\\n }\",\n \"function updateDropDownAnchor(section)\\n {\\n // Label\\n $('span.label', drop_down_anchor).html(section.label);\\n\\n // Href\\n drop_down_anchor.attr('href', '#' + section.id);\\n }\",\n \"_onAnchorUpdate()\\n {\\n this._transformID = -1;\\n }\",\n \"_onAnchorUpdate() {\\n this._transformID = -1;\\n this._transformTrimmedID = -1;\\n }\",\n \"function updateLink() {\\n const url = urlInput.value;\\n const name = nameInput.value;\\n editBookmark({url, name, key}, () => {\\n renderBookmarks(pagination.currentPage);\\n cancelEdit();\\n });\\n }\",\n \"addAnchor() {\\n const data = {\\n action: 'addAnchor',\\n value: null\\n };\\n this.postMessage(data);\\n }\",\n \"function editEndpointAnchorsHref($node) {\\n // Get data\\n var pluginData = getElasticSearchData($node);\\n // Loop trough links\\n $(pluginData.settings.endpointAnchorTarget).each(function () {\\n // Store element\\n $anchor = $(this);\\n // If not active\\n var anchorEndpoint = getQueryString(pluginData.settings.endpointQueryParam, $anchor.attr(\\\"href\\\"));\\n if (anchorEndpoint !== endpoint) {\\n // Check for cookie\\n var cookieValue = getElasticSearchCookie(pluginData.settings.cookiePrefix + anchorEndpoint);\\n // If cookie value is defined\\n if (cookieValue !== null && cookieValue !== \\\"\\\") {\\n // Update href\\n $anchor.attr(\\\"href\\\", $anchor.attr(\\\"href\\\") + cookieValue);\\n }\\n }\\n });\\n }\",\n \"get anchor() { return this.$anchor.pos }\",\n \"onClickAdvanced() {\\n location.hash = '/content/json/' + this.model.id;\\n }\",\n \"function update_link() {\\r\\n\\t$('#side_navi').append('

Update '+SCRIPT.name+'

');\\r\\n}\",\n \"function alterAnchor(e){\\n\\t// Prevent native scroll event.\\n\\te.preventDefault();\\n\\tvar destination = document.getElementById(e.target.classList[0]);\\n\\t// Find distance from top of page.\\n\\tvar body = document.body.getBoundingClientRect().top;\\n\\t// Find distance from top of element to scroll to.\\n\\tvar element = destination.getBoundingClientRect().top;\\n\\t// Find difference.\\n\\tvar newLoc = element - body - 25;\\n\\t// Go there.\\n\\t// window.scrollTo(0, newLoc);\\n\\tsmoothScroll(-body, newLoc);\\n}\",\n \"function anchorLink(element) {\\n // Prevent default behaviour\\n event.preventDefault();\\n\\n // Setting variables\\n var original_target = element,\\n target = $(original_target),\\n scrollTopAmount = Math.ceil(target.offset().top),\\n scrollUntilHeight2 = 0,\\n scrollUntilHeight = 0;\\n\\n // Add or reduce height from scrollTop\\n $('.sticky-parent').each(function () {\\n // Add height\\n if ( target.isAfter( $(this) ) ) {\\n scrollUntilHeight2 += $(this).outerHeight();\\n }\\n scrollUntilHeight = scrollUntilHeight2;\\n })\\n scrollTopAmount -= scrollUntilHeight;\\n window.location.hash = original_target;\\n $('html,body').animate({scrollTop: scrollTopAmount }, plugin.settings.scrollTopDuration);\\n }\",\n \"function update(){\\r\\n //needs to update server with link/navigation information\\r\\n //ajax\\r\\n}\",\n \"function reloadAndGotoAnchor() {\\n window.location.href='/#statistics';\\n window.location.reload();\\n}\",\n \"function $anchor(parent, id, cl, text, href) {\\n\\tlet a = $new(parent, 'a', id, cl, text);\\n\\tif (href) a.href = href;\\n\\treturn a;\\n}\",\n \"changeAnchorPart( arg_map ) {\\n var\\n anchor_map_revise = this.copyAnchorMap(),\\n bool_return = true,\\n key_name, key_name_dep;\\n\\n // Begin merge changes into anchor map\\n KEYVAL:\\n for ( key_name in arg_map ) {\\n if ( arg_map.hasOwnProperty( key_name ) ) {\\n\\n // skip dependent keys during iteration\\n if ( key_name.indexOf( '_' ) === 0 ) { continue KEYVAL; }\\n\\n // update independent key value\\n anchor_map_revise[key_name] = arg_map[key_name];\\n\\n // update matching dependent key\\n key_name_dep = '_' + key_name;\\n if ( arg_map[key_name_dep] ) {\\n anchor_map_revise[key_name_dep] = arg_map[key_name_dep];\\n }\\n else {\\n delete anchor_map_revise[key_name_dep];\\n delete anchor_map_revise['_s' + key_name_dep];\\n }\\n }\\n }\\n // End merge changes into anchor map\\n\\n // Begin attempt to update URI; revert if not successful\\n try {\\n $.uriAnchor.setAnchor( anchor_map_revise );\\n }\\n catch ( error ) {\\n // replace URI with existing state\\n $.uriAnchor.setAnchor( this.stateMap.anchor_map,null,true );\\n bool_return = false;\\n }\\n // End attempt to update URI...\\n\\n return bool_return;\\n }\",\n \"function anchor(url){\\n\\twindow.location.href= url;\\n}\",\n \"get anchor() {\\n return this.$anchor.pos;\\n }\",\n \"function onClick(target){\\n updateTitle(target);\\n updatePage(target);\\n}\",\n \"function enableAnchor(anchor) {\\n anchor.style.pointerEvents = \\\"all\\\";\\n anchor.style.cursor = \\\"pointer\\\";\\n anchor.className = \\\"button game-mode-button back-color-1\\\";\\n}\",\n \"function setHref(lnk,q){\\n\\turl = DBEDIT_MODULE_URL +\\\"&dba=118\\\";\\n\\tDBEDIT_TABLE_NAME = (dbObject.tableName)?dbObject.tableName:DBEDIT_TABLE_NAME;\\n\\tif(!DBEDIT_TABLE_NAME && !DBEDIT_DB_ID) return false;\\n\\turl+= (DBEDIT_DB_ID)?'&db='+DBEDIT_DB_ID:'';\\n\\turl+= (DBEDIT_TABLE_NAME) ? '&tbl='+DBEDIT_TABLE_NAME : '';\\n\\turl+= q;\\n\\tlnk.set({'href':url});\\n}\",\n \"function scrollTo_anchor(action) {\\n if (action.target.nodeName === \\\"A\\\") {\\n const allSecId = action.target.getAttribute(\\\"data-id\\\");\\n const allSec = document.getElementById(allSecId);\\n allSec.scrollIntoView({ behavior: \\\"smooth\\\" });\\n }\\n}\",\n \"_update() {\\n window.location.pathname = this._current().url;\\n }\",\n \"function getAnchor(e) {\\n let el = e.target;\\n while (el && !el.href) {\\n el = el.parentNode;\\n }\\n if (el) {\\n e.preventDefault();\\n history.pushState(null, null, el.href); // Modify current url to become url of link.\\n changePage();\\n }\\n }\",\n \"function offsetAnchor() {\\r\\n\\tif (location.hash.length !== 0) {\\r\\n\\t\\twindow.scrollTo(window.scrollX, window.scrollY - 100);\\r\\n\\t}\\r\\n}\",\n \"anchorClick(){\\n \\n var app = this;\\n var anchor = $('#ul-scroll').find('a');\\n\\n anchor.on('click', function(){\\n\\n var idom = $(this).children().attr('id');\\n var ctp = idom.replace(\\\"divpage-\\\", \\\"\\\");\\n\\n app.counter = parseInt(ctp);\\n app.currentPage = app.counter;\\n\\n app.hoverList(app.counter);\\n\\n console.log(app.hoverList(app.counter));\\n\\n // var divanchor = app.$divanchor;\\n\\n // if (divanchor.hasClass('actual-Session')) {\\n \\n // $('.actual-Session').css({\\n // \\\"background-color\\\" : \\\"rgba(255, 255, 255, 0)\\\"\\n // });\\n \\n // divanchor.removeClass('actual-Session');\\n // }\\n \\n // $('#divpage-' + app.counter).addClass('actual-Session');\\n \\n // $('.actual-Session').css({\\n // \\\"background-color\\\" : \\\"white\\\"\\n // });\\n });\\n }\",\n \"function offsetAnchor() {\\n if (location.hash.length !== 0) {\\n // window.scrollTo(window.scrollX, window.scrollY - 140);\\n $(\\\"html\\\").animate({ scrollTop: $(location.hash).offset().top - 160 }, 500);\\n }\\n }\",\n \"function offsetAnchor() {\\n if (location.hash.length !== 0) {\\n window.scrollTo(window.scrollX, window.scrollY - 100);\\n }\\n}\",\n \"function linkUpdate ( flag ) {\\r\\n\\r\\n\\t\\tvar trigger = $.inArray(flag, triggerPos);\\r\\n\\r\\n\\t\\t// The API might not have been set yet.\\r\\n\\t\\tif ( $Target[0].linkAPI && $Target[0].linkAPI[flag] ) {\\r\\n\\t\\t\\t$Target[0].linkAPI[flag].change(\\r\\n\\t\\t\\t\\t$Values[trigger],\\r\\n\\t\\t\\t\\t$Handles[trigger].children(),\\r\\n\\t\\t\\t\\t$Target\\r\\n\\t\\t\\t);\\r\\n\\t\\t}\\r\\n\\t}\",\n \"function offsetAnchor() {\\n if (location.hash.length !== 0) {\\n window.scrollTo(window.scrollX, window.scrollY - 100);\\n }\\n}\",\n \"function offsetAnchor() {\\n if (location.hash.length !== 0) {\\n window.scrollTo(window.scrollX, window.scrollY - 100);\\n }\\n}\",\n \"function scrollToAnchor(){\\n\\n //getting the anchor link in the URL and deleting the `#`\\n var value = window.location.hash.replace('#', '').split('/');\\n var section = decodeURIComponent(value[0]);\\n var slide = decodeURIComponent(value[1]);\\n /* nectar addition */ \\n if(section && $('.vc_row[data-fullscreen-anchor-id=\\\"'+section+'\\\"]').length > 0){ //if theres any #\\n /* nectar addition end */ \\n if(options.animateAnchor){\\n scrollPageAndSlide(section, slide);\\n }else{\\n FP.silentMoveTo(section, slide);\\n }\\n }\\n }\",\n \"function offsetAnchor() {\\n if (location.hash.length !== 0) {\\n window.scrollTo(window.scrollX, window.scrollY - 100)\\n }\\n}\",\n \"function href(editor, v) {\\n\\t\\tvar a = getFirstAnchor(editor);\\n\\t\\tif (!v)\\n\\t\\t\\treturn a ? a.href : '';\\n\\t\\telse if (a)\\n\\t\\t\\ta.href = v;\\n\\t}\",\n \"function goToAnchor(anchor) {\\n if (anchor) {\\n window.scrollTo(0, $('a[name=' + anchor + ']').offset().top - 120);\\n }\\n }\",\n \"function offsetAnchor() {\\n if (location.hash.length !== 0) {\\n window.scrollTo(window.scrollX, window.scrollY - 110);\\n }\\n}\",\n \"function linkUpdate ( flag ) {\\n\\n\\t\\tvar trigger = $.inArray(flag, triggerPos);\\n\\n\\t\\t// The API might not have been set yet.\\n\\t\\tif ( $Target[0].linkAPI && $Target[0].linkAPI[flag] ) {\\n\\t\\t\\t$Target[0].linkAPI[flag].change(\\n\\t\\t\\t\\t$Values[trigger],\\n\\t\\t\\t\\t$Handles[trigger].children(),\\n\\t\\t\\t\\t$Target\\n\\t\\t\\t);\\n\\t\\t}\\n\\t}\",\n \"function anchorClick() {\\n var marker = markerForUrl( this.href );\\n if( marker ) {\\n if( /\\\\bZOOM\\\\b/.exec( this.className ) ) {\\n var mapType = marker.mapType || marker.ezmap.map.getCurrentMapType();\\n var zoomLevel;\\n if( marker.span ) {\\n zoomLevel = mapType.getSpanZoomLevel(\\n marker.point, marker.span, marker.ezmap.viewsize );\\n }\\n else {\\n zoomLevel = marker.ezmap.map.getZoom();\\n }\\n marker.ezmap.map.setCenter( marker.point, zoomLevel, mapType );\\n }\\n marker.doOpen();\\n return false;\\n }\\n else {\\n return true;\\n }\\n }\",\n \"function setup_queue_link(element)\\n{\\n element.addEvent(\\\"click\\\", function(event) {\\n var id = event.target.get('id');\\n var name = id.substr(6);\\n\\n location.href = mlisturl + \\\"/\\\" + name;\\n });\\n}\",\n \"function updateRoute() {\\n\\n}\",\n \"if (this.props.anchorRef) {\\n const {height, width} = this.props.anchorRef.getBoundingClientRect();\\n\\n if (this.anchorHeight !== height || this.anchorWidth !== width) {\\n this.anchorHeight = height;\\n this.anchorWidth = width;\\n this.popper && this.popper.scheduleUpdate();\\n }\\n }\",\n \"function _adminLink(href, table, id, callback, anchor) {\\n anchor = _createElement('a');\\n if (id) anchor.id = table + id;\\n // href will always be appended with id\\n anchor.href = href + id;\\n _setInnerHTML(anchor, table);\\n if (callback) gU.on(anchor, 'click', callback);\\n return anchor;\\n }\",\n \"function ajxUpdateLinkDone() { \\n document.location.href=\\\"index.php\\\";\\n }\",\n \"scrollAnchor(e, respond = null) {\\n let targetID;\\n if (e) {\\n e.preventDefault();\\n targetID = respond ? respond.getAttribute('href') : this.getAttribute('href');\\n targetID = `#${targetID.split('#').pop()}`;\\n } else {\\n targetID = '#' + respond;\\n }\\n\\n const targetAnchor = document.querySelector(targetID);\\n if (!targetAnchor) return;\\n targetAnchor.scrollIntoView({\\n behavior: 'smooth'\\n });\\n }\",\n \"function scrollToAnchor(aid) {\\n\\t\\tvar aName = $(\\\"a[name='\\\"+ aid +\\\"']\\\");\\n\\t\\t$(\\\"html,body\\\").animate({scrollTop: aName.offset().top}, 'slow');\\n\\t}\",\n \"function updateURL() {\\n var link = baseUrl,\\n delim = \\\"?\\\";\\n\\n /* Appends all the query parameters to the link (a query parameter can be\\n * excluded by setting it to null) */\\n UtilDict.forEachEntry(parameters, function (key, value) {\\n if (value) { // Value cannot be null or the empty String\\n link += delim + value;\\n if (delim === \\\"?\\\") {\\n //first param has a question mark in front of it. all others have an &\\n delim = \\\"&\\\";\\n }\\n }\\n });\\n\\n // Need to add an extra \\\"&\\\" to the query if we have an anchor, otherwise\\n // the last query will contain the anchors\\n if (!UtilDict.isEmpty(anchors)) {\\n link += \\\"&\\\";\\n }\\n\\n // Anchors have to be at the end\\n UtilDict.forEachEntry(anchors, function (key, value) {\\n link += \\\"#\\\" + value;\\n });\\n\\n if (isShortLinkMode) {\\n if (linkPaneTextbox.is(\\\":visible\\\")) {\\n getlinkloadinganimation.show();\\n\\n jQuery.urlShortener({\\n longUrl: link,\\n success: function (shortUrl) {\\n setNewUrl(shortUrl);\\n getlinkloadinganimation.hide();\\n },\\n error: function (err) {\\n console.error(JSON.stringify(err));\\n getlinkloadinganimation.hide();\\n }\\n });\\n }\\n } else {\\n setNewUrl(link);\\n }\\n\\n //update lang href with current bookmark url\\n updateLangHref(link);\\n\\n //trigger event indicating bookmark is complete. pass bookmark as arg\\n topic.publish(EventManager.BookmarkLink.BOOKMARK_GENERATED, {\\n link: link\\n });\\n }\",\n \"buildAnchors() {\\r\\n this.buildPointAnchors();\\r\\n }\",\n \"function setUrl(nextAnchor) {\\n status.currentUrl = status.nextUrl || window.location.href;\\n status.nextUrl = nextAnchor ? nextAnchor.attr('href') : $(options.link).attr('href');\\n }\",\n \"function updateAnchorItemsPositions() {\\n for (var k = 0; k < anchorBlocks.length; k++) {\\n var item = anchorBlocks[k];\\n var blockTop = 0;\\n var blockH = _utility.wndH;\\n if (item.$block.length) {\\n blockTop = item.$block.offset().top;\\n blockH = item.$block.innerHeight();\\n }\\n item.activate = blockTop - _utility.wndH / 2;\\n item.deactivate = blockTop + blockH - _utility.wndH / 2;\\n }\\n }\",\n \"renderAnchor() {\\n return html `\\n \\n `;\\n }\",\n \"['click .method-container a'](e, $el) {\\n\\t\\tToc.goToHash($el.attr('href'));\\n\\t}\",\n \"function scrollToAnchor(aid){\\n\\t\\tvar aTag = $(\\\"a[name='\\\"+ aid +\\\"']\\\");\\n\\t\\t$('html,body').animate({scrollTop: aTag.offset().top},'slow');\\n\\t}\",\n \"function scrollToAnchor(aid){\\n\\t\\tvar aTag = $(\\\"a[name='\\\"+ aid +\\\"']\\\");\\n\\t\\t$('html,body').animate({scrollTop: aTag.offset().top},'slow');\\n\\t}\",\n \"function updateAnchorItemsPositions() {\\n for (var k = 0; k < anchorBlocks.length; k++) {\\n var item = anchorBlocks[k];\\n var blockTop = 0;\\n var blockH = wndH;\\n if (item.$block.length) {\\n blockTop = item.$block.offset().top;\\n blockH = item.$block.innerHeight();\\n }\\n item.activate = blockTop - wndH / 2;\\n item.deactivate = blockTop + blockH - wndH / 2;\\n }\\n }\",\n \"function swapAnchor (whichLayer, newAnchor) {\\n\\n\\t\\t// Layer Transform Group\\n\\tvar layerTransformGrp = whichLayer.property(\\\"ADBE Transform Group\\\");\\n\\n\\t\\t// Position Layer Anchor Point\\n\\tvar theLayerAnchor = layerTransformGrp.property(\\\"ADBE Anchor Point\\\");\\n\\ttheLayerAnchor.setValue(newAnchor);\\n\\n}\",\n \"render() {\\n let anchorAttributes = {\\n class: {\\n [this.activeClass]: this.match !== null,\\n },\\n onClick: this.handleClick.bind(this)\\n };\\n if (this.anchorClass) {\\n anchorAttributes.class[this.anchorClass] = true;\\n }\\n if (this.custom === 'a') {\\n anchorAttributes = Object.assign(Object.assign({}, anchorAttributes), { href: this.url, title: this.anchorTitle, role: this.anchorRole, tabindex: this.anchorTabIndex, 'aria-haspopup': this.ariaHaspopup, id: this.anchorId, 'aria-posinset': this.ariaPosinset, 'aria-setsize': this.ariaSetsize, 'aria-label': this.ariaLabel });\\n }\\n return (index.h(this.custom, Object.assign({}, anchorAttributes), index.h(\\\"slot\\\", null)));\\n }\",\n \"function updateLink(node, opts) {\\n \\tlet href = opts.href || node.getAttribute(\\\"href\\\");\\n\\n \\t// Destination must start with '/' or '#/'\\n \\tif (href && href.charAt(0) == \\\"/\\\") {\\n \\t\\t// Add # to the href attribute\\n \\t\\thref = \\\"#\\\" + href;\\n \\t} else if (!href || href.length < 2 || href.slice(0, 2) != \\\"#/\\\") {\\n \\t\\tthrow Error(\\\"Invalid value for \\\\\\\"href\\\\\\\" attribute: \\\" + href);\\n \\t}\\n\\n \\tnode.setAttribute(\\\"href\\\", href);\\n\\n \\tnode.addEventListener(\\\"click\\\", event => {\\n \\t\\t// Prevent default anchor onclick behaviour\\n \\t\\tevent.preventDefault();\\n\\n \\t\\tif (!opts.disabled) {\\n \\t\\t\\tscrollstateHistoryHandler(event.currentTarget.getAttribute(\\\"href\\\"));\\n \\t\\t}\\n \\t});\\n }\",\n \"function look_ruby_scroll_update_url() {\\r\\n var single = $('.single');\\r\\n if (single.length > 0) {\\r\\n var post_outer = single.find('.single-post-outer');\\r\\n if (post_outer.length > 1) {\\r\\n post_outer.each(function() {\\r\\n var post_outer_el = $(this);\\r\\n var url = post_outer_el.data('post_url');\\r\\n var title = post_outer_el.data('post_title');\\r\\n\\r\\n new Waypoint.Inview({\\r\\n element: post_outer_el,\\r\\n enter: function() {\\r\\n look_ruby_update_url(url, title);\\r\\n }\\r\\n });\\r\\n })\\r\\n }\\r\\n }\\r\\n }\",\n \"function updatePage(pair, forceback) {\\n var loc = window.location;\\n var newhash = pair.large.attr(params.anchorName);\\n var curhash = loc.pathname.replace(\\\"/\\\",\\\"\\\");\\n //dlog(\\\"Updating hash - current: \\\"+curhash+ \\\" new: \\\"+newhash);\\n if (newhash == curhash) {\\n //dlog(\\\"No need to update\\\");\\n return;\\n }\\n if (\\\"pushState\\\" in history) {\\n if (!curhash || forceback) {\\n //dlog(\\\"new location to \\\"+newhash);\\n history.pushState({state: 1}, document.title, newhash);\\n } else {\\n //dlog(\\\"update location to \\\"+newhash);\\n history.replaceState({state: 1}, document.title, newhash);\\n }\\n }\\n }\",\n \"updateRoute() {\\n this.props.updateRoute(this.props.index,\\n this.agency, this.line, this.direction, this.time);\\n }\",\n \"function clickActiveLink() {\\r\\n var splitID = this.id.split(\\\"_\\\");\\r\\n replaceContent(splitID[1] + \\\"/\\\" + splitID[2], this.title);\\r\\n if (boxStatus == 0) {\\r\\n showBox();\\r\\n } \\r\\n}\",\n \"function scrollToAnchor(aid){\\n var aTag = $(aid);\\n $('html,body').animate({scrollTop: (aTag.offset().top-100)},'slow');\\n }\",\n \"updateActiveLink() {\\n if (!this._items) {\\n return;\\n }\\n const items = this._items.toArray();\\n for (let i = 0; i < items.length; i++) {\\n if (items[i].active) {\\n this.selectedIndex = i;\\n this._changeDetectorRef.markForCheck();\\n return;\\n }\\n }\\n // The ink bar should hide itself if no items are active.\\n this.selectedIndex = -1;\\n this._inkBar.hide();\\n }\",\n \"function scrollToAnchor(){\\r\\n var anchors = getAnchorsURL();\\r\\n var sectionAnchor = anchors.section;\\r\\n var slideAnchor = anchors.slide;\\r\\n\\r\\n if(sectionAnchor){ //if theres any #\\r\\n if(options.animateAnchor){\\r\\n scrollPageAndSlide(sectionAnchor, slideAnchor);\\r\\n }else{\\r\\n silentMoveTo(sectionAnchor, slideAnchor);\\r\\n }\\r\\n }\\r\\n }\",\n \"function scrollToAnchor(){\\r\\n var anchors = getAnchorsURL();\\r\\n var sectionAnchor = anchors.section;\\r\\n var slideAnchor = anchors.slide;\\r\\n\\r\\n if(sectionAnchor){ //if theres any #\\r\\n if(options.animateAnchor){\\r\\n scrollPageAndSlide(sectionAnchor, slideAnchor);\\r\\n }else{\\r\\n silentMoveTo(sectionAnchor, slideAnchor);\\r\\n }\\r\\n }\\r\\n }\",\n \"function scrollToAnchor(){\\r\\n var anchors = getAnchorsURL();\\r\\n var sectionAnchor = anchors.section;\\r\\n var slideAnchor = anchors.slide;\\r\\n\\r\\n if(sectionAnchor){ //if theres any #\\r\\n if(options.animateAnchor){\\r\\n scrollPageAndSlide(sectionAnchor, slideAnchor);\\r\\n }else{\\r\\n silentMoveTo(sectionAnchor, slideAnchor);\\r\\n }\\r\\n }\\r\\n }\",\n \"function scrollTo(anchor) {\\n event.preventDefault();\\n\\n // Get offset from top of anchor point\\n topY = anchor.offsetTop;\\n\\n // Tween to anchor point\\n TweenLite.to(window, 1, {\\n scrollTo: {\\n y: topY,\\n offsetY: 10\\n },\\n force3D: true\\n });\\n }\",\n \"function updateLink(node, opts) {\\n \\tlet href = opts.href || node.getAttribute('href');\\n\\n \\t// Destination must start with '/' or '#/'\\n \\tif (href && href.charAt(0) == '/') {\\n \\t\\t// Add # to the href attribute\\n \\t\\thref = '#' + href;\\n \\t} else if (!href || href.length < 2 || href.slice(0, 2) != '#/') {\\n \\t\\tthrow Error('Invalid value for \\\"href\\\" attribute: ' + href);\\n \\t}\\n\\n \\tnode.setAttribute('href', href);\\n\\n \\tnode.addEventListener('click', event => {\\n \\t\\t// Prevent default anchor onclick behaviour\\n \\t\\tevent.preventDefault();\\n\\n \\t\\tif (!opts.disabled) {\\n \\t\\t\\tscrollstateHistoryHandler(event.currentTarget.getAttribute('href'));\\n \\t\\t}\\n \\t});\\n }\",\n \"update(){}\",\n \"update(){}\",\n \"update(){}\",\n \"function activateLink(e){\\n // remove/add .active\\n let activeLink = document.getElementsByClassName('active')[0] ? \\n document.getElementsByClassName('active')[0] : \\n null;\\n\\n if(activeLink){\\n activeLink.removeAttribute('class');\\n }\\n e.target.setAttribute('class', 'active');\\n\\n // get the paragraph\\n let content = new Content();\\n content.getParagraphByIndex(e.target.id);\\n\\n // change the url in the address bar\\n window.history.pushState(\\\"\\\", \\\"\\\", e.target.id);\\n}\",\n \"function goToAnchor(mixAnchor)\\n{\\n if (empty(mixAnchor))\\n return;\\n window.location.href = window.location.href + '#' + mixAnchor;\\n}\",\n \"function onHashChange() {\\n\\t\\tupdateActiveTab();\\n\\t\\tupdateActiveSection();\\n\\t}\",\n \"function scrollToAnchor(){\\n //getting the anchor link in the URL and deleting the `#`\\n var value = window.location.hash.replace('#', '').split('/');\\n var section = decodeURIComponent(value[0]);\\n var slide = decodeURIComponent(value[1]);\\n\\n if(section){ //if theres any #\\n if(options.animateAnchor){\\n scrollPageAndSlide(section, slide);\\n }else{\\n FP.silentMoveTo(section, slide);\\n }\\n }\\n }\",\n \"function addAnchorR() {\\n var pole = addStreetPostsR();\\n\\n pole.lightPost.position.z = -4770;\\n pole.light.position.z = -4770;\\n}\",\n \"updateURL (to, from) {\\n this.$emit('updateURL', to, from, this)\\n }\",\n \"function scrollToAnchor(){\\n var anchors = getAnchorsURL();\\n var sectionAnchor = anchors.section;\\n var slideAnchor = anchors.slide;\\n\\n if(sectionAnchor){ //if theres any #\\n if(options.animateAnchor){\\n scrollPageAndSlide(sectionAnchor, slideAnchor);\\n }else{\\n silentMoveTo(sectionAnchor, slideAnchor);\\n }\\n }\\n }\",\n \"function scrollToAnchor(){\\n var anchors = getAnchorsURL();\\n var sectionAnchor = anchors.section;\\n var slideAnchor = anchors.slide;\\n\\n if(sectionAnchor){ //if theres any #\\n if(options.animateAnchor){\\n scrollPageAndSlide(sectionAnchor, slideAnchor);\\n }else{\\n silentMoveTo(sectionAnchor, slideAnchor);\\n }\\n }\\n }\",\n \"function scrollToAnchor(){\\n var anchors = getAnchorsURL();\\n var sectionAnchor = anchors.section;\\n var slideAnchor = anchors.slide;\\n\\n if(sectionAnchor){ //if theres any #\\n if(options.animateAnchor){\\n scrollPageAndSlide(sectionAnchor, slideAnchor);\\n }else{\\n silentMoveTo(sectionAnchor, slideAnchor);\\n }\\n }\\n }\",\n \"function deriveAnchor(edge, index, ep, conn) {\\n return options.anchor ? options.anchor : options.deriveAnchor(edge, index, ep, conn);\\n }\",\n \"function updateHashInUrl(href) {\\n var hashInUrl = href;\\n if (href.indexOf('/feature/') !== -1) {\\n hashInUrl = href.substring(18);\\n }\\n\\n lastClickElementHref = hashInUrl;\\n window.location.hash = '#' + hashInUrl;\\n}\",\n \"function scrollToAnchor() {\\n var anchors = getAnchorsURL();\\n var sectionAnchor = anchors.section;\\n var slideAnchor = anchors.slide;\\n\\n if (sectionAnchor) { //if theres any #\\n if (options.animateAnchor) {\\n scrollPageAndSlide(sectionAnchor, slideAnchor);\\n } else {\\n silentMoveTo(sectionAnchor, slideAnchor);\\n }\\n }\\n }\",\n \"function setAnchorAsButton(anchor){anchor.setAttribute(\\\"role\\\",\\\"button\\\");anchor.tabIndex=0;}// eslint-disable-next-line es/no-object-assign -- safe\",\n \"function updateSectionLocation(node, anchorTag) {\\n return dispatchSectionLocations({\\n action: 'update',\\n payload: {\\n node,\\n anchorTag,\\n },\\n });\\n }\",\n \"function updateLink() {\\n\\tif(document.getElementById(\\\"link_span\\\").childElementCount > 0) {\\n\\t\\tvar url = parseURL(document.getElementById(\\\"link_span\\\").firstChild.href);\\n\\t\\turl.params[\\\"lat\\\"] = unsafeWindow._c09.getCenter().lat();\\n\\t\\turl.params[\\\"lng\\\"] = unsafeWindow._c09.getCenter().lng();\\n\\t\\turl.params[\\\"zoom\\\"] = unsafeWindow._c09.getZoom();\\n\\t\\tvar newUrl = url.protocol+\\\"://\\\"+url.host+\\\"/?\\\";\\n\\t\\tfor(key in url.params) {\\n\\t\\t\\tnewUrl += key+\\\"=\\\"+url.params[key]+\\\"&\\\";\\n\\t\\t}\\n\\t\\tconsole.log(newUrl);\\n\\t\\tdocument.getElementById(\\\"link_span\\\").firstChild.href = newUrl;\\n\\t}\\n}\",\n \"function scrollToAnchor(aid){\\n var aTag = $(aid);\\n var offSet = aTag.offset().top - 50;\\n $('html,body').animate({scrollTop: offSet},'fast');\\n }\",\n \"function scrollToAnchor(){\\r\\n //getting the anchor link in the URL and deleting the `#`\\r\\n var value = window.location.hash.replace('#', '').split('/');\\r\\n var sectionAnchor = decodeURIComponent(value[0]);\\r\\n var slideAnchor = decodeURIComponent(value[1]);\\r\\n\\r\\n if(sectionAnchor){ //if theres any #\\r\\n if(options.animateAnchor){\\r\\n scrollPageAndSlide(sectionAnchor, slideAnchor);\\r\\n }else{\\r\\n silentMoveTo(sectionAnchor, slideAnchor);\\r\\n }\\r\\n }\\r\\n }\",\n \"function scrollToAnchor(){\\r\\n //getting the anchor link in the URL and deleting the `#`\\r\\n var value = window.location.hash.replace('#', '').split('/');\\r\\n var sectionAnchor = decodeURIComponent(value[0]);\\r\\n var slideAnchor = decodeURIComponent(value[1]);\\r\\n\\r\\n if(sectionAnchor){ //if theres any #\\r\\n if(options.animateAnchor){\\r\\n scrollPageAndSlide(sectionAnchor, slideAnchor);\\r\\n }else{\\r\\n silentMoveTo(sectionAnchor, slideAnchor);\\r\\n }\\r\\n }\\r\\n }\",\n \"click(e){\\r\\n if ( this.url ){\\r\\n bbn.fn.link(this.url);\\r\\n }\\r\\n else{\\r\\n this.$emit('click', e);\\r\\n }\\r\\n }\",\n \"function updateA(gallery) {\\n function createKeyValue(key, value, isURL = false) {\\n function addLink(link) {\\n const linkElem = document.createElement('a');\\n linkElem.setAttribute('href', link);\\n linkElem.appendChild(document.createTextNode(link));\\n return linkElem;\\n }\\n const keyElem = document.createElement('strong');\\n keyElem.appendChild(document.createTextNode(key+\\\": \\\"));\\n const valueElem = document.createElement('span');\\n if(isURL)\\n valueElem.appendChild(addLink(value));\\n else \\n valueElem.appendChild(document.createTextNode(value));\\n const liTag = document.createElement('li');\\n liTag.appendChild(keyElem);\\n liTag.appendChild(valueElem);\\n return liTag;\\n }\\n const aDiv = document.querySelector(\\\".a\\\");\\n clearDiv(aDiv);\\n const list = document.createElement('ul');\\n list.appendChild(createKeyValue(\\\"Gallery Name\\\", gallery.nameEn));\\n list.appendChild(createKeyValue(\\\"Link\\\", gallery.link, true));\\n list.appendChild(createKeyValue(\\\"Address\\\", `${gallery.location.address}, ${gallery.location.city} ${gallery.location.country}`));\\n aDiv.appendChild(list);\\n}\",\n \"function attachPageTargetForClickToScroll(pageTarget,anchor) {\\n\\n const idAttribute = pageTarget.getAttribute(\\\"id\\\");\\n anchor.setAttribute('id','navlink'+idAttribute);\\n //anchor.setAttribute('href',`#${idAttribute}`);\\n}\",\n \"get anchor() {\\n return new FudgeCore.Vector3(this.jointAnchor.x, this.jointAnchor.y, this.jointAnchor.z);\\n }\"\n]"},"negative_scores":{"kind":"list like","value":["0.72916204","0.69752336","0.6894827","0.6742493","0.6742493","0.6742493","0.6742493","0.6624592","0.6604059","0.64496326","0.6418013","0.63974416","0.6310246","0.6221733","0.6213902","0.6185177","0.6141847","0.61350256","0.6090274","0.6022484","0.6017475","0.5994277","0.5905553","0.58630264","0.5826645","0.58171284","0.5790429","0.5772086","0.5747118","0.5744804","0.5736386","0.572017","0.5719185","0.570034","0.5692464","0.5681026","0.5674206","0.5669739","0.5669739","0.56621","0.5655355","0.56496507","0.5646353","0.5628438","0.56281763","0.56058216","0.55898744","0.55870885","0.55819285","0.55810493","0.5574214","0.5571927","0.5565796","0.55643046","0.55624145","0.5554431","0.554523","0.5533796","0.55311364","0.55304277","0.55304277","0.552068","0.55119085","0.550435","0.55024475","0.5500229","0.5500097","0.5492345","0.54865015","0.54862636","0.54779285","0.54769933","0.54769933","0.54769933","0.54661304","0.54654396","0.5459873","0.5459873","0.5459873","0.5457208","0.54552764","0.54498","0.54404616","0.54273343","0.5427021","0.54265314","0.54265314","0.54265314","0.54260075","0.5420191","0.5412383","0.5395765","0.53915423","0.5387809","0.5387","0.53842837","0.53842837","0.53795856","0.53766185","0.5371881","0.5365188"],"string":"[\n \"0.72916204\",\n \"0.69752336\",\n \"0.6894827\",\n \"0.6742493\",\n \"0.6742493\",\n \"0.6742493\",\n \"0.6742493\",\n \"0.6624592\",\n \"0.6604059\",\n \"0.64496326\",\n \"0.6418013\",\n \"0.63974416\",\n \"0.6310246\",\n \"0.6221733\",\n \"0.6213902\",\n \"0.6185177\",\n \"0.6141847\",\n \"0.61350256\",\n \"0.6090274\",\n \"0.6022484\",\n \"0.6017475\",\n \"0.5994277\",\n \"0.5905553\",\n \"0.58630264\",\n \"0.5826645\",\n \"0.58171284\",\n \"0.5790429\",\n \"0.5772086\",\n \"0.5747118\",\n \"0.5744804\",\n \"0.5736386\",\n \"0.572017\",\n \"0.5719185\",\n \"0.570034\",\n \"0.5692464\",\n \"0.5681026\",\n \"0.5674206\",\n \"0.5669739\",\n \"0.5669739\",\n \"0.56621\",\n \"0.5655355\",\n \"0.56496507\",\n \"0.5646353\",\n \"0.5628438\",\n \"0.56281763\",\n \"0.56058216\",\n \"0.55898744\",\n \"0.55870885\",\n \"0.55819285\",\n \"0.55810493\",\n \"0.5574214\",\n \"0.5571927\",\n \"0.5565796\",\n \"0.55643046\",\n \"0.55624145\",\n \"0.5554431\",\n \"0.554523\",\n \"0.5533796\",\n \"0.55311364\",\n \"0.55304277\",\n \"0.55304277\",\n \"0.552068\",\n \"0.55119085\",\n \"0.550435\",\n \"0.55024475\",\n \"0.5500229\",\n \"0.5500097\",\n \"0.5492345\",\n \"0.54865015\",\n \"0.54862636\",\n \"0.54779285\",\n \"0.54769933\",\n \"0.54769933\",\n \"0.54769933\",\n \"0.54661304\",\n \"0.54654396\",\n \"0.5459873\",\n \"0.5459873\",\n \"0.5459873\",\n \"0.5457208\",\n \"0.54552764\",\n \"0.54498\",\n \"0.54404616\",\n \"0.54273343\",\n \"0.5427021\",\n \"0.54265314\",\n \"0.54265314\",\n \"0.54265314\",\n \"0.54260075\",\n \"0.5420191\",\n \"0.5412383\",\n \"0.5395765\",\n \"0.53915423\",\n \"0.5387809\",\n \"0.5387\",\n \"0.53842837\",\n \"0.53842837\",\n \"0.53795856\",\n \"0.53766185\",\n \"0.5371881\",\n \"0.5365188\"\n]"},"document_score":{"kind":"string","value":"0.0"},"document_rank":{"kind":"string","value":"-1"}}},{"rowIdx":81344,"cells":{"query":{"kind":"string","value":"Anchor method for rendering"},"document":{"kind":"string","value":"render(delta, spriteBatch) {}"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["render() {\n let anchorAttributes = {\n class: {\n [this.activeClass]: this.match !== null,\n },\n onClick: this.handleClick.bind(this)\n };\n if (this.anchorClass) {\n anchorAttributes.class[this.anchorClass] = true;\n }\n if (this.custom === 'a') {\n anchorAttributes = Object.assign(Object.assign({}, anchorAttributes), { href: this.url, title: this.anchorTitle, role: this.anchorRole, tabindex: this.anchorTabIndex, 'aria-haspopup': this.ariaHaspopup, id: this.anchorId, 'aria-posinset': this.ariaPosinset, 'aria-setsize': this.ariaSetsize, 'aria-label': this.ariaLabel });\n }\n return (index.h(this.custom, Object.assign({}, anchorAttributes), index.h(\"slot\", null)));\n }","get anchor() {}","render (h) {\n return h('a', {\n attrs: {\n href: this.to\n },\n on: {\n click: this.guardEvent\n }\n }, [this.$slots.default])\n }","renderAnchor() {\n return html `\n \n `;\n }","function $anchor(parent, id, cl, text, href) {\n\tlet a = $new(parent, 'a', id, cl, text);\n\tif (href) a.href = href;\n\treturn a;\n}","set anchor(value) {}","anchor() {\n this.__anchors++;\n }","anchor() {\n this.__anchors++;\n }","anchor() {\n this.__anchors++;\n }","anchor() {\n this.__anchors++;\n }","click(e){\r\n if ( this.url ){\r\n bbn.fn.link(this.url);\r\n }\r\n else{\r\n this.$emit('click', e);\r\n }\r\n }","function theme_anchor(url, text, options)\n{\n id = 'anchor-' + Math.random();\n\n if (typeof options != 'undefined') {\n if (options.id)\n id = options.id;\n\n if (options.buttons == 'extra-small')\n button_class = 'btn btn-xs btn-primary';\n else if (options.buttons)\n button_class = 'btn btn-sm btn-primary';\n }\n\n return '' + text + '';\n}","['click .method-container a'](e, $el) {\n\t\tToc.goToHash($el.attr('href'));\n\t}","get anchor() { return this.$anchor.pos }","function anchor(url){\n\twindow.location.href= url;\n}","function goToAnchor(mixAnchor)\n{\n if (empty(mixAnchor))\n return;\n window.location.href = window.location.href + '#' + mixAnchor;\n}","anchorClick(){\n \n var app = this;\n var anchor = $('#ul-scroll').find('a');\n\n anchor.on('click', function(){\n\n var idom = $(this).children().attr('id');\n var ctp = idom.replace(\"divpage-\", \"\");\n\n app.counter = parseInt(ctp);\n app.currentPage = app.counter;\n\n app.hoverList(app.counter);\n\n console.log(app.hoverList(app.counter));\n\n // var divanchor = app.$divanchor;\n\n // if (divanchor.hasClass('actual-Session')) {\n \n // $('.actual-Session').css({\n // \"background-color\" : \"rgba(255, 255, 255, 0)\"\n // });\n \n // divanchor.removeClass('actual-Session');\n // }\n \n // $('#divpage-' + app.counter).addClass('actual-Session');\n \n // $('.actual-Session').css({\n // \"background-color\" : \"white\"\n // });\n });\n }","function formAnchorHtml(href, label) {\r\n\treturn \"\";\r\n}","render(){\r\n var item = document.createElement('li')\r\n var a = document.createElement('a')\r\n a.href = this.url\r\n a.innerText = this.text\r\n item.appendChild(a)\r\n // realizati aici structura HTML:\r\n /**\r\n *
  • \r\n * text\r\n *
  • \r\n */\r\n return item;\r\n }","function makeViewLink(text)\n{\n const link = makeLink(text, \"javascript:void(0)\");\n link.attr(\"id\", text);\n link.addClass(\"view\");\n return link;\n}","function _adminLink(href, table, id, callback, anchor) {\n anchor = _createElement('a');\n if (id) anchor.id = table + id;\n // href will always be appended with id\n anchor.href = href + id;\n _setInnerHTML(anchor, table);\n if (callback) gU.on(anchor, 'click', callback);\n return anchor;\n }","render() {\n return html`\n \n \n ${this.icon\n ? html`\n \n `\n : ``}\n ${this.title}\n ${this.trackIcon\n ? html`\n \n `\n : ``}\n \n \n `;\n }","function anchorClick() {\n var marker = markerForUrl( this.href );\n if( marker ) {\n if( /\\bZOOM\\b/.exec( this.className ) ) {\n var mapType = marker.mapType || marker.ezmap.map.getCurrentMapType();\n var zoomLevel;\n if( marker.span ) {\n zoomLevel = mapType.getSpanZoomLevel(\n marker.point, marker.span, marker.ezmap.viewsize );\n }\n else {\n zoomLevel = marker.ezmap.map.getZoom();\n }\n marker.ezmap.map.setCenter( marker.point, zoomLevel, mapType );\n }\n marker.doOpen();\n return false;\n }\n else {\n return true;\n }\n }","function openlink(upperCase){\n clickAnchor(upperCase,getItem(\"link\"));\n}","function getAnchor(e) {\n let el = e.target;\n while (el && !el.href) {\n el = el.parentNode;\n }\n if (el) {\n e.preventDefault();\n history.pushState(null, null, el.href); // Modify current url to become url of link.\n changePage();\n }\n }","cellLink(e){\n return \n {e}\n \n }","function link() {\n var LINKY_URL_REGEXP =\n /((ftp|https?):\\/\\/|(www\\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\\S*[^\\s.;,(){}<>\"”’]$/;\n var sub = selection.anchorNode.data.substring(0, selection.anchorOffset - 1);\n if (LINKY_URL_REGEXP.test(sub)) {\n var matchs = sub.match(LINKY_URL_REGEXP);\n if (matchs && matchs.length) {\n var st = selection.anchorOffset - matchs[0].length - 1;\n range.setStart(selection.anchorNode, st);\n scope.doCommand(null, {\n name: 'createLink',\n param: matchs[0]\n });\n }\n }\n }","function createAnchor(html, index) {\n const a = document.createElement('a');\n a.href = '#';\n a.innerHTML = html;\n a.onclick = onHeadigClick(this, index);\n return a;\n}","render() {\n return (\n \n get show recommendations!\n \n )\n }","addAnchor() {\n const data = {\n action: 'addAnchor',\n value: null\n };\n this.postMessage(data);\n }","render() { \n const { to, children } = this.props;\n return (\n \n {children}\n \n )\n }","function makeLinksClickable () {\n // Bring the layer with arrows forward.\n var $links = getLinkLayer();\n $divViewControlLayer.append($links);\n\n if (properties.browser === 'mozilla') {\n // A bug in Firefox? The canvas in the div element with the largest z-index.\n $divViewControlLayer.append($canvas);\n } else if (properties.browser === 'msie') {\n $divViewControlLayer.insertBefore($divLabelDrawingLayer);\n }\n }","function anchorClicked(e) {\n e.preventDefault();\n const selectedBookEl = document.getElementById('selectedBook');\n if (!selectedBookEl) return;\n\n const self = this;\n const cell = self.parentElement;\n const row = cell.parentElement;\n const data = row.querySelectorAll('td');\n\n // Generate HTML details of selected book\n let bookData = `
      `;\n for (const field of data) {\n // console.log(field); // each \n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\n bookData += `
    • ${field.dataset.value}: ${field.innerText}
    • `;\n }\n bookData += `
    `;\n\n selectedBookEl.innerHTML = bookData; // render\n}","_createAnchor() {\n const anchor = this._document.createElement('div');\n this._toggleAnchorTabIndex(this._enabled, anchor);\n anchor.classList.add('cdk-visually-hidden');\n anchor.classList.add('cdk-focus-trap-anchor');\n anchor.setAttribute('aria-hidden', 'true');\n return anchor;\n }","_createAnchor() {\n const anchor = this._document.createElement('div');\n this._toggleAnchorTabIndex(this._enabled, anchor);\n anchor.classList.add('cdk-visually-hidden');\n anchor.classList.add('cdk-focus-trap-anchor');\n anchor.setAttribute('aria-hidden', 'true');\n return anchor;\n }","_createAnchor() {\n const anchor = this._document.createElement('div');\n this._toggleAnchorTabIndex(this._enabled, anchor);\n anchor.classList.add('cdk-visually-hidden');\n anchor.classList.add('cdk-focus-trap-anchor');\n anchor.setAttribute('aria-hidden', 'true');\n return anchor;\n }","function enableAnchor(anchor) {\n anchor.style.pointerEvents = \"all\";\n anchor.style.cursor = \"pointer\";\n anchor.className = \"button game-mode-button back-color-1\";\n}","function getAnchorUrl(slug) {\n return \"#\" + slug;\n} // /#/Section/Button","function goToAnchor(anchor) {\n if (anchor) {\n window.scrollTo(0, $('a[name=' + anchor + ']').offset().top - 120);\n }\n }","_createAnchor() {\n const anchor = this._document.createElement('div');\n\n this._toggleAnchorTabIndex(this._enabled, anchor);\n\n anchor.classList.add('cdk-visually-hidden');\n anchor.classList.add('cdk-focus-trap-anchor');\n anchor.setAttribute('aria-hidden', 'true');\n return anchor;\n }","function onClick(link){\n \n}","setAnchorPostion(anchor, newX, newY) {\n anchor.html.attr(\"cx\", newX).attr(\"cy\", newY);\n }","render() {\n var mailtoLink = \"mailto:\";\n mailtoLink += config.app.adminEmail;\n mailtoLink += \"?subject=\";\n mailtoLink += this.props.l(\"app.reportEmailSubject\");\n mailtoLink += \": \" + this.props.currentUserId;\n mailtoLink += \" > \" + this.props.otherUserId;\n mailtoLink += \"&body=\";\n mailtoLink += this.props.l(\"app.reportEmailBody\");\n\n return (\n \n {this.props.l(\"app.report\")}\n \n )\n }","detectAnchor(): void\n\t{\n\t\t[...document.querySelectorAll('a')].map(node => {\n\t\t\tlet href = Dom.attr(node, 'href');\n\t\t\tif (href)\n\t\t\t{\n\t\t\t\thref = href.toString();\n\t\t\t}\n\t\t\tif (href && href.indexOf(':'))\n\t\t\t{\n\t\t\t\tconst hrefPref = href.split(':')[0];\n\t\t\t\tif (['callto', 'tel', 'mailto'].includes(hrefPref))\n\t\t\t\t{\n\t\t\t\t\tEvent.bind(node, 'click', () => {\n\t\t\t\t\t\tthis.sendLabel('', 'addressClick', hrefPref);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}","getAnchor(uid){\n\t\t// XRAnchor? getAnchor(DOMString uid);\n\t\treturn this._session.reality._getAnchor(uid)\n\t}","toLinkUrl() {\r\n return this.urlPath + this._stringifyAux() +\r\n (isPresent(this.child) ? this.child._toLinkUrl() : '');\r\n }","getHref() {\n switch (this.type) {\n case \"room\":\n return \"room.html?\" + this.id + \"+\" + this.title.split(' ').join('_');\n case \"device\":\n return \"device.html?\" + this.id + \"+\" + this.title.split(' ').join('_');\n default:\n return \"home.html\";\n }\n }","function deriveAnchor(edge, index, ep, conn) {\n return options.anchor ? options.anchor : options.deriveAnchor(edge, index, ep, conn);\n }","render() {//calling a function fruom index.js\n return(\n
    \n \n

    Research

    \n Awards
    \n Presentations
    \n Publications
    \n Research
    \n Teaching
    \n
    \n )\n }","render() {\n return (\n \n {this.props.name}\n \n );\n }","function createAnchor(name, text, count, url, d) {\n\n let a = document.createElement(\"a\");\n a.setAttribute(\"class\", \"bubble-action\");\n a.setAttribute(\"href\", url);\n\n\n let svg = document.createElementNS(NS, \"svg\");\n svg.setAttribute(\"class\", \"octicon octicon-\" + name);\n svg.setAttribute(\"viewBox\", \"0 0 14 16\");\n svg.setAttribute(\"version\", \"1.1\");\n svg.setAttribute(\"width\", \"24\");\n svg.setAttribute(\"height\", \"16\");\n svg.setAttribute(\"aria-hidden\", \"true\");\n\n\n let path = document.createElementNS(NS, \"path\");\n path.setAttribute(\"fill-rule\", \"evenodd\");\n path.setAttribute(\"d\", d);\n\n svg.appendChild(path);\n\n\n let span = document.createElement(\"span\");\n span.setAttribute(\"class\", \"Counter\");\n span.appendChild(document.createTextNode(count));\n\n a.appendChild(svg);\n a.appendChild(document.createTextNode(\" \" + text + \" \"));\n a.append(span);\n\n return a;\n}","scrollAnchor(e, respond = null) {\n let targetID;\n if (e) {\n e.preventDefault();\n targetID = respond ? respond.getAttribute('href') : this.getAttribute('href');\n targetID = `#${targetID.split('#').pop()}`;\n } else {\n targetID = '#' + respond;\n }\n\n const targetAnchor = document.querySelector(targetID);\n if (!targetAnchor) return;\n targetAnchor.scrollIntoView({\n behavior: 'smooth'\n });\n }","function href(editor, v) {\n\t\tvar a = getFirstAnchor(editor);\n\t\tif (!v)\n\t\t\treturn a ? a.href : '';\n\t\telse if (a)\n\t\t\ta.href = v;\n\t}","function generateAnchor(url, name) {\n let anchor = document.createElement(\"a\");\n anchor.href = url;\n anchor.innerText = name;\n anchor.id = \"save-as\";\n return anchor;\n}","function anchorLink(element) {\n // Prevent default behaviour\n event.preventDefault();\n\n // Setting variables\n var original_target = element,\n target = $(original_target),\n scrollTopAmount = Math.ceil(target.offset().top),\n scrollUntilHeight2 = 0,\n scrollUntilHeight = 0;\n\n // Add or reduce height from scrollTop\n $('.sticky-parent').each(function () {\n // Add height\n if ( target.isAfter( $(this) ) ) {\n scrollUntilHeight2 += $(this).outerHeight();\n }\n scrollUntilHeight = scrollUntilHeight2;\n })\n scrollTopAmount -= scrollUntilHeight;\n window.location.hash = original_target;\n $('html,body').animate({scrollTop: scrollTopAmount }, plugin.settings.scrollTopDuration);\n }","function addAnchorTags() {\n anchors.options = {\n visible: 'touch'\n }\n\n anchors.add('.content-main h2, .content-main h3, .content-main h4, .content-main h5, .content-main h6');\n}","_render()\n {\n if (this.isDisabled())\n return;\n\n this._setContentSizeCss();\n this._setDirection();\n const paragraph = html`

    ${this.text}

    `;\n let anchor = \"\";\n let action = \"\";\n if (this.link && this.linkText)\n anchor = html`${this.linkText}`;\n if (this.action && this.actionText)\n action = html`${anchor ? \" | \" : \"\"}${this.actionText}`;\n let heading = \"\";\n if (this.heading)\n heading = html`

    ${this.heading}

    `;\n\n render(html`${heading}${paragraph}
    ${anchor}${action}
    `, this.tooltipElem);\n }","function anchor({ id, text, cls, href } = {}) {\n\treturn new Anchor({ id, text, cls, href });\n}","function anchor({ id, text, cls, href } = {}) {\n\treturn new Anchor({ id, text, cls, href });\n}","function anchorLinkDirective($rootRouter) {\n return {\n restrict: 'E',\n link: function (scope, element) {\n // If the linked element is not an anchor tag anymore, do nothing\n if (element[0].nodeName.toLowerCase() !== 'a') {\n return;\n }\n\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var hrefAttrName = Object.prototype.toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n 'xlink:href' : 'href';\n\n element.on('click', function (event) {\n if (event.which !== 1) {\n return;\n }\n\n var href = element.attr(hrefAttrName);\n var target = element.attr('target');\n var isExternal = (['_blank', '_parent', '_self', '_top'].indexOf(target) > -1);\n\n if (href && $rootRouter.recognize(href) && !isExternal) {\n $rootRouter.navigateByUrl(href);\n event.preventDefault();\n }\n });\n }\n };\n }","function _getLink(text, enabled, urlFormat, index) {\n if (enabled == false)\n return J.FormatString(' {0}',\n text);\n else\n return J.FormatString(' {1}', index, text);\n }","function mk_link(text) {\r\n var a = $e('a')\r\n a.style.background = null\r\n a.style.backgroundColor = null\r\n a.href = '#'\r\n a.appendChild( $t(text) )\r\n return a\r\n}","buildAnchors() {\r\n this.buildPointAnchors();\r\n }","function a() {\n return {\n restrict: 'E',\n link: function (scope, elem, attrs) {\n if (attrs.ngClick || attrs.href === '' || attrs.href === '#') {\n elem.on('click', function (e) {\n e.preventDefault();\n });\n }\n }\n }\n }","function AnchorJS(a) {\n \"use strict\";\n this.options = a || {},\n this._applyRemainingDefaultOptions = function(a) {\n this.options.icon = this.options.hasOwnProperty(\"icon\") ? a.icon: \"&#xe9cb\",\n this.options.visible = this.options.hasOwnProperty(\"visible\") ? a.visible: \"hover\",\n this.options.placement = this.options.hasOwnProperty(\"placement\") ? a.placement: \"right\",\n this.options[\"class\"] = this.options.hasOwnProperty(\"class\") ? a[\"class\"] : \"\"\n },\n this._applyRemainingDefaultOptions(a),\n this.add = function(a) {\n var b, c, d, e, f, g, h, i, j, k, l, m, n, o;\n if (this._applyRemainingDefaultOptions(this.options), a) {\n if (\"string\" != typeof a) throw new Error(\"The selector provided to AnchorJS was invalid.\")\n } else a = \"h1, h2, h3, h4, h5, h6\";\n if (b = document.querySelectorAll(a), 0 === b.length) return ! 1;\n for (this._addBaselineStyles(), c = document.querySelectorAll(\"[id]\"), d = [].map.call(c,\n function(a) {\n return a.id\n }), f = 0; f < b.length; f++) {\n if (b[f].hasAttribute(\"id\")) e = b[f].getAttribute(\"id\");\n else {\n g = b[f].textContent,\n h = g.replace(/[^\\w\\s-]/gi, \"\").replace(/\\s+/g, \"-\").replace(/-{2,}/g, \"-\").substring(0, 32).replace(/^-+|-+$/gm, \"\").toLowerCase(),\n k = h,\n j = 0;\n do void 0 !== i && (k = h + \"-\" + j),\n i = d.indexOf(k),\n j += 1;\n while ( - 1 !== i);\n i = void 0,\n d.push(k),\n b[f].setAttribute(\"id\", k),\n e = k\n }\n l = e.replace(/-/g, \" \"),\n m = '',\n n = document.createElement(\"div\"),\n n.innerHTML = m,\n o = n.childNodes,\n \"always\" === this.options.visible && (o[0].style.opacity = \"1\"),\n \"&#xe9cb\" === this.options.icon && (o[0].style.fontFamily = \"anchorjs-icons\", o[0].style.fontStyle = \"normal\", o[0].style.fontVariant = \"normal\", o[0].style.fontWeight = \"normal\"),\n \"left\" === this.options.placement ? (o[0].style.position = \"absolute\", o[0].style.marginLeft = \"-1em\", o[0].style.paddingRight = \"0.5em\", b[f].insertBefore(o[0], b[f].firstChild)) : (o[0].style.paddingLeft = \"0.375em\", b[f].appendChild(o[0]))\n }\n return this\n },\n this.remove = function(a) {\n for (var b, c = document.querySelectorAll(a), d = 0; d < c.length; d++) b = c[d].querySelector(\".anchorjs-link\"),\n b && c[d].removeChild(b);\n return this\n },\n this._addBaselineStyles = function() {\n if (null === document.head.querySelector(\"style.anchorjs\")) {\n var a, b = document.createElement(\"style\"),\n c = \" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }\",\n d = \" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }\",\n e = ' @font-face { font-family: \"anchorjs-icons\"; font-style: normal; font-weight: normal; src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBTUAAAC8AAAAYGNtYXAWi9QdAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zgq29TcAAAF4AAABNGhlYWQEZM3pAAACrAAAADZoaGVhBhUDxgAAAuQAAAAkaG10eASAADEAAAMIAAAAFGxvY2EAKACuAAADHAAAAAxtYXhwAAgAVwAAAygAAAAgbmFtZQ5yJ3cAAANIAAAB2nBvc3QAAwAAAAAFJAAAACAAAwJAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpywPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6cv//f//AAAAAAAg6cv//f//AAH/4xY5AAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACADEARAJTAsAAKwBUAAABIiYnJjQ/AT4BMzIWFxYUDwEGIicmND8BNjQnLgEjIgYPAQYUFxYUBw4BIwciJicmND8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFA8BDgEjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAEAAAABAACiToc1Xw889QALBAAAAAAA0XnFFgAAAADRecUWAAAAAAJTAsAAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAlMAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAACAAAAAoAAMQAAAAAACgAUAB4AmgABAAAABQBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIABwCfAAEAAAAAAAMADgBLAAEAAAAAAAQADgC0AAEAAAAAAAUACwAqAAEAAAAAAAYADgB1AAEAAAAAAAoAGgDeAAMAAQQJAAEAHAAOAAMAAQQJAAIADgCmAAMAAQQJAAMAHABZAAMAAQQJAAQAHADCAAMAAQQJAAUAFgA1AAMAAQQJAAYAHACDAAMAAQQJAAoANAD4YW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzUmVndWxhcgBSAGUAZwB1AGwAYQByYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format(\"truetype\"); }',\n f = \" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }\";\n b.className = \"anchorjs\",\n b.appendChild(document.createTextNode(\"\")),\n a = document.head.querySelector('[rel=\"stylesheet\"], style'),\n void 0 === a ? document.head.appendChild(b) : document.head.insertBefore(b, a),\n b.sheet.insertRule(c, b.sheet.cssRules.length),\n b.sheet.insertRule(d, b.sheet.cssRules.length),\n b.sheet.insertRule(f, b.sheet.cssRules.length),\n b.sheet.insertRule(e, b.sheet.cssRules.length)\n }\n }\n}","function onAnchorClick(e) { // 756\n var event = e || window.event; // 757\n var target = event.target || event.srcElement; // 758\n var defaultPrevented = \"defaultPrevented\" in event ? event['defaultPrevented'] : event.returnValue === false; // 759\n if (target && target.nodeName === \"A\" && !defaultPrevented) { // 760\n var current = parseURL(); // 761\n var expect = parseURL(target.getAttribute(\"href\", 2)); // 762\n var isEqualBaseURL = current._href.split('#').shift() === expect._href.split('#').shift(); // 763\n if (isEqualBaseURL) { // 764\n if (current._hash !== expect._hash) { // 765\n historyObject.location.hash = expect._hash; // 766\n } // 767\n scrollToAnchorId(expect._hash); // 768\n if (event.preventDefault) { // 769\n event.preventDefault(); // 770\n } else { // 771\n event.returnValue = false; // 772\n } // 773\n } // 774\n } // 775\n } // 776","function leadsLink(val){\n\n //debugger;\n return '
  • ' + val.name + '

    ' + val.email + '

    ' + val.date +'

  • ';\n \n }","static applyAnchorUrl(reflection, container) {\n if (!reflection.url || !DefaultTheme.URL_PREFIX.test(reflection.url)) {\n const anchor = DefaultTheme.getUrl(reflection, container, \".\");\n reflection.url = container.url + \"#\" + anchor;\n reflection.anchor = anchor;\n reflection.hasOwnDocument = false;\n }\n reflection.traverse((child) => {\n if (child instanceof index_1.DeclarationReflection) {\n DefaultTheme.applyAnchorUrl(child, container);\n }\n });\n }","get anchor() {\n return this.$anchor.pos;\n }","link(options = {}) {\n if (!options || (options && !options.href) || !this.isValid()) {\n return;\n }\n\n if (window.getSelection && !window.getSelection().toString()) {\n console.warn(\"no text selected..\");\n return null;\n }\n const unwrapAtags = (linkElements) => {\n linkElements.forEach(link => {\n Array.from(link.querySelectorAll(\"a\")).forEach(aTag => aTag.unwrap());\n const closestATag = link.parentElement ? link.parentElement.__closest(\"a\") : null;\n if (closestATag) {\n var a = Object(_utilis_splitHTML__WEBPACK_IMPORTED_MODULE_2__[\"splitHTML\"])(link, closestATag, {\n tag: \"a\"\n });\n if (a) {\n a.center.unwrap();\n }\n // closestATag.unwrap();\n }\n });\n }\n const setTargetToTag = (linkElements, renderedLink, _target) => {\n linkElements.forEach(aTag => {\n aTag.href = renderedLink;\n if (_target) {\n aTag.setAttribute(\"target\", _target);\n }\n });\n }\n const setProtocol = (_protocol, newURL) => {\n _protocol = _protocol.replace(/:/g, \"\");\n _protocol = _protocol.replace(/\\/\\//g, \"\");\n _protocol += \":\";\n if (_protocol.includes(\"http\")) {\n _protocol += \"//\";\n } else {\n }\n newURL.push(_protocol);\n return _protocol;\n }\n\n\n const { href = \"\", protocol = \"\", target = \"\" } = options;\n\n const linkElements = Object(_services_range_service__WEBPACK_IMPORTED_MODULE_0__[\"wrapRangeWithElement\"])(\"a\");\n let newURL = [];\n const Atag = Object(_services_link_service__WEBPACK_IMPORTED_MODULE_9__[\"createTempLinkElement\"])(href);\n let _href = Object(_services_link_service__WEBPACK_IMPORTED_MODULE_9__[\"resetURL\"])(href.trim());\n\n let _protocol = protocol.trim() || Atag.protocol;\n let _target = null;\n const testTarget = _services_link_service__WEBPACK_IMPORTED_MODULE_9__[\"TARGETS\"][target.trim().toLowerCase()];\n if (testTarget) {\n _target = testTarget;\n }\n if (_protocol.trim()) {\n _protocol = setProtocol(_protocol, newURL);\n }\n if (_href) {\n newURL.push(_href);\n }\n const renderedLink = newURL.join(\"\");\n unwrapAtags(linkElements);\n setTargetToTag(linkElements, renderedLink, _target);\n const { firstFlag, lastFlag } = Object(_services_range_service__WEBPACK_IMPORTED_MODULE_0__[\"setSelectionFlags\"])(linkElements[0], linkElements[linkElements.length - 1]); //Set Flag at last\n Object(_services_range_service__WEBPACK_IMPORTED_MODULE_0__[\"setSelectionBetweenTwoNodes\"])(firstFlag, lastFlag);\n linkElements.forEach(aTag=>{\n Object(_services_textEditor_service__WEBPACK_IMPORTED_MODULE_4__[\"normalizeElement\"])(aTag.parentElement);// merge siblings and parents with child as possible.. \n })\n }","function onClick() {return thisObj.load(this.href);}","function onClick() {return thisObj.load(this.href);}","function anchor(url, attrs) {\n\tvar text = escape(url),\n\t\thref = url;\n\n\t// Ensure protocol at beginning of url\n\tif (!/^[a-zA-Z]{1,6}:/.test(href)) {\n\t\thref = 'http://' + href;\n\t}\n\n\tvar attrsString = [attributes({ href: href }), attributes(attrs)]\n\t\t.filter(Boolean)\n\t\t.join(\" \");\n\n\treturn \"\" + text + \"\";\n}","function viewLinkRenderer(entityKind) {\n\treturn function(value) {\n\t\tif (value != null) {\n\t\t\treturn \"\" + value + \"\";\n\t\t}\n\t\treturn \"\";\n\t};\n}","function activateLink(e){\n // remove/add .active\n let activeLink = document.getElementsByClassName('active')[0] ? \n document.getElementsByClassName('active')[0] : \n null;\n\n if(activeLink){\n activeLink.removeAttribute('class');\n }\n e.target.setAttribute('class', 'active');\n\n // get the paragraph\n let content = new Content();\n content.getParagraphByIndex(e.target.id);\n\n // change the url in the address bar\n window.history.pushState(\"\", \"\", e.target.id);\n}","createAnchor(paper, x, y, style, r = AnchorsComponent.DEFAULT_ANCHOR_RADIUS) {\r\n const a = paper.circle(x, y, r);\r\n a.addClass(\"anchorStyle\");\r\n if (style !== undefined && style !== \"\") {\r\n a.addClass(style);\r\n }\r\n return a;\r\n }","getLinkAnchors(mode) {\n const attrs = this.state.attributes;\n return [\n {\n element: this.object._id,\n points: [\n {\n x: attrs.x,\n y: attrs.y,\n xAttribute: \"x\",\n yAttribute: \"y\",\n direction: { x: mode == \"begin\" ? 1 : -1, y: 0 }\n }\n ]\n }\n ];\n }","function createkeyanchor(meal) {\n var makeKeyAnchor = $(dc('a'))\n .attr('id', 'keyAnchor')\n .attr('class', 'carousel_caption keyAnchor grid_2')\n .html('Make Key Photo');\n \n // Make this general & use same code for delete [0] case\n makeKeyAnchor.click(function() {\n \n // ajax for username, mealts, and keyts\n elm.makekeypicture(function(success, pinfo) {\n \n if(success) {\n \n // Update mongo on the server\n makeKeyPicAjax(meal, pinfo);\n \n // Set the display picture\n if(setgriddisplay) {\n setgriddisplay(meal, pinfo);\n }\n }\n });\n });\n return makeKeyAnchor;\n }","getAnchor() {\n this._assertInitialized();\n return this.marker;\n }","render() {\n const path = this.props.linkData.path;\n const title = this.props.linkData.title\n return (\n
  • {title}
  • \n );\n }","function _(e){var t=document.createElement(\"a\");return t.href=e,t}","function pagerHomePageLink() {\n 'use strict';\n var link = document.createElement('div');\n link.id = 'pagerGoHome';\n link.innerHTML = 'Home';\n return link;\n}","function onAnchorClick(event) {\n chrome.tabs.create({\n selected: true,\n url: event.srcElement.href\n });\n return false;\n}","function onAnchorClick(event) {\n chrome.tabs.create({\n selected: true,\n url: event.srcElement.href\n });\n return false;\n}","function attachPageTargetForClickToScroll(pageTarget,anchor) {\n\n const idAttribute = pageTarget.getAttribute(\"id\");\n anchor.setAttribute('id','navlink'+idAttribute);\n //anchor.setAttribute('href',`#${idAttribute}`);\n}","render(){\n return (\n \n )\n }","@method createNavigationLinkHTML(contents, path) {\n if (typeof contents != \"string\") {\n // Retrieve the HTML for the element.\n var tempDiv = I3.ui.create(\"div\");\n tempDiv.appendChild(contents);\n contents = tempDiv.innerHTML;\n }\n var eventParams = I3.browser.isIE() ? \"\" : \"event\";\n return '' + contents + '';\n }","function listItemWithAnchor(anchor) {\n // They give me element like this:\n // google.com\n const li = document.createElement(\"li\");\n li.appendChild(anchor);\n // I give them an element like this:\n //
  • \n // google.com\n //
  • \n return li;\n}","navigateHyperlink() {\n let fieldBegin = this.getHyperlinkField();\n if (fieldBegin) {\n this.fireRequestNavigate(fieldBegin);\n }\n }","function scrollTo_anchor(action) {\n if (action.target.nodeName === \"A\") {\n const allSecId = action.target.getAttribute(\"data-id\");\n const allSec = document.getElementById(allSecId);\n allSec.scrollIntoView({ behavior: \"smooth\" });\n }\n}","function UpdateAnchorsHandler() { }","function renderLink(url) {\n let card = document.createElement(\"div\");\n card.classList.add('card');\n\n let newLink = document.createElement(\"div\");\n newLink.innerHTML = ''+url+'';\n // newLink.classList.add(\"bg-success\");\n\n card.appendChild(newLink);\n\n let linkSection = document.querySelector('#linkSection');\n linkSection.appendChild(card); \n}","function Anchor(props) {\n const contentRef = useRef(null)\n\n return (\n
    \n
    {props.children}
    \n \n TOOLIP\n \n
    \n )\n}","function toAnchorNode(node, id) {\n setNodeAttr(node, 'id', id);\n mergeNodeAttr(node, 'class', classNames.anchor);\n\n const linkNode = tree.createElement('a', ns.html, [\n {\n name: 'class',\n value: classNames.anchorLink,\n },\n {\n name: 'href',\n value: `#${id}`,\n },\n {\n name: 'aria-hidden',\n value: 'true',\n },\n ]);\n\n const iconNode = tree.createElement('span', ns.html, [\n {\n name: 'class',\n value: classNames.anchorIcon,\n },\n ]);\n\n tree.appendChild(node, linkNode);\n tree.appendChild(linkNode, iconNode);\n}","function NavLink(params) {\n\n const users = [\n {id: 1, name: 'Tom'},\n {id: 2, name: 'Jerry'},\n {id: 3, name: 'Doggo'},\n {id: 4, name: 'Bruno'}\n ]\n\n return(\n
    \n Hooks &nbsp;&nbsp;&nbsp;\n Ref &nbsp;&nbsp; &nbsp;\n HOC &nbsp;&nbsp; &nbsp;\n No Comp Route &nbsp; &nbsp;\n {/* By using anchor tag, page reloads to change content and breaks SPA rule. Thats why we use react library function Link*/}\n Wrong Way to Route in SPA(Reload)

    \n\n {\n users.map((ele, index) => \n {ele.name} &nbsp; &nbsp; \n )\n }\n\n
    \n )\n}","displayActionButton() {\n return (\n // \n \n {this.props.buttonText}\n \n // \n )\n }","translateAnchorLinks(text)\n {\n let hashWithoutAnchorAndHashMark = this.windowHashWithoutAnchor().substring(1);\n if (_.startsWith(hashWithoutAnchorAndHashMark, \"#\"))\n {\n hashWithoutAnchorAndHashMark = hashWithoutAnchorAndHashMark.substring(1);\n }\n\n let regexp = new RegExp(\"(.*<\\\\s*a[^>]+href\\\\s*=\\\\s*[\\\"']#)([^\\\"'\"\n + this.anchorChar + \"]*)([\\\"'][^>]*>.*)\", \"\");\n let replacement = \"$1\" + hashWithoutAnchorAndHashMark + this.paramSeparator\n + this.anchorChar + \"=\" + \"$2$3\";\n text = simpleUtils.replaceLoop(regexp, replacement, text);\n\n regexp = new RegExp(\"(.*<\\\\s*a[^>]+name\\\\s*=\\\\s*[\\\"'])([^\\\"'\"\n + this.anchorChar + \"]*)([\\\"'][^>]*>.*)\", \"\");\n replacement = \"$1\" + hashWithoutAnchorAndHashMark + this.paramSeparator\n + this.anchorChar + \"=\" + \"$2$3\";\n text = simpleUtils.replaceLoop(regexp, replacement, text);\n\n return text;\n }","function createLink(name, text) {\n let className = `link-${name}`;\n \n const link = document.createElement('div');\n link.classList.add(className);\n link.textContent = text;\n link.addEventListener('click', () => {\n console.log(`clicked link: ${name}`);\n let el;\n if(name === \"About-Me\") {\n el = document.querySelector('.about-me-container');\n } else if(name === \"Projects\") {\n el = document.querySelector('.projects-container');\n } else if(name === 'Contact') {\n el = document.querySelector('.contact-container');\n }\n\n if(el != undefined) {\n el.scrollIntoView({behavior: \"smooth\"});\n }\n });\n \n return link;\n }","displayUserView() {\n const questionnaire = this.props.questionnaire\n\n return(\n
    \n { this.props.fetchQuestionnaire(questionnaire.id) }}\n >\n

    \n { questionnaire.attributes.name }\n

    \n \n
    \n )\n }","function scrollToAnchor(){\n\n //getting the anchor link in the URL and deleting the `#`\n var value = window.location.hash.replace('#', '').split('/');\n var section = decodeURIComponent(value[0]);\n var slide = decodeURIComponent(value[1]);\n /* nectar addition */ \n if(section && $('.vc_row[data-fullscreen-anchor-id=\"'+section+'\"]').length > 0){ //if theres any #\n /* nectar addition end */ \n if(options.animateAnchor){\n scrollPageAndSlide(section, slide);\n }else{\n FP.silentMoveTo(section, slide);\n }\n }\n }","pageLink(num) {\n let name;\n if(num === this.props.page)name='active';\n else name='';\n \n return (\n
  • \n this.props.fetchOrders(num)}>{num}\n
  • \n )\n }"],"string":"[\n \"render() {\\n let anchorAttributes = {\\n class: {\\n [this.activeClass]: this.match !== null,\\n },\\n onClick: this.handleClick.bind(this)\\n };\\n if (this.anchorClass) {\\n anchorAttributes.class[this.anchorClass] = true;\\n }\\n if (this.custom === 'a') {\\n anchorAttributes = Object.assign(Object.assign({}, anchorAttributes), { href: this.url, title: this.anchorTitle, role: this.anchorRole, tabindex: this.anchorTabIndex, 'aria-haspopup': this.ariaHaspopup, id: this.anchorId, 'aria-posinset': this.ariaPosinset, 'aria-setsize': this.ariaSetsize, 'aria-label': this.ariaLabel });\\n }\\n return (index.h(this.custom, Object.assign({}, anchorAttributes), index.h(\\\"slot\\\", null)));\\n }\",\n \"get anchor() {}\",\n \"render (h) {\\n return h('a', {\\n attrs: {\\n href: this.to\\n },\\n on: {\\n click: this.guardEvent\\n }\\n }, [this.$slots.default])\\n }\",\n \"renderAnchor() {\\n return html `\\n \\n `;\\n }\",\n \"function $anchor(parent, id, cl, text, href) {\\n\\tlet a = $new(parent, 'a', id, cl, text);\\n\\tif (href) a.href = href;\\n\\treturn a;\\n}\",\n \"set anchor(value) {}\",\n \"anchor() {\\n this.__anchors++;\\n }\",\n \"anchor() {\\n this.__anchors++;\\n }\",\n \"anchor() {\\n this.__anchors++;\\n }\",\n \"anchor() {\\n this.__anchors++;\\n }\",\n \"click(e){\\r\\n if ( this.url ){\\r\\n bbn.fn.link(this.url);\\r\\n }\\r\\n else{\\r\\n this.$emit('click', e);\\r\\n }\\r\\n }\",\n \"function theme_anchor(url, text, options)\\n{\\n id = 'anchor-' + Math.random();\\n\\n if (typeof options != 'undefined') {\\n if (options.id)\\n id = options.id;\\n\\n if (options.buttons == 'extra-small')\\n button_class = 'btn btn-xs btn-primary';\\n else if (options.buttons)\\n button_class = 'btn btn-sm btn-primary';\\n }\\n\\n return '' + text + '';\\n}\",\n \"['click .method-container a'](e, $el) {\\n\\t\\tToc.goToHash($el.attr('href'));\\n\\t}\",\n \"get anchor() { return this.$anchor.pos }\",\n \"function anchor(url){\\n\\twindow.location.href= url;\\n}\",\n \"function goToAnchor(mixAnchor)\\n{\\n if (empty(mixAnchor))\\n return;\\n window.location.href = window.location.href + '#' + mixAnchor;\\n}\",\n \"anchorClick(){\\n \\n var app = this;\\n var anchor = $('#ul-scroll').find('a');\\n\\n anchor.on('click', function(){\\n\\n var idom = $(this).children().attr('id');\\n var ctp = idom.replace(\\\"divpage-\\\", \\\"\\\");\\n\\n app.counter = parseInt(ctp);\\n app.currentPage = app.counter;\\n\\n app.hoverList(app.counter);\\n\\n console.log(app.hoverList(app.counter));\\n\\n // var divanchor = app.$divanchor;\\n\\n // if (divanchor.hasClass('actual-Session')) {\\n \\n // $('.actual-Session').css({\\n // \\\"background-color\\\" : \\\"rgba(255, 255, 255, 0)\\\"\\n // });\\n \\n // divanchor.removeClass('actual-Session');\\n // }\\n \\n // $('#divpage-' + app.counter).addClass('actual-Session');\\n \\n // $('.actual-Session').css({\\n // \\\"background-color\\\" : \\\"white\\\"\\n // });\\n });\\n }\",\n \"function formAnchorHtml(href, label) {\\r\\n\\treturn \\\"\\\";\\r\\n}\",\n \"render(){\\r\\n var item = document.createElement('li')\\r\\n var a = document.createElement('a')\\r\\n a.href = this.url\\r\\n a.innerText = this.text\\r\\n item.appendChild(a)\\r\\n // realizati aici structura HTML:\\r\\n /**\\r\\n *
  • \\r\\n * text\\r\\n *
  • \\r\\n */\\r\\n return item;\\r\\n }\",\n \"function makeViewLink(text)\\n{\\n const link = makeLink(text, \\\"javascript:void(0)\\\");\\n link.attr(\\\"id\\\", text);\\n link.addClass(\\\"view\\\");\\n return link;\\n}\",\n \"function _adminLink(href, table, id, callback, anchor) {\\n anchor = _createElement('a');\\n if (id) anchor.id = table + id;\\n // href will always be appended with id\\n anchor.href = href + id;\\n _setInnerHTML(anchor, table);\\n if (callback) gU.on(anchor, 'click', callback);\\n return anchor;\\n }\",\n \"render() {\\n return html`\\n \\n \\n ${this.icon\\n ? html`\\n \\n `\\n : ``}\\n ${this.title}\\n ${this.trackIcon\\n ? html`\\n \\n `\\n : ``}\\n \\n \\n `;\\n }\",\n \"function anchorClick() {\\n var marker = markerForUrl( this.href );\\n if( marker ) {\\n if( /\\\\bZOOM\\\\b/.exec( this.className ) ) {\\n var mapType = marker.mapType || marker.ezmap.map.getCurrentMapType();\\n var zoomLevel;\\n if( marker.span ) {\\n zoomLevel = mapType.getSpanZoomLevel(\\n marker.point, marker.span, marker.ezmap.viewsize );\\n }\\n else {\\n zoomLevel = marker.ezmap.map.getZoom();\\n }\\n marker.ezmap.map.setCenter( marker.point, zoomLevel, mapType );\\n }\\n marker.doOpen();\\n return false;\\n }\\n else {\\n return true;\\n }\\n }\",\n \"function openlink(upperCase){\\n clickAnchor(upperCase,getItem(\\\"link\\\"));\\n}\",\n \"function getAnchor(e) {\\n let el = e.target;\\n while (el && !el.href) {\\n el = el.parentNode;\\n }\\n if (el) {\\n e.preventDefault();\\n history.pushState(null, null, el.href); // Modify current url to become url of link.\\n changePage();\\n }\\n }\",\n \"cellLink(e){\\n return \\n {e}\\n \\n }\",\n \"function link() {\\n var LINKY_URL_REGEXP =\\n /((ftp|https?):\\\\/\\\\/|(www\\\\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\\\\S*[^\\\\s.;,(){}<>\\\"”’]$/;\\n var sub = selection.anchorNode.data.substring(0, selection.anchorOffset - 1);\\n if (LINKY_URL_REGEXP.test(sub)) {\\n var matchs = sub.match(LINKY_URL_REGEXP);\\n if (matchs && matchs.length) {\\n var st = selection.anchorOffset - matchs[0].length - 1;\\n range.setStart(selection.anchorNode, st);\\n scope.doCommand(null, {\\n name: 'createLink',\\n param: matchs[0]\\n });\\n }\\n }\\n }\",\n \"function createAnchor(html, index) {\\n const a = document.createElement('a');\\n a.href = '#';\\n a.innerHTML = html;\\n a.onclick = onHeadigClick(this, index);\\n return a;\\n}\",\n \"render() {\\n return (\\n \\n get show recommendations!\\n \\n )\\n }\",\n \"addAnchor() {\\n const data = {\\n action: 'addAnchor',\\n value: null\\n };\\n this.postMessage(data);\\n }\",\n \"render() { \\n const { to, children } = this.props;\\n return (\\n \\n {children}\\n \\n )\\n }\",\n \"function makeLinksClickable () {\\n // Bring the layer with arrows forward.\\n var $links = getLinkLayer();\\n $divViewControlLayer.append($links);\\n\\n if (properties.browser === 'mozilla') {\\n // A bug in Firefox? The canvas in the div element with the largest z-index.\\n $divViewControlLayer.append($canvas);\\n } else if (properties.browser === 'msie') {\\n $divViewControlLayer.insertBefore($divLabelDrawingLayer);\\n }\\n }\",\n \"function anchorClicked(e) {\\n e.preventDefault();\\n const selectedBookEl = document.getElementById('selectedBook');\\n if (!selectedBookEl) return;\\n\\n const self = this;\\n const cell = self.parentElement;\\n const row = cell.parentElement;\\n const data = row.querySelectorAll('td');\\n\\n // Generate HTML details of selected book\\n let bookData = `
      `;\\n for (const field of data) {\\n // console.log(field); // each \\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\\n bookData += `
    • ${field.dataset.value}: ${field.innerText}
    • `;\\n }\\n bookData += `
    `;\\n\\n selectedBookEl.innerHTML = bookData; // render\\n}\",\n \"_createAnchor() {\\n const anchor = this._document.createElement('div');\\n this._toggleAnchorTabIndex(this._enabled, anchor);\\n anchor.classList.add('cdk-visually-hidden');\\n anchor.classList.add('cdk-focus-trap-anchor');\\n anchor.setAttribute('aria-hidden', 'true');\\n return anchor;\\n }\",\n \"_createAnchor() {\\n const anchor = this._document.createElement('div');\\n this._toggleAnchorTabIndex(this._enabled, anchor);\\n anchor.classList.add('cdk-visually-hidden');\\n anchor.classList.add('cdk-focus-trap-anchor');\\n anchor.setAttribute('aria-hidden', 'true');\\n return anchor;\\n }\",\n \"_createAnchor() {\\n const anchor = this._document.createElement('div');\\n this._toggleAnchorTabIndex(this._enabled, anchor);\\n anchor.classList.add('cdk-visually-hidden');\\n anchor.classList.add('cdk-focus-trap-anchor');\\n anchor.setAttribute('aria-hidden', 'true');\\n return anchor;\\n }\",\n \"function enableAnchor(anchor) {\\n anchor.style.pointerEvents = \\\"all\\\";\\n anchor.style.cursor = \\\"pointer\\\";\\n anchor.className = \\\"button game-mode-button back-color-1\\\";\\n}\",\n \"function getAnchorUrl(slug) {\\n return \\\"#\\\" + slug;\\n} // /#/Section/Button\",\n \"function goToAnchor(anchor) {\\n if (anchor) {\\n window.scrollTo(0, $('a[name=' + anchor + ']').offset().top - 120);\\n }\\n }\",\n \"_createAnchor() {\\n const anchor = this._document.createElement('div');\\n\\n this._toggleAnchorTabIndex(this._enabled, anchor);\\n\\n anchor.classList.add('cdk-visually-hidden');\\n anchor.classList.add('cdk-focus-trap-anchor');\\n anchor.setAttribute('aria-hidden', 'true');\\n return anchor;\\n }\",\n \"function onClick(link){\\n \\n}\",\n \"setAnchorPostion(anchor, newX, newY) {\\n anchor.html.attr(\\\"cx\\\", newX).attr(\\\"cy\\\", newY);\\n }\",\n \"render() {\\n var mailtoLink = \\\"mailto:\\\";\\n mailtoLink += config.app.adminEmail;\\n mailtoLink += \\\"?subject=\\\";\\n mailtoLink += this.props.l(\\\"app.reportEmailSubject\\\");\\n mailtoLink += \\\": \\\" + this.props.currentUserId;\\n mailtoLink += \\\" > \\\" + this.props.otherUserId;\\n mailtoLink += \\\"&body=\\\";\\n mailtoLink += this.props.l(\\\"app.reportEmailBody\\\");\\n\\n return (\\n \\n {this.props.l(\\\"app.report\\\")}\\n \\n )\\n }\",\n \"detectAnchor(): void\\n\\t{\\n\\t\\t[...document.querySelectorAll('a')].map(node => {\\n\\t\\t\\tlet href = Dom.attr(node, 'href');\\n\\t\\t\\tif (href)\\n\\t\\t\\t{\\n\\t\\t\\t\\thref = href.toString();\\n\\t\\t\\t}\\n\\t\\t\\tif (href && href.indexOf(':'))\\n\\t\\t\\t{\\n\\t\\t\\t\\tconst hrefPref = href.split(':')[0];\\n\\t\\t\\t\\tif (['callto', 'tel', 'mailto'].includes(hrefPref))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tEvent.bind(node, 'click', () => {\\n\\t\\t\\t\\t\\t\\tthis.sendLabel('', 'addressClick', hrefPref);\\n\\t\\t\\t\\t\\t});\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t});\\n\\t}\",\n \"getAnchor(uid){\\n\\t\\t// XRAnchor? getAnchor(DOMString uid);\\n\\t\\treturn this._session.reality._getAnchor(uid)\\n\\t}\",\n \"toLinkUrl() {\\r\\n return this.urlPath + this._stringifyAux() +\\r\\n (isPresent(this.child) ? this.child._toLinkUrl() : '');\\r\\n }\",\n \"getHref() {\\n switch (this.type) {\\n case \\\"room\\\":\\n return \\\"room.html?\\\" + this.id + \\\"+\\\" + this.title.split(' ').join('_');\\n case \\\"device\\\":\\n return \\\"device.html?\\\" + this.id + \\\"+\\\" + this.title.split(' ').join('_');\\n default:\\n return \\\"home.html\\\";\\n }\\n }\",\n \"function deriveAnchor(edge, index, ep, conn) {\\n return options.anchor ? options.anchor : options.deriveAnchor(edge, index, ep, conn);\\n }\",\n \"render() {//calling a function fruom index.js\\n return(\\n
    \\n \\n

    Research

    \\n Awards
    \\n Presentations
    \\n Publications
    \\n Research
    \\n Teaching
    \\n
    \\n )\\n }\",\n \"render() {\\n return (\\n \\n {this.props.name}\\n \\n );\\n }\",\n \"function createAnchor(name, text, count, url, d) {\\n\\n let a = document.createElement(\\\"a\\\");\\n a.setAttribute(\\\"class\\\", \\\"bubble-action\\\");\\n a.setAttribute(\\\"href\\\", url);\\n\\n\\n let svg = document.createElementNS(NS, \\\"svg\\\");\\n svg.setAttribute(\\\"class\\\", \\\"octicon octicon-\\\" + name);\\n svg.setAttribute(\\\"viewBox\\\", \\\"0 0 14 16\\\");\\n svg.setAttribute(\\\"version\\\", \\\"1.1\\\");\\n svg.setAttribute(\\\"width\\\", \\\"24\\\");\\n svg.setAttribute(\\\"height\\\", \\\"16\\\");\\n svg.setAttribute(\\\"aria-hidden\\\", \\\"true\\\");\\n\\n\\n let path = document.createElementNS(NS, \\\"path\\\");\\n path.setAttribute(\\\"fill-rule\\\", \\\"evenodd\\\");\\n path.setAttribute(\\\"d\\\", d);\\n\\n svg.appendChild(path);\\n\\n\\n let span = document.createElement(\\\"span\\\");\\n span.setAttribute(\\\"class\\\", \\\"Counter\\\");\\n span.appendChild(document.createTextNode(count));\\n\\n a.appendChild(svg);\\n a.appendChild(document.createTextNode(\\\" \\\" + text + \\\" \\\"));\\n a.append(span);\\n\\n return a;\\n}\",\n \"scrollAnchor(e, respond = null) {\\n let targetID;\\n if (e) {\\n e.preventDefault();\\n targetID = respond ? respond.getAttribute('href') : this.getAttribute('href');\\n targetID = `#${targetID.split('#').pop()}`;\\n } else {\\n targetID = '#' + respond;\\n }\\n\\n const targetAnchor = document.querySelector(targetID);\\n if (!targetAnchor) return;\\n targetAnchor.scrollIntoView({\\n behavior: 'smooth'\\n });\\n }\",\n \"function href(editor, v) {\\n\\t\\tvar a = getFirstAnchor(editor);\\n\\t\\tif (!v)\\n\\t\\t\\treturn a ? a.href : '';\\n\\t\\telse if (a)\\n\\t\\t\\ta.href = v;\\n\\t}\",\n \"function generateAnchor(url, name) {\\n let anchor = document.createElement(\\\"a\\\");\\n anchor.href = url;\\n anchor.innerText = name;\\n anchor.id = \\\"save-as\\\";\\n return anchor;\\n}\",\n \"function anchorLink(element) {\\n // Prevent default behaviour\\n event.preventDefault();\\n\\n // Setting variables\\n var original_target = element,\\n target = $(original_target),\\n scrollTopAmount = Math.ceil(target.offset().top),\\n scrollUntilHeight2 = 0,\\n scrollUntilHeight = 0;\\n\\n // Add or reduce height from scrollTop\\n $('.sticky-parent').each(function () {\\n // Add height\\n if ( target.isAfter( $(this) ) ) {\\n scrollUntilHeight2 += $(this).outerHeight();\\n }\\n scrollUntilHeight = scrollUntilHeight2;\\n })\\n scrollTopAmount -= scrollUntilHeight;\\n window.location.hash = original_target;\\n $('html,body').animate({scrollTop: scrollTopAmount }, plugin.settings.scrollTopDuration);\\n }\",\n \"function addAnchorTags() {\\n anchors.options = {\\n visible: 'touch'\\n }\\n\\n anchors.add('.content-main h2, .content-main h3, .content-main h4, .content-main h5, .content-main h6');\\n}\",\n \"_render()\\n {\\n if (this.isDisabled())\\n return;\\n\\n this._setContentSizeCss();\\n this._setDirection();\\n const paragraph = html`

    ${this.text}

    `;\\n let anchor = \\\"\\\";\\n let action = \\\"\\\";\\n if (this.link && this.linkText)\\n anchor = html`${this.linkText}`;\\n if (this.action && this.actionText)\\n action = html`${anchor ? \\\" | \\\" : \\\"\\\"}${this.actionText}`;\\n let heading = \\\"\\\";\\n if (this.heading)\\n heading = html`

    ${this.heading}

    `;\\n\\n render(html`${heading}${paragraph}
    ${anchor}${action}
    `, this.tooltipElem);\\n }\",\n \"function anchor({ id, text, cls, href } = {}) {\\n\\treturn new Anchor({ id, text, cls, href });\\n}\",\n \"function anchor({ id, text, cls, href } = {}) {\\n\\treturn new Anchor({ id, text, cls, href });\\n}\",\n \"function anchorLinkDirective($rootRouter) {\\n return {\\n restrict: 'E',\\n link: function (scope, element) {\\n // If the linked element is not an anchor tag anymore, do nothing\\n if (element[0].nodeName.toLowerCase() !== 'a') {\\n return;\\n }\\n\\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\\n var hrefAttrName = Object.prototype.toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\\n 'xlink:href' : 'href';\\n\\n element.on('click', function (event) {\\n if (event.which !== 1) {\\n return;\\n }\\n\\n var href = element.attr(hrefAttrName);\\n var target = element.attr('target');\\n var isExternal = (['_blank', '_parent', '_self', '_top'].indexOf(target) > -1);\\n\\n if (href && $rootRouter.recognize(href) && !isExternal) {\\n $rootRouter.navigateByUrl(href);\\n event.preventDefault();\\n }\\n });\\n }\\n };\\n }\",\n \"function _getLink(text, enabled, urlFormat, index) {\\n if (enabled == false)\\n return J.FormatString(' {0}',\\n text);\\n else\\n return J.FormatString(' {1}', index, text);\\n }\",\n \"function mk_link(text) {\\r\\n var a = $e('a')\\r\\n a.style.background = null\\r\\n a.style.backgroundColor = null\\r\\n a.href = '#'\\r\\n a.appendChild( $t(text) )\\r\\n return a\\r\\n}\",\n \"buildAnchors() {\\r\\n this.buildPointAnchors();\\r\\n }\",\n \"function a() {\\n return {\\n restrict: 'E',\\n link: function (scope, elem, attrs) {\\n if (attrs.ngClick || attrs.href === '' || attrs.href === '#') {\\n elem.on('click', function (e) {\\n e.preventDefault();\\n });\\n }\\n }\\n }\\n }\",\n \"function AnchorJS(a) {\\n \\\"use strict\\\";\\n this.options = a || {},\\n this._applyRemainingDefaultOptions = function(a) {\\n this.options.icon = this.options.hasOwnProperty(\\\"icon\\\") ? a.icon: \\\"&#xe9cb\\\",\\n this.options.visible = this.options.hasOwnProperty(\\\"visible\\\") ? a.visible: \\\"hover\\\",\\n this.options.placement = this.options.hasOwnProperty(\\\"placement\\\") ? a.placement: \\\"right\\\",\\n this.options[\\\"class\\\"] = this.options.hasOwnProperty(\\\"class\\\") ? a[\\\"class\\\"] : \\\"\\\"\\n },\\n this._applyRemainingDefaultOptions(a),\\n this.add = function(a) {\\n var b, c, d, e, f, g, h, i, j, k, l, m, n, o;\\n if (this._applyRemainingDefaultOptions(this.options), a) {\\n if (\\\"string\\\" != typeof a) throw new Error(\\\"The selector provided to AnchorJS was invalid.\\\")\\n } else a = \\\"h1, h2, h3, h4, h5, h6\\\";\\n if (b = document.querySelectorAll(a), 0 === b.length) return ! 1;\\n for (this._addBaselineStyles(), c = document.querySelectorAll(\\\"[id]\\\"), d = [].map.call(c,\\n function(a) {\\n return a.id\\n }), f = 0; f < b.length; f++) {\\n if (b[f].hasAttribute(\\\"id\\\")) e = b[f].getAttribute(\\\"id\\\");\\n else {\\n g = b[f].textContent,\\n h = g.replace(/[^\\\\w\\\\s-]/gi, \\\"\\\").replace(/\\\\s+/g, \\\"-\\\").replace(/-{2,}/g, \\\"-\\\").substring(0, 32).replace(/^-+|-+$/gm, \\\"\\\").toLowerCase(),\\n k = h,\\n j = 0;\\n do void 0 !== i && (k = h + \\\"-\\\" + j),\\n i = d.indexOf(k),\\n j += 1;\\n while ( - 1 !== i);\\n i = void 0,\\n d.push(k),\\n b[f].setAttribute(\\\"id\\\", k),\\n e = k\\n }\\n l = e.replace(/-/g, \\\" \\\"),\\n m = '',\\n n = document.createElement(\\\"div\\\"),\\n n.innerHTML = m,\\n o = n.childNodes,\\n \\\"always\\\" === this.options.visible && (o[0].style.opacity = \\\"1\\\"),\\n \\\"&#xe9cb\\\" === this.options.icon && (o[0].style.fontFamily = \\\"anchorjs-icons\\\", o[0].style.fontStyle = \\\"normal\\\", o[0].style.fontVariant = \\\"normal\\\", o[0].style.fontWeight = \\\"normal\\\"),\\n \\\"left\\\" === this.options.placement ? (o[0].style.position = \\\"absolute\\\", o[0].style.marginLeft = \\\"-1em\\\", o[0].style.paddingRight = \\\"0.5em\\\", b[f].insertBefore(o[0], b[f].firstChild)) : (o[0].style.paddingLeft = \\\"0.375em\\\", b[f].appendChild(o[0]))\\n }\\n return this\\n },\\n this.remove = function(a) {\\n for (var b, c = document.querySelectorAll(a), d = 0; d < c.length; d++) b = c[d].querySelector(\\\".anchorjs-link\\\"),\\n b && c[d].removeChild(b);\\n return this\\n },\\n this._addBaselineStyles = function() {\\n if (null === document.head.querySelector(\\\"style.anchorjs\\\")) {\\n var a, b = document.createElement(\\\"style\\\"),\\n c = \\\" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }\\\",\\n d = \\\" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }\\\",\\n e = ' @font-face { font-family: \\\"anchorjs-icons\\\"; font-style: normal; font-weight: normal; src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBTUAAAC8AAAAYGNtYXAWi9QdAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zgq29TcAAAF4AAABNGhlYWQEZM3pAAACrAAAADZoaGVhBhUDxgAAAuQAAAAkaG10eASAADEAAAMIAAAAFGxvY2EAKACuAAADHAAAAAxtYXhwAAgAVwAAAygAAAAgbmFtZQ5yJ3cAAANIAAAB2nBvc3QAAwAAAAAFJAAAACAAAwJAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpywPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6cv//f//AAAAAAAg6cv//f//AAH/4xY5AAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACADEARAJTAsAAKwBUAAABIiYnJjQ/AT4BMzIWFxYUDwEGIicmND8BNjQnLgEjIgYPAQYUFxYUBw4BIwciJicmND8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFA8BDgEjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAEAAAABAACiToc1Xw889QALBAAAAAAA0XnFFgAAAADRecUWAAAAAAJTAsAAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAlMAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAACAAAAAoAAMQAAAAAACgAUAB4AmgABAAAABQBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIABwCfAAEAAAAAAAMADgBLAAEAAAAAAAQADgC0AAEAAAAAAAUACwAqAAEAAAAAAAYADgB1AAEAAAAAAAoAGgDeAAMAAQQJAAEAHAAOAAMAAQQJAAIADgCmAAMAAQQJAAMAHABZAAMAAQQJAAQAHADCAAMAAQQJAAUAFgA1AAMAAQQJAAYAHACDAAMAAQQJAAoANAD4YW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzUmVndWxhcgBSAGUAZwB1AGwAYQByYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format(\\\"truetype\\\"); }',\\n f = \\\" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }\\\";\\n b.className = \\\"anchorjs\\\",\\n b.appendChild(document.createTextNode(\\\"\\\")),\\n a = document.head.querySelector('[rel=\\\"stylesheet\\\"], style'),\\n void 0 === a ? document.head.appendChild(b) : document.head.insertBefore(b, a),\\n b.sheet.insertRule(c, b.sheet.cssRules.length),\\n b.sheet.insertRule(d, b.sheet.cssRules.length),\\n b.sheet.insertRule(f, b.sheet.cssRules.length),\\n b.sheet.insertRule(e, b.sheet.cssRules.length)\\n }\\n }\\n}\",\n \"function onAnchorClick(e) { // 756\\n var event = e || window.event; // 757\\n var target = event.target || event.srcElement; // 758\\n var defaultPrevented = \\\"defaultPrevented\\\" in event ? event['defaultPrevented'] : event.returnValue === false; // 759\\n if (target && target.nodeName === \\\"A\\\" && !defaultPrevented) { // 760\\n var current = parseURL(); // 761\\n var expect = parseURL(target.getAttribute(\\\"href\\\", 2)); // 762\\n var isEqualBaseURL = current._href.split('#').shift() === expect._href.split('#').shift(); // 763\\n if (isEqualBaseURL) { // 764\\n if (current._hash !== expect._hash) { // 765\\n historyObject.location.hash = expect._hash; // 766\\n } // 767\\n scrollToAnchorId(expect._hash); // 768\\n if (event.preventDefault) { // 769\\n event.preventDefault(); // 770\\n } else { // 771\\n event.returnValue = false; // 772\\n } // 773\\n } // 774\\n } // 775\\n } // 776\",\n \"function leadsLink(val){\\n\\n //debugger;\\n return '
  • ' + val.name + '

    ' + val.email + '

    ' + val.date +'

  • ';\\n \\n }\",\n \"static applyAnchorUrl(reflection, container) {\\n if (!reflection.url || !DefaultTheme.URL_PREFIX.test(reflection.url)) {\\n const anchor = DefaultTheme.getUrl(reflection, container, \\\".\\\");\\n reflection.url = container.url + \\\"#\\\" + anchor;\\n reflection.anchor = anchor;\\n reflection.hasOwnDocument = false;\\n }\\n reflection.traverse((child) => {\\n if (child instanceof index_1.DeclarationReflection) {\\n DefaultTheme.applyAnchorUrl(child, container);\\n }\\n });\\n }\",\n \"get anchor() {\\n return this.$anchor.pos;\\n }\",\n \"link(options = {}) {\\n if (!options || (options && !options.href) || !this.isValid()) {\\n return;\\n }\\n\\n if (window.getSelection && !window.getSelection().toString()) {\\n console.warn(\\\"no text selected..\\\");\\n return null;\\n }\\n const unwrapAtags = (linkElements) => {\\n linkElements.forEach(link => {\\n Array.from(link.querySelectorAll(\\\"a\\\")).forEach(aTag => aTag.unwrap());\\n const closestATag = link.parentElement ? link.parentElement.__closest(\\\"a\\\") : null;\\n if (closestATag) {\\n var a = Object(_utilis_splitHTML__WEBPACK_IMPORTED_MODULE_2__[\\\"splitHTML\\\"])(link, closestATag, {\\n tag: \\\"a\\\"\\n });\\n if (a) {\\n a.center.unwrap();\\n }\\n // closestATag.unwrap();\\n }\\n });\\n }\\n const setTargetToTag = (linkElements, renderedLink, _target) => {\\n linkElements.forEach(aTag => {\\n aTag.href = renderedLink;\\n if (_target) {\\n aTag.setAttribute(\\\"target\\\", _target);\\n }\\n });\\n }\\n const setProtocol = (_protocol, newURL) => {\\n _protocol = _protocol.replace(/:/g, \\\"\\\");\\n _protocol = _protocol.replace(/\\\\/\\\\//g, \\\"\\\");\\n _protocol += \\\":\\\";\\n if (_protocol.includes(\\\"http\\\")) {\\n _protocol += \\\"//\\\";\\n } else {\\n }\\n newURL.push(_protocol);\\n return _protocol;\\n }\\n\\n\\n const { href = \\\"\\\", protocol = \\\"\\\", target = \\\"\\\" } = options;\\n\\n const linkElements = Object(_services_range_service__WEBPACK_IMPORTED_MODULE_0__[\\\"wrapRangeWithElement\\\"])(\\\"a\\\");\\n let newURL = [];\\n const Atag = Object(_services_link_service__WEBPACK_IMPORTED_MODULE_9__[\\\"createTempLinkElement\\\"])(href);\\n let _href = Object(_services_link_service__WEBPACK_IMPORTED_MODULE_9__[\\\"resetURL\\\"])(href.trim());\\n\\n let _protocol = protocol.trim() || Atag.protocol;\\n let _target = null;\\n const testTarget = _services_link_service__WEBPACK_IMPORTED_MODULE_9__[\\\"TARGETS\\\"][target.trim().toLowerCase()];\\n if (testTarget) {\\n _target = testTarget;\\n }\\n if (_protocol.trim()) {\\n _protocol = setProtocol(_protocol, newURL);\\n }\\n if (_href) {\\n newURL.push(_href);\\n }\\n const renderedLink = newURL.join(\\\"\\\");\\n unwrapAtags(linkElements);\\n setTargetToTag(linkElements, renderedLink, _target);\\n const { firstFlag, lastFlag } = Object(_services_range_service__WEBPACK_IMPORTED_MODULE_0__[\\\"setSelectionFlags\\\"])(linkElements[0], linkElements[linkElements.length - 1]); //Set Flag at last\\n Object(_services_range_service__WEBPACK_IMPORTED_MODULE_0__[\\\"setSelectionBetweenTwoNodes\\\"])(firstFlag, lastFlag);\\n linkElements.forEach(aTag=>{\\n Object(_services_textEditor_service__WEBPACK_IMPORTED_MODULE_4__[\\\"normalizeElement\\\"])(aTag.parentElement);// merge siblings and parents with child as possible.. \\n })\\n }\",\n \"function onClick() {return thisObj.load(this.href);}\",\n \"function onClick() {return thisObj.load(this.href);}\",\n \"function anchor(url, attrs) {\\n\\tvar text = escape(url),\\n\\t\\thref = url;\\n\\n\\t// Ensure protocol at beginning of url\\n\\tif (!/^[a-zA-Z]{1,6}:/.test(href)) {\\n\\t\\thref = 'http://' + href;\\n\\t}\\n\\n\\tvar attrsString = [attributes({ href: href }), attributes(attrs)]\\n\\t\\t.filter(Boolean)\\n\\t\\t.join(\\\" \\\");\\n\\n\\treturn \\\"\\\" + text + \\\"\\\";\\n}\",\n \"function viewLinkRenderer(entityKind) {\\n\\treturn function(value) {\\n\\t\\tif (value != null) {\\n\\t\\t\\treturn \\\"\\\" + value + \\\"\\\";\\n\\t\\t}\\n\\t\\treturn \\\"\\\";\\n\\t};\\n}\",\n \"function activateLink(e){\\n // remove/add .active\\n let activeLink = document.getElementsByClassName('active')[0] ? \\n document.getElementsByClassName('active')[0] : \\n null;\\n\\n if(activeLink){\\n activeLink.removeAttribute('class');\\n }\\n e.target.setAttribute('class', 'active');\\n\\n // get the paragraph\\n let content = new Content();\\n content.getParagraphByIndex(e.target.id);\\n\\n // change the url in the address bar\\n window.history.pushState(\\\"\\\", \\\"\\\", e.target.id);\\n}\",\n \"createAnchor(paper, x, y, style, r = AnchorsComponent.DEFAULT_ANCHOR_RADIUS) {\\r\\n const a = paper.circle(x, y, r);\\r\\n a.addClass(\\\"anchorStyle\\\");\\r\\n if (style !== undefined && style !== \\\"\\\") {\\r\\n a.addClass(style);\\r\\n }\\r\\n return a;\\r\\n }\",\n \"getLinkAnchors(mode) {\\n const attrs = this.state.attributes;\\n return [\\n {\\n element: this.object._id,\\n points: [\\n {\\n x: attrs.x,\\n y: attrs.y,\\n xAttribute: \\\"x\\\",\\n yAttribute: \\\"y\\\",\\n direction: { x: mode == \\\"begin\\\" ? 1 : -1, y: 0 }\\n }\\n ]\\n }\\n ];\\n }\",\n \"function createkeyanchor(meal) {\\n var makeKeyAnchor = $(dc('a'))\\n .attr('id', 'keyAnchor')\\n .attr('class', 'carousel_caption keyAnchor grid_2')\\n .html('Make Key Photo');\\n \\n // Make this general & use same code for delete [0] case\\n makeKeyAnchor.click(function() {\\n \\n // ajax for username, mealts, and keyts\\n elm.makekeypicture(function(success, pinfo) {\\n \\n if(success) {\\n \\n // Update mongo on the server\\n makeKeyPicAjax(meal, pinfo);\\n \\n // Set the display picture\\n if(setgriddisplay) {\\n setgriddisplay(meal, pinfo);\\n }\\n }\\n });\\n });\\n return makeKeyAnchor;\\n }\",\n \"getAnchor() {\\n this._assertInitialized();\\n return this.marker;\\n }\",\n \"render() {\\n const path = this.props.linkData.path;\\n const title = this.props.linkData.title\\n return (\\n
  • {title}
  • \\n );\\n }\",\n \"function _(e){var t=document.createElement(\\\"a\\\");return t.href=e,t}\",\n \"function pagerHomePageLink() {\\n 'use strict';\\n var link = document.createElement('div');\\n link.id = 'pagerGoHome';\\n link.innerHTML = 'Home';\\n return link;\\n}\",\n \"function onAnchorClick(event) {\\n chrome.tabs.create({\\n selected: true,\\n url: event.srcElement.href\\n });\\n return false;\\n}\",\n \"function onAnchorClick(event) {\\n chrome.tabs.create({\\n selected: true,\\n url: event.srcElement.href\\n });\\n return false;\\n}\",\n \"function attachPageTargetForClickToScroll(pageTarget,anchor) {\\n\\n const idAttribute = pageTarget.getAttribute(\\\"id\\\");\\n anchor.setAttribute('id','navlink'+idAttribute);\\n //anchor.setAttribute('href',`#${idAttribute}`);\\n}\",\n \"render(){\\n return (\\n \\n )\\n }\",\n \"@method createNavigationLinkHTML(contents, path) {\\n if (typeof contents != \\\"string\\\") {\\n // Retrieve the HTML for the element.\\n var tempDiv = I3.ui.create(\\\"div\\\");\\n tempDiv.appendChild(contents);\\n contents = tempDiv.innerHTML;\\n }\\n var eventParams = I3.browser.isIE() ? \\\"\\\" : \\\"event\\\";\\n return '' + contents + '';\\n }\",\n \"function listItemWithAnchor(anchor) {\\n // They give me element like this:\\n // google.com\\n const li = document.createElement(\\\"li\\\");\\n li.appendChild(anchor);\\n // I give them an element like this:\\n //
  • \\n // google.com\\n //
  • \\n return li;\\n}\",\n \"navigateHyperlink() {\\n let fieldBegin = this.getHyperlinkField();\\n if (fieldBegin) {\\n this.fireRequestNavigate(fieldBegin);\\n }\\n }\",\n \"function scrollTo_anchor(action) {\\n if (action.target.nodeName === \\\"A\\\") {\\n const allSecId = action.target.getAttribute(\\\"data-id\\\");\\n const allSec = document.getElementById(allSecId);\\n allSec.scrollIntoView({ behavior: \\\"smooth\\\" });\\n }\\n}\",\n \"function UpdateAnchorsHandler() { }\",\n \"function renderLink(url) {\\n let card = document.createElement(\\\"div\\\");\\n card.classList.add('card');\\n\\n let newLink = document.createElement(\\\"div\\\");\\n newLink.innerHTML = ''+url+'';\\n // newLink.classList.add(\\\"bg-success\\\");\\n\\n card.appendChild(newLink);\\n\\n let linkSection = document.querySelector('#linkSection');\\n linkSection.appendChild(card); \\n}\",\n \"function Anchor(props) {\\n const contentRef = useRef(null)\\n\\n return (\\n
    \\n
    {props.children}
    \\n \\n TOOLIP\\n \\n
    \\n )\\n}\",\n \"function toAnchorNode(node, id) {\\n setNodeAttr(node, 'id', id);\\n mergeNodeAttr(node, 'class', classNames.anchor);\\n\\n const linkNode = tree.createElement('a', ns.html, [\\n {\\n name: 'class',\\n value: classNames.anchorLink,\\n },\\n {\\n name: 'href',\\n value: `#${id}`,\\n },\\n {\\n name: 'aria-hidden',\\n value: 'true',\\n },\\n ]);\\n\\n const iconNode = tree.createElement('span', ns.html, [\\n {\\n name: 'class',\\n value: classNames.anchorIcon,\\n },\\n ]);\\n\\n tree.appendChild(node, linkNode);\\n tree.appendChild(linkNode, iconNode);\\n}\",\n \"function NavLink(params) {\\n\\n const users = [\\n {id: 1, name: 'Tom'},\\n {id: 2, name: 'Jerry'},\\n {id: 3, name: 'Doggo'},\\n {id: 4, name: 'Bruno'}\\n ]\\n\\n return(\\n
    \\n Hooks &nbsp;&nbsp;&nbsp;\\n Ref &nbsp;&nbsp; &nbsp;\\n HOC &nbsp;&nbsp; &nbsp;\\n No Comp Route &nbsp; &nbsp;\\n {/* By using anchor tag, page reloads to change content and breaks SPA rule. Thats why we use react library function Link*/}\\n Wrong Way to Route in SPA(Reload)

    \\n\\n {\\n users.map((ele, index) => \\n {ele.name} &nbsp; &nbsp; \\n )\\n }\\n\\n
    \\n )\\n}\",\n \"displayActionButton() {\\n return (\\n // \\n \\n {this.props.buttonText}\\n \\n // \\n )\\n }\",\n \"translateAnchorLinks(text)\\n {\\n let hashWithoutAnchorAndHashMark = this.windowHashWithoutAnchor().substring(1);\\n if (_.startsWith(hashWithoutAnchorAndHashMark, \\\"#\\\"))\\n {\\n hashWithoutAnchorAndHashMark = hashWithoutAnchorAndHashMark.substring(1);\\n }\\n\\n let regexp = new RegExp(\\\"(.*<\\\\\\\\s*a[^>]+href\\\\\\\\s*=\\\\\\\\s*[\\\\\\\"']#)([^\\\\\\\"'\\\"\\n + this.anchorChar + \\\"]*)([\\\\\\\"'][^>]*>.*)\\\", \\\"\\\");\\n let replacement = \\\"$1\\\" + hashWithoutAnchorAndHashMark + this.paramSeparator\\n + this.anchorChar + \\\"=\\\" + \\\"$2$3\\\";\\n text = simpleUtils.replaceLoop(regexp, replacement, text);\\n\\n regexp = new RegExp(\\\"(.*<\\\\\\\\s*a[^>]+name\\\\\\\\s*=\\\\\\\\s*[\\\\\\\"'])([^\\\\\\\"'\\\"\\n + this.anchorChar + \\\"]*)([\\\\\\\"'][^>]*>.*)\\\", \\\"\\\");\\n replacement = \\\"$1\\\" + hashWithoutAnchorAndHashMark + this.paramSeparator\\n + this.anchorChar + \\\"=\\\" + \\\"$2$3\\\";\\n text = simpleUtils.replaceLoop(regexp, replacement, text);\\n\\n return text;\\n }\",\n \"function createLink(name, text) {\\n let className = `link-${name}`;\\n \\n const link = document.createElement('div');\\n link.classList.add(className);\\n link.textContent = text;\\n link.addEventListener('click', () => {\\n console.log(`clicked link: ${name}`);\\n let el;\\n if(name === \\\"About-Me\\\") {\\n el = document.querySelector('.about-me-container');\\n } else if(name === \\\"Projects\\\") {\\n el = document.querySelector('.projects-container');\\n } else if(name === 'Contact') {\\n el = document.querySelector('.contact-container');\\n }\\n\\n if(el != undefined) {\\n el.scrollIntoView({behavior: \\\"smooth\\\"});\\n }\\n });\\n \\n return link;\\n }\",\n \"displayUserView() {\\n const questionnaire = this.props.questionnaire\\n\\n return(\\n
    \\n { this.props.fetchQuestionnaire(questionnaire.id) }}\\n >\\n

    \\n { questionnaire.attributes.name }\\n

    \\n \\n
    \\n )\\n }\",\n \"function scrollToAnchor(){\\n\\n //getting the anchor link in the URL and deleting the `#`\\n var value = window.location.hash.replace('#', '').split('/');\\n var section = decodeURIComponent(value[0]);\\n var slide = decodeURIComponent(value[1]);\\n /* nectar addition */ \\n if(section && $('.vc_row[data-fullscreen-anchor-id=\\\"'+section+'\\\"]').length > 0){ //if theres any #\\n /* nectar addition end */ \\n if(options.animateAnchor){\\n scrollPageAndSlide(section, slide);\\n }else{\\n FP.silentMoveTo(section, slide);\\n }\\n }\\n }\",\n \"pageLink(num) {\\n let name;\\n if(num === this.props.page)name='active';\\n else name='';\\n \\n return (\\n
  • \\n this.props.fetchOrders(num)}>{num}\\n
  • \\n )\\n }\"\n]"},"negative_scores":{"kind":"list like","value":["0.7293357","0.725551","0.6827036","0.67869955","0.6448339","0.6386757","0.6336245","0.6336245","0.6336245","0.6336245","0.6198019","0.61884713","0.614755","0.61313796","0.6124272","0.6094945","0.60794866","0.6052326","0.6043256","0.6003522","0.59908676","0.59836626","0.597176","0.5969112","0.5968302","0.5944599","0.593861","0.59206736","0.590543","0.58977854","0.5875484","0.5867688","0.5856255","0.58003014","0.58003014","0.58003014","0.5789114","0.5788822","0.57876855","0.57814777","0.5781074","0.57805574","0.5765957","0.5759331","0.57560456","0.575513","0.5749747","0.57430494","0.574304","0.5741085","0.57350373","0.57267064","0.5720846","0.56982654","0.5698005","0.568917","0.568404","0.5676472","0.5676472","0.5659911","0.56560606","0.5655697","0.56525195","0.5635774","0.5630504","0.56261486","0.56256634","0.5621981","0.56216085","0.56099623","0.5601666","0.5601666","0.5600834","0.55987346","0.55971354","0.5594998","0.5586903","0.5579778","0.5575832","0.5575735","0.5575576","0.5575244","0.5572517","0.5572517","0.5559035","0.55557483","0.5555651","0.5542804","0.5541402","0.5538083","0.55303705","0.5522433","0.55200994","0.5517456","0.5516694","0.5507295","0.5501562","0.5497165","0.549671","0.5495223","0.54952055"],"string":"[\n \"0.7293357\",\n \"0.725551\",\n \"0.6827036\",\n \"0.67869955\",\n \"0.6448339\",\n \"0.6386757\",\n \"0.6336245\",\n \"0.6336245\",\n \"0.6336245\",\n \"0.6336245\",\n \"0.6198019\",\n \"0.61884713\",\n \"0.614755\",\n \"0.61313796\",\n \"0.6124272\",\n \"0.6094945\",\n \"0.60794866\",\n \"0.6052326\",\n \"0.6043256\",\n \"0.6003522\",\n \"0.59908676\",\n \"0.59836626\",\n \"0.597176\",\n \"0.5969112\",\n \"0.5968302\",\n \"0.5944599\",\n \"0.593861\",\n \"0.59206736\",\n \"0.590543\",\n \"0.58977854\",\n \"0.5875484\",\n \"0.5867688\",\n \"0.5856255\",\n \"0.58003014\",\n \"0.58003014\",\n \"0.58003014\",\n \"0.5789114\",\n \"0.5788822\",\n \"0.57876855\",\n \"0.57814777\",\n \"0.5781074\",\n \"0.57805574\",\n \"0.5765957\",\n \"0.5759331\",\n \"0.57560456\",\n \"0.575513\",\n \"0.5749747\",\n \"0.57430494\",\n \"0.574304\",\n \"0.5741085\",\n \"0.57350373\",\n \"0.57267064\",\n \"0.5720846\",\n \"0.56982654\",\n \"0.5698005\",\n \"0.568917\",\n \"0.568404\",\n \"0.5676472\",\n \"0.5676472\",\n \"0.5659911\",\n \"0.56560606\",\n \"0.5655697\",\n \"0.56525195\",\n \"0.5635774\",\n \"0.5630504\",\n \"0.56261486\",\n \"0.56256634\",\n \"0.5621981\",\n \"0.56216085\",\n \"0.56099623\",\n \"0.5601666\",\n \"0.5601666\",\n \"0.5600834\",\n \"0.55987346\",\n \"0.55971354\",\n \"0.5594998\",\n \"0.5586903\",\n \"0.5579778\",\n \"0.5575832\",\n \"0.5575735\",\n \"0.5575576\",\n \"0.5575244\",\n \"0.5572517\",\n \"0.5572517\",\n \"0.5559035\",\n \"0.55557483\",\n \"0.5555651\",\n \"0.5542804\",\n \"0.5541402\",\n \"0.5538083\",\n \"0.55303705\",\n \"0.5522433\",\n \"0.55200994\",\n \"0.5517456\",\n \"0.5516694\",\n \"0.5507295\",\n \"0.5501562\",\n \"0.5497165\",\n \"0.549671\",\n \"0.5495223\",\n \"0.54952055\"\n]"},"document_score":{"kind":"string","value":"0.0"},"document_rank":{"kind":"string","value":"-1"}}},{"rowIdx":81345,"cells":{"query":{"kind":"string","value":"! ZRender, a high performance 2d drawing library. Copyright (c) 2013, Baidu Inc. All rights reserved. LICENSE"},"document":{"kind":"string","value":"function Ni(t){delete Li[t]}"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["function drawSurface() {\n wgl.takeBufferData(positionLocation, positionBuffer, 3, gl.FLOAT, false, 0, 0);\n wgl.takeBufferData(normalLocation, normalBuffer, 3, gl.FLOAT, false, 0, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6 * (map.points.length - 1) * (map.points.length - 1));\n }","render(renderParameters) {\r\n\t\t\t\t var tileSize = this.layer.tileInfo.size[0];\r\n\t\t\t\t var state = renderParameters.state;\r\n\t\t\t\t var pixelRatio = state.pixelRatio;\r\n\t\t\t\t var width = state.size[0];\r\n\t\t\t\t var height = state.size[1];\r\n\t\t\t\t var context = renderParameters.context;\r\n\t\t\t\t var coords = [0, 0];\r\n\r\n\t\t\t\t context.fillStyle = \"rgba(0,0,0,0.25)\";\r\n\t\t\t\t context.fillRect(0, 0, width * pixelRatio, height * pixelRatio);\r\n\t\t\t\t }","draw() { }","draw() { }","draw() { }","function UpdateRender() {\r\n // Set background\r\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\r\n\r\n // RenderSquares\r\n BackContextHandle.save();\r\n RenderSquares();\r\n BackContextHandle.restore();\r\n\r\n // Swap the backbuffer with the frontbuffer\r\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\r\n ContextHandle.putImageData(ImageData, 0, 0);\r\n}","drawOffscreen() { }","function b2Draw()\r\n{\r\n}","function setupDraw() {\n // Stop the 3D view from rendering\n continueRender = 0;\n //Check to see if Draw setup has already been run\n if(startupDraw == 1)\n {\n // Check if View mode has been run, if it has then we remove View Mode's listeners\n if(startupView == 0)\n {\n\n }\n canvas.onmousemove = null;\n canvas.onmousedown = null;\n window.onmouseup = null;\n\n //setup click and drag listeners\n canvas.addEventListener(\"mousedown\", checkPoint, false);\n canvas.addEventListener(\"mousemove\", movePoint, false);\n canvas.addEventListener(\"mouseup\", endMove, false);\n\n document.getElementById(\"demo\").innerHTML = \"Draw Mode\";\n\n // This will enable the correct menu for draw mode\n document.getElementById(\"drawMenu\").style.display = \"block\";\n document.getElementById(\"viewMenu\").style.display = \"none\";\n gl.enable(gl.DEPTH_TEST);\n \n // Load shaders\n programId = initShaders(gl, \"2d-vertex-shader\", \"2d-fragment-shader\");\n \n // ######Create vertex buffer objects --- ADD CODE HERE #######\n var positionAttributeLocation = gl.getAttribLocation(programId, \"a_position\");\n var resolutionUniformLocation = gl.getUniformLocation(programId, \"u_resolution\");\n colorLocation = gl.getUniformLocation(programId, \"u_color\");\n \n //setup buffer for control points line and bezier curve\n var positionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\n //tell atribute how to get data out of it, first turn the attribute on\n gl.enableVertexAttribArray(positionAttributeLocation);\n //specify how to pull the data out\n var size = 2; // 2 components per iteration\n var type = gl.FLOAT; // the data is 32bit floats\n var normalize = false; // don't normalize the data\n var stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position\n var offset = 0; // start at the beginning of the buffer\n gl.vertexAttribPointer(\n positionAttributeLocation, size, type, normalize, stride, offset)\n\n\n gl.useProgram(programId);\n // set the resolution so we use pixels instead of default 0 to 1\n gl.uniform2f(resolutionUniformLocation, gl.canvas.width, gl.canvas.height);\n\n // Ensure OpenGL viewport is resized to match canvas dimensions\n gl.viewportWidth = canvas.width;\n gl.viewportHeight = canvas.height;\n gl.lineWidth(1);\n\n // Set screen clear color to R, G, B, alpha; where 0.0 is 0% and 1.0 is 100%\n gl.clearColor(0.8, 0.8, 0.8, 1.0);\n \n // Enable color; required for clearing the screen\n gl.clear(gl.COLOR_BUFFER_BIT);\n startupDraw = 0;\n drawMethod();\n }\n else {\n drawMethod();\n }\n} // End of setupDraw()","function render(){\n\tcanvas.clearRect(0,0, canvas.canvas.width, canvas.canvas.height)\n\tcanvas.strokeStyle = '#000000';\n\tcanvas.lineJoin = 'round';\n\tcanvas.lineWidth = 3;\n\t// lays down the drawing background first.\n\tif (back) {\n\t\tcanvas.drawImage(back,0,0);\n\t}\n\t// paints and retains painting order so everything renders correctly\n\t// uses the array of objects to determine what should be rendered\n\tfor(let i = 0; i < strokeOrder.length; i+=1){\n\t\t// draws standard painting\n\t\tif(strokeOrder[i].type ==='paint') {\n\t\t\tcanvas.beginPath();\n\t\t\tif(strokeOrder[i].paintPress && i){\n\t\t\t\tcanvas.moveTo(strokeOrder[i-1].paintX, strokeOrder[i-1].paintY);\n\t\t\t}else{\n\t\t\t\tcanvas.moveTo(strokeOrder[i].paintX-1, strokeOrder[i].paintY);\n\t\t}\n\t\tcanvas.lineTo(strokeOrder[i].paintX, strokeOrder[i].paintY)\n\t\tcanvas.closePath();\n\t\tcanvas.strokeStyle=strokeOrder[i].saveColor;\n\t\tcanvas.lineWidth=strokeOrder[i].saveSize;\n\t\tcanvas.stroke(); \n\t\t// draws the spray emoji\n\t\t} else if (strokeOrder[i].type ==='spray'){\n\t\t\tcanvas.drawImage(strokeOrder[i].src,strokeOrder[i].x,strokeOrder[i].y);\n\t\t// draws square shape\n\t\t} else if (strokeOrder[i].type=== 'square') {\n\t\t\tcanvas.lineWidth = 5;\n\t\t\tcanvas.strokeStyle = strokeOrder[i].color;\n\t\t\tcanvas.strokeRect(strokeOrder[i].x, strokeOrder[i].y, 50, 50);\n\t\t// draws circle shape\n\t\t} else if (strokeOrder[i].type === 'circle'){\n\t\t\tcanvas.beginPath();\n\t\t\tcanvas.lineWidth = 5;\n\t\t\tcanvas.strokeStyle = strokeOrder[i].color;\n\t\t\tcanvas.arc(strokeOrder[i].x, strokeOrder[i].y,25,0,2*Math.PI);\n\t\t\tcanvas.stroke();\n\t\t// draws triangle shape\n\t\t} else if (strokeOrder[i].type === 'triangle') {\n\t\t\tcanvas.beginPath();\n\t\t\tcanvas.lineWidth = 5;\n\t\t\tcanvas.strokeStyle = strokeOrder[i].color;\n\t\t\tcanvas.moveTo(strokeOrder[i].x, strokeOrder[i].y);\n\t\t\tcanvas.lineTo(strokeOrder[i].x +50, strokeOrder[i].y);\n\t\t\tcanvas.lineTo(strokeOrder[i].x +25, strokeOrder[i].y-35);\n\t\t\tcanvas.lineTo(strokeOrder[i].x, strokeOrder[i].y);\n\t\t\tcanvas.stroke();\n\t\t// draws lines\n\t\t} else if (strokeOrder[i].type === 'line'){\n\t\t\tcanvas.beginPath();\n\t\t\tcanvas.moveTo(strokeOrder[i].startX, strokeOrder[i].startY);\n\t\t\tcanvas.lineTo(strokeOrder[i].endX, strokeOrder[i].endY);\n\t\t\tcanvas.lineWidth = strokeOrder[i].lineSize;\n\t\t\tcanvas.strokeStyle = strokeOrder[i].lineColor;\n\t\t\tcanvas.stroke();\n\t\t}\n\t}\n\t}","function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}","RenderInit() {\n this.canvas.width = this.size;\n this.canvas.height = this.size;\n this.context = this.canvas.getContext(\"2d\");\n this.buffer = this.size / this.gamestate.layout.length;\n this.draw();\n this.drawKey();\n this.drawExit();\n this.drawPlayers();\n this.drawAdversaries();\n }","function render() {\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n gl.drawArrays(gl.POINTS, 0, 2);\r\n}","_draw() {\n\n }","render2d(){\n const ctx = this.canvas2dctx;\n\n ctx.clearRect(0,0,this.state.width,this.state.height);\n\n ctx.strokeStyle = \"white\";\n ctx.lineWidth = 2.0;\n ctx.font = \"16px sans-serif\";\n ctx.fillStyle = \"white\";\n\n for (let i = 0; i < this.text2d.length; i ++){\n const {text,vec, withline } = this.text2d[i];\n let v2 = this.convertWorldToScreenXY(vec);\n if( withline){\n ctx.beginPath();\n ctx.moveTo(v2.x,v2.y); ctx.lineTo(v2.x+30, v2.y-30); ctx.lineTo(v2.x+30+ctx.measureText(text).width, v2.y-30);\n ctx.stroke();\n ctx.fillText(text, v2.x+30, v2.y-30-3);\n }else{\n ctx.fillText(text, v2.x-ctx.measureText(text).width/2, v2.y-3);\n }\n }\n }","function allthere(){\n\n // settings.\n var gridres = 128, totX = 4096,\n totY = 391, pbrtShowrender = true,\n pbrtBounces = 2, pbrtBatch = 1,\n pbrtSamples = Math.floor((parseInt(document.location.hash.slice(1)) || 200) / pbrtBatch);\n var pbrtGrid = { // grid 外框\n bbox: new Float32Array(\n [-16.35320053100586, -3.3039399147033692, -13.719999885559082, 31.68820018768311, 13.706639957427978, 24.6798002243042])\n };\n\n // Shader helpers.\n function createShader(gl, source, type) { var shader=gl.createShader(type); gl.shaderSource(shader, source); gl.compileShader(shader); return shader; }\n function createProgram(gl, vertexShaderSource, fragmentShaderSource) {\n var program = gl.createProgram();\n gl.attachShader(program, createShader(gl, vertexShaderSource, gl.VERTEX_SHADER)); \n gl.attachShader(program, createShader(gl, fragmentShaderSource, gl.FRAGMENT_SHADER));\n gl.linkProgram(program);\n return program;\n };\n\n // Offscreen float buffers.\n function createOffscreen(gl,width,height) {\n var colorTexture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, colorTexture);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA32F, width, height, 0, gl.RGBA, gl.FLOAT, null);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.bindTexture(gl.TEXTURE_2D, null);\n\n var depthBuffer = gl.createRenderbuffer();\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthBuffer);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, width, height);\n gl.bindRenderbuffer(gl.RENDERBUFFER, null);\n\n var framebuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorTexture, 0);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthBuffer);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\n return {\n framebuffer:framebuffer,colorTexture:colorTexture,depthBuffer:depthBuffer,width:width,height:height,gl:gl,\n bind : function() { this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, this.framebuffer); this.gl.viewport(0,0,this.width,this.height); },\n unbind : function() { this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, null); },\n delete : function() { this.gl.deleteRenderbuffer(this.depthBuffer); this.gl.deleteFramebuffer(this.framebuffer); this.gl.deleteTexture(this.colorTexture); }\n }\n }\n\n // setup output canvas, gl context and offscreen.\n var canvas = m(document.body.appendChild(document.createElement('canvas')),{width:800,height:450});\n m(canvas.style,{width:'800px',height:'450px'});\n var gl = canvas.getContext('webgl2'); if (!gl) alert('webGL2 required !');\n var ext1 = gl.getExtension('EXT_color_buffer_float'); if (!ext1) alert('videocard required');\n var ofscreen1 = createOffscreen(gl,canvas.width,canvas.height);\n \n // Shaders for accumulation and tonemap.\n var vs2=`#version 300 es\n #define POSITION_LOCATION 0\n precision lowp float;\n layout(location = POSITION_LOCATION) in vec3 position;\n void main() { gl_Position = vec4(position, 1.0); }`;\n\n var fs2=`#version 300 es\n precision lowp float;\n precision lowp sampler2D;\n uniform sampler2D accum;\n uniform float count; // 采样次数的倒数 相当于除以采样次数\n out vec4 color;\n void main() { color = vec4(sqrt(texelFetch(accum,ivec2(gl_FragCoord.xy),0).rgb*count),1.0); }\n `;\n\n // Actual Path tracing shaders.\n var vs=`#version 300 es\n #define POSITION_LOCATION 0\n precision highp float;\n precision highp int;\n uniform mat4 MVP;\n layout(location = POSITION_LOCATION) in vec3 position;\n out vec3 origin;\n void main()\n {\n origin = (MVP * vec4(0.0,0.0,0.0,1.0)).xyz;\n gl_Position = vec4(position, 1.0);\n }`;\n\n var fs=`#version 300 es\n precision highp float;\n precision highp int;\n precision highp sampler3D;\n precision highp sampler2D;\n\n #define EPSILON 0.000001\n\n uniform vec2 resolution;\n uniform float inseed;\n uniform int incount;\n \n uniform mat4 MVP, proj;\n\n uniform sampler3D grid;\n uniform sampler2D tris;\n uniform vec3 bbina, bbinb;\n\n vec3 bboxA, bboxB;\n\n in vec3 origin;\n out vec4 color;\n \n uint N = ${pbrtSamples}u, i;\n\n float seed;\n float minc(const vec3 x) { return min(x.x,min(x.y,x.z)); }\n \n float random_ofs=0.0;\n vec3 cosWeightedRandomHemisphereDirectionHammersley( const vec3 n ) {\n float x = float(i)/float(N); \n i = (i << 16u) | (i >> 16u);\n i = ((i & 0x55555555u) << 1u) | ((i & 0xAAAAAAAAu) >> 1u);\n i = ((i & 0x33333333u) << 2u) | ((i & 0xCCCCCCCCu) >> 2u);\n i = ((i & 0x0F0F0F0Fu) << 4u) | ((i & 0xF0F0F0F0u) >> 4u);\n i = ((i & 0x00FF00FFu) << 8u) | ((i & 0xFF00FF00u) >> 8u);\n vec2 r = vec2(x,(float(i) * 2.32830643653086963e-10 * 6.2831) + random_ofs);\n vec3 uu=normalize(cross(n, vec3(1.0,1.0,0.0))), vv=cross( uu, n );\n float sqrtx = sqrt(r.x);\n return normalize(vec3( sqrtx*cos(r.y)*uu + sqrtx*sin(r.y)*vv + sqrt(1.0-r.x)*n ));\n }\n\n vec4 trace( inout vec3 realori, const vec3 dir) {\n float len=0.0,l,b,mint=1000.0;\n vec2 minuv, mintri, cpos;\n vec3 scaler=vec3(bbinb/${gridres}.0)/dir,orig=realori,v0,v1,v2;\n for (int i=0;i<150;i++){\n vec3 txc=(orig-bboxA)*bboxB;\n if ( txc != clamp(txc,0.0,1.0)) break;\n vec3 tex=textureLod(grid,txc,0.0).rgb;\n for(int tri=0; tri<512; tri++) { \n if (tex.b<=0.0) break; cpos=tex.rg; tex.rb+=vec2(3.0/4096.0,-1.0); \n v1 = textureLodOffset(tris,cpos,0.0,ivec2(1,0)).rgb;\n v2 = textureLodOffset(tris,cpos,0.0,ivec2(2,0)).rgb;\n vec3 P = cross(dir,v2); float det=dot(v1,P); if (det>-EPSILON) continue;\n v0 = textureLod(tris,cpos,0.0).rgb;\n vec3 T=realori-v0; float invdet=1.0/det; float u=dot(T,P)*invdet; if (u < 0.0 || u > 1.0) continue;\n vec3 Q=cross(T,v1); float v=dot(dir,Q)*invdet; if(v<0.0||u+v>1.0) continue;\n float t=dot(v2, Q)*invdet; if (t>EPSILON && t ex) { color=vec4(1.0); return; }\n orig += max(0.0,en)*view.xyz;\n vec4 hit=trace(orig,view.xyz);\n if (hit.w <= 0.0) { color.rgb = vec3(1.0); return; }\n hit=trace(orig, -cosWeightedRandomHemisphereDirectionHammersley(hit.xyz));\n if (hit.w <= 0.0) { color.rgb = vec3(0.8); return; }\n }`;\n\n // Upload polygon and acceleration data.\n var texture = gl.createTexture(); // grid\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_3D, texture);\n gl.texParameteri(gl.TEXTURE_3D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_3D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage3D( gl.TEXTURE_3D, 0, gl.RGB32F, gridres, gridres, gridres, 0, gl.RGB, gl.FLOAT, map ); \n\n var texture2 = gl.createTexture(); // trangle\n gl.activeTexture(gl.TEXTURE1);\n gl.bindTexture(gl.TEXTURE_2D, texture2);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D( gl.TEXTURE_2D, 0, gl.RGB32F, totX, totY*4, 0, gl.RGB, gl.FLOAT, polyData ); \n\n // Create the path tracing program, grab the uniforms.\n var program = createProgram(gl, vs, fs);\n var mvpLocation = gl.getUniformLocation(program, 'MVP');\n var pLocation = gl.getUniformLocation(program, 'proj');\n var uniformgridLocation = gl.getUniformLocation(program, 'grid');\n var uniformtrisLocation = gl.getUniformLocation(program, 'tris');\n var uniformSeed = gl.getUniformLocation(program, 'inseed');\n var uniformCount = gl.getUniformLocation(program, 'incount');\n var uniformbbaLocation = gl.getUniformLocation(program, 'bbina');\n var uniformbbbLocation = gl.getUniformLocation(program, 'bbinb');\n var uniformresLocation = gl.getUniformLocation(program, 'resolution');\n\n // Create the accumulation program, grab thos uniforms.\n var program2 = createProgram(gl, vs2, fs2);\n var uniformAccumLocation = gl.getUniformLocation(program2, 'accum');\n var uniformCountLocation = gl.getUniformLocation(program2, 'count');\n\n // Setup the quad that will drive the rendering.\n var vertexPosBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 0, 1, -1, 0, 1, 1, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0]), gl.STATIC_DRAW);\n gl.bindBuffer(gl.ARRAY_BUFFER, null); \n\n var vertexArray = gl.createVertexArray();\n gl.bindVertexArray(vertexArray);\n var vertexPosLocation = 0;\n gl.enableVertexAttribArray(vertexPosLocation);\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer);\n gl.vertexAttribPointer(vertexPosLocation, 3, gl.FLOAT, false, 0, 0);\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n gl.bindVertexArray(null);\n\n // Setup some matrices (stole values from jimmy|rig)\n //相机矩阵 \n var matrix = new Float32Array(\n [6.123234262925839e-17, 0, 1, 0,\n -0.8660253882408142, 0.5, 5.302876566937394e-17, 0,\n -0.5, -0.8660253882408142, 3.0616171314629196e-17, 0,\n 6.535898208618164, 19.320507049560547, -4.0020835038019837e-16, 1]);\n // 场景矩阵\n var matrix2 = new Float32Array([1.7777777910232544, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -0.49950000643730164, 0, 0, 1, 0.5005000233650208]);\n var viewportMV = new Float32Array(matrix); \n var accum_count=1, diff=true, abort=false;\n\n // frame handler. \n function frame() {\n // Do we need to restart rendering (i.e. viewport change)\n if (diff) { // 如果视角变化,设置新的矩阵,清空framebuffer重新渲染\n matrix.set(viewportMV);\n ofscreen1.bind(); gl.clear(gl.COLOR_BUFFER_BIT); ofscreen1.unbind();\n accum_count=1;\n abort=undefined;\n diff=false;\n }\n\n // Render more samples.\n if (!abort) { \n // Bind the offscreen and render a new sample.\n ofscreen1.bind();\n gl.useProgram(program);\n gl.uniformMatrix4fv(mvpLocation, false, matrix);\n gl.uniformMatrix4fv(pLocation, false, matrix2);\n gl.uniform1i(uniformgridLocation, 0);\n gl.uniform1i(uniformtrisLocation, 1);\n gl.uniform3fv(uniformbbaLocation, pbrtGrid.bbox.slice(0,3));\n gl.uniform3fv(uniformbbbLocation, pbrtGrid.bbox.slice(3,6));\n gl.uniform2fv(uniformresLocation, new Float32Array([canvas.width,canvas.height]));\n gl.uniform1f(uniformSeed,Math.random());\n gl.uniform1i(uniformCount,(accum_count)%pbrtSamples);\n\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_3D, texture); // grid\n gl.activeTexture(gl.TEXTURE1);\n gl.bindTexture(gl.TEXTURE_2D, texture2); // trangle\n\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE,gl.ONE);\n gl.bindVertexArray(vertexArray);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.bindVertexArray(null);\n gl.disable(gl.BLEND);\n ofscreen1.unbind();\n\n // Display progress (mixdown from float to ldr) \n gl.useProgram(program2);\n gl.uniform1i(uniformAccumLocation, 0);\n gl.uniform1f(uniformCountLocation, 1.0/accum_count);\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, ofscreen1.colorTexture);\n\n gl.bindVertexArray(vertexArray);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.bindVertexArray(null);\n\n gl.bindTexture(gl.TEXTURE_2D, null);\n\n // Stop if we're done.\n if (++accum_count>pbrtSamples) abort =true;\n }\n requestAnimationFrame(frame);\n }\n requestAnimationFrame(frame);\n\n var angle=-Math.PI/2, angle2=Math.PI/3,zoom=0;\n canvas.oncontextmenu =function(e) { e.preventDefault(); e.stopPropagation(); }\n canvas.onmousemove = function(e) {\n if (!e.buttons) return;\n if (e.buttons==1) { angle += e.movementX/100; angle2 += e.movementY/100; } else { zoom += e.movementX/10; }\n viewportMV = t(rX(rY(i(),angle),angle2),[0,4,-20+zoom]);\n diff = true;\n }\n }","function draw() {}","function draw() {}","draw() {}","draw() {}","draw() {}","draw() {}","function init() {\r\n Draw() ;\r\n}","blitFrom(c){\n this.context.clearRect(0,0,this.canvas.width,this.canvas.height);\n if (this.opt.tall){\n this.context.drawImage(c.canvas, 0, 0, c.canvas.width/2, c.canvas.height, 0, 0, this.canvas.width, this.canvas.height/2);\n this.context.drawImage(c.canvas, c.canvas.width/2, 0, c.canvas.width/2, c.canvas.height, 0, this.canvas.height/2, this.canvas.width, this.canvas.height/2);\n } else {\n this.context.drawImage(c.canvas, 0, 0, c.canvas.width, c.canvas.height, 0, 0, c.canvas.width/(c.zoom/this.zoom), c.canvas.height/(c.zoom/this.zoom))\n }\n if (this.opt.grid){\n for (let x = 0; x < this.canvas.width/this.zoom; ++x){\n if (x % 16 == 15 && x != this.tWidth-1){\n this.context.fillStyle = \"#AA0000\";\n }else{\n this.context.fillStyle = \"#AAAAAA\";\n }\n this.context.fillRect((x+1)*this.zoom-((x%8==7)?2:1),0,(x%8==7)?2:1,this.canvas.height);\n }\n for (let y = 0; y < this.canvas.height/this.zoom; ++y){\n if (y % 16 == 15 && y != this.tWidth-1){\n this.context.fillStyle = \"#BB0000\";\n }else{\n this.context.fillStyle = \"#AAAAAA\";\n }\n this.context.fillRect(0,(y+1)*this.zoom-((y%8==7)?2:1),this.canvas.width,(y%8==7)?2:1);\n }\n }\n this.drawCallback();\n }","function render3d() {\n\n createBezierCurves();\n\n // create all models\n var models = [];\n curves.forEach((c)=>{\n models.push(new BezierModel(c.vertices));\n });\n points = [];\n normals = [];\n colors = [];\n texCoordsArray = [];\n // build the main object\n buildObjects({objects:models});\n\n // load colors, points, and normals to buffer\n loadVertices(program);\n loadColors(program);\n loadNormals(program);\n loadTextureArray(program);\n\n}","function render() {\n\t\tdraw.custom(function(canvas, context) {\n\t\t\tbullets.forEach(function(bullet, index, bulletList) {\n\t\t\t\tgetSides(bullet, bullet.angle);\n\t\t\t\tcontext.fillStyle = \"black\";\n\t\t\t\tcontext.beginPath();\n\t\t\t\tcontext.moveTo(bullet.points[0].x + bullet.x, bullet.points[0].y + bullet.y);\n\t\t\t\tfor (var i = 1; i < bullet.points.length; i++) {\n\t\t\t\t\tcontext.lineTo(bullet.points[i].x + bullet.x, bullet.points[i].y + bullet.y);\n\t\t\t\t}\n\t\t\t\tcontext.closePath();\n\t\t\t\tcontext.stroke();\n\t\t\t\tcontext.fill();\n\n\t\t\t});\n\t\t\ttanks.forEach(function(tank, index, tankList) {\n\t\t\t\tgetSides(tank, tank.angle);\n\t\t\t\tcontext.fillStyle = \"black\";\n\t\t\t\tcontext.beginPath();\n\t\t\t\tcontext.moveTo(tank.points[0].x + tank.x, tank.points[0].y + tank.y);\n\t\t\t\tfor (var i = 1; i < tank.points.length; i++) {\n\t\t\t\t\tcontext.lineTo(tank.points[i].x + tank.x, tank.points[i].y + tank.y);\n\t\t\t\t}\n\t\t\t\tcontext.closePath();\n\t\t\t\tcontext.stroke();\n\t\t\t\tcontext.fill();\n\t\t\t});\n\t\t\teffects.forEach(function(effect, index, effectList) {\n\t\t\t\tfor (var i = 0; i < effect.particles.length; i++) {\n\t\t\t\t\tvar particle = effect.particles[i];\n\t\t\t\t\tgetSides(particle, particle.angle);\n\t\t\t\t\tcontext.fillStyle = \"black\";\n\t\t\t\t\tcontext.beginPath();\n\t\t\t\t\tcontext.moveTo(particle.points[0].x + particle.x, particle.points[0].y + particle.y);\n\t\t\t\t\tfor (var e = 1; e < particle.points.length; e++) {\n\t\t\t\t\t\tcontext.lineTo(particle.points[e].x + particle.x, particle.points[e].y + particle.y);\n\t\t\t\t\t}\n\t\t\t\t\tcontext.closePath();\n\t\t\t\t\tcontext.stroke();\n\t\t\t\t\tcontext.fill();\n\t\t\t\t}\n\t\t\t});\n\t\t\tmap.forEach(function(wall, index, walls) {\n\t\t\t\tgetSides(wall, wall.angle);\n\t\t\t\tcontext.fillStyle = \"black\";\n\t\t\t\tcontext.beginPath();\n\t\t\t\tcontext.moveTo(wall.points[0].x + wall.x, wall.points[0].y + wall.y);\n\t\t\t\tfor (var i = 1; i < wall.points.length; i++) {\n\t\t\t\t\tcontext.lineTo(wall.points[i].x + wall.x, wall.points[i].y + wall.y);\n\t\t\t\t}\n\t\t\t\tcontext.closePath();\n\t\t\t\tcontext.stroke();\n\t\t\t\tcontext.fill();\n\t\t\t});\n\t\t});\n\t}","function Renderer3D(image, points)\n{\n\tthis.canvas = createCanvas(0, 0, 1, 1);\n\tthis.ctx = this.canvas.getContext(\"2d\");\n\tthis.image = image;\n\tthis.transform = null;\n\tthis.iw = 0;\n\tthis.ih = 0;\n\tthis.points = points;\n\tthis.bounds = [];//just the right order of points\n\tthis.offsetx = 0;\n\tthis.offsety = 0;\n\t\n\t//\n\tthis.options = {\n\t wireframe: false,\n\t image: 'images/image1.jpg',\n\t subdivisionLimit: 3,\n\t patchSize: 128\n\t};\n\t//Update the display to match a new point configuration.\n this.update = update;\n\tthis.divide = divide;\n\tthis.getCanvas = getCanvas;\n\tthis.testObjectClick = testObjectClick;\n\tfunction getCanvas(){\n\t\treturn this.canvas;\n\t}\n\tfunction testObjectClick(pt){\n\t\treturn(isPointInPoly(this.bounds, pt));\n\t}\n\tfunction update() {\n\t // Get extents.\n\t var minX = Infinity, maxX = -Infinity, minY = Infinity, maxY = -Infinity;\n\t for (var i = 0; i < 4; i++)\n\t {\n\t\tminX = Math.min(minX, Math.floor(this.points[i][0]));\n\t\tmaxX = Math.max(maxX, Math.ceil(this.points[i][0]));\n\t\tminY = Math.min(minY, Math.floor(this.points[i][1]));\n\t\tmaxY = Math.max(maxY, Math.ceil(this.points[i][1]));\n\t }\n\t \n\t minX--; minY--; maxX++; maxY++;\n\t this.offsetX = minX;\n\t this.offsetY = minY;\n\t \n\t var width = maxX - minX;\n\t var height = maxY - minY;\n\n\t // Reshape canvas.\n\t this.canvas.style.left = minX +'px';\n\t this.canvas.style.top = minY +'px';\n\t this.canvas.width = width;\n\t this.canvas.height = height;\n\t \n\t // Measure texture.\n\t this.iw = this.image.width;\n\t this.ih = this.image.height;\n\n\t // Set up basic drawing context.\n\t this.ctx = this.canvas.getContext(\"2d\");\n\t this.ctx.translate(-minX, -minY);\n\t this.ctx.clearRect(minX, minY, width, height);\n\t this.ctx.strokeStyle = \"rgb(220,0,100)\";\n\n\t this.transform = getProjectiveTransform(points);\n\n\t // Begin subdivision process.\n\t var ptl = this.transform.transformProjectiveVector([0, 0, 1]);\n\t var ptr = this.transform.transformProjectiveVector([1, 0, 1]);\n\t var pbl = this.transform.transformProjectiveVector([0, 1, 1]);\n\t var pbr = this.transform.transformProjectiveVector([1, 1, 1]);\n\n\t this.ctx.beginPath();\n\t this.ctx.moveTo(ptl[0], ptl[1]);\n\t this.ctx.lineTo(ptr[0], ptr[1]);\n\t this.ctx.lineTo(pbr[0], pbr[1]);\n\t this.ctx.lineTo(pbl[0], pbl[1]);\n\t this.ctx.closePath();\n\t this.ctx.clip();\n\n\t this.bounds.length = 0;\n\t this.bounds.push(new jsPoint(ptl[0], ptl[1]));\n\t this.bounds.push(new jsPoint(ptr[0], ptr[1]));\n\t this.bounds.push(new jsPoint(pbr[0], pbr[1]));\n\t this.bounds.push(new jsPoint(pbl[0], pbl[1]));\n\t \n\t this.divide(0, 0, 1, 1, ptl, ptr, pbl, pbr, this.options.subdivisionLimit);\n\n\t \n\t if (this.options.wireframe) {\n\t\tthis.ctx.beginPath();\n\t\tthis.ctx.moveTo(ptl[0], ptl[1]);\n\t\tthis.ctx.lineTo(ptr[0], ptr[1]);\n\t\tthis.ctx.lineTo(pbr[0], pbr[1]);\n\t\tthis.ctx.lineTo(pbl[0], pbl[1]);\n\t\tthis.ctx.closePath();\n\t\tthis.ctx.stroke();\n\t }\n\t}\n\t//Render a projective patch.\n\tfunction divide(u1, v1, u4, v4, p1, p2, p3, p4, limit) {\n\t // See if we can still divide.\n\t if (limit) {\n\t\t// Measure patch non-affinity.\n\t\tvar d1 = [p2[0] + p3[0] - 2 * p1[0], p2[1] + p3[1] - 2 * p1[1]];\n\t\tvar d2 = [p2[0] + p3[0] - 2 * p4[0], p2[1] + p3[1] - 2 * p4[1]];\n\t\tvar d3 = [d1[0] + d2[0], d1[1] + d2[1]];\n\t\tvar r = Math.abs((d3[0] * d3[0] + d3[1] * d3[1]) / (d1[0] * d2[0] + d1[1] * d2[1]));\n\n\t\t// Measure patch area.\n\t\td1 = [p2[0] - p1[0] + p4[0] - p3[0], p2[1] - p1[1] + p4[1] - p3[1]];\n\t\td2 = [p3[0] - p1[0] + p4[0] - p2[0], p3[1] - p1[1] + p4[1] - p2[1]];\n\t\tvar area = Math.abs(d1[0] * d2[1] - d1[1] * d2[0]);\n\n\t\t// Check area > patchSize pixels (note factor 4 due to not averaging d1 and d2)\n\t\t// The non-affinity measure is used as a correction factor.\n\t\tif ((u1 == 0 && u4 == 1) || ((.25 + r * 5) * area > (this.options.patchSize * this.options.patchSize))) {\n\t\t // Calculate subdivision points (middle, top, bottom, left, right).\n\t\t var umid = (u1 + u4) / 2;\n\t\t var vmid = (v1 + v4) / 2;\n\t\t var pmid = this.transform.transformProjectiveVector([umid, vmid, 1]);\n\t\t var pt = this.transform.transformProjectiveVector([umid, v1, 1]);\n\t\t var pb = this.transform.transformProjectiveVector([umid, v4, 1]);\n\t\t var pl = this.transform.transformProjectiveVector([u1, vmid, 1]);\n\t\t var pr = this.transform.transformProjectiveVector([u4, vmid, 1]);\n\n\t\t // Subdivide.\n\t\t limit--;\n\t\t this.divide(u1, v1, umid, vmid, p1, pt, pl, pmid, limit);\n\t\t this.divide(umid, v1, u4, vmid, pt, p2, pmid, pr, limit);\n\t\t this.divide(u1, vmid, umid, v4, pl, pmid, p3, pb, limit);\n\t\t this.divide(umid, vmid, u4, v4, pmid, pr, pb, p4, limit);\n\n\t\t if (this.options.wireframe) {\n\t\t\tthis.ctx.beginPath();\n\t\t\tthis.ctx.moveTo(pt[0], pt[1]);\n\t\t\tthis.ctx.lineTo(pb[0], pb[1]);\n\t\t\tthis.ctx.stroke();\n\n\t\t\tthis.ctx.beginPath();\n\t\t\tthis.ctx.moveTo(pl[0], pl[1]);\n\t\t\tthis.ctx.lineTo(pr[0], pr[1]);\n\t\t\tthis.ctx.stroke();\n\t\t }\n\n\t\t return;\n\t\t}\n\t }\n\n\t // Render this patch.\n\t this.ctx.save();\n\n\t // Set clipping path.\n\t this.ctx.beginPath();\n\t this.ctx.moveTo(p1[0], p1[1]);\n\t this.ctx.lineTo(p2[0], p2[1]);\n\t this.ctx.lineTo(p4[0], p4[1]);\n\t this.ctx.lineTo(p3[0], p3[1]);\n\t this.ctx.closePath();\n\t //this.ctx.clip();\n\t \n\t // Get patch edge vectors.\n\t var d12 = [p2[0] - p1[0], p2[1] - p1[1]];\n\t var d24 = [p4[0] - p2[0], p4[1] - p2[1]];\n\t var d43 = [p3[0] - p4[0], p3[1] - p4[1]];\n\t var d31 = [p1[0] - p3[0], p1[1] - p3[1]];\n\t \n\t // Find the corner that encloses the most area\n\t var a1 = Math.abs(d12[0] * d31[1] - d12[1] * d31[0]);\n\t var a2 = Math.abs(d24[0] * d12[1] - d24[1] * d12[0]);\n\t var a4 = Math.abs(d43[0] * d24[1] - d43[1] * d24[0]);\n\t var a3 = Math.abs(d31[0] * d43[1] - d31[1] * d43[0]);\n\t var amax = Math.max(Math.max(a1, a2), Math.max(a3, a4));\n\t var dx = 0, dy = 0, padx = 0, pady = 0;\n\t \n\t // Align the this.transform along this corner.\n\t switch (amax) {\n\t\tcase a1:\n\t\t this.ctx.transform(d12[0], d12[1], -d31[0], -d31[1], p1[0], p1[1]);\n\t\t // Calculate 1.05 pixel padding on vector basis.\n\t\t if (u4 != 1) padx = 1.05 / Math.sqrt(d12[0] * d12[0] + d12[1] * d12[1]);\n\t\t if (v4 != 1) pady = 1.05 / Math.sqrt(d31[0] * d31[0] + d31[1] * d31[1]);\n\t\t break;\n\t\tcase a2:\n\t\t this.ctx.transform(d12[0], d12[1], d24[0], d24[1], p2[0], p2[1]);\n\t\t // Calculate 1.05 pixel padding on vector basis.\n\t\t if (u4 != 1) padx = 1.05 / Math.sqrt(d12[0] * d12[0] + d12[1] * d12[1]);\n\t\t if (v4 != 1) pady = 1.05 / Math.sqrt(d24[0] * d24[0] + d24[1] * d24[1]);\n\t\t dx = -1;\n\t\t break;\n\t\tcase a4:\n\t\t this.ctx.transform(-d43[0], -d43[1], d24[0], d24[1], p4[0], p4[1]);\n\t\t // Calculate 1.05 pixel padding on vector basis.\n\t\t if (u4 != 1) padx = 1.05 / Math.sqrt(d43[0] * d43[0] + d43[1] * d43[1]);\n\t\t if (v4 != 1) pady = 1.05 / Math.sqrt(d24[0] * d24[0] + d24[1] * d24[1]);\n\t\t dx = -1;\n\t\t dy = -1;\n\t\t break;\n\t\tcase a3:\n\t\t // Calculate 1.05 pixel padding on vector basis.\n\t\t this.ctx.transform(-d43[0], -d43[1], -d31[0], -d31[1], p3[0], p3[1]);\n\t\t if (u4 != 1) padx = 1.05 / Math.sqrt(d43[0] * d43[0] + d43[1] * d43[1]);\n\t\t if (v4 != 1) pady = 1.05 / Math.sqrt(d31[0] * d31[0] + d31[1] * d31[1]);\n\t\t dy = -1;\n\t\t break;\n\t }\n\t \n\t // Calculate image padding to match.\n\t var du = (u4 - u1);\n\t var dv = (v4 - v1);\n\t var padu = padx * du;\n\t var padv = pady * dv;\n\t this.ctx.drawImage(\n\t\timage,\n\t\tu1 * this.iw,\n\t\tv1 * this.ih,\n\t\tMath.min(u4 - u1 + padu, 1) * this.iw,\n\t\tMath.min(v4 - v1 + padv, 1) * this.ih,\n\t\tdx, dy,\n\t\t//1 + padx, 1 + pady\n\t\t1, 1\n\t );\n\n\t this.ctx.restore();\n\t}\n}","function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}","function draw(){\n\t\t// Needed to comply with Tool Delegate design pattern\n\t}","function draw() {\n\t\t\t// Adjust render settings if we switched to multiple viewports or vice versa\n\t\t\tif (medeactx.frame_flags & medeactx.FRAME_VIEWPORT_UPDATED) {\n\t\t\t\tif (medeactx.GetEnabledViewportCount()>1) {\n\t\t\t\t\tmedeactx.gl.enable(medeactx.gl.SCISSOR_TEST);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmedeactx.gl.disable(medeactx.gl.SCISSOR_TEST);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform rendering\n\t\t\tvar viewports = medeactx.GetViewports();\n\t\t\tfor(var vn = 0; vn < viewports.length; ++vn) {\n\t\t\t\tviewports[vn].Render(medeactx,dtime);\n\t\t\t}\n\t\t}","function ProceduralRenderer3(){}","function Renderer() {}","function render() {\n\tctx.beginPath();\n\tctx.fillRect(-width, -height, 2*width, 2*height);\n\tctx.beginPath();\n\tdraw(document.getElementById('num').value, -10, -50, 10, -50);\n}","renderFrame(){\n // calculate fps\n let now = Date.now();\n this.fps = Math.round( 1000/ (now-this.lastFrameTimestamp) );\n this.lastFrameTimestamp = now;\n\n // calculate average fps\n if( this.fpsLast.length < 60 ) this.fpsLast.push( this.fps );\n else{\n let sum = this.fpsLast.reduce(function(a, b) { return a + b }, 0);\n let average = sum / this.fpsLast.length;\n this.fpsAverage = Math.round( average );\n this.fpsLast= [];\n }\n\n if( this.edgeScrolling ) this.__edgeScrollingHandler();\n\n // clear viewport\n this.Context.clearRect(0, 0, this.Canvas.width/this.Scale.current, this.Canvas.height/this.Scale.current);\n //\n // OPTIMIZATIONS TOSO: render only inscreen tiles\n // render in invisible canvas and dumpmcntent whennscene is ready\n //\n // Iterate columns from right to left\n for (var column =this.Map.columns-1; column >=0 ; column--){\n // Iteraterows from top to bottom\n for (var row =0; row < this.Map.rows ; row++){\n // each cell can have multiple sprites, iterate them...\n for (var layer = 0; layer < this.Map.tileData[row][column].length; layer++){\n this.renderTile( this.Map.tileData[row][column][layer], column, row);\n\n //this.Context.globalAlpha = 0.10;\n //this.renderTile( 7, column, row );\n //this.Context.globalAlpha = 1;\n }\n }\n }\n\n if(this.showProfiler) this.renderProfiler();\n\n let focusedTile = this.getTileFromCoords(this.Mouse.x, this.Mouse.y);\n if(focusedTile){\n this.Context.globalAlpha = 0.40;\n this.renderTile( 7, focusedTile.column, focusedTile.row );\n this.Context.globalAlpha = 1;\n }\n }","draw() {\n var c2 = document.getElementById(this.canvasId);\n\n if (c2 instanceof HTMLCanvasElement) {\n var ctx2 = c2.getContext('2d');\n }\n else {\n throw 'c2 is not a canvas';\n }\n\n var c1 = document.createElement('canvas');\n\n if (c1 instanceof HTMLCanvasElement) {\n c1.width = this.size;\n c1.height = this.size;\n var ctx1 = c1.getContext('2d');\n\n if (ctx1 === null || ctx1 === undefined) {\n throw 'ctx1 is null';\n }\n\n var pixelData1 = new Array(this.size * this.size);\n\n var imgData = ctx1.createImageData(this.size, this.size);\n for (var i = 0; i < this.size; i++) {\n for (var j = 0; j < this.size; j++) {\n var k = j * this.size;\n\n var position = this.positions[i + k];\n var pixelData = position.getPixelData();\n pixelData1[i + k] = {};\n\n // Get pixel data for each pass\n // foreach pass\n // px = pass.getPixelData(position, pixelData, i + k);\n $(this.passes).each(function(i : number, pass : WP.WorldPass) {\n pass.getPixelData(position);\n pixelData1[i + k].r = pixelData.r;\n pixelData1[i + k].g = pixelData.g;\n pixelData1[i + k].b = pixelData.b;\n });\n\n }\n }\n console.log(pixelData);\n\n for (var i = 0; i < imgData.data.length; i+= 4) {\n var j = i/4;\n\n var r = pixelData1[j].r;\n if (r != null) {\n imgData.data[i] = r;\n }\n var g = pixelData1[j].g;\n if (g != null) {\n imgData.data[i+1] = g;\n }\n var b = pixelData1[j].b;\n if (b != null) {\n imgData.data[i+2] = b;\n }\n\n imgData.data[i+3] = 255;\n\n }\n ctx1.putImageData(imgData, 0, 0);\n\n //ctx2.mozImageSmoothingEnabled = false;\n //ctx2.webkitImageSmoothingEnabled = false;\n //ctx2.msImageSmoothingEnabled = false;\n //ctx2.imageSmoothingEnabled = false;\n if (ctx2 instanceof CanvasRenderingContext2D) {\n ctx2.drawImage(c1, 0, 0, this.size * 2, this.size * 2);\n }\n else {\n throw 'ctx2 is not a canvas rendering context';\n }\n\n }\n\n }","function draw() {\n\tvar meshes = io.meshes();\n\tvar fibres = io.fibres();\n\t\n\tgl.enable(gl.DEPTH_TEST);\n\tgl.depthFunc(gl.LEQUAL);\n gl.clearDepth(1);\n \n var peels = mygl.peels();\n var peelFramebuffer = mygl.peelFramebuffer();\n //***************************************************************************************************\n //\n // Pass 1 - draw opaque objects\n //\n //***************************************************************************************************/\n\tvariables.webgl.minorMode = 4;\n\t// set render target to C0\n\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['C0'], 0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n if ( scene.getValue( 'showSlices' ) ) {\n\t\tdrawSlices();\n\t}\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"mesh\" && ( this.display || this.display2 ) && this.transparency == 1.0 ) {\n\t\t\tdrawMesh(this);\n\t\t}\n\t});\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"texmesh\" && ( this.display || this.display2 ) && this.transparency == 1.0 ) {\n\t\t\tdrawTexMesh(this);\n\t\t}\n\t});\n\t\n\t$.each(fibres, function() {\n\t\tif (( this.display || this.display2 ) && this.transparency == 1.0 ) {\n\t\t\tdrawFibers(this);\n\t\t}\n\t});\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\n\tvariables.webgl.minorMode = 5;\n\t// set render target to D0\n\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D0'], 0);\n gl.clearColor(variables.backgroundColor[0], variables.backgroundColor[1], variables.backgroundColor[2], 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n \n\tif ( scene.getValue( 'showSlices' ) ) {\n\t\tdrawSlices();\n\t}\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"mesh\" && ( this.display || this.display2 ) && this.transparency == 1.0 ) {\n\t\t\tdrawMeshTransp(this);\n\t\t}\n\t});\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"texmesh\" && ( this.display || this.display2 ) && this.transparency == 1.0 ) {\n\t\t\tdrawTexMeshTransp(this);\n\t\t}\n\t});\n\t\n\t$.each(fibres, function() {\n\t\tif (( this.display || this.display2 ) && this.transparency == 1.0 ) {\n\t\t\tdrawFibersTransp(this);\n\t\t}\n\t});\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\n\t//***************************************************************************************************\n //\n // Pass 2\n //\n //***************************************************************************************************/\n\tvariables.webgl.minorMode = 9;\n\t// set render target to C1\n\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['C1'], 0);\n gl.clearColor(variables.backgroundColor[0], variables.backgroundColor[1], variables.backgroundColor[2], 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"mesh\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawMesh(this);\n\t\t}\n\t});\n\n\t$.each(fibres, function() {\n\t\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawFibers(this);\n\t\t}\n\t});\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\n\tvariables.webgl.minorMode = 6;\n\t// set render target to D1\n\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D1'], 0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"mesh\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawMeshTransp(this);\n\t\t}\n\t});\n\t$.each(fibres, function() {\n\t\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawFibersTransp(this);\n\t\t}\n\t});\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\n\t//***************************************************************************************************\n //\n // Pass 3\n //\n //***************************************************************************************************/\n\tvariables.webgl.minorMode = 10;\n\t// set render target to C2\n\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['C2'], 0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"mesh\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawMesh(this);\n\t\t}\n\t});\n\t\n\t$.each(fibres, function() {\n\t\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawFibers(this);\n\t\t}\n\t});\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\n\tvariables.webgl.minorMode = 7;\n\t// set render target to D2\n\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D2'], 0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"mesh\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawMeshTransp(this);\n\t\t}\n\t});\n\t$.each(fibres, function() {\n\t\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawFibersTransp(this);\n\t\t}\n\t});\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\n\t//***************************************************************************************************\n //\n // Pass 4\n //\n //***************************************************************************************************/\n\tvariables.webgl.minorMode = 11;\n\t// set render target to C3\n\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['C3'], 0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"mesh\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawMesh(this);\n\t\t}\n\t});\n\t\n\t\n\t$.each(fibres, function() {\n\t\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawFibers(this);\n\t\t}\n\t});\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\n\tvariables.webgl.minorMode = 8;\n\t// set render target to D1b\n\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D1'], 0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"mesh\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawMeshTransp(this);\n\t\t}\n\t});\n\t$.each(fibres, function() {\n\t\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawFibersTransp(this);\n\t\t}\n\t});\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\n\t//***************************************************************************************************\n //\n // Pass 5\n //\n //***************************************************************************************************/\n\tvariables.webgl.minorMode = 12;\n\t// set render target to C3\n\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D2'], 0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\t\n\t$.each(meshes, function() {\n\t\tif ( this.type === \"mesh\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawMesh(this);\n\t\t}\n\t});\n\t$.each(fibres, function() {\n\t\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\n\t\t\tdrawFibers(this);\n\t\t}\n\t});\n\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\t\n\t\n\t//***************************************************************************************************\n //\n // Pass 6 - merge previous results and render on quad\n //\n //***************************************************************************************************/\t\n\tgl.useProgram(shaders['merge']);\n\tgl.enableVertexAttribArray(shaders['merge'].aVertexPosition);\n\t\n\tvar posBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, posBuffer);\n\t\n\tvar vertices = [ -gl.viewportWidth, -10, 0, \n\t gl.viewportWidth, -10, 0,\n\t gl.viewportWidth, gl.viewportHeight, 0,\n\t -gl.viewportWidth0, gl.viewportHeight, 0 ];\n\t\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n\tgl.vertexAttribPointer(shaders['merge'].aVertexPosition, 3, gl.FLOAT, false, 0, 0);\n\tgl.uniform2f(shaders['merge'].uCanvasSize, gl.viewportWidth, gl.viewportHeight);\n\t\n\tgl.activeTexture( gl.TEXTURE2 );\n\tgl.bindTexture( gl.TEXTURE_2D, peels['C0'] );\n\tgl.uniform1i(shaders['merge'].C0, 2);\n\t\n\tgl.activeTexture( gl.TEXTURE6 );\n\tgl.bindTexture( gl.TEXTURE_2D, peels['C1'] );\n\tgl.uniform1i(shaders['merge'].C1, 6);\n\t\n\tgl.activeTexture( gl.TEXTURE7 );\n\tgl.bindTexture( gl.TEXTURE_2D, peels['C2'] );\n\tgl.uniform1i(shaders['merge'].C2, 7);\n\t\n\tgl.activeTexture( gl.TEXTURE8 );\n\tgl.bindTexture( gl.TEXTURE_2D, peels['C3'] );\n\tgl.uniform1i(shaders['merge'].C3, 8);\n\t\n\tgl.activeTexture( gl.TEXTURE5 );\n\tgl.bindTexture( gl.TEXTURE_2D, peels['D2'] );\n\tgl.uniform1i(shaders['merge'].D2, 5);\n\t\n\tvar vertexIndexBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vertexIndexBuffer);\n\tvar vertexIndices = [ 0, 1, 2, 0, 2, 3 ];\n\tgl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(vertexIndices), gl.STATIC_DRAW);\n\n\tgl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);\n}","function Draw_Init(obj)\r\n{\r\n\tvar canvas3d = document.getElementById(\"ID_CANVAS_3D\");\r\n\tcanvas3d.setAttribute(\"hidden\",\"\");\r\n\tCreateCanvas();\r\n if(obj != undefined)\r\n {\r\n BoundBoxs =[];\r\n // ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n //ctx.clearRect(0,0,obj.width,obj.height);\r\n// m_worldPos.x =0;\r\n// m_worldPos.y =0;\r\n// m_mouseOldPos.x = 0;\r\n// m_mouseOldPos.y = 0;\r\n mousewheelevt=(/Firefox/i.test(navigator.userAgent))? \"DOMMouseScroll\" : \"mousewheel\"\r\n \r\n if (canvas.attachEvent) //if IE (and Opera depending on user setting)\r\n {\r\n canvas.attachEvent(\"on\"+mousewheelevt, onmousewheel);\r\n }\r\n else if (canvas.addEventListener) //WC3 browsers\r\n {\r\n canvas.addEventListener(mousewheelevt, onmousewheel, false);\r\n }\r\n \r\n// m_bAutoscale =false;\r\n //캔버스 사이즈 와 svg 사이즈를 비교한다\r\n //큰축을 기준으로 스케일을 만든다.\r\n \r\n// m_wordldScale.x =1;\r\n// m_wordldScale.y=1;\r\n }\r\n}","function renderCanvas()\n {\n if (drawing)\n {\n context.moveTo(lastPos.x, lastPos.y);\n context.lineTo(mousePos.x, mousePos.y);\n context.stroke();\n lastPos = mousePos;\n }\n }","function updateDraw() {\n terrain.draw();\n car.draw();\n colorText(mouseX, mouseY, \"(\"+Math.floor(mouseX / 120)+\", \"+Math.floor(mouseY / 80)+\")\", 12, 'white');\n}","display() {\n strokeWeight(1);\n stroke(200);\n fill(200);\n beginShape();\n for (let i = 0; i < this.surface.length; i++) {\n let v = scaleToPixels(this.surface[i]);\n vertex(v.x, v.y);\n }\n vertex(width, height);\n vertex(0, height);\n endShape(CLOSE);\n }","draw() {\n\n }","function render() {\r\n // Dessine une frame\r\n drawFrame();\r\n\r\n // Affiche le niveau\r\n drawLevel();\r\n\r\n //Dessine l'angle de la souris\r\n renderMouseAngle();\r\n\r\n // Dessine le player\r\n drawPlayer();\r\n\r\n }","function draw() {\r\n \r\n}","function cw_drawScreen() {\n ctx.clearRect(0,0,canvas.width,canvas.height);\n ctx.save();\n ctx.translate(400, 200);\n ctx.scale(1.5*zoom, -zoom);\n cw_drawFloor(floorBody);\n //cw_drawFloor(boxBody);\n cw_drawCar(carBody);\n ctx.restore();\n}","function Main() {\r\n \r\n//....................................Set up viewport\r\n canvas1 = document.getElementById(\"canvas1\");\r\n\r\n //disable right click context menu on canvas\r\n canvas1.oncontextmenu=function() {return false;};\r\n\r\n GL = WebGLUtils.setupWebGL(canvas1, { depth: true, preserveDrawingBuffer: true });\r\n camera=new CCamera();\r\n\r\n line=new CLine(GL, canvas1);\r\n sprite=new CSprite(GL);\r\n glsel=new SelectionEngine(GL);\r\n \r\n//.....................................Resizing mechanics\r\n width = $(\"#candiv\").innerWidth();\r\n height = $(\"#candiv\").innerHeight(); \r\n\r\n canvas1.width=width;\r\n canvas1.height=height;\r\n\r\n\r\n $(window).resize(function () {\r\n width = $(\"#candiv\").innerWidth();\r\n height = $(\"#candiv\").innerHeight();\r\n\r\n canvas1.width=width;\r\n canvas1.height=height;\r\n });\r\n\r\n//........................................Mouse interactions\r\n $(canvas1).mousedown(OnMouseDown);\r\n $(canvas1).mouseup(OnMouseUp);\r\n $(canvas1).mousemove(OnMouseMove);\r\n\r\n\r\n//.....................................Set Up Shaders\r\n SetUpShaders(GL);\r\n SetUpUserInterface(GL);\r\n//..........................................Start rendering recurcion\r\n CreateUI();\r\n setInterval(function(){RequestUpdate();},500);\r\n OnFrameUpdate();\r\n\r\n}","function draw() {\n \n}","draw() {\n }","function draw() {\n \n}","function Renderer(args) {\n\n\n}","renderSSAO(scene, camera, { clear = true, draw = true } = { clear: true, draw: true }) {\n if (clear) {\n this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight)\n this.imgData = this.ctx.getImageData(0, 0, this.canvasWidth, this.canvasHeight)\n this.data = this.imgData.data\n this.zBuffer.fill(-Infinity)\n }\n\n let { imgData, data } = this\n\n // setup\n let { model, light } = scene\n let { shader } = model\n let { viewportTr } = camera\n\n shader.updateUniform({\n uniM: camera.uniM,\n lightDir: light.dir,\n })\n\n let renderingTime = new Date()\n let coords = []\n\n let width = camera.vW\n let height = camera.vH\n\n // first pass, using depth shader\n\n for (let fi = 0; fi < model.faces.length; fi++) {\n for (let vi = 0; vi < 3; vi++) {\n coords[vi] = shader.vertex(fi, vi)\n }\n triangleWithZBuffer(...coords, shader, this.zBuffer, data, this.canvasWidth, viewportTr, draw)\n }\n\n // second pass\n\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n if (this.zBuffer[(height - 1 - y) * width + x] < -1e5) continue\n\n let bufferIdx = (width - 1 - y) * width + x\n\n let total = 0\n // - 1e-4 for preventing extra round due to the float type\n // from ssloy's\n for (let deg = 0; deg < 2 * Math.PI - 1e-4; deg += Math.PI / 4) {\n let dx = Math.round(Math.cos(deg))\n let dy = Math.round(Math.sin(deg))\n\n let tx = x + dx\n let ty = y + dy\n let tIdx = (width - 1 - ty) * width + tx\n let diffZ = this.zBuffer[tIdx] - this.zBuffer[bufferIdx]\n\n if (diffZ < 0) {\n total += Math.PI / 2\n continue\n }\n let maxElevationAngle = Math.atan(diffZ / Math.sqrt(dx ** 2 + dy ** 2))\n total += Math.PI / 2 - maxElevationAngle\n }\n\n total /= Math.PI * 4\n total *= 255\n\n // total = Math.pow(total, 100) * 255\n data[bufferIdx * 4 + 0] = total\n data[bufferIdx * 4 + 1] = total\n data[bufferIdx * 4 + 2] = total\n }\n }\n\n console.log(\"render: \", new Date() - renderingTime, \"ms\")\n this.ctx.putImageData(imgData, 0, 0)\n }","draw(){\n push();\n\n beginShape();\n texture(this.texture);\n textureWrap(MIRROR);\n //draw as a rectangle, divide by 2 for width and height\n vertex(this.getX() - (this.w/2.0), this.getY() - (this.h/2.0),CENTER,TOP_EDGE); //bottom right, CCW, Need UV coordinates for texture mapping\n vertex(this.getX() + (this.w/2.0), this.getY() - (this.h/2.0),RIGHT_EDGE,TOP_EDGE); //for some reason this starts on bottom right?\n vertex(this.getX() + (this.w/2.0), this.getY() + (this.h/2.0),RIGHT_EDGE,CENTER);\n vertex(this.getX() - (this.w/2.0), this.getY() + (this.h/2.0),CENTER,CENTER);\n\n endShape(CLOSE);\n\n pop();\n }","function game_draw() {\r\n /*\r\n\tthis.BackSurfaceDraw();\r\n\r\n\tobCtrl.draw();\r\n\r\n\tthis.FrontSurfaceDraw();\r\n\r\n\treturn;\r\n */\r\n\t //\t work2.putImageTransform(tex_bg, 0, scroll_y - (480 * (1 - scrollsw)), 1, 0, 0, -1);\r\n\r\n\t scenechange = true;\r\n \r\n\t if ((scroll_x != dev.gs.world_x) || (scroll_y != dev.gs.world_y)) {\r\n\r\n\t scenechange = false;\r\n\r\n\t scroll_x = dev.gs.world_x;\r\n\t scroll_y = dev.gs.world_y;\r\n\t }\r\n\t \r\n //scenechange = false;\r\n\t if (!scenechange) {\r\n\r\n\t for (var i in mapChip) {\r\n\t var mc = mapChip[i];\r\n\r\n\t //\t if ((dev.gs.in_view(mc.x, mc.y)) || (dev.gs.in_view(mc.x + mc.w, mc.y)) ||\r\n\t // (dev.gs.in_view(mc.x, mc.y + mc.h)) || (dev.gs.in_view(mc.x + mc.w, mc.y + mc.h))||\r\n\t // (dev.gs.in_view(mc.x + mc.w/2, mc.y + mc.h/2))) {\r\n\r\n\t if (dev.gs.in_stage_range(mc.x, mc.y, mc.w, mc.h)) {\r\n\t mc.view = true;//視界に入っている(当たり判定有効扱いの為のフラグ)\r\n\t var w = dev.gs.worldtoView(mc.x, mc.y);\r\n\r\n\t //work2.putchr(Number(mc.type).toString(16), w.x, w.y);\r\n\r\n\t if (mc.visible) {//表示するマップチップ(当たり判定用で表示しないものもあるため)\r\n\t var wfg = false;\r\n\t if (mc.type == 11) wfg = true;\r\n\t //if (Boolean(tex_bg[mc.no])) {\r\n\t if (Boolean(bgData[mc.no])) {\r\n\t if (wfg) {\r\n\t forgroundBG.putPattern(tex_bg, bgData[mc.no], w.x, w.y - 24, mc.w, mc.h);\r\n\t //work2.putPattern(tex_bg, bgData[mc.no], w.x, w.y, mc.w, mc.h);\r\n\t } else {\r\n\t work2.putPattern(tex_bg, bgData[mc.no], w.x, w.y, mc.w, mc.h);\r\n\t }\r\n\r\n\t //work2.putchr(Number(mc.no).toString(), w.x, w.y);\r\n\t } else {\r\n\t var cl = {}\r\n\t cl.x = w.x;\r\n\t cl.y = w.y;\r\n\t cl.w = mc.w;\r\n\t cl.h = mc.h;\r\n\r\n\t cl.draw = function (device) {\r\n\t device.beginPath();\r\n\r\n\t device.strokeStyle = \"green\";\r\n\t device.lineWidth = 1;\r\n\t device.rect(this.x, this.y, this.w, this.h);\r\n\t device.stroke();\r\n\t }\r\n\r\n\t work2.putFunc(cl);\r\n\t //work2.putchr(Number(mc.no).toString(), w.x, w.y);\r\n\t }\r\n\t }\r\n\t //壁の当たり判定有無確認用のデバックコード\r\n /*\r\n\t if (mc.c) {\r\n\t var cl = {}\r\n\t cl.x = w.x;\r\n\t cl.y = w.y;\r\n\t cl.w = mc.w;\r\n\t cl.h = mc.h;\r\n\r\n\t cl.draw = function (device) {\r\n\t device.beginPath();\r\n\r\n\t device.strokeStyle = \"green\";\r\n\t device.lineWidth = 1;\r\n\t device.rect(this.x, this.y, this.w, this.h);\r\n\t device.stroke();\r\n\t }\r\n\r\n\t work2.putFunc(cl);\r\n\r\n\t }\r\n */\r\n\t // work2.putchr(Number(mc.type).toString(16), w.x, w.y);\r\n\t } else {\r\n\t mc.view = false;\r\n\t }\r\n\t //\t work2.putImage(tex_bg, 0, scroll_y - 480);\r\n\t //\t work2.putImage(tex_bg, 0, scroll_y);\r\n\t }\r\n\r\n\t //obCtrl.drawPoint(forgroundBG, lampf);//Forgroundへ表示\r\n\r\n\t //縮小マップ枠\r\n /*\r\n\t var cl = {}\r\n\t cl.draw = function (device) {\r\n\t device.beginPath();\r\n\t device.fillStyle = \"rgba(0,0,0,0.3)\";\r\n\t device.fillRect(dev.layout.map_x, dev.layout.map_y, 150, 150);\r\n\t }\r\n */\r\n \r\n\t forgroundBG.putFunc(SubmapframeDraw);\r\n\r\n\t obCtrl.drawPoint(forgroundBG, lampf); //Forgroundへ表示\r\n\r\n\t //一番下の行消す(clipすんのがいいかも\r\n /*\r\n\t var cl = {}\r\n\t cl.draw = function (device) {\r\n\t device.beginPath();\r\n\t device.fillStyle = \"rgba(0,0,0,0.5)\";\r\n\t device.fillRect(0, 480 - 36, 640 - 13* 13, 36);\r\n\t }\r\n */\r\n\t forgroundBG.putFunc(ButtomlineBackgroundDraw);\r\n \r\n work2.clear(\"black\");\r\n\t work2.draw();\r\n\t work2.reset();\r\n\r\n\t forgroundBG.clear();\r\n\t forgroundBG.draw();\r\n\t forgroundBG.reset();\r\n }\r\n\r\n //==この↑は背景描画\r\n\t obCtrl.draw();\r\n//\t obCtrl.drawPoint(work);\r\n\r\n\t //== ここから文字表示画面(出来るだけ書き換えを少なくする)\r\n\t //プライオリティ最前面の画面追加したので\r\n\t var scdispview = false;\r\n \r\n\t fdrawcnt++;\r\n\t if ((fdrawcnt % 6) == 0) {\r\n\t fdrawcnt = 0;\r\n\t scdispview = true;\r\n\t }\r\n \r\n\t //var scdispview = true;\r\n\r\n\t if (scdispview) {\r\n\r\n\t //work3.putchr(\"a\", mapsc.flame / 20, mapsc.flame / 20);\r\n\r\n\t //work3.clear();\r\n\t //work3.draw();\r\n\t //work3.reset();\r\n\r\n\t var wtxt = [];\r\n\t /*\r\n\t if (!lampf) {\r\n\t work3.fill(0, 0, work3.cw, work3.ch, \"blue\"); // , \"darkblue\");\r\n\t } else {\r\n\t work3.fill(0, 0, work3.cw, work3.ch); // , \"darkblue\");\r\n\t }\r\n\t */\r\n\r\n\t work3.fill(dev.layout.hiscore_x + 12 * 6, dev.layout.hiscore_y, 12 * 7, 32); // , \"darkblue\");\r\n\r\n\t wt = ehighscore.read(state.Result.highscore);\r\n\t work3.putchr(\"Hi-Sc:\" + wt, dev.layout.hiscore_x, dev.layout.hiscore_y);\r\n\r\n\t wt = escore.read(obCtrl.score);\r\n\t work3.putchr(\"Score:\" + wt, dev.layout.score_x, dev.layout.score_y);\r\n\r\n\t //残機表示\r\n\t var zc = 2 - dead_cnt;\r\n\r\n\t if (zc < 3) {\r\n\t for (var i = 0; i < 2 - dead_cnt; i++) {\r\n\t work3.put(\"Mayura1\", dev.layout.zanki_x + i * 32, dev.layout.zanki_y);\r\n\t }\r\n\t } else {\r\n\t work3.put(\"Mayura1\", dev.layout.zanki_x, dev.layout.zanki_y);\r\n\t work3.putchr(\"x\" + zc, dev.layout.zanki_x + 16, dev.layout.zanki_y);\r\n\t }\r\n\r\n\t //ball表示\r\n\t if (Boolean(obCtrl.item[20])) {\r\n\t var n = obCtrl.item[20];\r\n\t if (n <= 8) {\r\n\t //n = 16;\r\n\r\n\t for (var i = 0; i < n; i++) {\r\n\t work3.put(\"Ball1\",\r\n dev.layout.zanki_x + i * 20 + 288, dev.layout.zanki_y - 8);\r\n\t }\r\n\t } else {\r\n\t work3.put(\"Ball1\",\r\n dev.layout.zanki_x + 288, dev.layout.zanki_y - 8);\r\n\r\n\t work3.putchr8(\"x\" + n, dev.layout.zanki_x + 288 + 10, dev.layout.zanki_y - 12);\r\n\t }\r\n\t }\r\n\r\n\t //取得アイテム表示\r\n\t if (Boolean(obCtrl.itemstack)) {\r\n\r\n\t var wchr = { 20: \"Ball1\", 23: \"BallB1\", 24: \"BallS1\", 25: \"BallL1\" }\r\n\t var witem = [];\r\n\r\n\t for (var i in obCtrl.itemstack) {\r\n\t var w = obCtrl.itemstack[i];\r\n\t witem.push(w);\r\n\t }\r\n\r\n\t work3.putchr8(\"[X]\", dev.layout.zanki_x + 132 - 16, dev.layout.zanki_y - 16);\r\n\t n = witem.length;\r\n\r\n\t if (n >= 18) n = 18;\r\n\t //if (n >= 7) n = 7;\r\n\r\n\t for (var i = 0; i < n; i++) {\r\n\r\n\t if (i == 0) {\r\n\t work3.put(wchr[witem[witem.length - 1 - i]],\r\n dev.layout.zanki_x + i * 20 + 132, dev.layout.zanki_y);\r\n\t //640 - (12 * 12), 479 - 32 + 5);\r\n\t } else {\r\n\t work3.put(wchr[witem[witem.length - 1 - i]],\r\n dev.layout.zanki_x + i * 20 + 136, dev.layout.zanki_y + 8);\r\n\t }\r\n\t }\r\n\r\n\t }\r\n\r\n\t n = 0;\r\n\t if (Boolean(obCtrl.item[22])) {\r\n\t n = obCtrl.item[22];\r\n\t }\r\n\t if (n > 0) work3.put(\"Key\", dev.layout.zanki_x + 64, dev.layout.zanki_y);\r\n\r\n\t var wweapon = [\"Wand\", \"Knife\", \"Axe\", \"Boom\", \"Spear\"];\r\n\r\n\t if (!Boolean(state.Game.player.weapon)) state.Game.player.weapon = 0;\r\n\r\n\t work3.putchr8(\"[Z]\", dev.layout.zanki_x + 96 - 16, dev.layout.zanki_y - 16);\r\n\t work3.put(wweapon[state.Game.player.weapon], dev.layout.zanki_x + 96, dev.layout.zanki_y);\r\n\r\n\t work3.putchr(\"Floor \" + mapsc.stage, dev.layout.stage_x, dev.layout.stage_y);\r\n\r\n\t work3.putchr(\"Time:\" + Math.floor((7200 - mapsc.flame) / 6), dev.layout.time_x, dev.layout.time_y);\r\n\r\n\t //work3.putchr8(\"ITEM\", dev.layout.hp_x , dev.layout.hp_y - 40);\r\n\r\n\t var w_hp = (state.Game.player.hp > 0) ? state.Game.player.hp : 0;\r\n\r\n\t HpbarDraw.hp = w_hp; \r\n HpbarDraw.mhp = state.Game.player.maxhp;\r\n HpbarDraw.br = state.Game.player.barrier;\r\n\t //var cl = { hp: w_hp, mhp: state.Game.player.maxhp, br: state.Game.player.barrier }\r\n /*\r\n\t cl.draw = function (device) {\r\n\t device.beginPath();\r\n\t device.fillStyle = (this.br)?\"skyblue\":\"limegreen\";\r\n\t device.lineWidth = 1;\r\n\t device.fillRect(dev.layout.hp_x + 1, dev.layout.hp_y + 1, this.hp, 14);\r\n\t device.stroke();\r\n\r\n\t device.beginPath();\r\n\t device.strokeStyle = \"white\"; ;\r\n\t device.lineWidth = 1;\r\n\t device.rect(dev.layout.hp_x, dev.layout.hp_y, this.mhp, 15);\r\n\t device.stroke();\r\n\t }\r\n */\r\n\t work3.putFunc(HpbarDraw);\r\n \r\n\t //work3.putchr(w_st, dev.layout.hp_x + 16 - w_st.length * 12, dev.layout.hp_y - 12);\r\n var wst = \"HP:\" + w_hp + \"/\" + state.Game.player.maxhp;\r\n\r\n if (state.Game.player.barrier) {\r\n wst = \"!!SHIELD!!\"; \r\n }\r\n\t work3.putchr8(wst, dev.layout.hp_x + 8, dev.layout.hp_y + 4);\r\n\t }\r\n\r\n if (obCtrl.interrapt && (obCtrl.SIGNAL == 1)) {\r\n work3.putchr(\" == PAUSE ==\", 320 - 50, 200);\r\n work3.putchr(\"Push key or [Space] \", 320 - 100, 220);\r\n work3.putchr(\" Return game.\", 320 - 50, 240);\r\n work3.putchr(\"Push key /\", 320 - 100, 260);\r\n work3.putchr(\"Save and Quit.\", 320 - 50, 280); \r\n\r\n } else {\r\n work3.fill(320 - 100, 200, 12 * 24, 20 * 5);\r\n }\r\n\r\n //work.putchr(dev.sound.info() + \".\" + dev.sound.running(), 320 - 50, 260);\r\n \r\n\r\n //debug true の場合以下表示\r\n if (state.Config.debug) {\r\n var wtxt = [];\r\n\r\n\t wtxt.push(\"o:\" + obCtrl.cnt() + \"/\" + obCtrl.num() + \"/\" + obCtrl.nonmove);\r\n\t wtxt.push(\"f:\" + mapsc.flame);\r\n\r\n\t if (obCtrl.interrapt) {\r\n\t wtxt.push(\"interrapt:\" + obCtrl.SIGNAL);\r\n\t } else {\r\n\t wtxt.push(\"running:\" + obCtrl.SIGNAL);\r\n\t }\r\n\r\n\t for (i in obCtrl.item) {\r\n\t wtxt.push(\"item[\" + i + \"]:\" + obCtrl.item[i]);\r\n\t }\r\n /*\r\n\t for (i in obCtrl.combo) {\r\n\t wtxt.push(\"combo[\" + i + \"]:\" + obCtrl.combo[i]);\r\n\t }\r\n\r\n\t for (i in obCtrl.combomax) {\r\n\t wtxt.push(\"combomax[\" + i + \"]:\" + obCtrl.combomax[i]);\r\n\t }\r\n */\r\n\t var n1 = 0;\r\n\t for (i in obCtrl.total) {\r\n\t if (i == 2) n1 = obCtrl.total[i];\r\n\t }\r\n\r\n\t var n2 = 1;\r\n\t for (i in obCtrl.obCount) {\r\n\t if (i == 2) n2 = obCtrl.obCount[i];\r\n\t }\r\n\t //wtxt.push(\"rate:\" + Math.floor((n1 / n2) * 100) + \"par\");\r\n\r\n\t //wtxt.push(\"hidan:\" + obCtrl.hidan);\r\n\r\n\t wtxt.push(\"wx,wy:\" + Math.floor(dev.gs.world_x) + \",\" + Math.floor(dev.gs.world_y));\r\n\r\n\t wtxt.push(\"play:\" + Math.floor(dev.sound.info()) + \".\" + dev.sound.running() );\r\n\r\n\t for (var s in wtxt) {\r\n\t work.putchr8(wtxt[s], dev.layout.status_x, dev.layout.status_y + 8 * s);\r\n\t }\r\n\t }\r\n\r\n\t if (scdispview) {\r\n//\t work3.clear();\r\n\t //\t work3.fill(480, 0, 5, 480, \"blue\");\r\n\t work3.fill(0, 480-48, 640, 48);//, \"darkblue\");\r\n\t work3.draw();\r\n\t work3.reset();\r\n\t }\r\n\r\n\r\n\t //mapdisp = false;\r\n\t if (!mapdisp) {\r\n\r\n\t work3.fill(dev.layout.map_x, dev.layout.map_y, 150, 150);\r\n\r\n\t var cl = {};\r\n\r\n\t cl.mcp = mapChip;\r\n\r\n\t cl.draw = function (device) {\r\n\r\n\t for (var i = 0, loopend = this.mcp.length; i < loopend; i++) {\r\n\r\n\t var mc = this.mcp[i];\r\n\t if ((mc.visible) && ((mc.type == 11) || (mc.type == 12))) {\r\n\t device.beginPath();\r\n\t device.strokeStyle = (mc.type == 12) ? \"orange\" : \"blue\";\r\n\t device.lineWidth = 1;\r\n\t device.rect(dev.layout.map_x + mc.x / 20, dev.layout.map_y + mc.y / 20, 2, 2);\r\n\t device.stroke();\r\n\t }\r\n\t }\r\n\r\n\t }\r\n\t work3.putFunc(cl);\r\n\r\n /*\r\n\t for (var i in mapChip) {\r\n\t var mc = mapChip[i];\r\n\t if ((mc.visible) && ((mc.type == 11) || (mc.type == 12))) {//表示するマップチップ(当たり判定用で表示しないものもあるため)\r\n\r\n\t var cl = {}\r\n\t cl.x = mc.x / 20;\r\n\t cl.y = mc.y / 20;\r\n\t cl.w = 1; //mc.w / 20;\r\n\t cl.h = 1; //mc.h / 20;\r\n\t cl.c = (mc.type == 12) ? \"orange\" : \"blue\";\r\n\r\n\t cl.draw = function (device) {\r\n\t device.beginPath();\r\n\t device.strokeStyle = this.c;\r\n\t device.lineWidth = 1;\r\n\t device.rect(dev.layout.map_x + this.x, dev.layout.map_y + this.y, this.w, this.h);\r\n\t device.stroke();\r\n\t }\r\n\r\n\t work3.putFunc(cl);\r\n\t }\r\n\t }\r\n */\r\n\t mapdisp = true;\r\n\t } \r\n \r\n\r\n\t}","function draw() {\n\n}","function draw() {\n\n}","function draw() {\n\n}","function draw() {\n\n}","function draw() {\n\n}","function draw() {\n\n}","function draw() {\n\n}","function draw() {\n\n}","function draw() {\n\n}","function draw() {\n\n}","function draw() {\n\n}","function draw(){\t\n\trequestAnimationFrame(draw); //allows for maximum use of the hardwares potential\n}","function render() {\r\n\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\tgl.drawArrays(gl.TRIANGLES, 0, 9);\r\n}","function ProceduralRenderer3() { }","function ProceduralRenderer3() { }","render() {\n render(offscreenCanvas);\n }","function renderCanvas2() {\n\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n}","function draw() {\n \n\n \n}","doDraw(offset) {\n super.doDraw(offset);\n let pp = [this.pos[0] - 64 - offset, this.pos[1] - 128];\n let image = \"gobbo-\";\n if (this.dir == 1){\n image+=\"r\";\n } else {\n image+=\"l\";\n }\n drawImage(Graphics[image], pp);\n \n }","function draw() {\n \n\tvar red = 0; // Color value defined\n\tvar green = 1;\n\tvar blue = 2;\n\tvar alpha = 3;\n\n\tvar iter = 81;\n\n\tif(os){ // if oscillation is set true by oscillate(), then do oscilation of \n\t\t\t\t\t\t\t\t\t\t// julia set by using sin(angle) to set real c and cos(angle) to set imaginary c.\n\t\tcx =0.7885*cos(angle);\n\t\tcy =0.7785*sin(angle);\n\t\tangle+= 0.04;\n\t}\n\n\tvar zy = 0.0;\n\tvar zx = 0.0;\n\n loadPixels(); \n\n\n // Interate through the window demision. 'width' and 'hieght' are the with and height of our window\n for (var y = 0; y < height; y++) {\n\n for (var x = 0; x < width; x++) {\n\n\t zy = map(y, 0, height, min_i , max_i); // use map() to scale the range so it will be from \n\t\tzx = map(x, 0, width, minReal, maxReal); // minReal to maxReal and min_i to max_i\n\t\t\n\t\tif(!os && !clicked){ // if neither of 'os' or 'clicked' is true, cy and cx (real and imaginary c) will be the scale of zy and zx.\n\t\t\tcy = zy;\n\t\t\tcx = zx;\n\t\t}\n\t\t\n var counter= 0;\n\n\t\t// calculate the mandelbrot / julia set using:\n\t\t// mandelbrot: f(z) = z^2 + c where c is changing\n\t\t// julia: f(z) = z^2 + c where c is constant\n\t\twhile ((zx * zx + (zy * zy) < 16.0) && counter < iter) {\n\n\t\t\tvar zx_temp = zx * zx - zy * zy +cx\n\n\t\t\tzy = 2.0 * zx * zy+cy;\n\t\t\tzx = zx_temp;\n\n\t\t\t++counter;\n\t\t}\n\t\t\n\t var color = 255;\n\n\t\tif(counter !=iter){\n\t\t\tcolor = counter;\n\t\t}\n\n var pix = (x + y * width) * 4;\n\n pixels[pix + red] = sin(color)%255; // set pixels\n pixels[pix + green] = color;\n pixels[pix + blue] = color;\n\n pixels[pix+alpha] = 255;\n }\n }\n\n updatePixels(); \n}","function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}","function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}","function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}","function renderCanvas() {\n\t\tif (drawing) {\n\t\t\tctx.moveTo(lastPos.x, lastPos.y);\n\t\t\tctx.lineTo(mousePos.x, mousePos.y);\n\t\t\tctx.stroke();\n\t\t\tlastPos = mousePos;\n\t\t}\n\t}","function ObjectOrientedRenderer3(){}","function render()\n{\n requestAnimationFrame(render);\n\n\tctx.clearRect(0, 0, width, height);\n drawTiles();\n\tgui.draw(ctx, mouse);\n}","function renderCanvas() {\n if (drawing) {\n ctx.moveTo(lastPos.x, lastPos.y);\n ctx.lineTo(mousePos.x, mousePos.y);\n ctx.stroke();\n lastPos = mousePos;\n }\n }","function ObjectOrientedRenderer3() {}","function ObjectOrientedRenderer3() {}","function ObjectOrientedRenderer3() {}","function render() {\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n if (params.polygonOffset) {\n gl.polygonOffset(1, 1);\n }\n gl.uniform3fv(uColor, [1.0, 0.0, 0.0]);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n\n\n if (params.polygonOffset) {\n gl.polygonOffset(0, 1);\n }\n gl.uniform3fv(uColor, [0.0, 0.0, 1.0]);\n gl.drawArrays(gl.TRIANGLES, 3, 3);\n}","render(webGLRenderer) {}","render() {\n this.context.drawImage(this.buffer.canvas, 0, 0, this.buffer.canvas.width, this.buffer.canvas.height, 0, 0, this.context.canvas.width, this.context.canvas.height);\n }","function ProceduralRenderer3() {}","function ProceduralRenderer3() {}","function ProceduralRenderer3() {}","function draw()\n{\n \n}","function render_user_interface()\n{\n mycanvas_context.drawImage(m_canvas, 0, 0);\n}","static draw3D()\n {\n RPM.gameStack.draw3D();\n }","function draw(time){\r\n\tif(!use2D){\r\n\t\tctx.setBuffer(null);\r\n\t\tctx.viewport(0, 0, ctx.viewportWidth, ctx.viewportHeight);\r\n\t\tvar alpha = clearColor[3];\r\n\t\tctx.clearColor(clearColor[0]*alpha, clearColor[1]*alpha, clearColor[2]*alpha, alpha);\r\n\t\tctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT);\r\n\t\t\r\n\t\tctx.setBuffer(colorBuffer);\r\n\t\tctx.viewport(0, 0, ctx.viewportWidth, ctx.viewportHeight);\r\n\t\t//ctx.clearColor(clearColor[0]*alpha, clearColor[1]*alpha, clearColor[2]*alpha, alpha);\r\n\t\tctx.clearColor(0,0,0,0);\r\n\t\tctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT);\r\n\t}else{\r\n\t\tctx.clearRect(0,0,canvas.width,canvas.height);\r\n\t\tctx.fillStyle = rgb(clearColor);\r\n\t\tctx.globalAlpha = clearColor[3];\r\n\t\tctx.fillRect(0,0,canvas.width,canvas.height);\r\n\t}\r\n\t\r\n\tmat4.ortho(pMatrix, -0, 1*aspectRatio, -1, 0, -1, 1);\r\n\tmat4.identity(mvMatrix);\r\n\t\r\n\tif(useStates){\r\n\t\tStates.draw(ctx);\r\n\t}\r\n\t\r\n\t//Draw the stateless world\r\n\tworld.transform(ctx);\r\n\tworld.draw(ctx);\r\n\tworld.unTransform(ctx);\r\n\t\r\n\tif(!use2D){\r\n\t\tctx.clearColor(0, 0, 0, 0);\r\n\t\teffects.apply(ctx, colorBuffer);\r\n\t\t\r\n\t\tctx.useProgram(shaderProgram);\r\n\t\t\r\n\t\tctx.bindTexTo(colorBuffer.texture, shaderProgram.samplerUniform);\r\n\t\t\r\n\t\tctx.uniform1f(shaderProgram.alpha, 1.0);\r\n\t\t\r\n\t\tctx.setBuffer(null);\r\n\t\t\r\n\t\tctx.drawScreenBuffer(shaderProgram);\r\n\t}\r\n\t\r\n\tif(showConsole){\r\n\t\tif(!use2D){\r\n\t\t\tbrineConsole = document.getElementById(\"console\");\r\n\t\t\tif(brineConsole != null && brineConsole != undefined){\r\n\t\t\t\tvar text = \"\";\r\n\t\t\t\tfor(var node = log.head; node !== null; node = node.link){\r\n\t\t\t\t\ttext = node.item+\"
    \"+text;\r\n\t\t\t\t}\r\n\t\t\t\tbrineConsole.innerHTML = text;\r\n\t\t\t}\r\n\t\t\tbrineConsole.style.visibility = \"visible\";\r\n\t\t}else{\r\n\t\t\tctx.fillStyle = \"#ffffff\";\r\n\t\t\tctx.globalAlpha = 0.25;\r\n\t\t\tctx.fillRect(0,0,canvas.width,canvas.height);\r\n\t\t\tctx.globalAlpha = 1.0;\r\n\t\t\tctx.fillStyle = \"#000000\";\r\n\t\t\t//ctx.shadowBlur = 3;\r\n\t\t\tctx.shadowColor = \"#ffffff\";\r\n\t\t\tvar lineHeight = 18;\r\n\t\t\tvar lineNumber = 0;\r\n\t\t\tfor(var node = log.head; node !== null; node = node.link){\r\n\t\t\t\tvar line = node.item;\r\n\t\t\t\t//ctx.font=\"16px Arial\";\r\n\t\t\t\t//ctx.strokeText(line, 5, canvas.height-(log.length-lineNumber)*12);\r\n\t\t\t\tctx.font = lineHeight+\"px Arial\";\r\n\t\t\t\tctx.fillText(line, 5, canvas.height-(log.length-lineNumber)*lineHeight);\r\n\t\t\t\tlineNumber++;\r\n\t\t\t}\r\n\t\t\tctx.shadowBlur = 0;\r\n\t\t}\r\n\t}else{\r\n\t\tif(brineConsole != null && brineConsole != undefined && !use2D){\r\n\t\t\tbrineConsole.innerHTML = \"\";\r\n\t\t\tbrineConsole.style.visibility = \"hidden\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tvar timeDiff = time-oldDrawTime;\r\n\tbrineFPS = Math.round((1000/timeDiff)*10)/10;\r\n\tfpsCounter.html = \"FPS: \"+brineFPS;\r\n\toldDrawTime = time;\r\n}","function render() {\n\n var baseSegment = findSegment(position);\n var basePercent = Util.percentRemaining(position, segmentLength);\n var playerSegment = findSegment(position+playerZ);\n var playerPercent = Util.percentRemaining(position+playerZ, segmentLength);\n var playerY = Util.interpolate(playerSegment.p1.world.y, playerSegment.p2.world.y, playerPercent);\n var maxy = height;\n\n var x = 0;\n var dx = - (baseSegment.curve * basePercent);\n\n // Clear the canvas\n ctx.clearRect(0, 0, width, height);\n\n // Order the background layers\n if (currentBackground == 0) {\n // Build the list of positions in the image to extract the appropriate background\n // Depending on the current background, load as current the night or day version\n background_pos_cur = [BACKGROUND.SKY, BACKGROUND.HILLS, BACKGROUND.TREES];\n background_pos_next = [BACKGROUND.SKY2, BACKGROUND.HILLS2, BACKGROUND.TREES2];\n } else {\n background_pos_cur = [BACKGROUND.SKY2, BACKGROUND.HILLS2, BACKGROUND.TREES2];\n background_pos_next = [BACKGROUND.SKY, BACKGROUND.HILLS, BACKGROUND.TREES];\n }\n // Draw the background layers\n if (!changeBackgroundFlag) {\n // No switching, we draw one set of backgrounds\n Render.background(ctx, background, width, height, background_pos_cur[0], skyOffset, resolution * skySpeed * playerY, 1.0);\n Render.background(ctx, background, width, height, background_pos_cur[1], hillOffset, resolution * hillSpeed * playerY, 1.0);\n Render.background(ctx, background, width, height, background_pos_cur[2], treeOffset, resolution * treeSpeed * playerY, 1.0);\n } else {\n // else we are in the process of switching, do a progressive blending\n // continue the blending\n changeBackgroundCurrentAlpha += 0.01; // increase the alpha for one, and decrease for the next background set\n Render.background(ctx, background, width, height, background_pos_cur[0], skyOffset, resolution * skySpeed * playerY, 1.0-changeBackgroundCurrentAlpha);\n Render.background(ctx, background, width, height, background_pos_cur[1], hillOffset, resolution * hillSpeed * playerY, 1.0-changeBackgroundCurrentAlpha);\n Render.background(ctx, background, width, height, background_pos_cur[2], treeOffset, resolution * treeSpeed * playerY, 1.0-changeBackgroundCurrentAlpha);\n Render.background(ctx, background, width, height, background_pos_next[0], skyOffset, resolution * skySpeed * playerY, changeBackgroundCurrentAlpha);\n Render.background(ctx, background, width, height, background_pos_next[1], hillOffset, resolution * hillSpeed * playerY, changeBackgroundCurrentAlpha);\n Render.background(ctx, background, width, height, background_pos_next[2], treeOffset, resolution * treeSpeed * playerY, changeBackgroundCurrentAlpha);\n if (changeBackgroundCurrentAlpha >= 1.0) {\n // blending is done, disable the flags and reinit all related vars\n // Note: it is important to still do the drawing (and not put it in an if statement) because else the last drawing won't be done, there will be no background for a split-second and this will produce a flickering effect\n currentBackground = (currentBackground + 1) % 2\n changeBackgroundCurrentAlpha = 0.0;\n changeBackgroundFlag = false;\n }\n }\n\n var n, i, segment, car, sprite, spriteScale, spriteX, spriteY;\n\n for(n = 0 ; n < drawDistance ; n++) {\n\n segment = segments[(baseSegment.index + n) % segments.length];\n segment.looped = segment.index < baseSegment.index;\n segment.fog = Util.exponentialFog(n/drawDistance, fogDensity);\n segment.clip = maxy;\n\n Util.project(segment.p1, (playerX * roadWidth) - x, playerY + cameraHeight, position - (segment.looped ? trackLength : 0), cameraDepth, width, height, roadWidth);\n Util.project(segment.p2, (playerX * roadWidth) - x - dx, playerY + cameraHeight, position - (segment.looped ? trackLength : 0), cameraDepth, width, height, roadWidth);\n\n x = x + dx;\n dx = dx + segment.curve;\n\n if ((segment.p1.camera.z <= cameraDepth) || // behind us\n (segment.p2.screen.y >= segment.p1.screen.y) || // back face cull\n (segment.p2.screen.y >= maxy)) // clip by (already rendered) hill\n continue;\n\n Render.segment(ctx, width, lanes,\n segment.p1.screen.x,\n segment.p1.screen.y,\n segment.p1.screen.w,\n segment.p2.screen.x,\n segment.p2.screen.y,\n segment.p2.screen.w,\n segment.fog,\n segment.color);\n\n maxy = segment.p1.screen.y;\n }\n\n for(n = (drawDistance-1) ; n > 0 ; n--) {\n segment = segments[(baseSegment.index + n) % segments.length];\n\n for(i = 0 ; i < segment.cars.length ; i++) {\n car = segment.cars[i];\n sprite = car.sprite;\n spriteScale = Util.interpolate(segment.p1.screen.scale, segment.p2.screen.scale, car.percent);\n spriteX = Util.interpolate(segment.p1.screen.x, segment.p2.screen.x, car.percent) + (spriteScale * car.offset * roadWidth * width/2);\n spriteY = Util.interpolate(segment.p1.screen.y, segment.p2.screen.y, car.percent);\n Render.sprite(ctx, width, height, resolution, roadWidth, sprites, car.sprite, spriteScale, spriteX, spriteY, -0.5, -1, segment.clip);\n }\n\n for(i = 0 ; i < segment.sprites.length ; i++) {\n sprite = segment.sprites[i];\n spriteScale = segment.p1.screen.scale;\n spriteX = segment.p1.screen.x + (spriteScale * sprite.offset * roadWidth * width/2);\n spriteY = segment.p1.screen.y;\n Render.sprite(ctx, width, height, resolution, roadWidth, sprites, sprite.source, spriteScale, spriteX, spriteY, (sprite.offset < 0 ? -1 : 0), -1, segment.clip);\n }\n\n if (segment == playerSegment) {\n Render.player(ctx, width, height, resolution, roadWidth, sprites, speed/maxSpeed,\n cameraDepth/playerZ,\n width/2,\n (height/2) - (cameraDepth/playerZ * Util.interpolate(playerSegment.p1.camera.y, playerSegment.p2.camera.y, playerPercent) * height/2),\n speed * (keyLeft ? -1 : keyRight ? 1 : 0),\n playerSegment.p2.world.y - playerSegment.p1.world.y);\n }\n }\n\t\t\t\n // start horizon tilt\n if (enableTilt) {\n rotation=0;\n if (baseSegment.curve==0) {\n rotation=-currentRotation;\n currentRotation=0;\n } else {\n newrot = Math.round(baseSegment.curve*speed/maxSpeed*100)/100;\n rotation=newrot - currentRotation ;\n currentRotation = newrot ;\n }\n if (rotation!=0) {\n //ctx.save(); // doesn't help with moire problem\n ctx.translate(canvas.width/2,canvas.height/2);\n ctx.rotate(-rotation*(Math.PI/90));\n ctx.translate(-canvas.width/2,-canvas.height/2);\n //ctx.restore();\n }\n }\n\n // Draw \"Game Over\" screen\n if (gameOverFlag) {\n ctx.font = \"3em Arial\";\n ctx.fillStyle = \"magenta\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"GAME OVER\", canvas.width/2, canvas.height/2);\n ctx.fillText(\"(refresh to restart)\", canvas.width/2, canvas.height/1.5);\n }\n }","function render () {\n\n\t\tfunction pushMatrix (fn) {\n\t\t\tp.push();\n\t\t\tfn();\n\t\t\tp.pop();\n\t\t}\n\n\t\t// Draw Horizontal Lines\n\t\tpushMatrix(function () {\n\t\t\tp.strokeCap(p.ROUND);\n\t\t\tp.stroke(121, 192, 242);\t\t\t\t// Light Blue\n\t\t\tp.translate(p.width/2, p.height/2);\t\t// Translate to center\n\n\t\t\t// Set strokeweight to decrease proportionally to the stretch factor\n\t\t\tvar base_stroke_weight = 2;\n\t\t\tvar stroke_weight = base_stroke_weight - (a_l_de.value * base_stroke_weight);\n\t\t\tp.strokeWeight(stroke_weight);\n\n\t\t\tvar spacing = 60;\t\t\t\t\t\t// Set space around Es\n\t\t\t// Mult by -1 for left line\n\t\t\tvar displacement_start = a_l_ds.value * (p.width / 2) + spacing;\n\t\t\tvar displacement_end = a_l_de.value * (p.width / 2) + spacing;\n\n\t\t\tp.line(-displacement_end, 0, -displacement_start, 0);\t\t// Left Line\n\t\t\tp.line(displacement_end, 0, displacement_start, 0);\t\t// Right Line\n\t\t});\n\n\t\t// Assemble Logo!\n\n\t\t// Rotate E\n\t\tpushMatrix(function () {\n\n\t\t\tp.tint(255, 255); // Opacity (255)\n\t\t\t\n\t\t\tp.translate(p.width / 2, p.height / 2);\n\t\t\tp.rotate(p.radians(a_ed_r.value));\t\t// All rotations must occur here!!!\n\t\t\tp.scale(0.75, 0.75);\n\n\t\t\t// For Dots\n\t\t\tpushMatrix(function () {\n\n\t\t\t\tp.translate(-41.25,-42.65); \t\t// Center offset\n\t\t\t\tp.scale(0.15,0.15);\n\n\t\t\t\t// Polar Coordinates\n\t\t\t\tvar r = a_d_d.value;\t\t\t\t// Origin Offset \t{start: 300, end: 265}\n\t\t\t\tvar angle = p.radians(a_d_r.value);\t\t// Angle Offset\t\t{start: 0, end: 77}\n\t\t\t\tvar x = p.cos(angle) * r;\t\t\t\t// Multiply r * -1 for other Dot\n\t\t\t\tvar y = p.sin(angle) * r;\n\n\t\t\t\t// Top Dot\n\t\t\t\tpushMatrix(function () {\n\t\t\t\t\tp.scale(1, 1);\n\t\t\t\t\t\n\t\t\t\t\tp.translate(x,y);\n\t\t\t\t\tp.translate(276,283); \t\t// Center on Es\n\t\t\t\t\tp.scale(a_d_s.value, a_d_s.value); \t// Each scale <-- Parametric\n\t\t\t\t\tp.image(dot, -50, -50); \t// Center around origin\n\t\t\t\t});\n\n\t\t\t\t// Bottom Dot\n\t\t\t\tpushMatrix(function () {\n\t\t\t\t\tp.scale(1, 1);\n\t\t\t\t\t\n\t\t\t\t\tp.translate(-x,-y);\n\t\t\t\t\tp.translate(276, 283); \t\t// Center on Es, experimentally determined\n\t\t\t\t\tp.scale(a_d_s.value, a_d_s.value); \t// Each scale <-- Parametric\n\t\t\t\t\tp.image(dot2, -50, -50); \t// Center around origin\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// For Es\n\t\t\tpushMatrix(function () {\n\t\t\t\tp.scale(a_e_s.value, a_e_s.value); \t// Global scale\n\t\t\t\tp.translate(-41.25,-42.65); \t\t// Center offset, experimentally determined\n\t\t\t\tp.scale(0.15,0.15);\n\t\t\t\t\n\t\t\t\t// Bottom E\n\t\t\t\tp.image(E, 100, 100);\n\n\t\t\t\t// Top E\n\t\t\t\tpushMatrix(function () {\n\t\t\t\t\tp.translate(200, 0);\n\t\t\t\t\tp.image(E2, 0, 0);\n\t\t\t\t});\n\t\t\t});\n\n\t\t});\n\n\t\tpushMatrix(function () {\n\t\t\tp.fill(255);\n\t\t\tp.noStroke();\n\t\t\tp.translate(p.width/2, p.height/2);\n\t\t});\n\n\t\tif (global_animator.value >= 1) {\n\t\t\tp.noLoop();\n\t\t}\n\t}","renderScene(scene) {\n let flatScene = this.projectScene(scene)\n\n let polygonList = []\n flatScene.addToList(polygonList)\n //polygonList.sort((a, b) => (a === b)? 0 : a? -1 : 1)\n polygonList.sort(function(a, b) {\n if(a.getAverageDepth() < b.getAverageDepth()) {\n return 1\n } else if(a.getAverageDepth() > b.getAverageDepth()) {\n return -1\n } else if(a.justOutline && !b.justOutline) {//Both are same depth, sort by outline or not\n return -1\n } else return 1\n })\n // polygonList.sort((a,b) => (a.getAverageDepth() < b.getAverageDepth()) ? 1 : -1 || (a.justOutline === b.justOutline)? 0 : a.justOutline? 1 : -1)\n \n let context = this.canvas.getContext(\"2d\")\n \n context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n //Clear context first? \n for(let i = 0; i < polygonList.length; i++) {\n let polygon = polygonList[i] \n polygon.render(context)\n }\n }","function draw() {\n}","function draw() {\n}","function draw() {\n}","function draw() {\n}","function draw() {\n}","function setColors2(gl) {\n\n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Uint8Array([\n // left column front\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n\n // top rung front\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n\n // middle rung front\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n\n // left column back\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n\n // top rung back\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n\n // middle rung back\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n 80, 70, 200,\n\n // top\n 70, 200, 210,\n 70, 200, 210,\n 70, 200, 210,\n 70, 200, 210,\n 70, 200, 210,\n 70, 200, 210,\n\n // top rung right\n 200, 200, 70,\n 200, 200, 70,\n 200, 200, 70,\n 200, 200, 70,\n 200, 200, 70,\n 200, 200, 70,\n\n // under top rung\n 210, 100, 70,\n 210, 100, 70,\n 210, 100, 70,\n 210, 100, 70,\n 210, 100, 70,\n 210, 100, 70,\n\n // between top rung and middle\n 210, 160, 70,\n 210, 160, 70,\n 210, 160, 70,\n 210, 160, 70,\n 210, 160, 70,\n 210, 160, 70,\n\n // top of middle rung\n 70, 180, 210,\n 70, 180, 210,\n 70, 180, 210,\n 70, 180, 210,\n 70, 180, 210,\n 70, 180, 210,\n\n // right of middle rung\n 100, 70, 210,\n 100, 70, 210,\n 100, 70, 210,\n 100, 70, 210,\n 100, 70, 210,\n 100, 70, 210,\n\n // bottom of middle rung.\n 76, 210, 100,\n 76, 210, 100,\n 76, 210, 100,\n 76, 210, 100,\n 76, 210, 100,\n 76, 210, 100,\n\n // right of bottom\n 140, 210, 80,\n 140, 210, 80,\n 140, 210, 80,\n 140, 210, 80,\n 140, 210, 80,\n 140, 210, 80,\n\n // bottom\n 90, 130, 110,\n 90, 130, 110,\n 90, 130, 110,\n 90, 130, 110,\n 90, 130, 110,\n 90, 130, 110,\n\n // left side\n 160, 160, 220,\n 160, 160, 220,\n 160, 160, 220,\n 160, 160, 220,\n 160, 160, 220,\n 160, 160, 220]),\n gl.STATIC_DRAW);\n}"],"string":"[\n \"function drawSurface() {\\n wgl.takeBufferData(positionLocation, positionBuffer, 3, gl.FLOAT, false, 0, 0);\\n wgl.takeBufferData(normalLocation, normalBuffer, 3, gl.FLOAT, false, 0, 0);\\n gl.drawArrays(gl.TRIANGLES, 0, 6 * (map.points.length - 1) * (map.points.length - 1));\\n }\",\n \"render(renderParameters) {\\r\\n\\t\\t\\t\\t var tileSize = this.layer.tileInfo.size[0];\\r\\n\\t\\t\\t\\t var state = renderParameters.state;\\r\\n\\t\\t\\t\\t var pixelRatio = state.pixelRatio;\\r\\n\\t\\t\\t\\t var width = state.size[0];\\r\\n\\t\\t\\t\\t var height = state.size[1];\\r\\n\\t\\t\\t\\t var context = renderParameters.context;\\r\\n\\t\\t\\t\\t var coords = [0, 0];\\r\\n\\r\\n\\t\\t\\t\\t context.fillStyle = \\\"rgba(0,0,0,0.25)\\\";\\r\\n\\t\\t\\t\\t context.fillRect(0, 0, width * pixelRatio, height * pixelRatio);\\r\\n\\t\\t\\t\\t }\",\n \"draw() { }\",\n \"draw() { }\",\n \"draw() { }\",\n \"function UpdateRender() {\\r\\n // Set background\\r\\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\\r\\n\\r\\n // RenderSquares\\r\\n BackContextHandle.save();\\r\\n RenderSquares();\\r\\n BackContextHandle.restore();\\r\\n\\r\\n // Swap the backbuffer with the frontbuffer\\r\\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\\r\\n ContextHandle.putImageData(ImageData, 0, 0);\\r\\n}\",\n \"drawOffscreen() { }\",\n \"function b2Draw()\\r\\n{\\r\\n}\",\n \"function setupDraw() {\\n // Stop the 3D view from rendering\\n continueRender = 0;\\n //Check to see if Draw setup has already been run\\n if(startupDraw == 1)\\n {\\n // Check if View mode has been run, if it has then we remove View Mode's listeners\\n if(startupView == 0)\\n {\\n\\n }\\n canvas.onmousemove = null;\\n canvas.onmousedown = null;\\n window.onmouseup = null;\\n\\n //setup click and drag listeners\\n canvas.addEventListener(\\\"mousedown\\\", checkPoint, false);\\n canvas.addEventListener(\\\"mousemove\\\", movePoint, false);\\n canvas.addEventListener(\\\"mouseup\\\", endMove, false);\\n\\n document.getElementById(\\\"demo\\\").innerHTML = \\\"Draw Mode\\\";\\n\\n // This will enable the correct menu for draw mode\\n document.getElementById(\\\"drawMenu\\\").style.display = \\\"block\\\";\\n document.getElementById(\\\"viewMenu\\\").style.display = \\\"none\\\";\\n gl.enable(gl.DEPTH_TEST);\\n \\n // Load shaders\\n programId = initShaders(gl, \\\"2d-vertex-shader\\\", \\\"2d-fragment-shader\\\");\\n \\n // ######Create vertex buffer objects --- ADD CODE HERE #######\\n var positionAttributeLocation = gl.getAttribLocation(programId, \\\"a_position\\\");\\n var resolutionUniformLocation = gl.getUniformLocation(programId, \\\"u_resolution\\\");\\n colorLocation = gl.getUniformLocation(programId, \\\"u_color\\\");\\n \\n //setup buffer for control points line and bezier curve\\n var positionBuffer = gl.createBuffer();\\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\\n\\n //tell atribute how to get data out of it, first turn the attribute on\\n gl.enableVertexAttribArray(positionAttributeLocation);\\n //specify how to pull the data out\\n var size = 2; // 2 components per iteration\\n var type = gl.FLOAT; // the data is 32bit floats\\n var normalize = false; // don't normalize the data\\n var stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position\\n var offset = 0; // start at the beginning of the buffer\\n gl.vertexAttribPointer(\\n positionAttributeLocation, size, type, normalize, stride, offset)\\n\\n\\n gl.useProgram(programId);\\n // set the resolution so we use pixels instead of default 0 to 1\\n gl.uniform2f(resolutionUniformLocation, gl.canvas.width, gl.canvas.height);\\n\\n // Ensure OpenGL viewport is resized to match canvas dimensions\\n gl.viewportWidth = canvas.width;\\n gl.viewportHeight = canvas.height;\\n gl.lineWidth(1);\\n\\n // Set screen clear color to R, G, B, alpha; where 0.0 is 0% and 1.0 is 100%\\n gl.clearColor(0.8, 0.8, 0.8, 1.0);\\n \\n // Enable color; required for clearing the screen\\n gl.clear(gl.COLOR_BUFFER_BIT);\\n startupDraw = 0;\\n drawMethod();\\n }\\n else {\\n drawMethod();\\n }\\n} // End of setupDraw()\",\n \"function render(){\\n\\tcanvas.clearRect(0,0, canvas.canvas.width, canvas.canvas.height)\\n\\tcanvas.strokeStyle = '#000000';\\n\\tcanvas.lineJoin = 'round';\\n\\tcanvas.lineWidth = 3;\\n\\t// lays down the drawing background first.\\n\\tif (back) {\\n\\t\\tcanvas.drawImage(back,0,0);\\n\\t}\\n\\t// paints and retains painting order so everything renders correctly\\n\\t// uses the array of objects to determine what should be rendered\\n\\tfor(let i = 0; i < strokeOrder.length; i+=1){\\n\\t\\t// draws standard painting\\n\\t\\tif(strokeOrder[i].type ==='paint') {\\n\\t\\t\\tcanvas.beginPath();\\n\\t\\t\\tif(strokeOrder[i].paintPress && i){\\n\\t\\t\\t\\tcanvas.moveTo(strokeOrder[i-1].paintX, strokeOrder[i-1].paintY);\\n\\t\\t\\t}else{\\n\\t\\t\\t\\tcanvas.moveTo(strokeOrder[i].paintX-1, strokeOrder[i].paintY);\\n\\t\\t}\\n\\t\\tcanvas.lineTo(strokeOrder[i].paintX, strokeOrder[i].paintY)\\n\\t\\tcanvas.closePath();\\n\\t\\tcanvas.strokeStyle=strokeOrder[i].saveColor;\\n\\t\\tcanvas.lineWidth=strokeOrder[i].saveSize;\\n\\t\\tcanvas.stroke(); \\n\\t\\t// draws the spray emoji\\n\\t\\t} else if (strokeOrder[i].type ==='spray'){\\n\\t\\t\\tcanvas.drawImage(strokeOrder[i].src,strokeOrder[i].x,strokeOrder[i].y);\\n\\t\\t// draws square shape\\n\\t\\t} else if (strokeOrder[i].type=== 'square') {\\n\\t\\t\\tcanvas.lineWidth = 5;\\n\\t\\t\\tcanvas.strokeStyle = strokeOrder[i].color;\\n\\t\\t\\tcanvas.strokeRect(strokeOrder[i].x, strokeOrder[i].y, 50, 50);\\n\\t\\t// draws circle shape\\n\\t\\t} else if (strokeOrder[i].type === 'circle'){\\n\\t\\t\\tcanvas.beginPath();\\n\\t\\t\\tcanvas.lineWidth = 5;\\n\\t\\t\\tcanvas.strokeStyle = strokeOrder[i].color;\\n\\t\\t\\tcanvas.arc(strokeOrder[i].x, strokeOrder[i].y,25,0,2*Math.PI);\\n\\t\\t\\tcanvas.stroke();\\n\\t\\t// draws triangle shape\\n\\t\\t} else if (strokeOrder[i].type === 'triangle') {\\n\\t\\t\\tcanvas.beginPath();\\n\\t\\t\\tcanvas.lineWidth = 5;\\n\\t\\t\\tcanvas.strokeStyle = strokeOrder[i].color;\\n\\t\\t\\tcanvas.moveTo(strokeOrder[i].x, strokeOrder[i].y);\\n\\t\\t\\tcanvas.lineTo(strokeOrder[i].x +50, strokeOrder[i].y);\\n\\t\\t\\tcanvas.lineTo(strokeOrder[i].x +25, strokeOrder[i].y-35);\\n\\t\\t\\tcanvas.lineTo(strokeOrder[i].x, strokeOrder[i].y);\\n\\t\\t\\tcanvas.stroke();\\n\\t\\t// draws lines\\n\\t\\t} else if (strokeOrder[i].type === 'line'){\\n\\t\\t\\tcanvas.beginPath();\\n\\t\\t\\tcanvas.moveTo(strokeOrder[i].startX, strokeOrder[i].startY);\\n\\t\\t\\tcanvas.lineTo(strokeOrder[i].endX, strokeOrder[i].endY);\\n\\t\\t\\tcanvas.lineWidth = strokeOrder[i].lineSize;\\n\\t\\t\\tcanvas.strokeStyle = strokeOrder[i].lineColor;\\n\\t\\t\\tcanvas.stroke();\\n\\t\\t}\\n\\t}\\n\\t}\",\n \"function render() {\\n\\tclearCanvas();\\n\\tRenderer.draw();\\n\\t\\n\\t\\t\\n}\",\n \"RenderInit() {\\n this.canvas.width = this.size;\\n this.canvas.height = this.size;\\n this.context = this.canvas.getContext(\\\"2d\\\");\\n this.buffer = this.size / this.gamestate.layout.length;\\n this.draw();\\n this.drawKey();\\n this.drawExit();\\n this.drawPlayers();\\n this.drawAdversaries();\\n }\",\n \"function render() {\\r\\n gl.clear(gl.COLOR_BUFFER_BIT);\\r\\n gl.drawArrays(gl.POINTS, 0, 2);\\r\\n}\",\n \"_draw() {\\n\\n }\",\n \"render2d(){\\n const ctx = this.canvas2dctx;\\n\\n ctx.clearRect(0,0,this.state.width,this.state.height);\\n\\n ctx.strokeStyle = \\\"white\\\";\\n ctx.lineWidth = 2.0;\\n ctx.font = \\\"16px sans-serif\\\";\\n ctx.fillStyle = \\\"white\\\";\\n\\n for (let i = 0; i < this.text2d.length; i ++){\\n const {text,vec, withline } = this.text2d[i];\\n let v2 = this.convertWorldToScreenXY(vec);\\n if( withline){\\n ctx.beginPath();\\n ctx.moveTo(v2.x,v2.y); ctx.lineTo(v2.x+30, v2.y-30); ctx.lineTo(v2.x+30+ctx.measureText(text).width, v2.y-30);\\n ctx.stroke();\\n ctx.fillText(text, v2.x+30, v2.y-30-3);\\n }else{\\n ctx.fillText(text, v2.x-ctx.measureText(text).width/2, v2.y-3);\\n }\\n }\\n }\",\n \"function allthere(){\\n\\n // settings.\\n var gridres = 128, totX = 4096,\\n totY = 391, pbrtShowrender = true,\\n pbrtBounces = 2, pbrtBatch = 1,\\n pbrtSamples = Math.floor((parseInt(document.location.hash.slice(1)) || 200) / pbrtBatch);\\n var pbrtGrid = { // grid 外框\\n bbox: new Float32Array(\\n [-16.35320053100586, -3.3039399147033692, -13.719999885559082, 31.68820018768311, 13.706639957427978, 24.6798002243042])\\n };\\n\\n // Shader helpers.\\n function createShader(gl, source, type) { var shader=gl.createShader(type); gl.shaderSource(shader, source); gl.compileShader(shader); return shader; }\\n function createProgram(gl, vertexShaderSource, fragmentShaderSource) {\\n var program = gl.createProgram();\\n gl.attachShader(program, createShader(gl, vertexShaderSource, gl.VERTEX_SHADER)); \\n gl.attachShader(program, createShader(gl, fragmentShaderSource, gl.FRAGMENT_SHADER));\\n gl.linkProgram(program);\\n return program;\\n };\\n\\n // Offscreen float buffers.\\n function createOffscreen(gl,width,height) {\\n var colorTexture = gl.createTexture();\\n gl.bindTexture(gl.TEXTURE_2D, colorTexture);\\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA32F, width, height, 0, gl.RGBA, gl.FLOAT, null);\\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\\n gl.bindTexture(gl.TEXTURE_2D, null);\\n\\n var depthBuffer = gl.createRenderbuffer();\\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthBuffer);\\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, width, height);\\n gl.bindRenderbuffer(gl.RENDERBUFFER, null);\\n\\n var framebuffer = gl.createFramebuffer();\\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorTexture, 0);\\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthBuffer);\\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\n return {\\n framebuffer:framebuffer,colorTexture:colorTexture,depthBuffer:depthBuffer,width:width,height:height,gl:gl,\\n bind : function() { this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, this.framebuffer); this.gl.viewport(0,0,this.width,this.height); },\\n unbind : function() { this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, null); },\\n delete : function() { this.gl.deleteRenderbuffer(this.depthBuffer); this.gl.deleteFramebuffer(this.framebuffer); this.gl.deleteTexture(this.colorTexture); }\\n }\\n }\\n\\n // setup output canvas, gl context and offscreen.\\n var canvas = m(document.body.appendChild(document.createElement('canvas')),{width:800,height:450});\\n m(canvas.style,{width:'800px',height:'450px'});\\n var gl = canvas.getContext('webgl2'); if (!gl) alert('webGL2 required !');\\n var ext1 = gl.getExtension('EXT_color_buffer_float'); if (!ext1) alert('videocard required');\\n var ofscreen1 = createOffscreen(gl,canvas.width,canvas.height);\\n \\n // Shaders for accumulation and tonemap.\\n var vs2=`#version 300 es\\n #define POSITION_LOCATION 0\\n precision lowp float;\\n layout(location = POSITION_LOCATION) in vec3 position;\\n void main() { gl_Position = vec4(position, 1.0); }`;\\n\\n var fs2=`#version 300 es\\n precision lowp float;\\n precision lowp sampler2D;\\n uniform sampler2D accum;\\n uniform float count; // 采样次数的倒数 相当于除以采样次数\\n out vec4 color;\\n void main() { color = vec4(sqrt(texelFetch(accum,ivec2(gl_FragCoord.xy),0).rgb*count),1.0); }\\n `;\\n\\n // Actual Path tracing shaders.\\n var vs=`#version 300 es\\n #define POSITION_LOCATION 0\\n precision highp float;\\n precision highp int;\\n uniform mat4 MVP;\\n layout(location = POSITION_LOCATION) in vec3 position;\\n out vec3 origin;\\n void main()\\n {\\n origin = (MVP * vec4(0.0,0.0,0.0,1.0)).xyz;\\n gl_Position = vec4(position, 1.0);\\n }`;\\n\\n var fs=`#version 300 es\\n precision highp float;\\n precision highp int;\\n precision highp sampler3D;\\n precision highp sampler2D;\\n\\n #define EPSILON 0.000001\\n\\n uniform vec2 resolution;\\n uniform float inseed;\\n uniform int incount;\\n \\n uniform mat4 MVP, proj;\\n\\n uniform sampler3D grid;\\n uniform sampler2D tris;\\n uniform vec3 bbina, bbinb;\\n\\n vec3 bboxA, bboxB;\\n\\n in vec3 origin;\\n out vec4 color;\\n \\n uint N = ${pbrtSamples}u, i;\\n\\n float seed;\\n float minc(const vec3 x) { return min(x.x,min(x.y,x.z)); }\\n \\n float random_ofs=0.0;\\n vec3 cosWeightedRandomHemisphereDirectionHammersley( const vec3 n ) {\\n float x = float(i)/float(N); \\n i = (i << 16u) | (i >> 16u);\\n i = ((i & 0x55555555u) << 1u) | ((i & 0xAAAAAAAAu) >> 1u);\\n i = ((i & 0x33333333u) << 2u) | ((i & 0xCCCCCCCCu) >> 2u);\\n i = ((i & 0x0F0F0F0Fu) << 4u) | ((i & 0xF0F0F0F0u) >> 4u);\\n i = ((i & 0x00FF00FFu) << 8u) | ((i & 0xFF00FF00u) >> 8u);\\n vec2 r = vec2(x,(float(i) * 2.32830643653086963e-10 * 6.2831) + random_ofs);\\n vec3 uu=normalize(cross(n, vec3(1.0,1.0,0.0))), vv=cross( uu, n );\\n float sqrtx = sqrt(r.x);\\n return normalize(vec3( sqrtx*cos(r.y)*uu + sqrtx*sin(r.y)*vv + sqrt(1.0-r.x)*n ));\\n }\\n\\n vec4 trace( inout vec3 realori, const vec3 dir) {\\n float len=0.0,l,b,mint=1000.0;\\n vec2 minuv, mintri, cpos;\\n vec3 scaler=vec3(bbinb/${gridres}.0)/dir,orig=realori,v0,v1,v2;\\n for (int i=0;i<150;i++){\\n vec3 txc=(orig-bboxA)*bboxB;\\n if ( txc != clamp(txc,0.0,1.0)) break;\\n vec3 tex=textureLod(grid,txc,0.0).rgb;\\n for(int tri=0; tri<512; tri++) { \\n if (tex.b<=0.0) break; cpos=tex.rg; tex.rb+=vec2(3.0/4096.0,-1.0); \\n v1 = textureLodOffset(tris,cpos,0.0,ivec2(1,0)).rgb;\\n v2 = textureLodOffset(tris,cpos,0.0,ivec2(2,0)).rgb;\\n vec3 P = cross(dir,v2); float det=dot(v1,P); if (det>-EPSILON) continue;\\n v0 = textureLod(tris,cpos,0.0).rgb;\\n vec3 T=realori-v0; float invdet=1.0/det; float u=dot(T,P)*invdet; if (u < 0.0 || u > 1.0) continue;\\n vec3 Q=cross(T,v1); float v=dot(dir,Q)*invdet; if(v<0.0||u+v>1.0) continue;\\n float t=dot(v2, Q)*invdet; if (t>EPSILON && t ex) { color=vec4(1.0); return; }\\n orig += max(0.0,en)*view.xyz;\\n vec4 hit=trace(orig,view.xyz);\\n if (hit.w <= 0.0) { color.rgb = vec3(1.0); return; }\\n hit=trace(orig, -cosWeightedRandomHemisphereDirectionHammersley(hit.xyz));\\n if (hit.w <= 0.0) { color.rgb = vec3(0.8); return; }\\n }`;\\n\\n // Upload polygon and acceleration data.\\n var texture = gl.createTexture(); // grid\\n gl.activeTexture(gl.TEXTURE0);\\n gl.bindTexture(gl.TEXTURE_3D, texture);\\n gl.texParameteri(gl.TEXTURE_3D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\\n gl.texParameteri(gl.TEXTURE_3D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\\n gl.texImage3D( gl.TEXTURE_3D, 0, gl.RGB32F, gridres, gridres, gridres, 0, gl.RGB, gl.FLOAT, map ); \\n\\n var texture2 = gl.createTexture(); // trangle\\n gl.activeTexture(gl.TEXTURE1);\\n gl.bindTexture(gl.TEXTURE_2D, texture2);\\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\\n gl.texImage2D( gl.TEXTURE_2D, 0, gl.RGB32F, totX, totY*4, 0, gl.RGB, gl.FLOAT, polyData ); \\n\\n // Create the path tracing program, grab the uniforms.\\n var program = createProgram(gl, vs, fs);\\n var mvpLocation = gl.getUniformLocation(program, 'MVP');\\n var pLocation = gl.getUniformLocation(program, 'proj');\\n var uniformgridLocation = gl.getUniformLocation(program, 'grid');\\n var uniformtrisLocation = gl.getUniformLocation(program, 'tris');\\n var uniformSeed = gl.getUniformLocation(program, 'inseed');\\n var uniformCount = gl.getUniformLocation(program, 'incount');\\n var uniformbbaLocation = gl.getUniformLocation(program, 'bbina');\\n var uniformbbbLocation = gl.getUniformLocation(program, 'bbinb');\\n var uniformresLocation = gl.getUniformLocation(program, 'resolution');\\n\\n // Create the accumulation program, grab thos uniforms.\\n var program2 = createProgram(gl, vs2, fs2);\\n var uniformAccumLocation = gl.getUniformLocation(program2, 'accum');\\n var uniformCountLocation = gl.getUniformLocation(program2, 'count');\\n\\n // Setup the quad that will drive the rendering.\\n var vertexPosBuffer = gl.createBuffer();\\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer);\\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 0, 1, -1, 0, 1, 1, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0]), gl.STATIC_DRAW);\\n gl.bindBuffer(gl.ARRAY_BUFFER, null); \\n\\n var vertexArray = gl.createVertexArray();\\n gl.bindVertexArray(vertexArray);\\n var vertexPosLocation = 0;\\n gl.enableVertexAttribArray(vertexPosLocation);\\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer);\\n gl.vertexAttribPointer(vertexPosLocation, 3, gl.FLOAT, false, 0, 0);\\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\\n gl.bindVertexArray(null);\\n\\n // Setup some matrices (stole values from jimmy|rig)\\n //相机矩阵 \\n var matrix = new Float32Array(\\n [6.123234262925839e-17, 0, 1, 0,\\n -0.8660253882408142, 0.5, 5.302876566937394e-17, 0,\\n -0.5, -0.8660253882408142, 3.0616171314629196e-17, 0,\\n 6.535898208618164, 19.320507049560547, -4.0020835038019837e-16, 1]);\\n // 场景矩阵\\n var matrix2 = new Float32Array([1.7777777910232544, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -0.49950000643730164, 0, 0, 1, 0.5005000233650208]);\\n var viewportMV = new Float32Array(matrix); \\n var accum_count=1, diff=true, abort=false;\\n\\n // frame handler. \\n function frame() {\\n // Do we need to restart rendering (i.e. viewport change)\\n if (diff) { // 如果视角变化,设置新的矩阵,清空framebuffer重新渲染\\n matrix.set(viewportMV);\\n ofscreen1.bind(); gl.clear(gl.COLOR_BUFFER_BIT); ofscreen1.unbind();\\n accum_count=1;\\n abort=undefined;\\n diff=false;\\n }\\n\\n // Render more samples.\\n if (!abort) { \\n // Bind the offscreen and render a new sample.\\n ofscreen1.bind();\\n gl.useProgram(program);\\n gl.uniformMatrix4fv(mvpLocation, false, matrix);\\n gl.uniformMatrix4fv(pLocation, false, matrix2);\\n gl.uniform1i(uniformgridLocation, 0);\\n gl.uniform1i(uniformtrisLocation, 1);\\n gl.uniform3fv(uniformbbaLocation, pbrtGrid.bbox.slice(0,3));\\n gl.uniform3fv(uniformbbbLocation, pbrtGrid.bbox.slice(3,6));\\n gl.uniform2fv(uniformresLocation, new Float32Array([canvas.width,canvas.height]));\\n gl.uniform1f(uniformSeed,Math.random());\\n gl.uniform1i(uniformCount,(accum_count)%pbrtSamples);\\n\\n gl.activeTexture(gl.TEXTURE0);\\n gl.bindTexture(gl.TEXTURE_3D, texture); // grid\\n gl.activeTexture(gl.TEXTURE1);\\n gl.bindTexture(gl.TEXTURE_2D, texture2); // trangle\\n\\n gl.enable(gl.BLEND);\\n gl.blendFunc(gl.ONE,gl.ONE);\\n gl.bindVertexArray(vertexArray);\\n gl.drawArrays(gl.TRIANGLES, 0, 6);\\n gl.bindVertexArray(null);\\n gl.disable(gl.BLEND);\\n ofscreen1.unbind();\\n\\n // Display progress (mixdown from float to ldr) \\n gl.useProgram(program2);\\n gl.uniform1i(uniformAccumLocation, 0);\\n gl.uniform1f(uniformCountLocation, 1.0/accum_count);\\n gl.activeTexture(gl.TEXTURE0);\\n gl.bindTexture(gl.TEXTURE_2D, ofscreen1.colorTexture);\\n\\n gl.bindVertexArray(vertexArray);\\n gl.drawArrays(gl.TRIANGLES, 0, 6);\\n gl.bindVertexArray(null);\\n\\n gl.bindTexture(gl.TEXTURE_2D, null);\\n\\n // Stop if we're done.\\n if (++accum_count>pbrtSamples) abort =true;\\n }\\n requestAnimationFrame(frame);\\n }\\n requestAnimationFrame(frame);\\n\\n var angle=-Math.PI/2, angle2=Math.PI/3,zoom=0;\\n canvas.oncontextmenu =function(e) { e.preventDefault(); e.stopPropagation(); }\\n canvas.onmousemove = function(e) {\\n if (!e.buttons) return;\\n if (e.buttons==1) { angle += e.movementX/100; angle2 += e.movementY/100; } else { zoom += e.movementX/10; }\\n viewportMV = t(rX(rY(i(),angle),angle2),[0,4,-20+zoom]);\\n diff = true;\\n }\\n }\",\n \"function draw() {}\",\n \"function draw() {}\",\n \"draw() {}\",\n \"draw() {}\",\n \"draw() {}\",\n \"draw() {}\",\n \"function init() {\\r\\n Draw() ;\\r\\n}\",\n \"blitFrom(c){\\n this.context.clearRect(0,0,this.canvas.width,this.canvas.height);\\n if (this.opt.tall){\\n this.context.drawImage(c.canvas, 0, 0, c.canvas.width/2, c.canvas.height, 0, 0, this.canvas.width, this.canvas.height/2);\\n this.context.drawImage(c.canvas, c.canvas.width/2, 0, c.canvas.width/2, c.canvas.height, 0, this.canvas.height/2, this.canvas.width, this.canvas.height/2);\\n } else {\\n this.context.drawImage(c.canvas, 0, 0, c.canvas.width, c.canvas.height, 0, 0, c.canvas.width/(c.zoom/this.zoom), c.canvas.height/(c.zoom/this.zoom))\\n }\\n if (this.opt.grid){\\n for (let x = 0; x < this.canvas.width/this.zoom; ++x){\\n if (x % 16 == 15 && x != this.tWidth-1){\\n this.context.fillStyle = \\\"#AA0000\\\";\\n }else{\\n this.context.fillStyle = \\\"#AAAAAA\\\";\\n }\\n this.context.fillRect((x+1)*this.zoom-((x%8==7)?2:1),0,(x%8==7)?2:1,this.canvas.height);\\n }\\n for (let y = 0; y < this.canvas.height/this.zoom; ++y){\\n if (y % 16 == 15 && y != this.tWidth-1){\\n this.context.fillStyle = \\\"#BB0000\\\";\\n }else{\\n this.context.fillStyle = \\\"#AAAAAA\\\";\\n }\\n this.context.fillRect(0,(y+1)*this.zoom-((y%8==7)?2:1),this.canvas.width,(y%8==7)?2:1);\\n }\\n }\\n this.drawCallback();\\n }\",\n \"function render3d() {\\n\\n createBezierCurves();\\n\\n // create all models\\n var models = [];\\n curves.forEach((c)=>{\\n models.push(new BezierModel(c.vertices));\\n });\\n points = [];\\n normals = [];\\n colors = [];\\n texCoordsArray = [];\\n // build the main object\\n buildObjects({objects:models});\\n\\n // load colors, points, and normals to buffer\\n loadVertices(program);\\n loadColors(program);\\n loadNormals(program);\\n loadTextureArray(program);\\n\\n}\",\n \"function render() {\\n\\t\\tdraw.custom(function(canvas, context) {\\n\\t\\t\\tbullets.forEach(function(bullet, index, bulletList) {\\n\\t\\t\\t\\tgetSides(bullet, bullet.angle);\\n\\t\\t\\t\\tcontext.fillStyle = \\\"black\\\";\\n\\t\\t\\t\\tcontext.beginPath();\\n\\t\\t\\t\\tcontext.moveTo(bullet.points[0].x + bullet.x, bullet.points[0].y + bullet.y);\\n\\t\\t\\t\\tfor (var i = 1; i < bullet.points.length; i++) {\\n\\t\\t\\t\\t\\tcontext.lineTo(bullet.points[i].x + bullet.x, bullet.points[i].y + bullet.y);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tcontext.closePath();\\n\\t\\t\\t\\tcontext.stroke();\\n\\t\\t\\t\\tcontext.fill();\\n\\n\\t\\t\\t});\\n\\t\\t\\ttanks.forEach(function(tank, index, tankList) {\\n\\t\\t\\t\\tgetSides(tank, tank.angle);\\n\\t\\t\\t\\tcontext.fillStyle = \\\"black\\\";\\n\\t\\t\\t\\tcontext.beginPath();\\n\\t\\t\\t\\tcontext.moveTo(tank.points[0].x + tank.x, tank.points[0].y + tank.y);\\n\\t\\t\\t\\tfor (var i = 1; i < tank.points.length; i++) {\\n\\t\\t\\t\\t\\tcontext.lineTo(tank.points[i].x + tank.x, tank.points[i].y + tank.y);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tcontext.closePath();\\n\\t\\t\\t\\tcontext.stroke();\\n\\t\\t\\t\\tcontext.fill();\\n\\t\\t\\t});\\n\\t\\t\\teffects.forEach(function(effect, index, effectList) {\\n\\t\\t\\t\\tfor (var i = 0; i < effect.particles.length; i++) {\\n\\t\\t\\t\\t\\tvar particle = effect.particles[i];\\n\\t\\t\\t\\t\\tgetSides(particle, particle.angle);\\n\\t\\t\\t\\t\\tcontext.fillStyle = \\\"black\\\";\\n\\t\\t\\t\\t\\tcontext.beginPath();\\n\\t\\t\\t\\t\\tcontext.moveTo(particle.points[0].x + particle.x, particle.points[0].y + particle.y);\\n\\t\\t\\t\\t\\tfor (var e = 1; e < particle.points.length; e++) {\\n\\t\\t\\t\\t\\t\\tcontext.lineTo(particle.points[e].x + particle.x, particle.points[e].y + particle.y);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tcontext.closePath();\\n\\t\\t\\t\\t\\tcontext.stroke();\\n\\t\\t\\t\\t\\tcontext.fill();\\n\\t\\t\\t\\t}\\n\\t\\t\\t});\\n\\t\\t\\tmap.forEach(function(wall, index, walls) {\\n\\t\\t\\t\\tgetSides(wall, wall.angle);\\n\\t\\t\\t\\tcontext.fillStyle = \\\"black\\\";\\n\\t\\t\\t\\tcontext.beginPath();\\n\\t\\t\\t\\tcontext.moveTo(wall.points[0].x + wall.x, wall.points[0].y + wall.y);\\n\\t\\t\\t\\tfor (var i = 1; i < wall.points.length; i++) {\\n\\t\\t\\t\\t\\tcontext.lineTo(wall.points[i].x + wall.x, wall.points[i].y + wall.y);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tcontext.closePath();\\n\\t\\t\\t\\tcontext.stroke();\\n\\t\\t\\t\\tcontext.fill();\\n\\t\\t\\t});\\n\\t\\t});\\n\\t}\",\n \"function Renderer3D(image, points)\\n{\\n\\tthis.canvas = createCanvas(0, 0, 1, 1);\\n\\tthis.ctx = this.canvas.getContext(\\\"2d\\\");\\n\\tthis.image = image;\\n\\tthis.transform = null;\\n\\tthis.iw = 0;\\n\\tthis.ih = 0;\\n\\tthis.points = points;\\n\\tthis.bounds = [];//just the right order of points\\n\\tthis.offsetx = 0;\\n\\tthis.offsety = 0;\\n\\t\\n\\t//\\n\\tthis.options = {\\n\\t wireframe: false,\\n\\t image: 'images/image1.jpg',\\n\\t subdivisionLimit: 3,\\n\\t patchSize: 128\\n\\t};\\n\\t//Update the display to match a new point configuration.\\n this.update = update;\\n\\tthis.divide = divide;\\n\\tthis.getCanvas = getCanvas;\\n\\tthis.testObjectClick = testObjectClick;\\n\\tfunction getCanvas(){\\n\\t\\treturn this.canvas;\\n\\t}\\n\\tfunction testObjectClick(pt){\\n\\t\\treturn(isPointInPoly(this.bounds, pt));\\n\\t}\\n\\tfunction update() {\\n\\t // Get extents.\\n\\t var minX = Infinity, maxX = -Infinity, minY = Infinity, maxY = -Infinity;\\n\\t for (var i = 0; i < 4; i++)\\n\\t {\\n\\t\\tminX = Math.min(minX, Math.floor(this.points[i][0]));\\n\\t\\tmaxX = Math.max(maxX, Math.ceil(this.points[i][0]));\\n\\t\\tminY = Math.min(minY, Math.floor(this.points[i][1]));\\n\\t\\tmaxY = Math.max(maxY, Math.ceil(this.points[i][1]));\\n\\t }\\n\\t \\n\\t minX--; minY--; maxX++; maxY++;\\n\\t this.offsetX = minX;\\n\\t this.offsetY = minY;\\n\\t \\n\\t var width = maxX - minX;\\n\\t var height = maxY - minY;\\n\\n\\t // Reshape canvas.\\n\\t this.canvas.style.left = minX +'px';\\n\\t this.canvas.style.top = minY +'px';\\n\\t this.canvas.width = width;\\n\\t this.canvas.height = height;\\n\\t \\n\\t // Measure texture.\\n\\t this.iw = this.image.width;\\n\\t this.ih = this.image.height;\\n\\n\\t // Set up basic drawing context.\\n\\t this.ctx = this.canvas.getContext(\\\"2d\\\");\\n\\t this.ctx.translate(-minX, -minY);\\n\\t this.ctx.clearRect(minX, minY, width, height);\\n\\t this.ctx.strokeStyle = \\\"rgb(220,0,100)\\\";\\n\\n\\t this.transform = getProjectiveTransform(points);\\n\\n\\t // Begin subdivision process.\\n\\t var ptl = this.transform.transformProjectiveVector([0, 0, 1]);\\n\\t var ptr = this.transform.transformProjectiveVector([1, 0, 1]);\\n\\t var pbl = this.transform.transformProjectiveVector([0, 1, 1]);\\n\\t var pbr = this.transform.transformProjectiveVector([1, 1, 1]);\\n\\n\\t this.ctx.beginPath();\\n\\t this.ctx.moveTo(ptl[0], ptl[1]);\\n\\t this.ctx.lineTo(ptr[0], ptr[1]);\\n\\t this.ctx.lineTo(pbr[0], pbr[1]);\\n\\t this.ctx.lineTo(pbl[0], pbl[1]);\\n\\t this.ctx.closePath();\\n\\t this.ctx.clip();\\n\\n\\t this.bounds.length = 0;\\n\\t this.bounds.push(new jsPoint(ptl[0], ptl[1]));\\n\\t this.bounds.push(new jsPoint(ptr[0], ptr[1]));\\n\\t this.bounds.push(new jsPoint(pbr[0], pbr[1]));\\n\\t this.bounds.push(new jsPoint(pbl[0], pbl[1]));\\n\\t \\n\\t this.divide(0, 0, 1, 1, ptl, ptr, pbl, pbr, this.options.subdivisionLimit);\\n\\n\\t \\n\\t if (this.options.wireframe) {\\n\\t\\tthis.ctx.beginPath();\\n\\t\\tthis.ctx.moveTo(ptl[0], ptl[1]);\\n\\t\\tthis.ctx.lineTo(ptr[0], ptr[1]);\\n\\t\\tthis.ctx.lineTo(pbr[0], pbr[1]);\\n\\t\\tthis.ctx.lineTo(pbl[0], pbl[1]);\\n\\t\\tthis.ctx.closePath();\\n\\t\\tthis.ctx.stroke();\\n\\t }\\n\\t}\\n\\t//Render a projective patch.\\n\\tfunction divide(u1, v1, u4, v4, p1, p2, p3, p4, limit) {\\n\\t // See if we can still divide.\\n\\t if (limit) {\\n\\t\\t// Measure patch non-affinity.\\n\\t\\tvar d1 = [p2[0] + p3[0] - 2 * p1[0], p2[1] + p3[1] - 2 * p1[1]];\\n\\t\\tvar d2 = [p2[0] + p3[0] - 2 * p4[0], p2[1] + p3[1] - 2 * p4[1]];\\n\\t\\tvar d3 = [d1[0] + d2[0], d1[1] + d2[1]];\\n\\t\\tvar r = Math.abs((d3[0] * d3[0] + d3[1] * d3[1]) / (d1[0] * d2[0] + d1[1] * d2[1]));\\n\\n\\t\\t// Measure patch area.\\n\\t\\td1 = [p2[0] - p1[0] + p4[0] - p3[0], p2[1] - p1[1] + p4[1] - p3[1]];\\n\\t\\td2 = [p3[0] - p1[0] + p4[0] - p2[0], p3[1] - p1[1] + p4[1] - p2[1]];\\n\\t\\tvar area = Math.abs(d1[0] * d2[1] - d1[1] * d2[0]);\\n\\n\\t\\t// Check area > patchSize pixels (note factor 4 due to not averaging d1 and d2)\\n\\t\\t// The non-affinity measure is used as a correction factor.\\n\\t\\tif ((u1 == 0 && u4 == 1) || ((.25 + r * 5) * area > (this.options.patchSize * this.options.patchSize))) {\\n\\t\\t // Calculate subdivision points (middle, top, bottom, left, right).\\n\\t\\t var umid = (u1 + u4) / 2;\\n\\t\\t var vmid = (v1 + v4) / 2;\\n\\t\\t var pmid = this.transform.transformProjectiveVector([umid, vmid, 1]);\\n\\t\\t var pt = this.transform.transformProjectiveVector([umid, v1, 1]);\\n\\t\\t var pb = this.transform.transformProjectiveVector([umid, v4, 1]);\\n\\t\\t var pl = this.transform.transformProjectiveVector([u1, vmid, 1]);\\n\\t\\t var pr = this.transform.transformProjectiveVector([u4, vmid, 1]);\\n\\n\\t\\t // Subdivide.\\n\\t\\t limit--;\\n\\t\\t this.divide(u1, v1, umid, vmid, p1, pt, pl, pmid, limit);\\n\\t\\t this.divide(umid, v1, u4, vmid, pt, p2, pmid, pr, limit);\\n\\t\\t this.divide(u1, vmid, umid, v4, pl, pmid, p3, pb, limit);\\n\\t\\t this.divide(umid, vmid, u4, v4, pmid, pr, pb, p4, limit);\\n\\n\\t\\t if (this.options.wireframe) {\\n\\t\\t\\tthis.ctx.beginPath();\\n\\t\\t\\tthis.ctx.moveTo(pt[0], pt[1]);\\n\\t\\t\\tthis.ctx.lineTo(pb[0], pb[1]);\\n\\t\\t\\tthis.ctx.stroke();\\n\\n\\t\\t\\tthis.ctx.beginPath();\\n\\t\\t\\tthis.ctx.moveTo(pl[0], pl[1]);\\n\\t\\t\\tthis.ctx.lineTo(pr[0], pr[1]);\\n\\t\\t\\tthis.ctx.stroke();\\n\\t\\t }\\n\\n\\t\\t return;\\n\\t\\t}\\n\\t }\\n\\n\\t // Render this patch.\\n\\t this.ctx.save();\\n\\n\\t // Set clipping path.\\n\\t this.ctx.beginPath();\\n\\t this.ctx.moveTo(p1[0], p1[1]);\\n\\t this.ctx.lineTo(p2[0], p2[1]);\\n\\t this.ctx.lineTo(p4[0], p4[1]);\\n\\t this.ctx.lineTo(p3[0], p3[1]);\\n\\t this.ctx.closePath();\\n\\t //this.ctx.clip();\\n\\t \\n\\t // Get patch edge vectors.\\n\\t var d12 = [p2[0] - p1[0], p2[1] - p1[1]];\\n\\t var d24 = [p4[0] - p2[0], p4[1] - p2[1]];\\n\\t var d43 = [p3[0] - p4[0], p3[1] - p4[1]];\\n\\t var d31 = [p1[0] - p3[0], p1[1] - p3[1]];\\n\\t \\n\\t // Find the corner that encloses the most area\\n\\t var a1 = Math.abs(d12[0] * d31[1] - d12[1] * d31[0]);\\n\\t var a2 = Math.abs(d24[0] * d12[1] - d24[1] * d12[0]);\\n\\t var a4 = Math.abs(d43[0] * d24[1] - d43[1] * d24[0]);\\n\\t var a3 = Math.abs(d31[0] * d43[1] - d31[1] * d43[0]);\\n\\t var amax = Math.max(Math.max(a1, a2), Math.max(a3, a4));\\n\\t var dx = 0, dy = 0, padx = 0, pady = 0;\\n\\t \\n\\t // Align the this.transform along this corner.\\n\\t switch (amax) {\\n\\t\\tcase a1:\\n\\t\\t this.ctx.transform(d12[0], d12[1], -d31[0], -d31[1], p1[0], p1[1]);\\n\\t\\t // Calculate 1.05 pixel padding on vector basis.\\n\\t\\t if (u4 != 1) padx = 1.05 / Math.sqrt(d12[0] * d12[0] + d12[1] * d12[1]);\\n\\t\\t if (v4 != 1) pady = 1.05 / Math.sqrt(d31[0] * d31[0] + d31[1] * d31[1]);\\n\\t\\t break;\\n\\t\\tcase a2:\\n\\t\\t this.ctx.transform(d12[0], d12[1], d24[0], d24[1], p2[0], p2[1]);\\n\\t\\t // Calculate 1.05 pixel padding on vector basis.\\n\\t\\t if (u4 != 1) padx = 1.05 / Math.sqrt(d12[0] * d12[0] + d12[1] * d12[1]);\\n\\t\\t if (v4 != 1) pady = 1.05 / Math.sqrt(d24[0] * d24[0] + d24[1] * d24[1]);\\n\\t\\t dx = -1;\\n\\t\\t break;\\n\\t\\tcase a4:\\n\\t\\t this.ctx.transform(-d43[0], -d43[1], d24[0], d24[1], p4[0], p4[1]);\\n\\t\\t // Calculate 1.05 pixel padding on vector basis.\\n\\t\\t if (u4 != 1) padx = 1.05 / Math.sqrt(d43[0] * d43[0] + d43[1] * d43[1]);\\n\\t\\t if (v4 != 1) pady = 1.05 / Math.sqrt(d24[0] * d24[0] + d24[1] * d24[1]);\\n\\t\\t dx = -1;\\n\\t\\t dy = -1;\\n\\t\\t break;\\n\\t\\tcase a3:\\n\\t\\t // Calculate 1.05 pixel padding on vector basis.\\n\\t\\t this.ctx.transform(-d43[0], -d43[1], -d31[0], -d31[1], p3[0], p3[1]);\\n\\t\\t if (u4 != 1) padx = 1.05 / Math.sqrt(d43[0] * d43[0] + d43[1] * d43[1]);\\n\\t\\t if (v4 != 1) pady = 1.05 / Math.sqrt(d31[0] * d31[0] + d31[1] * d31[1]);\\n\\t\\t dy = -1;\\n\\t\\t break;\\n\\t }\\n\\t \\n\\t // Calculate image padding to match.\\n\\t var du = (u4 - u1);\\n\\t var dv = (v4 - v1);\\n\\t var padu = padx * du;\\n\\t var padv = pady * dv;\\n\\t this.ctx.drawImage(\\n\\t\\timage,\\n\\t\\tu1 * this.iw,\\n\\t\\tv1 * this.ih,\\n\\t\\tMath.min(u4 - u1 + padu, 1) * this.iw,\\n\\t\\tMath.min(v4 - v1 + padv, 1) * this.ih,\\n\\t\\tdx, dy,\\n\\t\\t//1 + padx, 1 + pady\\n\\t\\t1, 1\\n\\t );\\n\\n\\t this.ctx.restore();\\n\\t}\\n}\",\n \"function UpdateRender() {\\n // Set background\\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\\n\\n // Render\\n BackContextHandle.save();\\n Render();\\n BackContextHandle.restore();\\n\\n // Swap the backbuffer with the frontbuffer\\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\\n ContextHandle.putImageData(ImageData, 0, 0);\\n}\",\n \"function draw(){\\n\\t\\t// Needed to comply with Tool Delegate design pattern\\n\\t}\",\n \"function draw() {\\n\\t\\t\\t// Adjust render settings if we switched to multiple viewports or vice versa\\n\\t\\t\\tif (medeactx.frame_flags & medeactx.FRAME_VIEWPORT_UPDATED) {\\n\\t\\t\\t\\tif (medeactx.GetEnabledViewportCount()>1) {\\n\\t\\t\\t\\t\\tmedeactx.gl.enable(medeactx.gl.SCISSOR_TEST);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse {\\n\\t\\t\\t\\t\\tmedeactx.gl.disable(medeactx.gl.SCISSOR_TEST);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Perform rendering\\n\\t\\t\\tvar viewports = medeactx.GetViewports();\\n\\t\\t\\tfor(var vn = 0; vn < viewports.length; ++vn) {\\n\\t\\t\\t\\tviewports[vn].Render(medeactx,dtime);\\n\\t\\t\\t}\\n\\t\\t}\",\n \"function ProceduralRenderer3(){}\",\n \"function Renderer() {}\",\n \"function render() {\\n\\tctx.beginPath();\\n\\tctx.fillRect(-width, -height, 2*width, 2*height);\\n\\tctx.beginPath();\\n\\tdraw(document.getElementById('num').value, -10, -50, 10, -50);\\n}\",\n \"renderFrame(){\\n // calculate fps\\n let now = Date.now();\\n this.fps = Math.round( 1000/ (now-this.lastFrameTimestamp) );\\n this.lastFrameTimestamp = now;\\n\\n // calculate average fps\\n if( this.fpsLast.length < 60 ) this.fpsLast.push( this.fps );\\n else{\\n let sum = this.fpsLast.reduce(function(a, b) { return a + b }, 0);\\n let average = sum / this.fpsLast.length;\\n this.fpsAverage = Math.round( average );\\n this.fpsLast= [];\\n }\\n\\n if( this.edgeScrolling ) this.__edgeScrollingHandler();\\n\\n // clear viewport\\n this.Context.clearRect(0, 0, this.Canvas.width/this.Scale.current, this.Canvas.height/this.Scale.current);\\n //\\n // OPTIMIZATIONS TOSO: render only inscreen tiles\\n // render in invisible canvas and dumpmcntent whennscene is ready\\n //\\n // Iterate columns from right to left\\n for (var column =this.Map.columns-1; column >=0 ; column--){\\n // Iteraterows from top to bottom\\n for (var row =0; row < this.Map.rows ; row++){\\n // each cell can have multiple sprites, iterate them...\\n for (var layer = 0; layer < this.Map.tileData[row][column].length; layer++){\\n this.renderTile( this.Map.tileData[row][column][layer], column, row);\\n\\n //this.Context.globalAlpha = 0.10;\\n //this.renderTile( 7, column, row );\\n //this.Context.globalAlpha = 1;\\n }\\n }\\n }\\n\\n if(this.showProfiler) this.renderProfiler();\\n\\n let focusedTile = this.getTileFromCoords(this.Mouse.x, this.Mouse.y);\\n if(focusedTile){\\n this.Context.globalAlpha = 0.40;\\n this.renderTile( 7, focusedTile.column, focusedTile.row );\\n this.Context.globalAlpha = 1;\\n }\\n }\",\n \"draw() {\\n var c2 = document.getElementById(this.canvasId);\\n\\n if (c2 instanceof HTMLCanvasElement) {\\n var ctx2 = c2.getContext('2d');\\n }\\n else {\\n throw 'c2 is not a canvas';\\n }\\n\\n var c1 = document.createElement('canvas');\\n\\n if (c1 instanceof HTMLCanvasElement) {\\n c1.width = this.size;\\n c1.height = this.size;\\n var ctx1 = c1.getContext('2d');\\n\\n if (ctx1 === null || ctx1 === undefined) {\\n throw 'ctx1 is null';\\n }\\n\\n var pixelData1 = new Array(this.size * this.size);\\n\\n var imgData = ctx1.createImageData(this.size, this.size);\\n for (var i = 0; i < this.size; i++) {\\n for (var j = 0; j < this.size; j++) {\\n var k = j * this.size;\\n\\n var position = this.positions[i + k];\\n var pixelData = position.getPixelData();\\n pixelData1[i + k] = {};\\n\\n // Get pixel data for each pass\\n // foreach pass\\n // px = pass.getPixelData(position, pixelData, i + k);\\n $(this.passes).each(function(i : number, pass : WP.WorldPass) {\\n pass.getPixelData(position);\\n pixelData1[i + k].r = pixelData.r;\\n pixelData1[i + k].g = pixelData.g;\\n pixelData1[i + k].b = pixelData.b;\\n });\\n\\n }\\n }\\n console.log(pixelData);\\n\\n for (var i = 0; i < imgData.data.length; i+= 4) {\\n var j = i/4;\\n\\n var r = pixelData1[j].r;\\n if (r != null) {\\n imgData.data[i] = r;\\n }\\n var g = pixelData1[j].g;\\n if (g != null) {\\n imgData.data[i+1] = g;\\n }\\n var b = pixelData1[j].b;\\n if (b != null) {\\n imgData.data[i+2] = b;\\n }\\n\\n imgData.data[i+3] = 255;\\n\\n }\\n ctx1.putImageData(imgData, 0, 0);\\n\\n //ctx2.mozImageSmoothingEnabled = false;\\n //ctx2.webkitImageSmoothingEnabled = false;\\n //ctx2.msImageSmoothingEnabled = false;\\n //ctx2.imageSmoothingEnabled = false;\\n if (ctx2 instanceof CanvasRenderingContext2D) {\\n ctx2.drawImage(c1, 0, 0, this.size * 2, this.size * 2);\\n }\\n else {\\n throw 'ctx2 is not a canvas rendering context';\\n }\\n\\n }\\n\\n }\",\n \"function draw() {\\n\\tvar meshes = io.meshes();\\n\\tvar fibres = io.fibres();\\n\\t\\n\\tgl.enable(gl.DEPTH_TEST);\\n\\tgl.depthFunc(gl.LEQUAL);\\n gl.clearDepth(1);\\n \\n var peels = mygl.peels();\\n var peelFramebuffer = mygl.peelFramebuffer();\\n //***************************************************************************************************\\n //\\n // Pass 1 - draw opaque objects\\n //\\n //***************************************************************************************************/\\n\\tvariables.webgl.minorMode = 4;\\n\\t// set render target to C0\\n\\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['C0'], 0);\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n\\n if ( scene.getValue( 'showSlices' ) ) {\\n\\t\\tdrawSlices();\\n\\t}\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"mesh\\\" && ( this.display || this.display2 ) && this.transparency == 1.0 ) {\\n\\t\\t\\tdrawMesh(this);\\n\\t\\t}\\n\\t});\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"texmesh\\\" && ( this.display || this.display2 ) && this.transparency == 1.0 ) {\\n\\t\\t\\tdrawTexMesh(this);\\n\\t\\t}\\n\\t});\\n\\t\\n\\t$.each(fibres, function() {\\n\\t\\tif (( this.display || this.display2 ) && this.transparency == 1.0 ) {\\n\\t\\t\\tdrawFibers(this);\\n\\t\\t}\\n\\t});\\n\\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\n\\tvariables.webgl.minorMode = 5;\\n\\t// set render target to D0\\n\\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D0'], 0);\\n gl.clearColor(variables.backgroundColor[0], variables.backgroundColor[1], variables.backgroundColor[2], 0.0);\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n \\n\\tif ( scene.getValue( 'showSlices' ) ) {\\n\\t\\tdrawSlices();\\n\\t}\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"mesh\\\" && ( this.display || this.display2 ) && this.transparency == 1.0 ) {\\n\\t\\t\\tdrawMeshTransp(this);\\n\\t\\t}\\n\\t});\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"texmesh\\\" && ( this.display || this.display2 ) && this.transparency == 1.0 ) {\\n\\t\\t\\tdrawTexMeshTransp(this);\\n\\t\\t}\\n\\t});\\n\\t\\n\\t$.each(fibres, function() {\\n\\t\\tif (( this.display || this.display2 ) && this.transparency == 1.0 ) {\\n\\t\\t\\tdrawFibersTransp(this);\\n\\t\\t}\\n\\t});\\n\\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\t\\n\\t//***************************************************************************************************\\n //\\n // Pass 2\\n //\\n //***************************************************************************************************/\\n\\tvariables.webgl.minorMode = 9;\\n\\t// set render target to C1\\n\\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['C1'], 0);\\n gl.clearColor(variables.backgroundColor[0], variables.backgroundColor[1], variables.backgroundColor[2], 0.0);\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"mesh\\\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawMesh(this);\\n\\t\\t}\\n\\t});\\n\\n\\t$.each(fibres, function() {\\n\\t\\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawFibers(this);\\n\\t\\t}\\n\\t});\\n\\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\t\\n\\tvariables.webgl.minorMode = 6;\\n\\t// set render target to D1\\n\\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D1'], 0);\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"mesh\\\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawMeshTransp(this);\\n\\t\\t}\\n\\t});\\n\\t$.each(fibres, function() {\\n\\t\\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawFibersTransp(this);\\n\\t\\t}\\n\\t});\\n\\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\t\\n\\t//***************************************************************************************************\\n //\\n // Pass 3\\n //\\n //***************************************************************************************************/\\n\\tvariables.webgl.minorMode = 10;\\n\\t// set render target to C2\\n\\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['C2'], 0);\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"mesh\\\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawMesh(this);\\n\\t\\t}\\n\\t});\\n\\t\\n\\t$.each(fibres, function() {\\n\\t\\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawFibers(this);\\n\\t\\t}\\n\\t});\\n\\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\t\\n\\tvariables.webgl.minorMode = 7;\\n\\t// set render target to D2\\n\\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D2'], 0);\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"mesh\\\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawMeshTransp(this);\\n\\t\\t}\\n\\t});\\n\\t$.each(fibres, function() {\\n\\t\\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawFibersTransp(this);\\n\\t\\t}\\n\\t});\\n\\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\t\\n\\t//***************************************************************************************************\\n //\\n // Pass 4\\n //\\n //***************************************************************************************************/\\n\\tvariables.webgl.minorMode = 11;\\n\\t// set render target to C3\\n\\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['C3'], 0);\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"mesh\\\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawMesh(this);\\n\\t\\t}\\n\\t});\\n\\t\\n\\t\\n\\t$.each(fibres, function() {\\n\\t\\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawFibers(this);\\n\\t\\t}\\n\\t});\\n\\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\t\\n\\tvariables.webgl.minorMode = 8;\\n\\t// set render target to D1b\\n\\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D1'], 0);\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"mesh\\\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawMeshTransp(this);\\n\\t\\t}\\n\\t});\\n\\t$.each(fibres, function() {\\n\\t\\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawFibersTransp(this);\\n\\t\\t}\\n\\t});\\n\\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\t\\n\\t//***************************************************************************************************\\n //\\n // Pass 5\\n //\\n //***************************************************************************************************/\\n\\tvariables.webgl.minorMode = 12;\\n\\t// set render target to C3\\n\\tgl.bindFramebuffer( gl.FRAMEBUFFER, peelFramebuffer );\\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, peels['D2'], 0);\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n\\t\\n\\t$.each(meshes, function() {\\n\\t\\tif ( this.type === \\\"mesh\\\" && ( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawMesh(this);\\n\\t\\t}\\n\\t});\\n\\t$.each(fibres, function() {\\n\\t\\tif (( this.display || this.display2 ) && this.transparency < 1.0 ) {\\n\\t\\t\\tdrawFibers(this);\\n\\t\\t}\\n\\t});\\n\\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\\n\\t\\n\\t\\n\\t//***************************************************************************************************\\n //\\n // Pass 6 - merge previous results and render on quad\\n //\\n //***************************************************************************************************/\\t\\n\\tgl.useProgram(shaders['merge']);\\n\\tgl.enableVertexAttribArray(shaders['merge'].aVertexPosition);\\n\\t\\n\\tvar posBuffer = gl.createBuffer();\\n\\tgl.bindBuffer(gl.ARRAY_BUFFER, posBuffer);\\n\\t\\n\\tvar vertices = [ -gl.viewportWidth, -10, 0, \\n\\t gl.viewportWidth, -10, 0,\\n\\t gl.viewportWidth, gl.viewportHeight, 0,\\n\\t -gl.viewportWidth0, gl.viewportHeight, 0 ];\\n\\t\\n\\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\\n\\tgl.vertexAttribPointer(shaders['merge'].aVertexPosition, 3, gl.FLOAT, false, 0, 0);\\n\\tgl.uniform2f(shaders['merge'].uCanvasSize, gl.viewportWidth, gl.viewportHeight);\\n\\t\\n\\tgl.activeTexture( gl.TEXTURE2 );\\n\\tgl.bindTexture( gl.TEXTURE_2D, peels['C0'] );\\n\\tgl.uniform1i(shaders['merge'].C0, 2);\\n\\t\\n\\tgl.activeTexture( gl.TEXTURE6 );\\n\\tgl.bindTexture( gl.TEXTURE_2D, peels['C1'] );\\n\\tgl.uniform1i(shaders['merge'].C1, 6);\\n\\t\\n\\tgl.activeTexture( gl.TEXTURE7 );\\n\\tgl.bindTexture( gl.TEXTURE_2D, peels['C2'] );\\n\\tgl.uniform1i(shaders['merge'].C2, 7);\\n\\t\\n\\tgl.activeTexture( gl.TEXTURE8 );\\n\\tgl.bindTexture( gl.TEXTURE_2D, peels['C3'] );\\n\\tgl.uniform1i(shaders['merge'].C3, 8);\\n\\t\\n\\tgl.activeTexture( gl.TEXTURE5 );\\n\\tgl.bindTexture( gl.TEXTURE_2D, peels['D2'] );\\n\\tgl.uniform1i(shaders['merge'].D2, 5);\\n\\t\\n\\tvar vertexIndexBuffer = gl.createBuffer();\\n\\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vertexIndexBuffer);\\n\\tvar vertexIndices = [ 0, 1, 2, 0, 2, 3 ];\\n\\tgl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(vertexIndices), gl.STATIC_DRAW);\\n\\n\\tgl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);\\n}\",\n \"function Draw_Init(obj)\\r\\n{\\r\\n\\tvar canvas3d = document.getElementById(\\\"ID_CANVAS_3D\\\");\\r\\n\\tcanvas3d.setAttribute(\\\"hidden\\\",\\\"\\\");\\r\\n\\tCreateCanvas();\\r\\n if(obj != undefined)\\r\\n {\\r\\n BoundBoxs =[];\\r\\n // ctx.clearRect(0, 0, canvas.width, canvas.height);\\r\\n //ctx.clearRect(0,0,obj.width,obj.height);\\r\\n// m_worldPos.x =0;\\r\\n// m_worldPos.y =0;\\r\\n// m_mouseOldPos.x = 0;\\r\\n// m_mouseOldPos.y = 0;\\r\\n mousewheelevt=(/Firefox/i.test(navigator.userAgent))? \\\"DOMMouseScroll\\\" : \\\"mousewheel\\\"\\r\\n \\r\\n if (canvas.attachEvent) //if IE (and Opera depending on user setting)\\r\\n {\\r\\n canvas.attachEvent(\\\"on\\\"+mousewheelevt, onmousewheel);\\r\\n }\\r\\n else if (canvas.addEventListener) //WC3 browsers\\r\\n {\\r\\n canvas.addEventListener(mousewheelevt, onmousewheel, false);\\r\\n }\\r\\n \\r\\n// m_bAutoscale =false;\\r\\n //캔버스 사이즈 와 svg 사이즈를 비교한다\\r\\n //큰축을 기준으로 스케일을 만든다.\\r\\n \\r\\n// m_wordldScale.x =1;\\r\\n// m_wordldScale.y=1;\\r\\n }\\r\\n}\",\n \"function renderCanvas()\\n {\\n if (drawing)\\n {\\n context.moveTo(lastPos.x, lastPos.y);\\n context.lineTo(mousePos.x, mousePos.y);\\n context.stroke();\\n lastPos = mousePos;\\n }\\n }\",\n \"function updateDraw() {\\n terrain.draw();\\n car.draw();\\n colorText(mouseX, mouseY, \\\"(\\\"+Math.floor(mouseX / 120)+\\\", \\\"+Math.floor(mouseY / 80)+\\\")\\\", 12, 'white');\\n}\",\n \"display() {\\n strokeWeight(1);\\n stroke(200);\\n fill(200);\\n beginShape();\\n for (let i = 0; i < this.surface.length; i++) {\\n let v = scaleToPixels(this.surface[i]);\\n vertex(v.x, v.y);\\n }\\n vertex(width, height);\\n vertex(0, height);\\n endShape(CLOSE);\\n }\",\n \"draw() {\\n\\n }\",\n \"function render() {\\r\\n // Dessine une frame\\r\\n drawFrame();\\r\\n\\r\\n // Affiche le niveau\\r\\n drawLevel();\\r\\n\\r\\n //Dessine l'angle de la souris\\r\\n renderMouseAngle();\\r\\n\\r\\n // Dessine le player\\r\\n drawPlayer();\\r\\n\\r\\n }\",\n \"function draw() {\\r\\n \\r\\n}\",\n \"function cw_drawScreen() {\\n ctx.clearRect(0,0,canvas.width,canvas.height);\\n ctx.save();\\n ctx.translate(400, 200);\\n ctx.scale(1.5*zoom, -zoom);\\n cw_drawFloor(floorBody);\\n //cw_drawFloor(boxBody);\\n cw_drawCar(carBody);\\n ctx.restore();\\n}\",\n \"function Main() {\\r\\n \\r\\n//....................................Set up viewport\\r\\n canvas1 = document.getElementById(\\\"canvas1\\\");\\r\\n\\r\\n //disable right click context menu on canvas\\r\\n canvas1.oncontextmenu=function() {return false;};\\r\\n\\r\\n GL = WebGLUtils.setupWebGL(canvas1, { depth: true, preserveDrawingBuffer: true });\\r\\n camera=new CCamera();\\r\\n\\r\\n line=new CLine(GL, canvas1);\\r\\n sprite=new CSprite(GL);\\r\\n glsel=new SelectionEngine(GL);\\r\\n \\r\\n//.....................................Resizing mechanics\\r\\n width = $(\\\"#candiv\\\").innerWidth();\\r\\n height = $(\\\"#candiv\\\").innerHeight(); \\r\\n\\r\\n canvas1.width=width;\\r\\n canvas1.height=height;\\r\\n\\r\\n\\r\\n $(window).resize(function () {\\r\\n width = $(\\\"#candiv\\\").innerWidth();\\r\\n height = $(\\\"#candiv\\\").innerHeight();\\r\\n\\r\\n canvas1.width=width;\\r\\n canvas1.height=height;\\r\\n });\\r\\n\\r\\n//........................................Mouse interactions\\r\\n $(canvas1).mousedown(OnMouseDown);\\r\\n $(canvas1).mouseup(OnMouseUp);\\r\\n $(canvas1).mousemove(OnMouseMove);\\r\\n\\r\\n\\r\\n//.....................................Set Up Shaders\\r\\n SetUpShaders(GL);\\r\\n SetUpUserInterface(GL);\\r\\n//..........................................Start rendering recurcion\\r\\n CreateUI();\\r\\n setInterval(function(){RequestUpdate();},500);\\r\\n OnFrameUpdate();\\r\\n\\r\\n}\",\n \"function draw() {\\n \\n}\",\n \"draw() {\\n }\",\n \"function draw() {\\n \\n}\",\n \"function Renderer(args) {\\n\\n\\n}\",\n \"renderSSAO(scene, camera, { clear = true, draw = true } = { clear: true, draw: true }) {\\n if (clear) {\\n this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight)\\n this.imgData = this.ctx.getImageData(0, 0, this.canvasWidth, this.canvasHeight)\\n this.data = this.imgData.data\\n this.zBuffer.fill(-Infinity)\\n }\\n\\n let { imgData, data } = this\\n\\n // setup\\n let { model, light } = scene\\n let { shader } = model\\n let { viewportTr } = camera\\n\\n shader.updateUniform({\\n uniM: camera.uniM,\\n lightDir: light.dir,\\n })\\n\\n let renderingTime = new Date()\\n let coords = []\\n\\n let width = camera.vW\\n let height = camera.vH\\n\\n // first pass, using depth shader\\n\\n for (let fi = 0; fi < model.faces.length; fi++) {\\n for (let vi = 0; vi < 3; vi++) {\\n coords[vi] = shader.vertex(fi, vi)\\n }\\n triangleWithZBuffer(...coords, shader, this.zBuffer, data, this.canvasWidth, viewportTr, draw)\\n }\\n\\n // second pass\\n\\n for (let x = 0; x < width; x++) {\\n for (let y = 0; y < height; y++) {\\n if (this.zBuffer[(height - 1 - y) * width + x] < -1e5) continue\\n\\n let bufferIdx = (width - 1 - y) * width + x\\n\\n let total = 0\\n // - 1e-4 for preventing extra round due to the float type\\n // from ssloy's\\n for (let deg = 0; deg < 2 * Math.PI - 1e-4; deg += Math.PI / 4) {\\n let dx = Math.round(Math.cos(deg))\\n let dy = Math.round(Math.sin(deg))\\n\\n let tx = x + dx\\n let ty = y + dy\\n let tIdx = (width - 1 - ty) * width + tx\\n let diffZ = this.zBuffer[tIdx] - this.zBuffer[bufferIdx]\\n\\n if (diffZ < 0) {\\n total += Math.PI / 2\\n continue\\n }\\n let maxElevationAngle = Math.atan(diffZ / Math.sqrt(dx ** 2 + dy ** 2))\\n total += Math.PI / 2 - maxElevationAngle\\n }\\n\\n total /= Math.PI * 4\\n total *= 255\\n\\n // total = Math.pow(total, 100) * 255\\n data[bufferIdx * 4 + 0] = total\\n data[bufferIdx * 4 + 1] = total\\n data[bufferIdx * 4 + 2] = total\\n }\\n }\\n\\n console.log(\\\"render: \\\", new Date() - renderingTime, \\\"ms\\\")\\n this.ctx.putImageData(imgData, 0, 0)\\n }\",\n \"draw(){\\n push();\\n\\n beginShape();\\n texture(this.texture);\\n textureWrap(MIRROR);\\n //draw as a rectangle, divide by 2 for width and height\\n vertex(this.getX() - (this.w/2.0), this.getY() - (this.h/2.0),CENTER,TOP_EDGE); //bottom right, CCW, Need UV coordinates for texture mapping\\n vertex(this.getX() + (this.w/2.0), this.getY() - (this.h/2.0),RIGHT_EDGE,TOP_EDGE); //for some reason this starts on bottom right?\\n vertex(this.getX() + (this.w/2.0), this.getY() + (this.h/2.0),RIGHT_EDGE,CENTER);\\n vertex(this.getX() - (this.w/2.0), this.getY() + (this.h/2.0),CENTER,CENTER);\\n\\n endShape(CLOSE);\\n\\n pop();\\n }\",\n \"function game_draw() {\\r\\n /*\\r\\n\\tthis.BackSurfaceDraw();\\r\\n\\r\\n\\tobCtrl.draw();\\r\\n\\r\\n\\tthis.FrontSurfaceDraw();\\r\\n\\r\\n\\treturn;\\r\\n */\\r\\n\\t //\\t work2.putImageTransform(tex_bg, 0, scroll_y - (480 * (1 - scrollsw)), 1, 0, 0, -1);\\r\\n\\r\\n\\t scenechange = true;\\r\\n \\r\\n\\t if ((scroll_x != dev.gs.world_x) || (scroll_y != dev.gs.world_y)) {\\r\\n\\r\\n\\t scenechange = false;\\r\\n\\r\\n\\t scroll_x = dev.gs.world_x;\\r\\n\\t scroll_y = dev.gs.world_y;\\r\\n\\t }\\r\\n\\t \\r\\n //scenechange = false;\\r\\n\\t if (!scenechange) {\\r\\n\\r\\n\\t for (var i in mapChip) {\\r\\n\\t var mc = mapChip[i];\\r\\n\\r\\n\\t //\\t if ((dev.gs.in_view(mc.x, mc.y)) || (dev.gs.in_view(mc.x + mc.w, mc.y)) ||\\r\\n\\t // (dev.gs.in_view(mc.x, mc.y + mc.h)) || (dev.gs.in_view(mc.x + mc.w, mc.y + mc.h))||\\r\\n\\t // (dev.gs.in_view(mc.x + mc.w/2, mc.y + mc.h/2))) {\\r\\n\\r\\n\\t if (dev.gs.in_stage_range(mc.x, mc.y, mc.w, mc.h)) {\\r\\n\\t mc.view = true;//視界に入っている(当たり判定有効扱いの為のフラグ)\\r\\n\\t var w = dev.gs.worldtoView(mc.x, mc.y);\\r\\n\\r\\n\\t //work2.putchr(Number(mc.type).toString(16), w.x, w.y);\\r\\n\\r\\n\\t if (mc.visible) {//表示するマップチップ(当たり判定用で表示しないものもあるため)\\r\\n\\t var wfg = false;\\r\\n\\t if (mc.type == 11) wfg = true;\\r\\n\\t //if (Boolean(tex_bg[mc.no])) {\\r\\n\\t if (Boolean(bgData[mc.no])) {\\r\\n\\t if (wfg) {\\r\\n\\t forgroundBG.putPattern(tex_bg, bgData[mc.no], w.x, w.y - 24, mc.w, mc.h);\\r\\n\\t //work2.putPattern(tex_bg, bgData[mc.no], w.x, w.y, mc.w, mc.h);\\r\\n\\t } else {\\r\\n\\t work2.putPattern(tex_bg, bgData[mc.no], w.x, w.y, mc.w, mc.h);\\r\\n\\t }\\r\\n\\r\\n\\t //work2.putchr(Number(mc.no).toString(), w.x, w.y);\\r\\n\\t } else {\\r\\n\\t var cl = {}\\r\\n\\t cl.x = w.x;\\r\\n\\t cl.y = w.y;\\r\\n\\t cl.w = mc.w;\\r\\n\\t cl.h = mc.h;\\r\\n\\r\\n\\t cl.draw = function (device) {\\r\\n\\t device.beginPath();\\r\\n\\r\\n\\t device.strokeStyle = \\\"green\\\";\\r\\n\\t device.lineWidth = 1;\\r\\n\\t device.rect(this.x, this.y, this.w, this.h);\\r\\n\\t device.stroke();\\r\\n\\t }\\r\\n\\r\\n\\t work2.putFunc(cl);\\r\\n\\t //work2.putchr(Number(mc.no).toString(), w.x, w.y);\\r\\n\\t }\\r\\n\\t }\\r\\n\\t //壁の当たり判定有無確認用のデバックコード\\r\\n /*\\r\\n\\t if (mc.c) {\\r\\n\\t var cl = {}\\r\\n\\t cl.x = w.x;\\r\\n\\t cl.y = w.y;\\r\\n\\t cl.w = mc.w;\\r\\n\\t cl.h = mc.h;\\r\\n\\r\\n\\t cl.draw = function (device) {\\r\\n\\t device.beginPath();\\r\\n\\r\\n\\t device.strokeStyle = \\\"green\\\";\\r\\n\\t device.lineWidth = 1;\\r\\n\\t device.rect(this.x, this.y, this.w, this.h);\\r\\n\\t device.stroke();\\r\\n\\t }\\r\\n\\r\\n\\t work2.putFunc(cl);\\r\\n\\r\\n\\t }\\r\\n */\\r\\n\\t // work2.putchr(Number(mc.type).toString(16), w.x, w.y);\\r\\n\\t } else {\\r\\n\\t mc.view = false;\\r\\n\\t }\\r\\n\\t //\\t work2.putImage(tex_bg, 0, scroll_y - 480);\\r\\n\\t //\\t work2.putImage(tex_bg, 0, scroll_y);\\r\\n\\t }\\r\\n\\r\\n\\t //obCtrl.drawPoint(forgroundBG, lampf);//Forgroundへ表示\\r\\n\\r\\n\\t //縮小マップ枠\\r\\n /*\\r\\n\\t var cl = {}\\r\\n\\t cl.draw = function (device) {\\r\\n\\t device.beginPath();\\r\\n\\t device.fillStyle = \\\"rgba(0,0,0,0.3)\\\";\\r\\n\\t device.fillRect(dev.layout.map_x, dev.layout.map_y, 150, 150);\\r\\n\\t }\\r\\n */\\r\\n \\r\\n\\t forgroundBG.putFunc(SubmapframeDraw);\\r\\n\\r\\n\\t obCtrl.drawPoint(forgroundBG, lampf); //Forgroundへ表示\\r\\n\\r\\n\\t //一番下の行消す(clipすんのがいいかも\\r\\n /*\\r\\n\\t var cl = {}\\r\\n\\t cl.draw = function (device) {\\r\\n\\t device.beginPath();\\r\\n\\t device.fillStyle = \\\"rgba(0,0,0,0.5)\\\";\\r\\n\\t device.fillRect(0, 480 - 36, 640 - 13* 13, 36);\\r\\n\\t }\\r\\n */\\r\\n\\t forgroundBG.putFunc(ButtomlineBackgroundDraw);\\r\\n \\r\\n work2.clear(\\\"black\\\");\\r\\n\\t work2.draw();\\r\\n\\t work2.reset();\\r\\n\\r\\n\\t forgroundBG.clear();\\r\\n\\t forgroundBG.draw();\\r\\n\\t forgroundBG.reset();\\r\\n }\\r\\n\\r\\n //==この↑は背景描画\\r\\n\\t obCtrl.draw();\\r\\n//\\t obCtrl.drawPoint(work);\\r\\n\\r\\n\\t //== ここから文字表示画面(出来るだけ書き換えを少なくする)\\r\\n\\t //プライオリティ最前面の画面追加したので\\r\\n\\t var scdispview = false;\\r\\n \\r\\n\\t fdrawcnt++;\\r\\n\\t if ((fdrawcnt % 6) == 0) {\\r\\n\\t fdrawcnt = 0;\\r\\n\\t scdispview = true;\\r\\n\\t }\\r\\n \\r\\n\\t //var scdispview = true;\\r\\n\\r\\n\\t if (scdispview) {\\r\\n\\r\\n\\t //work3.putchr(\\\"a\\\", mapsc.flame / 20, mapsc.flame / 20);\\r\\n\\r\\n\\t //work3.clear();\\r\\n\\t //work3.draw();\\r\\n\\t //work3.reset();\\r\\n\\r\\n\\t var wtxt = [];\\r\\n\\t /*\\r\\n\\t if (!lampf) {\\r\\n\\t work3.fill(0, 0, work3.cw, work3.ch, \\\"blue\\\"); // , \\\"darkblue\\\");\\r\\n\\t } else {\\r\\n\\t work3.fill(0, 0, work3.cw, work3.ch); // , \\\"darkblue\\\");\\r\\n\\t }\\r\\n\\t */\\r\\n\\r\\n\\t work3.fill(dev.layout.hiscore_x + 12 * 6, dev.layout.hiscore_y, 12 * 7, 32); // , \\\"darkblue\\\");\\r\\n\\r\\n\\t wt = ehighscore.read(state.Result.highscore);\\r\\n\\t work3.putchr(\\\"Hi-Sc:\\\" + wt, dev.layout.hiscore_x, dev.layout.hiscore_y);\\r\\n\\r\\n\\t wt = escore.read(obCtrl.score);\\r\\n\\t work3.putchr(\\\"Score:\\\" + wt, dev.layout.score_x, dev.layout.score_y);\\r\\n\\r\\n\\t //残機表示\\r\\n\\t var zc = 2 - dead_cnt;\\r\\n\\r\\n\\t if (zc < 3) {\\r\\n\\t for (var i = 0; i < 2 - dead_cnt; i++) {\\r\\n\\t work3.put(\\\"Mayura1\\\", dev.layout.zanki_x + i * 32, dev.layout.zanki_y);\\r\\n\\t }\\r\\n\\t } else {\\r\\n\\t work3.put(\\\"Mayura1\\\", dev.layout.zanki_x, dev.layout.zanki_y);\\r\\n\\t work3.putchr(\\\"x\\\" + zc, dev.layout.zanki_x + 16, dev.layout.zanki_y);\\r\\n\\t }\\r\\n\\r\\n\\t //ball表示\\r\\n\\t if (Boolean(obCtrl.item[20])) {\\r\\n\\t var n = obCtrl.item[20];\\r\\n\\t if (n <= 8) {\\r\\n\\t //n = 16;\\r\\n\\r\\n\\t for (var i = 0; i < n; i++) {\\r\\n\\t work3.put(\\\"Ball1\\\",\\r\\n dev.layout.zanki_x + i * 20 + 288, dev.layout.zanki_y - 8);\\r\\n\\t }\\r\\n\\t } else {\\r\\n\\t work3.put(\\\"Ball1\\\",\\r\\n dev.layout.zanki_x + 288, dev.layout.zanki_y - 8);\\r\\n\\r\\n\\t work3.putchr8(\\\"x\\\" + n, dev.layout.zanki_x + 288 + 10, dev.layout.zanki_y - 12);\\r\\n\\t }\\r\\n\\t }\\r\\n\\r\\n\\t //取得アイテム表示\\r\\n\\t if (Boolean(obCtrl.itemstack)) {\\r\\n\\r\\n\\t var wchr = { 20: \\\"Ball1\\\", 23: \\\"BallB1\\\", 24: \\\"BallS1\\\", 25: \\\"BallL1\\\" }\\r\\n\\t var witem = [];\\r\\n\\r\\n\\t for (var i in obCtrl.itemstack) {\\r\\n\\t var w = obCtrl.itemstack[i];\\r\\n\\t witem.push(w);\\r\\n\\t }\\r\\n\\r\\n\\t work3.putchr8(\\\"[X]\\\", dev.layout.zanki_x + 132 - 16, dev.layout.zanki_y - 16);\\r\\n\\t n = witem.length;\\r\\n\\r\\n\\t if (n >= 18) n = 18;\\r\\n\\t //if (n >= 7) n = 7;\\r\\n\\r\\n\\t for (var i = 0; i < n; i++) {\\r\\n\\r\\n\\t if (i == 0) {\\r\\n\\t work3.put(wchr[witem[witem.length - 1 - i]],\\r\\n dev.layout.zanki_x + i * 20 + 132, dev.layout.zanki_y);\\r\\n\\t //640 - (12 * 12), 479 - 32 + 5);\\r\\n\\t } else {\\r\\n\\t work3.put(wchr[witem[witem.length - 1 - i]],\\r\\n dev.layout.zanki_x + i * 20 + 136, dev.layout.zanki_y + 8);\\r\\n\\t }\\r\\n\\t }\\r\\n\\r\\n\\t }\\r\\n\\r\\n\\t n = 0;\\r\\n\\t if (Boolean(obCtrl.item[22])) {\\r\\n\\t n = obCtrl.item[22];\\r\\n\\t }\\r\\n\\t if (n > 0) work3.put(\\\"Key\\\", dev.layout.zanki_x + 64, dev.layout.zanki_y);\\r\\n\\r\\n\\t var wweapon = [\\\"Wand\\\", \\\"Knife\\\", \\\"Axe\\\", \\\"Boom\\\", \\\"Spear\\\"];\\r\\n\\r\\n\\t if (!Boolean(state.Game.player.weapon)) state.Game.player.weapon = 0;\\r\\n\\r\\n\\t work3.putchr8(\\\"[Z]\\\", dev.layout.zanki_x + 96 - 16, dev.layout.zanki_y - 16);\\r\\n\\t work3.put(wweapon[state.Game.player.weapon], dev.layout.zanki_x + 96, dev.layout.zanki_y);\\r\\n\\r\\n\\t work3.putchr(\\\"Floor \\\" + mapsc.stage, dev.layout.stage_x, dev.layout.stage_y);\\r\\n\\r\\n\\t work3.putchr(\\\"Time:\\\" + Math.floor((7200 - mapsc.flame) / 6), dev.layout.time_x, dev.layout.time_y);\\r\\n\\r\\n\\t //work3.putchr8(\\\"ITEM\\\", dev.layout.hp_x , dev.layout.hp_y - 40);\\r\\n\\r\\n\\t var w_hp = (state.Game.player.hp > 0) ? state.Game.player.hp : 0;\\r\\n\\r\\n\\t HpbarDraw.hp = w_hp; \\r\\n HpbarDraw.mhp = state.Game.player.maxhp;\\r\\n HpbarDraw.br = state.Game.player.barrier;\\r\\n\\t //var cl = { hp: w_hp, mhp: state.Game.player.maxhp, br: state.Game.player.barrier }\\r\\n /*\\r\\n\\t cl.draw = function (device) {\\r\\n\\t device.beginPath();\\r\\n\\t device.fillStyle = (this.br)?\\\"skyblue\\\":\\\"limegreen\\\";\\r\\n\\t device.lineWidth = 1;\\r\\n\\t device.fillRect(dev.layout.hp_x + 1, dev.layout.hp_y + 1, this.hp, 14);\\r\\n\\t device.stroke();\\r\\n\\r\\n\\t device.beginPath();\\r\\n\\t device.strokeStyle = \\\"white\\\"; ;\\r\\n\\t device.lineWidth = 1;\\r\\n\\t device.rect(dev.layout.hp_x, dev.layout.hp_y, this.mhp, 15);\\r\\n\\t device.stroke();\\r\\n\\t }\\r\\n */\\r\\n\\t work3.putFunc(HpbarDraw);\\r\\n \\r\\n\\t //work3.putchr(w_st, dev.layout.hp_x + 16 - w_st.length * 12, dev.layout.hp_y - 12);\\r\\n var wst = \\\"HP:\\\" + w_hp + \\\"/\\\" + state.Game.player.maxhp;\\r\\n\\r\\n if (state.Game.player.barrier) {\\r\\n wst = \\\"!!SHIELD!!\\\"; \\r\\n }\\r\\n\\t work3.putchr8(wst, dev.layout.hp_x + 8, dev.layout.hp_y + 4);\\r\\n\\t }\\r\\n\\r\\n if (obCtrl.interrapt && (obCtrl.SIGNAL == 1)) {\\r\\n work3.putchr(\\\" == PAUSE ==\\\", 320 - 50, 200);\\r\\n work3.putchr(\\\"Push key or [Space] \\\", 320 - 100, 220);\\r\\n work3.putchr(\\\" Return game.\\\", 320 - 50, 240);\\r\\n work3.putchr(\\\"Push key /\\\", 320 - 100, 260);\\r\\n work3.putchr(\\\"Save and Quit.\\\", 320 - 50, 280); \\r\\n\\r\\n } else {\\r\\n work3.fill(320 - 100, 200, 12 * 24, 20 * 5);\\r\\n }\\r\\n\\r\\n //work.putchr(dev.sound.info() + \\\".\\\" + dev.sound.running(), 320 - 50, 260);\\r\\n \\r\\n\\r\\n //debug true の場合以下表示\\r\\n if (state.Config.debug) {\\r\\n var wtxt = [];\\r\\n\\r\\n\\t wtxt.push(\\\"o:\\\" + obCtrl.cnt() + \\\"/\\\" + obCtrl.num() + \\\"/\\\" + obCtrl.nonmove);\\r\\n\\t wtxt.push(\\\"f:\\\" + mapsc.flame);\\r\\n\\r\\n\\t if (obCtrl.interrapt) {\\r\\n\\t wtxt.push(\\\"interrapt:\\\" + obCtrl.SIGNAL);\\r\\n\\t } else {\\r\\n\\t wtxt.push(\\\"running:\\\" + obCtrl.SIGNAL);\\r\\n\\t }\\r\\n\\r\\n\\t for (i in obCtrl.item) {\\r\\n\\t wtxt.push(\\\"item[\\\" + i + \\\"]:\\\" + obCtrl.item[i]);\\r\\n\\t }\\r\\n /*\\r\\n\\t for (i in obCtrl.combo) {\\r\\n\\t wtxt.push(\\\"combo[\\\" + i + \\\"]:\\\" + obCtrl.combo[i]);\\r\\n\\t }\\r\\n\\r\\n\\t for (i in obCtrl.combomax) {\\r\\n\\t wtxt.push(\\\"combomax[\\\" + i + \\\"]:\\\" + obCtrl.combomax[i]);\\r\\n\\t }\\r\\n */\\r\\n\\t var n1 = 0;\\r\\n\\t for (i in obCtrl.total) {\\r\\n\\t if (i == 2) n1 = obCtrl.total[i];\\r\\n\\t }\\r\\n\\r\\n\\t var n2 = 1;\\r\\n\\t for (i in obCtrl.obCount) {\\r\\n\\t if (i == 2) n2 = obCtrl.obCount[i];\\r\\n\\t }\\r\\n\\t //wtxt.push(\\\"rate:\\\" + Math.floor((n1 / n2) * 100) + \\\"par\\\");\\r\\n\\r\\n\\t //wtxt.push(\\\"hidan:\\\" + obCtrl.hidan);\\r\\n\\r\\n\\t wtxt.push(\\\"wx,wy:\\\" + Math.floor(dev.gs.world_x) + \\\",\\\" + Math.floor(dev.gs.world_y));\\r\\n\\r\\n\\t wtxt.push(\\\"play:\\\" + Math.floor(dev.sound.info()) + \\\".\\\" + dev.sound.running() );\\r\\n\\r\\n\\t for (var s in wtxt) {\\r\\n\\t work.putchr8(wtxt[s], dev.layout.status_x, dev.layout.status_y + 8 * s);\\r\\n\\t }\\r\\n\\t }\\r\\n\\r\\n\\t if (scdispview) {\\r\\n//\\t work3.clear();\\r\\n\\t //\\t work3.fill(480, 0, 5, 480, \\\"blue\\\");\\r\\n\\t work3.fill(0, 480-48, 640, 48);//, \\\"darkblue\\\");\\r\\n\\t work3.draw();\\r\\n\\t work3.reset();\\r\\n\\t }\\r\\n\\r\\n\\r\\n\\t //mapdisp = false;\\r\\n\\t if (!mapdisp) {\\r\\n\\r\\n\\t work3.fill(dev.layout.map_x, dev.layout.map_y, 150, 150);\\r\\n\\r\\n\\t var cl = {};\\r\\n\\r\\n\\t cl.mcp = mapChip;\\r\\n\\r\\n\\t cl.draw = function (device) {\\r\\n\\r\\n\\t for (var i = 0, loopend = this.mcp.length; i < loopend; i++) {\\r\\n\\r\\n\\t var mc = this.mcp[i];\\r\\n\\t if ((mc.visible) && ((mc.type == 11) || (mc.type == 12))) {\\r\\n\\t device.beginPath();\\r\\n\\t device.strokeStyle = (mc.type == 12) ? \\\"orange\\\" : \\\"blue\\\";\\r\\n\\t device.lineWidth = 1;\\r\\n\\t device.rect(dev.layout.map_x + mc.x / 20, dev.layout.map_y + mc.y / 20, 2, 2);\\r\\n\\t device.stroke();\\r\\n\\t }\\r\\n\\t }\\r\\n\\r\\n\\t }\\r\\n\\t work3.putFunc(cl);\\r\\n\\r\\n /*\\r\\n\\t for (var i in mapChip) {\\r\\n\\t var mc = mapChip[i];\\r\\n\\t if ((mc.visible) && ((mc.type == 11) || (mc.type == 12))) {//表示するマップチップ(当たり判定用で表示しないものもあるため)\\r\\n\\r\\n\\t var cl = {}\\r\\n\\t cl.x = mc.x / 20;\\r\\n\\t cl.y = mc.y / 20;\\r\\n\\t cl.w = 1; //mc.w / 20;\\r\\n\\t cl.h = 1; //mc.h / 20;\\r\\n\\t cl.c = (mc.type == 12) ? \\\"orange\\\" : \\\"blue\\\";\\r\\n\\r\\n\\t cl.draw = function (device) {\\r\\n\\t device.beginPath();\\r\\n\\t device.strokeStyle = this.c;\\r\\n\\t device.lineWidth = 1;\\r\\n\\t device.rect(dev.layout.map_x + this.x, dev.layout.map_y + this.y, this.w, this.h);\\r\\n\\t device.stroke();\\r\\n\\t }\\r\\n\\r\\n\\t work3.putFunc(cl);\\r\\n\\t }\\r\\n\\t }\\r\\n */\\r\\n\\t mapdisp = true;\\r\\n\\t } \\r\\n \\r\\n\\r\\n\\t}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw() {\\n\\n}\",\n \"function draw(){\\t\\n\\trequestAnimationFrame(draw); //allows for maximum use of the hardwares potential\\n}\",\n \"function render() {\\r\\n\\tgl.clear(gl.COLOR_BUFFER_BIT);\\r\\n\\tgl.drawArrays(gl.TRIANGLES, 0, 9);\\r\\n}\",\n \"function ProceduralRenderer3() { }\",\n \"function ProceduralRenderer3() { }\",\n \"render() {\\n render(offscreenCanvas);\\n }\",\n \"function renderCanvas2() {\\n\\n if (drawing) {\\n ctx.moveTo(lastPos.x, lastPos.y);\\n ctx.lineTo(mousePos.x, mousePos.y);\\n ctx.stroke();\\n lastPos = mousePos;\\n }\\n}\",\n \"function draw() {\\n \\n\\n \\n}\",\n \"doDraw(offset) {\\n super.doDraw(offset);\\n let pp = [this.pos[0] - 64 - offset, this.pos[1] - 128];\\n let image = \\\"gobbo-\\\";\\n if (this.dir == 1){\\n image+=\\\"r\\\";\\n } else {\\n image+=\\\"l\\\";\\n }\\n drawImage(Graphics[image], pp);\\n \\n }\",\n \"function draw() {\\n \\n\\tvar red = 0; // Color value defined\\n\\tvar green = 1;\\n\\tvar blue = 2;\\n\\tvar alpha = 3;\\n\\n\\tvar iter = 81;\\n\\n\\tif(os){ // if oscillation is set true by oscillate(), then do oscilation of \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// julia set by using sin(angle) to set real c and cos(angle) to set imaginary c.\\n\\t\\tcx =0.7885*cos(angle);\\n\\t\\tcy =0.7785*sin(angle);\\n\\t\\tangle+= 0.04;\\n\\t}\\n\\n\\tvar zy = 0.0;\\n\\tvar zx = 0.0;\\n\\n loadPixels(); \\n\\n\\n // Interate through the window demision. 'width' and 'hieght' are the with and height of our window\\n for (var y = 0; y < height; y++) {\\n\\n for (var x = 0; x < width; x++) {\\n\\n\\t zy = map(y, 0, height, min_i , max_i); // use map() to scale the range so it will be from \\n\\t\\tzx = map(x, 0, width, minReal, maxReal); // minReal to maxReal and min_i to max_i\\n\\t\\t\\n\\t\\tif(!os && !clicked){ // if neither of 'os' or 'clicked' is true, cy and cx (real and imaginary c) will be the scale of zy and zx.\\n\\t\\t\\tcy = zy;\\n\\t\\t\\tcx = zx;\\n\\t\\t}\\n\\t\\t\\n var counter= 0;\\n\\n\\t\\t// calculate the mandelbrot / julia set using:\\n\\t\\t// mandelbrot: f(z) = z^2 + c where c is changing\\n\\t\\t// julia: f(z) = z^2 + c where c is constant\\n\\t\\twhile ((zx * zx + (zy * zy) < 16.0) && counter < iter) {\\n\\n\\t\\t\\tvar zx_temp = zx * zx - zy * zy +cx\\n\\n\\t\\t\\tzy = 2.0 * zx * zy+cy;\\n\\t\\t\\tzx = zx_temp;\\n\\n\\t\\t\\t++counter;\\n\\t\\t}\\n\\t\\t\\n\\t var color = 255;\\n\\n\\t\\tif(counter !=iter){\\n\\t\\t\\tcolor = counter;\\n\\t\\t}\\n\\n var pix = (x + y * width) * 4;\\n\\n pixels[pix + red] = sin(color)%255; // set pixels\\n pixels[pix + green] = color;\\n pixels[pix + blue] = color;\\n\\n pixels[pix+alpha] = 255;\\n }\\n }\\n\\n updatePixels(); \\n}\",\n \"function renderCanvas() {\\n\\t\\tif (drawing) {\\n\\t\\t\\tctx.moveTo(lastPos.x, lastPos.y);\\n\\t\\t\\tctx.lineTo(mousePos.x, mousePos.y);\\n\\t\\t\\tctx.stroke();\\n\\t\\t\\tlastPos = mousePos;\\n\\t\\t}\\n\\t}\",\n \"function renderCanvas() {\\n\\t\\tif (drawing) {\\n\\t\\t\\tctx.moveTo(lastPos.x, lastPos.y);\\n\\t\\t\\tctx.lineTo(mousePos.x, mousePos.y);\\n\\t\\t\\tctx.stroke();\\n\\t\\t\\tlastPos = mousePos;\\n\\t\\t}\\n\\t}\",\n \"function renderCanvas() {\\n\\t\\tif (drawing) {\\n\\t\\t\\tctx.moveTo(lastPos.x, lastPos.y);\\n\\t\\t\\tctx.lineTo(mousePos.x, mousePos.y);\\n\\t\\t\\tctx.stroke();\\n\\t\\t\\tlastPos = mousePos;\\n\\t\\t}\\n\\t}\",\n \"function renderCanvas() {\\n\\t\\tif (drawing) {\\n\\t\\t\\tctx.moveTo(lastPos.x, lastPos.y);\\n\\t\\t\\tctx.lineTo(mousePos.x, mousePos.y);\\n\\t\\t\\tctx.stroke();\\n\\t\\t\\tlastPos = mousePos;\\n\\t\\t}\\n\\t}\",\n \"function ObjectOrientedRenderer3(){}\",\n \"function render()\\n{\\n requestAnimationFrame(render);\\n\\n\\tctx.clearRect(0, 0, width, height);\\n drawTiles();\\n\\tgui.draw(ctx, mouse);\\n}\",\n \"function renderCanvas() {\\n if (drawing) {\\n ctx.moveTo(lastPos.x, lastPos.y);\\n ctx.lineTo(mousePos.x, mousePos.y);\\n ctx.stroke();\\n lastPos = mousePos;\\n }\\n }\",\n \"function ObjectOrientedRenderer3() {}\",\n \"function ObjectOrientedRenderer3() {}\",\n \"function ObjectOrientedRenderer3() {}\",\n \"function render() {\\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\\n if (params.polygonOffset) {\\n gl.polygonOffset(1, 1);\\n }\\n gl.uniform3fv(uColor, [1.0, 0.0, 0.0]);\\n gl.drawArrays(gl.TRIANGLES, 0, 3);\\n\\n\\n if (params.polygonOffset) {\\n gl.polygonOffset(0, 1);\\n }\\n gl.uniform3fv(uColor, [0.0, 0.0, 1.0]);\\n gl.drawArrays(gl.TRIANGLES, 3, 3);\\n}\",\n \"render(webGLRenderer) {}\",\n \"render() {\\n this.context.drawImage(this.buffer.canvas, 0, 0, this.buffer.canvas.width, this.buffer.canvas.height, 0, 0, this.context.canvas.width, this.context.canvas.height);\\n }\",\n \"function ProceduralRenderer3() {}\",\n \"function ProceduralRenderer3() {}\",\n \"function ProceduralRenderer3() {}\",\n \"function draw()\\n{\\n \\n}\",\n \"function render_user_interface()\\n{\\n mycanvas_context.drawImage(m_canvas, 0, 0);\\n}\",\n \"static draw3D()\\n {\\n RPM.gameStack.draw3D();\\n }\",\n \"function draw(time){\\r\\n\\tif(!use2D){\\r\\n\\t\\tctx.setBuffer(null);\\r\\n\\t\\tctx.viewport(0, 0, ctx.viewportWidth, ctx.viewportHeight);\\r\\n\\t\\tvar alpha = clearColor[3];\\r\\n\\t\\tctx.clearColor(clearColor[0]*alpha, clearColor[1]*alpha, clearColor[2]*alpha, alpha);\\r\\n\\t\\tctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT);\\r\\n\\t\\t\\r\\n\\t\\tctx.setBuffer(colorBuffer);\\r\\n\\t\\tctx.viewport(0, 0, ctx.viewportWidth, ctx.viewportHeight);\\r\\n\\t\\t//ctx.clearColor(clearColor[0]*alpha, clearColor[1]*alpha, clearColor[2]*alpha, alpha);\\r\\n\\t\\tctx.clearColor(0,0,0,0);\\r\\n\\t\\tctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT);\\r\\n\\t}else{\\r\\n\\t\\tctx.clearRect(0,0,canvas.width,canvas.height);\\r\\n\\t\\tctx.fillStyle = rgb(clearColor);\\r\\n\\t\\tctx.globalAlpha = clearColor[3];\\r\\n\\t\\tctx.fillRect(0,0,canvas.width,canvas.height);\\r\\n\\t}\\r\\n\\t\\r\\n\\tmat4.ortho(pMatrix, -0, 1*aspectRatio, -1, 0, -1, 1);\\r\\n\\tmat4.identity(mvMatrix);\\r\\n\\t\\r\\n\\tif(useStates){\\r\\n\\t\\tStates.draw(ctx);\\r\\n\\t}\\r\\n\\t\\r\\n\\t//Draw the stateless world\\r\\n\\tworld.transform(ctx);\\r\\n\\tworld.draw(ctx);\\r\\n\\tworld.unTransform(ctx);\\r\\n\\t\\r\\n\\tif(!use2D){\\r\\n\\t\\tctx.clearColor(0, 0, 0, 0);\\r\\n\\t\\teffects.apply(ctx, colorBuffer);\\r\\n\\t\\t\\r\\n\\t\\tctx.useProgram(shaderProgram);\\r\\n\\t\\t\\r\\n\\t\\tctx.bindTexTo(colorBuffer.texture, shaderProgram.samplerUniform);\\r\\n\\t\\t\\r\\n\\t\\tctx.uniform1f(shaderProgram.alpha, 1.0);\\r\\n\\t\\t\\r\\n\\t\\tctx.setBuffer(null);\\r\\n\\t\\t\\r\\n\\t\\tctx.drawScreenBuffer(shaderProgram);\\r\\n\\t}\\r\\n\\t\\r\\n\\tif(showConsole){\\r\\n\\t\\tif(!use2D){\\r\\n\\t\\t\\tbrineConsole = document.getElementById(\\\"console\\\");\\r\\n\\t\\t\\tif(brineConsole != null && brineConsole != undefined){\\r\\n\\t\\t\\t\\tvar text = \\\"\\\";\\r\\n\\t\\t\\t\\tfor(var node = log.head; node !== null; node = node.link){\\r\\n\\t\\t\\t\\t\\ttext = node.item+\\\"
    \\\"+text;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbrineConsole.innerHTML = text;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbrineConsole.style.visibility = \\\"visible\\\";\\r\\n\\t\\t}else{\\r\\n\\t\\t\\tctx.fillStyle = \\\"#ffffff\\\";\\r\\n\\t\\t\\tctx.globalAlpha = 0.25;\\r\\n\\t\\t\\tctx.fillRect(0,0,canvas.width,canvas.height);\\r\\n\\t\\t\\tctx.globalAlpha = 1.0;\\r\\n\\t\\t\\tctx.fillStyle = \\\"#000000\\\";\\r\\n\\t\\t\\t//ctx.shadowBlur = 3;\\r\\n\\t\\t\\tctx.shadowColor = \\\"#ffffff\\\";\\r\\n\\t\\t\\tvar lineHeight = 18;\\r\\n\\t\\t\\tvar lineNumber = 0;\\r\\n\\t\\t\\tfor(var node = log.head; node !== null; node = node.link){\\r\\n\\t\\t\\t\\tvar line = node.item;\\r\\n\\t\\t\\t\\t//ctx.font=\\\"16px Arial\\\";\\r\\n\\t\\t\\t\\t//ctx.strokeText(line, 5, canvas.height-(log.length-lineNumber)*12);\\r\\n\\t\\t\\t\\tctx.font = lineHeight+\\\"px Arial\\\";\\r\\n\\t\\t\\t\\tctx.fillText(line, 5, canvas.height-(log.length-lineNumber)*lineHeight);\\r\\n\\t\\t\\t\\tlineNumber++;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tctx.shadowBlur = 0;\\r\\n\\t\\t}\\r\\n\\t}else{\\r\\n\\t\\tif(brineConsole != null && brineConsole != undefined && !use2D){\\r\\n\\t\\t\\tbrineConsole.innerHTML = \\\"\\\";\\r\\n\\t\\t\\tbrineConsole.style.visibility = \\\"hidden\\\";\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\tvar timeDiff = time-oldDrawTime;\\r\\n\\tbrineFPS = Math.round((1000/timeDiff)*10)/10;\\r\\n\\tfpsCounter.html = \\\"FPS: \\\"+brineFPS;\\r\\n\\toldDrawTime = time;\\r\\n}\",\n \"function render() {\\n\\n var baseSegment = findSegment(position);\\n var basePercent = Util.percentRemaining(position, segmentLength);\\n var playerSegment = findSegment(position+playerZ);\\n var playerPercent = Util.percentRemaining(position+playerZ, segmentLength);\\n var playerY = Util.interpolate(playerSegment.p1.world.y, playerSegment.p2.world.y, playerPercent);\\n var maxy = height;\\n\\n var x = 0;\\n var dx = - (baseSegment.curve * basePercent);\\n\\n // Clear the canvas\\n ctx.clearRect(0, 0, width, height);\\n\\n // Order the background layers\\n if (currentBackground == 0) {\\n // Build the list of positions in the image to extract the appropriate background\\n // Depending on the current background, load as current the night or day version\\n background_pos_cur = [BACKGROUND.SKY, BACKGROUND.HILLS, BACKGROUND.TREES];\\n background_pos_next = [BACKGROUND.SKY2, BACKGROUND.HILLS2, BACKGROUND.TREES2];\\n } else {\\n background_pos_cur = [BACKGROUND.SKY2, BACKGROUND.HILLS2, BACKGROUND.TREES2];\\n background_pos_next = [BACKGROUND.SKY, BACKGROUND.HILLS, BACKGROUND.TREES];\\n }\\n // Draw the background layers\\n if (!changeBackgroundFlag) {\\n // No switching, we draw one set of backgrounds\\n Render.background(ctx, background, width, height, background_pos_cur[0], skyOffset, resolution * skySpeed * playerY, 1.0);\\n Render.background(ctx, background, width, height, background_pos_cur[1], hillOffset, resolution * hillSpeed * playerY, 1.0);\\n Render.background(ctx, background, width, height, background_pos_cur[2], treeOffset, resolution * treeSpeed * playerY, 1.0);\\n } else {\\n // else we are in the process of switching, do a progressive blending\\n // continue the blending\\n changeBackgroundCurrentAlpha += 0.01; // increase the alpha for one, and decrease for the next background set\\n Render.background(ctx, background, width, height, background_pos_cur[0], skyOffset, resolution * skySpeed * playerY, 1.0-changeBackgroundCurrentAlpha);\\n Render.background(ctx, background, width, height, background_pos_cur[1], hillOffset, resolution * hillSpeed * playerY, 1.0-changeBackgroundCurrentAlpha);\\n Render.background(ctx, background, width, height, background_pos_cur[2], treeOffset, resolution * treeSpeed * playerY, 1.0-changeBackgroundCurrentAlpha);\\n Render.background(ctx, background, width, height, background_pos_next[0], skyOffset, resolution * skySpeed * playerY, changeBackgroundCurrentAlpha);\\n Render.background(ctx, background, width, height, background_pos_next[1], hillOffset, resolution * hillSpeed * playerY, changeBackgroundCurrentAlpha);\\n Render.background(ctx, background, width, height, background_pos_next[2], treeOffset, resolution * treeSpeed * playerY, changeBackgroundCurrentAlpha);\\n if (changeBackgroundCurrentAlpha >= 1.0) {\\n // blending is done, disable the flags and reinit all related vars\\n // Note: it is important to still do the drawing (and not put it in an if statement) because else the last drawing won't be done, there will be no background for a split-second and this will produce a flickering effect\\n currentBackground = (currentBackground + 1) % 2\\n changeBackgroundCurrentAlpha = 0.0;\\n changeBackgroundFlag = false;\\n }\\n }\\n\\n var n, i, segment, car, sprite, spriteScale, spriteX, spriteY;\\n\\n for(n = 0 ; n < drawDistance ; n++) {\\n\\n segment = segments[(baseSegment.index + n) % segments.length];\\n segment.looped = segment.index < baseSegment.index;\\n segment.fog = Util.exponentialFog(n/drawDistance, fogDensity);\\n segment.clip = maxy;\\n\\n Util.project(segment.p1, (playerX * roadWidth) - x, playerY + cameraHeight, position - (segment.looped ? trackLength : 0), cameraDepth, width, height, roadWidth);\\n Util.project(segment.p2, (playerX * roadWidth) - x - dx, playerY + cameraHeight, position - (segment.looped ? trackLength : 0), cameraDepth, width, height, roadWidth);\\n\\n x = x + dx;\\n dx = dx + segment.curve;\\n\\n if ((segment.p1.camera.z <= cameraDepth) || // behind us\\n (segment.p2.screen.y >= segment.p1.screen.y) || // back face cull\\n (segment.p2.screen.y >= maxy)) // clip by (already rendered) hill\\n continue;\\n\\n Render.segment(ctx, width, lanes,\\n segment.p1.screen.x,\\n segment.p1.screen.y,\\n segment.p1.screen.w,\\n segment.p2.screen.x,\\n segment.p2.screen.y,\\n segment.p2.screen.w,\\n segment.fog,\\n segment.color);\\n\\n maxy = segment.p1.screen.y;\\n }\\n\\n for(n = (drawDistance-1) ; n > 0 ; n--) {\\n segment = segments[(baseSegment.index + n) % segments.length];\\n\\n for(i = 0 ; i < segment.cars.length ; i++) {\\n car = segment.cars[i];\\n sprite = car.sprite;\\n spriteScale = Util.interpolate(segment.p1.screen.scale, segment.p2.screen.scale, car.percent);\\n spriteX = Util.interpolate(segment.p1.screen.x, segment.p2.screen.x, car.percent) + (spriteScale * car.offset * roadWidth * width/2);\\n spriteY = Util.interpolate(segment.p1.screen.y, segment.p2.screen.y, car.percent);\\n Render.sprite(ctx, width, height, resolution, roadWidth, sprites, car.sprite, spriteScale, spriteX, spriteY, -0.5, -1, segment.clip);\\n }\\n\\n for(i = 0 ; i < segment.sprites.length ; i++) {\\n sprite = segment.sprites[i];\\n spriteScale = segment.p1.screen.scale;\\n spriteX = segment.p1.screen.x + (spriteScale * sprite.offset * roadWidth * width/2);\\n spriteY = segment.p1.screen.y;\\n Render.sprite(ctx, width, height, resolution, roadWidth, sprites, sprite.source, spriteScale, spriteX, spriteY, (sprite.offset < 0 ? -1 : 0), -1, segment.clip);\\n }\\n\\n if (segment == playerSegment) {\\n Render.player(ctx, width, height, resolution, roadWidth, sprites, speed/maxSpeed,\\n cameraDepth/playerZ,\\n width/2,\\n (height/2) - (cameraDepth/playerZ * Util.interpolate(playerSegment.p1.camera.y, playerSegment.p2.camera.y, playerPercent) * height/2),\\n speed * (keyLeft ? -1 : keyRight ? 1 : 0),\\n playerSegment.p2.world.y - playerSegment.p1.world.y);\\n }\\n }\\n\\t\\t\\t\\n // start horizon tilt\\n if (enableTilt) {\\n rotation=0;\\n if (baseSegment.curve==0) {\\n rotation=-currentRotation;\\n currentRotation=0;\\n } else {\\n newrot = Math.round(baseSegment.curve*speed/maxSpeed*100)/100;\\n rotation=newrot - currentRotation ;\\n currentRotation = newrot ;\\n }\\n if (rotation!=0) {\\n //ctx.save(); // doesn't help with moire problem\\n ctx.translate(canvas.width/2,canvas.height/2);\\n ctx.rotate(-rotation*(Math.PI/90));\\n ctx.translate(-canvas.width/2,-canvas.height/2);\\n //ctx.restore();\\n }\\n }\\n\\n // Draw \\\"Game Over\\\" screen\\n if (gameOverFlag) {\\n ctx.font = \\\"3em Arial\\\";\\n ctx.fillStyle = \\\"magenta\\\";\\n ctx.textAlign = \\\"center\\\";\\n ctx.fillText(\\\"GAME OVER\\\", canvas.width/2, canvas.height/2);\\n ctx.fillText(\\\"(refresh to restart)\\\", canvas.width/2, canvas.height/1.5);\\n }\\n }\",\n \"function render () {\\n\\n\\t\\tfunction pushMatrix (fn) {\\n\\t\\t\\tp.push();\\n\\t\\t\\tfn();\\n\\t\\t\\tp.pop();\\n\\t\\t}\\n\\n\\t\\t// Draw Horizontal Lines\\n\\t\\tpushMatrix(function () {\\n\\t\\t\\tp.strokeCap(p.ROUND);\\n\\t\\t\\tp.stroke(121, 192, 242);\\t\\t\\t\\t// Light Blue\\n\\t\\t\\tp.translate(p.width/2, p.height/2);\\t\\t// Translate to center\\n\\n\\t\\t\\t// Set strokeweight to decrease proportionally to the stretch factor\\n\\t\\t\\tvar base_stroke_weight = 2;\\n\\t\\t\\tvar stroke_weight = base_stroke_weight - (a_l_de.value * base_stroke_weight);\\n\\t\\t\\tp.strokeWeight(stroke_weight);\\n\\n\\t\\t\\tvar spacing = 60;\\t\\t\\t\\t\\t\\t// Set space around Es\\n\\t\\t\\t// Mult by -1 for left line\\n\\t\\t\\tvar displacement_start = a_l_ds.value * (p.width / 2) + spacing;\\n\\t\\t\\tvar displacement_end = a_l_de.value * (p.width / 2) + spacing;\\n\\n\\t\\t\\tp.line(-displacement_end, 0, -displacement_start, 0);\\t\\t// Left Line\\n\\t\\t\\tp.line(displacement_end, 0, displacement_start, 0);\\t\\t// Right Line\\n\\t\\t});\\n\\n\\t\\t// Assemble Logo!\\n\\n\\t\\t// Rotate E\\n\\t\\tpushMatrix(function () {\\n\\n\\t\\t\\tp.tint(255, 255); // Opacity (255)\\n\\t\\t\\t\\n\\t\\t\\tp.translate(p.width / 2, p.height / 2);\\n\\t\\t\\tp.rotate(p.radians(a_ed_r.value));\\t\\t// All rotations must occur here!!!\\n\\t\\t\\tp.scale(0.75, 0.75);\\n\\n\\t\\t\\t// For Dots\\n\\t\\t\\tpushMatrix(function () {\\n\\n\\t\\t\\t\\tp.translate(-41.25,-42.65); \\t\\t// Center offset\\n\\t\\t\\t\\tp.scale(0.15,0.15);\\n\\n\\t\\t\\t\\t// Polar Coordinates\\n\\t\\t\\t\\tvar r = a_d_d.value;\\t\\t\\t\\t// Origin Offset \\t{start: 300, end: 265}\\n\\t\\t\\t\\tvar angle = p.radians(a_d_r.value);\\t\\t// Angle Offset\\t\\t{start: 0, end: 77}\\n\\t\\t\\t\\tvar x = p.cos(angle) * r;\\t\\t\\t\\t// Multiply r * -1 for other Dot\\n\\t\\t\\t\\tvar y = p.sin(angle) * r;\\n\\n\\t\\t\\t\\t// Top Dot\\n\\t\\t\\t\\tpushMatrix(function () {\\n\\t\\t\\t\\t\\tp.scale(1, 1);\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tp.translate(x,y);\\n\\t\\t\\t\\t\\tp.translate(276,283); \\t\\t// Center on Es\\n\\t\\t\\t\\t\\tp.scale(a_d_s.value, a_d_s.value); \\t// Each scale <-- Parametric\\n\\t\\t\\t\\t\\tp.image(dot, -50, -50); \\t// Center around origin\\n\\t\\t\\t\\t});\\n\\n\\t\\t\\t\\t// Bottom Dot\\n\\t\\t\\t\\tpushMatrix(function () {\\n\\t\\t\\t\\t\\tp.scale(1, 1);\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tp.translate(-x,-y);\\n\\t\\t\\t\\t\\tp.translate(276, 283); \\t\\t// Center on Es, experimentally determined\\n\\t\\t\\t\\t\\tp.scale(a_d_s.value, a_d_s.value); \\t// Each scale <-- Parametric\\n\\t\\t\\t\\t\\tp.image(dot2, -50, -50); \\t// Center around origin\\n\\t\\t\\t\\t});\\n\\t\\t\\t});\\n\\n\\t\\t\\t// For Es\\n\\t\\t\\tpushMatrix(function () {\\n\\t\\t\\t\\tp.scale(a_e_s.value, a_e_s.value); \\t// Global scale\\n\\t\\t\\t\\tp.translate(-41.25,-42.65); \\t\\t// Center offset, experimentally determined\\n\\t\\t\\t\\tp.scale(0.15,0.15);\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t// Bottom E\\n\\t\\t\\t\\tp.image(E, 100, 100);\\n\\n\\t\\t\\t\\t// Top E\\n\\t\\t\\t\\tpushMatrix(function () {\\n\\t\\t\\t\\t\\tp.translate(200, 0);\\n\\t\\t\\t\\t\\tp.image(E2, 0, 0);\\n\\t\\t\\t\\t});\\n\\t\\t\\t});\\n\\n\\t\\t});\\n\\n\\t\\tpushMatrix(function () {\\n\\t\\t\\tp.fill(255);\\n\\t\\t\\tp.noStroke();\\n\\t\\t\\tp.translate(p.width/2, p.height/2);\\n\\t\\t});\\n\\n\\t\\tif (global_animator.value >= 1) {\\n\\t\\t\\tp.noLoop();\\n\\t\\t}\\n\\t}\",\n \"renderScene(scene) {\\n let flatScene = this.projectScene(scene)\\n\\n let polygonList = []\\n flatScene.addToList(polygonList)\\n //polygonList.sort((a, b) => (a === b)? 0 : a? -1 : 1)\\n polygonList.sort(function(a, b) {\\n if(a.getAverageDepth() < b.getAverageDepth()) {\\n return 1\\n } else if(a.getAverageDepth() > b.getAverageDepth()) {\\n return -1\\n } else if(a.justOutline && !b.justOutline) {//Both are same depth, sort by outline or not\\n return -1\\n } else return 1\\n })\\n // polygonList.sort((a,b) => (a.getAverageDepth() < b.getAverageDepth()) ? 1 : -1 || (a.justOutline === b.justOutline)? 0 : a.justOutline? 1 : -1)\\n \\n let context = this.canvas.getContext(\\\"2d\\\")\\n \\n context.clearRect(0, 0, this.canvas.width, this.canvas.height);\\n //Clear context first? \\n for(let i = 0; i < polygonList.length; i++) {\\n let polygon = polygonList[i] \\n polygon.render(context)\\n }\\n }\",\n \"function draw() {\\n}\",\n \"function draw() {\\n}\",\n \"function draw() {\\n}\",\n \"function draw() {\\n}\",\n \"function draw() {\\n}\",\n \"function setColors2(gl) {\\n\\n gl.bufferData(\\n gl.ARRAY_BUFFER,\\n new Uint8Array([\\n // left column front\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n\\n // top rung front\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n\\n // middle rung front\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n 200, 70, 120,\\n\\n // left column back\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n\\n // top rung back\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n\\n // middle rung back\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n 80, 70, 200,\\n\\n // top\\n 70, 200, 210,\\n 70, 200, 210,\\n 70, 200, 210,\\n 70, 200, 210,\\n 70, 200, 210,\\n 70, 200, 210,\\n\\n // top rung right\\n 200, 200, 70,\\n 200, 200, 70,\\n 200, 200, 70,\\n 200, 200, 70,\\n 200, 200, 70,\\n 200, 200, 70,\\n\\n // under top rung\\n 210, 100, 70,\\n 210, 100, 70,\\n 210, 100, 70,\\n 210, 100, 70,\\n 210, 100, 70,\\n 210, 100, 70,\\n\\n // between top rung and middle\\n 210, 160, 70,\\n 210, 160, 70,\\n 210, 160, 70,\\n 210, 160, 70,\\n 210, 160, 70,\\n 210, 160, 70,\\n\\n // top of middle rung\\n 70, 180, 210,\\n 70, 180, 210,\\n 70, 180, 210,\\n 70, 180, 210,\\n 70, 180, 210,\\n 70, 180, 210,\\n\\n // right of middle rung\\n 100, 70, 210,\\n 100, 70, 210,\\n 100, 70, 210,\\n 100, 70, 210,\\n 100, 70, 210,\\n 100, 70, 210,\\n\\n // bottom of middle rung.\\n 76, 210, 100,\\n 76, 210, 100,\\n 76, 210, 100,\\n 76, 210, 100,\\n 76, 210, 100,\\n 76, 210, 100,\\n\\n // right of bottom\\n 140, 210, 80,\\n 140, 210, 80,\\n 140, 210, 80,\\n 140, 210, 80,\\n 140, 210, 80,\\n 140, 210, 80,\\n\\n // bottom\\n 90, 130, 110,\\n 90, 130, 110,\\n 90, 130, 110,\\n 90, 130, 110,\\n 90, 130, 110,\\n 90, 130, 110,\\n\\n // left side\\n 160, 160, 220,\\n 160, 160, 220,\\n 160, 160, 220,\\n 160, 160, 220,\\n 160, 160, 220,\\n 160, 160, 220]),\\n gl.STATIC_DRAW);\\n}\"\n]"},"negative_scores":{"kind":"list like","value":["0.6581787","0.6546497","0.65223056","0.65223056","0.65223056","0.6495967","0.64545876","0.6426752","0.64223933","0.6346952","0.6334454","0.63129914","0.6310721","0.6300453","0.6299124","0.62815106","0.62755704","0.62755704","0.6267502","0.6267502","0.6267502","0.6267502","0.62629294","0.6233807","0.62335396","0.62298465","0.6216389","0.62061846","0.6201504","0.61799175","0.6179668","0.6165365","0.6158964","0.61445457","0.61424714","0.6127025","0.61256444","0.6118225","0.61164904","0.6115335","0.61134773","0.61113036","0.61104023","0.61097777","0.6107971","0.61034346","0.6101735","0.60983074","0.6096802","0.60898757","0.6076281","0.60756814","0.60722107","0.60722107","0.60722107","0.60722107","0.60722107","0.60722107","0.60722107","0.60722107","0.60722107","0.60722107","0.60722107","0.60711175","0.6068995","0.6064662","0.6064662","0.60615456","0.6060356","0.60473454","0.6046173","0.6043566","0.60326874","0.60326874","0.60326874","0.60326874","0.60311836","0.6029495","0.6025198","0.6022123","0.6022123","0.6022123","0.6018935","0.6010364","0.6003851","0.599632","0.599632","0.599632","0.5992413","0.59884113","0.59772646","0.59648156","0.5963048","0.5956187","0.59537864","0.5953202","0.5953202","0.5953202","0.5953202","0.5953202","0.595319"],"string":"[\n \"0.6581787\",\n \"0.6546497\",\n \"0.65223056\",\n \"0.65223056\",\n \"0.65223056\",\n \"0.6495967\",\n \"0.64545876\",\n \"0.6426752\",\n \"0.64223933\",\n \"0.6346952\",\n \"0.6334454\",\n \"0.63129914\",\n \"0.6310721\",\n \"0.6300453\",\n \"0.6299124\",\n \"0.62815106\",\n \"0.62755704\",\n \"0.62755704\",\n \"0.6267502\",\n \"0.6267502\",\n \"0.6267502\",\n \"0.6267502\",\n \"0.62629294\",\n \"0.6233807\",\n \"0.62335396\",\n \"0.62298465\",\n \"0.6216389\",\n \"0.62061846\",\n \"0.6201504\",\n \"0.61799175\",\n \"0.6179668\",\n \"0.6165365\",\n \"0.6158964\",\n \"0.61445457\",\n \"0.61424714\",\n \"0.6127025\",\n \"0.61256444\",\n \"0.6118225\",\n \"0.61164904\",\n \"0.6115335\",\n \"0.61134773\",\n \"0.61113036\",\n \"0.61104023\",\n \"0.61097777\",\n \"0.6107971\",\n \"0.61034346\",\n \"0.6101735\",\n \"0.60983074\",\n \"0.6096802\",\n \"0.60898757\",\n \"0.6076281\",\n \"0.60756814\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60722107\",\n \"0.60711175\",\n \"0.6068995\",\n \"0.6064662\",\n \"0.6064662\",\n \"0.60615456\",\n \"0.6060356\",\n \"0.60473454\",\n \"0.6046173\",\n \"0.6043566\",\n \"0.60326874\",\n \"0.60326874\",\n \"0.60326874\",\n \"0.60326874\",\n \"0.60311836\",\n \"0.6029495\",\n \"0.6025198\",\n \"0.6022123\",\n \"0.6022123\",\n \"0.6022123\",\n \"0.6018935\",\n \"0.6010364\",\n \"0.6003851\",\n \"0.599632\",\n \"0.599632\",\n \"0.599632\",\n \"0.5992413\",\n \"0.59884113\",\n \"0.59772646\",\n \"0.59648156\",\n \"0.5963048\",\n \"0.5956187\",\n \"0.59537864\",\n \"0.5953202\",\n \"0.5953202\",\n \"0.5953202\",\n \"0.5953202\",\n \"0.5953202\",\n \"0.595319\"\n]"},"document_score":{"kind":"string","value":"0.0"},"document_rank":{"kind":"string","value":"-1"}}},{"rowIdx":81346,"cells":{"query":{"kind":"string","value":"! vuerouter v3.5.3 (c) 2021 Evan You"},"document":{"kind":"string","value":"function i(t,e){for(var n in e)t[n]=e[n];return t}"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["private public function m246() {}","function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","function version(){ return \"0.13.0\" }","function TM(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","function BO(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","private internal function m248() {}","function Es(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","function Uk(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"geom.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","function yh(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"graticule.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","function Qw(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"geom.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","function iP(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","vampireWithName(name) {\n \n }","function fyv(){\n \n }","function Bv(e){let{basename:t,children:n,window:r}=e,l=X.exports.useRef();l.current==null&&(l.current=gv({window:r}));let o=l.current,[i,u]=X.exports.useState({action:o.action,location:o.location});return X.exports.useLayoutEffect(()=>o.listen(u),[o]),X.exports.createElement(Fv,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:o})}","function cO(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","function ow(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"geom.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","function Wx(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"geom.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","function Ak(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"geom.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","constructor() {\n \n\n \n \n\n \n\n \n }","function vT(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"layer.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","upgrade() {}","function PD(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"geom.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","function Hr(e,t){\"undefined\"!==typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}","function dp(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"geom.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","function Rb(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"geom.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","function Ek(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"geom.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","transient private internal function m185() {}","function JV(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}","function jx(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"geom.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","transient final protected internal function m174() {}","function vI(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"style.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","function hA(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"geom.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}","function SigV4Utils() { }","function __vue_normalize__(a,b,c,d,e){var f=(\"function\"==typeof c?c.options:c)||{};// For security concerns, we use only base name in production mode.\nreturn f.__file=\"/Users/hadefication/Packages/vue-chartisan/src/components/Pie.vue\",f.render||(f.render=a.render,f.staticRenderFns=a.staticRenderFns,f._compiled=!0,e&&(f.functional=!0)),f._scopeId=d,f}","function $S(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"geom.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","function VI(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"layer.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}","protected internal function m252() {}","updated() {}","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }","constructor() {\n \n \n \n }"],"string":"[\n \"private public function m246() {}\",\n \"function jj(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"source.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"function version(){ return \\\"0.13.0\\\" }\",\n \"function TM(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"source.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"function BO(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"source.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"private internal function m248() {}\",\n \"function Es(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"source.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"function Uk(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"geom.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"function yh(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"graticule.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"function Qw(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"geom.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"function iP(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"source.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"vampireWithName(name) {\\n \\n }\",\n \"function fyv(){\\n \\n }\",\n \"function Bv(e){let{basename:t,children:n,window:r}=e,l=X.exports.useRef();l.current==null&&(l.current=gv({window:r}));let o=l.current,[i,u]=X.exports.useState({action:o.action,location:o.location});return X.exports.useLayoutEffect(()=>o.listen(u),[o]),X.exports.createElement(Fv,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:o})}\",\n \"function cO(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"source.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"function ow(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"geom.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"function Wx(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"geom.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"function Ak(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"geom.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"constructor() {\\n \\n\\n \\n \\n\\n \\n\\n \\n }\",\n \"function vT(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"layer.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"upgrade() {}\",\n \"function PD(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"geom.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"function Hr(e,t){\\\"undefined\\\"!==typeof console&&(console.warn(\\\"[vue-i18n] \\\"+e),t&&console.warn(t.stack))}\",\n \"function dp(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"geom.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"function Rb(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"geom.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"function Ek(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"geom.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"transient private internal function m185() {}\",\n \"function JV(e,t){\\\"undefined\\\"!=typeof console&&(console.warn(\\\"[vue-i18n] \\\"+e),t&&console.warn(t.stack))}\",\n \"function jx(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"geom.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"transient final protected internal function m174() {}\",\n \"function vI(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"style.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"function hA(t,e,n,i,r,o,a,s){var u=(\\\"function\\\"===typeof n?n.options:n)||{};return u.__file=\\\"geom.vue\\\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}\",\n \"function SigV4Utils() { }\",\n \"function __vue_normalize__(a,b,c,d,e){var f=(\\\"function\\\"==typeof c?c.options:c)||{};// For security concerns, we use only base name in production mode.\\nreturn f.__file=\\\"/Users/hadefication/Packages/vue-chartisan/src/components/Pie.vue\\\",f.render||(f.render=a.render,f.staticRenderFns=a.staticRenderFns,f._compiled=!0,e&&(f.functional=!0)),f._scopeId=d,f}\",\n \"function $S(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"geom.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"function VI(t,e,n,r,i,o,a,s){var l=(\\\"function\\\"===typeof n?n.options:n)||{};return l.__file=\\\"layer.vue\\\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}\",\n \"protected internal function m252() {}\",\n \"updated() {}\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\",\n \"constructor() {\\n \\n \\n \\n }\"\n]"},"negative_scores":{"kind":"list like","value":["0.5826432","0.5783646","0.5761382","0.5714104","0.56972057","0.5668579","0.56480795","0.559433","0.5578421","0.5549824","0.55136424","0.5491717","0.54752815","0.54628813","0.5451074","0.539044","0.53702855","0.53666264","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.5360071","0.53533614","0.53477776","0.53361845","0.5333446","0.5326447","0.53227127","0.5319553","0.5298129","0.5297441","0.5275164","0.5256549","0.5255813","0.5252842","0.5248856","0.52219296","0.52168494","0.520677","0.5204768","0.5170155","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982","0.5141982"],"string":"[\n \"0.5826432\",\n \"0.5783646\",\n \"0.5761382\",\n \"0.5714104\",\n \"0.56972057\",\n \"0.5668579\",\n \"0.56480795\",\n \"0.559433\",\n \"0.5578421\",\n \"0.5549824\",\n \"0.55136424\",\n \"0.5491717\",\n \"0.54752815\",\n \"0.54628813\",\n \"0.5451074\",\n \"0.539044\",\n \"0.53702855\",\n \"0.53666264\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.5360071\",\n \"0.53533614\",\n \"0.53477776\",\n \"0.53361845\",\n \"0.5333446\",\n \"0.5326447\",\n \"0.53227127\",\n \"0.5319553\",\n \"0.5298129\",\n \"0.5297441\",\n \"0.5275164\",\n \"0.5256549\",\n \"0.5255813\",\n \"0.5252842\",\n \"0.5248856\",\n \"0.52219296\",\n \"0.52168494\",\n \"0.520677\",\n \"0.5204768\",\n \"0.5170155\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\",\n \"0.5141982\"\n]"},"document_score":{"kind":"string","value":"0.0"},"document_rank":{"kind":"string","value":"-1"}}},{"rowIdx":81347,"cells":{"query":{"kind":"string","value":"interface and a POSIXlike interface. (The POSIXlike calls are implemented on top of the ncurseslike calls, not the other way round.)"},"document":{"kind":"string","value":"function VT100(wd, ht, scr_id)\n{\n\tvar r;\n\tvar c;\n\tvar scr = document.getElementById(scr_id);\n\tthis.wd_ = wd;\n\tthis.ht_ = ht;\n\tthis.scrolled_ = 0;\n\tthis.bkgd_ = {\n\t\t\tmode: VT100.A_NORMAL,\n\t\t\tfg: VT100.COLOR_WHITE,\n\t\t\tbg: VT100.COLOR_BLACK\n\t\t };\n\tthis.c_attr_ = {\n\t\t\tmode: VT100.A_NORMAL,\n\t\t\tfg: VT100.COLOR_WHITE,\n\t\t\tbg: VT100.COLOR_BLACK\n\t\t };\n\tthis.text_ = new Array(ht);\n\tthis.attr_ = new Array(ht);\n\tfor (r = 0; r < ht; ++r) {\n\t\tthis.text_[r] = new Array(wd);\n\t\tthis.attr_[r] = new Array(wd);\n\t}\n\tthis.scr_ = scr;\n\tthis.cursor_vis_ = true;\n\tthis.grab_events_ = false;\n\tthis.getch_isr_ = undefined;\n\tthis.key_buf_ = [];\n\tthis.echo_ = true;\n\tthis.esc_state_ = 0;\n\t// Internal debug setting.\n\tthis.debug_ = 0;\n\tthis.clear();\n\tthis.refresh();\n}"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["function system() { }","function Terminal () {}","function rc(){}","function os_func() {\n this.execCommand = function (cmd, callback) {\n exec(cmd, (error, stdout, stderr) => {\n if (error) {\n console.error(`exec error: ${error}`);\n return;\n }\n\n callback(stdout);\n });\n };\n }","_bootstrap() {\n // This code executes in the jsdom global scope\n this.term = new Terminal({\n cols: this.width - this.iwidth,\n rows: this.height - this.iheight,\n scrollback: this.options.scrollback !== \"none\" ?\n this.options.scrollback : this.height - this.iheight,\n });\n this.term._core.cursorState = 1;\n\n /* monkey-patch XTerm to prevent it from effectively rendering\n anything to the Virtual DOM, as we just grab its character buffer.\n The alternative would be to listen on the XTerm \"refresh\" event,\n but this way XTerm would uselessly render the DOM elements. */\n this.term._core.refresh = (start, end) => {\n /* enforce a new screen rendering,\n which in turn will call our render() method, too */\n this.screen.render()\n }\n\n this.term._core.viewport = {\n syncScrollArea: () => {},\n };\n\n /* monkey-patch XTerm to prevent any key handling */\n this.term._core.keyDown = () => { }\n this.term._core.keyPress = () => { }\n this.term.focus();\n\n /* pass-through title changes by application */\n this.term.on(\"title\", (title) => {\n this.title = title\n this.emit(\"title\", title)\n })\n\n /* helper function to determine mouse inputs */\n const _isMouse = (buf) => {\n /* mouse event determination:\n borrowed from original Blessed Terminal widget\n Copyright (c) 2013-2015 Christopher Jeffrey et al. */\n let s = buf\n if (Buffer.isBuffer(s)) {\n if (s[0] > 127 && s[1] === undefined) {\n s[0] -= 128\n s = \"\\x1b\" + s.toString(\"utf-8\")\n }\n else\n s = s.toString(\"utf-8\")\n }\n return (buf[0] === 0x1b && buf[1] === 0x5b && buf[2] === 0x4d)\n || /^\\x1b\\[M([\\x00\\u0020-\\uffff]{3})/.test(s)\n || /^\\x1b\\[(\\d+;\\d+;\\d+)M/.test(s)\n || /^\\x1b\\[<(\\d+;\\d+;\\d+)([mM])/.test(s)\n || /^\\x1b\\[<(\\d+;\\d+;\\d+;\\d+)&w/.test(s)\n || /^\\x1b\\[24([0135])~\\[(\\d+),(\\d+)\\]\\r/.test(s)\n || /^\\x1b\\[(O|I)/.test(s)\n }\n\n /* pass raw keyboard input from Blessed to XTerm */\n this.skipInputDataOnce = false;\n this.skipInputDataAlways = false;\n this.screen.program.input.on(\"data\", this._onScreenEventInputData = (data) => {\n /* only in case we are focused and not in scrolling mode */\n if (this.screen.focused !== this || this.scrolling)\n return;\n if (this.skipInputDataAlways)\n return;\n if (this.skipInputDataOnce) {\n this.skipInputDataOnce = false;\n return;\n }\n if (!_isMouse(data))\n this.handler(data);\n })\n\n /* capture cooked keyboard input from Blessed (locally) */\n this.on(\"keypress\", this._onWidgetEventKeypress = (ch, key) => {\n /* handle scrolling keys */\n if (!this.scrolling\n && this.options.controKey !== \"none\"\n && key.full === this.options.controlKey)\n this._scrollingStart()\n else if (this.scrolling) {\n if (key.full === this.options.controlKey\n || key.full.match(/^(?:escape|return|space)$/)) {\n this._scrollingEnd()\n this.skipInputDataOnce = true\n }\n else if (key.full === \"up\") this.scroll(-1)\n else if (key.full === \"down\") this.scroll(+1)\n else if (key.full === \"pageup\") this.scroll(-(this.height - 2))\n else if (key.full === \"pagedown\") this.scroll(+(this.height - 2))\n }\n })\n\n /* pass mouse input from Blessed to XTerm */\n if (this.options.mousePassthrough) {\n this.onScreenEvent(\"mouse\", this._onScreenEventMouse = (ev) => {\n /* only in case we are focused */\n if (this.screen.focused !== this)\n return\n\n /* only in case we are touched */\n if ((ev.x < this.aleft + this.ileft)\n || (ev.y < this.atop + this.itop)\n || (ev.x > this.aleft - this.ileft + this.width)\n || (ev.y > this.atop - this.itop + this.height))\n return\n\n /* generate canonical mouse input sequence,\n borrowed from original Blessed Terminal widget\n Copyright (c) 2013-2015 Christopher Jeffrey et al. */\n let b = ev.raw[0]\n let x = ev.x - this.aleft\n let y = ev.y - this.atop\n let s\n if (this.term._core.urxvtMouse) {\n if (this.screen.program.sgrMouse)\n b += 32\n s = \"\\x1b[\" + b + \";\" + (x + 32) + \";\" + (y + 32) + \"M\"\n }\n else if (this.term._core.sgrMouse) {\n if (!this.screen.program.sgrMouse)\n b -= 32\n s = \"\\x1b[<\" + b + \";\" + x + \";\" + y +\n (ev.action === \"mousedown\" ? \"M\" : \"m\")\n }\n else {\n if (this.screen.program.sgrMouse)\n b += 32\n s = \"\\x1b[M\" +\n String.fromCharCode(b) +\n String.fromCharCode(x + 32) +\n String.fromCharCode(y + 32)\n }\n\n /* pass-through mouse event sequence */\n this.handler(s)\n })\n }\n\n /* pass-through Blessed resize events to XTerm/Pty */\n this.on(\"resize\", () => {\n const nextTick = global.setImmediate || process.nextTick.bind(process)\n nextTick(() => {\n /* determine new width/height */\n let width = this.width - this.iwidth\n let height = this.height - this.iheight\n\n /* pass-through to XTerm */\n this.term.resize(width, height);\n })\n })\n\n /* perform an initial resizing once */\n this.once(\"render\", () => {\n let width = this.width - this.iwidth\n let height = this.height - this.iheight\n this.term.resize(width, height)\n })\n\n this.on(\"destroy\", () => this.dispose());\n }","function mkpty(pty) {\n //pty: optional argument, inherit if set\n var pty2 = pty ? object(pty) : {}\n pty2.constructor = function() {}\n pty2.constructor.prototype = pty2\n return pty2\n}","function test_vmrc_console_linux(browser, operating_system, provider) {}","function System() {\n}","function test_vmrc_console_windows(browser, operating_system, provider) {}","function c(t){t.rl&&t.rl.close(),t.rl=i.createInterface({input:t.input,output:t.output,completer:function(e,n){if(!r.isFunction(t.autocomplete))return n(null,[[],e]);o.getAutocompleteArguments(t.currentCommand,e,function(r,i){if(r)return n(null,[[],e]);t.autocomplete(i,function(r,i){if(r)return n(r);o.getAutocompleteReplacements(t.currentCommand,e,i,function(t,e){return n(null,[t,e])})})})}});\n/*!\n * Monkey-patch the setPrompt method to properly calculate the string length when colors are\n * used. :(\n *\n * http://stackoverflow.com/questions/12075396/adding-colors-to-terminal-prompt-results-in-large-white-space\n */\nvar e=t.rl;e._setPrompt=e.setPrompt,e.setPrompt=function(t,n){var r=null;if(n)r=n;else{var i=t.split(/[\\r\\n]/).pop().stripColors;i&&(r=i.length)}e._setPrompt(t,r)},\n/*!\n * Bind the SIGINT handling to the readline instance, which effectively returns with an empty\n * command.\n */\nfunction(t){t.rl.once(\"SIGINT\",function(){return t.output.write(\"\\n\"),l(t,r.extend(new Error(\"User pressed CTRL+C\"),{code:\"SIGINT\"}))})}(t)}","get LinuxEditor() {}","*run() {\n const ctor = `${this.constructor.name}`;\n throw new OSError.OSCriticalError('Abstract Process.*run() was called by '+ctor);\n }","function WSAPI() {\n }","function CurrentThread() {\r\n}","function MZConsole(){}","function systemMessage(msg) {\n}","function CursorChannel() {}","function syscall(name, syscall_number, arg1, arg2, arg3, arg4, arg5, arg6)\n{\n debug_log(\"syscall \" + name)\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_rax)\n rop_chain.push(webkitgtk_base_addr_high)\n rop_chain.push(syscall_number)\n rop_chain.push(0x0)\n if(typeof(arg1) !== \"undefined\")\n {\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_rdi)\n rop_chain.push(webkitgtk_base_addr_high)\n rop_chain.push(arg1.getLowBitsUnsigned())\n rop_chain.push(arg1.getHighBitsUnsigned())\n }\n if(typeof(arg2) !== \"undefined\")\n {\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_rsi)\n rop_chain.push(webkitgtk_base_addr_high)\n rop_chain.push(arg2.getLowBitsUnsigned())\n rop_chain.push(arg2.getHighBitsUnsigned())\n }\n if(typeof(arg3) !== \"undefined\")\n {\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_rdx)\n rop_chain.push(webkitgtk_base_addr_high)\n rop_chain.push(arg3.getLowBitsUnsigned())\n rop_chain.push(arg3.getHighBitsUnsigned())\n }\n if(typeof(arg4) !== \"undefined\")\n {\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_r10)\n rop_chain.push(webkitgtk_base_addr_high)\n rop_chain.push(arg4.getLowBitsUnsigned())\n rop_chain.push(arg4.getHighBitsUnsigned())\n }\n if(typeof(arg5) !== \"undefined\")\n {\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_r8)\n rop_chain.push(webkitgtk_base_addr_high)\n rop_chain.push(arg5.getLowBitsUnsigned())\n rop_chain.push(arg5.getHighBitsUnsigned())\n }\n if(typeof(arg6) !== \"undefined\")\n {\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_r9)\n rop_chain.push(webkitgtk_base_addr_high)\n rop_chain.push(arg6.getLowBitsUnsigned())\n rop_chain.push(arg6.getHighBitsUnsigned())\n }\n // syscall ; ret ;\n rop_chain.push(libc_base_addr_low + 0xc5c55)\n rop_chain.push(libc_base_addr_high);\n}","function _____SHARED_functions_____(){}","function createTerminalInterface(){\n let _rl = READLINE.createInterface({\n input: process.stdin,\n output: process.stdout,\n prompt: \"Enter help for more >> \",\n });\n // initial prompt and welcome display\n displayHeading(\"Welcome to CLI\");\n _rl.prompt();\n // listening for input on terminal\n _rl.on(\"line\", (input) => {\n processInput(input);\n _rl.prompt();\n });\n}","get OSXEditor() {}","function openShellUnimplemented(/* dirpath */) {\n console.error('not implemented');\n }","function startxtermjs() {\n\tconsole.log('function startxterm from SSHyClient called')\n termInit();\n\n // if we haven't authenticated yet we're doing an interactive login\n if (!transport.auth.authenticated) {\n term.write('Login as: ');\n }\n\n // sets up some listeners for the terminal (keydown, paste)\n term.textarea.onkeydown = function(e) {\n\t\t// Sanity Checks\n if (!ws || !transport || transport.auth.failedAttempts >= 5 || transport.auth.awaitingAuthentication) {\n return;\n }\n\n var pressedKey\n /** IE isn't very good so it displays one character keys as full names in .key \n\t \tEG - e.key = \" \" to e.key = \"Spacebar\"\t\n\t \tso assuming .char is one character we'll use that instead **/\n\t\tif (e.char && e.char.length == 1) {\n\t\t\tpressedKey = e.char;\n\t\t} else { \n\t\t\tpressedKey = e.key\n\t\t}\n\n\t\t// So we don't spam single control characters\n if (pressedKey.length > 1 && (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) && pressedKey != \"Backspace\") {\n return;\n }\n\n if (!transport.auth.authenticated) {\n // Other clients doesn't allow control characters during authentication\n if (e.altKey || e.ctrlKey || e.metaKey) {\n return;\n }\n\n\t\t\t// so we can't input stuff like 'ArrowUp'\n\t\t\tif(pressedKey.length > 1 && (e.keyCode != 13 && e.keyCode != 8)){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t/* while termPassword is undefined, add all input to termUsername\n\t\t\t when it becomes defined then change targets to transport.auth.termPassword */\n switch (e.keyCode) {\n case 8: // backspace\n if (transport.auth.termPassword === undefined) {\n if (transport.auth.termUsername.length > 0) {\n termBackspace(term)\n transport.auth.termUsername = transport.auth.termUsername.slice(0, transport.auth.termUsername.length - 1);\n }\n } else {\n transport.auth.termPassword = transport.auth.termPassword.slice(0, transport.auth.termPassword.length - 1);\n }\n break;\n case 13: // enter\n if (transport.auth.termPassword === undefined) {\n term.write(\"\\n\\r\" + transport.auth.termUsername + '@' + transport.auth.hostname + '\\'s password:');\n transport.auth.termPassword = '';\n } else {\n term.write('\\n\\r');\n transport.auth.ssh_connection();\n return;\n }\n break;\n default:\n if (transport.auth.termPassword === undefined) {\n transport.auth.termUsername += pressedKey;\n term.write(pressedKey);\n } else {\n transport.auth.termPassword += pressedKey;\n }\n }\n return;\n }\n\n\t\t// We've already authenticated so now any keypress is a command for the SSH server\n var command;\n\n // Decides if the keypress is an alphanumeric character or needs escaping\n if (pressedKey.length == 1 && (!(e.altKey || e.ctrlKey || e.metaKey) || (e.altKey && e.ctrlKey))) {\n command = pressedKey;\n } else if (pressedKey.length == 1 && (e.shiftKey && e.ctrlKey)) {\n // allows ctrl + shift + v for pasting\n if (e.key != 'V') {\n e.preventDefault();\n\t\t\t\treturn;\n }\n } else {\n //xtermjs is kind enough to evaluate our special characters instead of having to translate every char ourself\n command = term._evaluateKeyEscapeSequence(e).key;\n }\n\n\t\t// Decide if we're going to locally' echo this key or not\n if (transport.settings.localEcho) {\n transport.settings.parseKey(e);\n }\n /* Regardless of local echo we still want a reply to confirm / update terminal\n\t\t could be controversial? but putty does this too (each key press shows up twice)\n\t\t Instead we're checking the our locally echoed key and replacing it if the\n\t\t recieved key !== locally echoed key */\n return command === null ? null : transport.expect_key(command);\n };\n\n term.textarea.onpaste = function(ev) {\n\t\tvar text \n\n\t\t// Yay IE11 stuff!\n\t\tif ( window.clipboardData && window.clipboardData.getData ) {\n\t\t\ttext = window.clipboardData.getData('Text')\n\t\t} else if ( ev.clipboardData && ev.clipboardData.getData ) {\n\t\t\ttext = ev.clipboardData.getData('text/plain');\n\t\t}\n\t\t\t\t\n if (text) {\n\t\t\t// Just don't allow more than 1 million characters to be pasted.\n\t\t\tif(text.length < 1000000){\n\t\t if (text.length > 5000) {\n\t\t\t\t\t// If its a long string then chunk it down to reduce load on SSHyClient.parceler\n\t\t text = splitSlice(text);\n\t\t for (var i = 0; i < text.length; i++) {\n\t\t transport.expect_key(text[i]);\n\t\t }\n\t\t return;\n\t\t }\n\t\t transport.expect_key(text);\n\t\t } else {\n\t\t\t\talert('Error: Pasting large strings is not permitted.');\n\t\t\t}\n\t\t}\n };\n}","function extendCore() {\n\t// adds some properties i use to core based on the current operating system, it needs a switch, thats why i couldnt put it into the core obj at top\n\tswitch (core.os.name) {\n\t\tcase 'winnt':\n\t\tcase 'winmo':\n\t\tcase 'wince':\n\t\t\tcore.os.version = parseFloat(Services.sysinfo.getProperty('version'));\n\t\t\t// http://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions\n\t\t\tif (core.os.version == 6.0) {\n\t\t\t\tcore.os.version_name = 'vista';\n\t\t\t}\n\t\t\tif (core.os.version >= 6.1) {\n\t\t\t\tcore.os.version_name = '7+';\n\t\t\t}\n\t\t\tif (core.os.version == 5.1 || core.os.version == 5.2) { // 5.2 is 64bit xp\n\t\t\t\tcore.os.version_name = 'xp';\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'darwin':\n\t\t\tvar userAgent = myServices.hph.userAgent;\n\n\t\t\tvar version_osx = userAgent.match(/Mac OS X 10\\.([\\d\\.]+)/);\n\n\t\t\t\n\t\t\tif (!version_osx) {\n\t\t\t\tthrow new Error('Could not identify Mac OS X version.');\n\t\t\t} else {\n\t\t\t\tvar version_osx_str = version_osx[1];\n\t\t\t\tvar ints_split = version_osx[1].split('.');\n\t\t\t\tif (ints_split.length == 1) {\n\t\t\t\t\tcore.os.version = parseInt(ints_split[0]);\n\t\t\t\t} else if (ints_split.length >= 2) {\n\t\t\t\t\tcore.os.version = ints_split[0] + '.' + ints_split[1];\n\t\t\t\t\tif (ints_split.length > 2) {\n\t\t\t\t\t\tcore.os.version += ints_split.slice(2).join('');\n\t\t\t\t\t}\n\t\t\t\t\tcore.os.version = parseFloat(core.os.version);\n\t\t\t\t}\n\t\t\t\t// this makes it so that 10.10.0 becomes 10.100\n\t\t\t\t// 10.10.1 => 10.101\n\t\t\t\t// so can compare numerically, as 10.100 is less then 10.101\n\t\t\t\t\n\t\t\t\t//core.os.version = 6.9; // note: debug: temporarily forcing mac to be 10.6 so we can test kqueue\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// nothing special\n\t}\n\t\n\n}","function Window() {}","function Shell()\n{\n // Properties\n this.promptStr = \">\";\n this.commandList = [];\n this.curses = \"[fuvg],[cvff],[shpx],[phag],[pbpxfhpxre],[zbgureshpxre],[gvgf]\";\n this.apologies = \"[sorry]\";\n \n \n // Methods\n this.init = shellInit;\n this.putPrompt = shellPutPrompt;\n this.handleInput = shellHandleInput;\n this.execute = shellExecute;\n this.drop = shellDropLine;\n}","function Control()\n{\n\tfunction Move(move) \n { \t\n switch (move) \n {\n case mJump: \n\t\t\t\tvar timeout = 90;\t\t\t\n PressKey(38, timeout)\n console.log('Jump!');\n break;\n\n case mDuck: \t\n timeout = 400;\n PressKey(40, timeout)\n console.log('Duck!');\n break;\n case mRun:\n \tbreak;\n\n default:\n console.log('Invalid move ' + move);\n }\n }\n\t\n\tfunction PressKey(key, timeout) \n {\n\t\tkeyPress('keydown', key);\n\t\tsetTimeout(function() {keyPress('keyup', key);}, timeout);\n }\n\t\n\tfunction keyPress(type, keycode) \n {\n var eventObj = document.createEventObject ?\n document.createEventObject() : document.createEvent(\"Events\");\n\n if(eventObj.initEvent)\n {\n eventObj.initEvent(type, true, true);\n }\n\n eventObj.keyCode = keycode;\n eventObj.which = keycode;\n\n document.dispatchEvent ? document.dispatchEvent(eventObj) : el.fireEvent(\"onkeydown\", eventObj);\n }\n\t\n\t// exports\n return { Move: Move, PressKey : PressKey };\n}","function shellGetS()\n{\n krnGetScheduler();\n}","_showThreadPane() {}","function support_system_file_popen (cmd, m) {\n const mode = support_system_file_parseMode(m)\n if (mode != 'r') {\n process.__lasterr = 'The NodeJS popen FFI only supports opening for reading currently.'\n return null\n }\n\n const tmp_file = require('os').tmpdir() + \"/\" + require('crypto').randomBytes(15).toString('hex')\n const write_fd = support_system_file_fs.openSync(\n tmp_file,\n 'w'\n )\n\n var io_setting\n switch (mode) {\n case \"r\":\n io_setting = ['ignore', write_fd, 2]\n break\n case \"w\", \"a\":\n io_setting = [write_fd, 'ignore', 2]\n break\n default:\n process.__lasterr = 'The popen function cannot be used for reading and writing simultaneously.'\n return null\n }\n\n const { status, error } = support_system_file_child_process.spawnSync(\n cmd,\n [],\n { stdio: io_setting, shell: true }\n )\n\n support_system_file_fs.closeSync(write_fd)\n\n if (error) {\n process.__lasterr = error\n return null\n }\n\n const read_ptr = support_system_file_openFile(\n tmp_file,\n 'r'\n )\n\n return { ...read_ptr, exit_code: status }\n}","function UHelpNATIVE(topic,mode,logicalname)\n{\n w = window.open(\"help?topic=\"+topic+\"&mode=\"+mode+\"&logicalname=\"+logicalname, \"UnifaceHelpNative\",\n \"scrollbars=yes,resizable=yes,width=400,height=200\");\n if (uTestBrowserNS()) {\n w.focus();\n }\n}","open(parent) {\n if (!parent) {\n throw new Error('Terminal requires a parent element.');\n }\n if (!parent.isConnected) {\n this._logService.debug('Terminal.open was called on an element that was not attached to the DOM');\n }\n this._document = parent.ownerDocument;\n // Create main element container\n this.element = this._document.createElement('div');\n this.element.dir = 'ltr'; // xterm.css assumes LTR\n this.element.classList.add('terminal');\n this.element.classList.add('xterm');\n this.element.setAttribute('tabindex', '0');\n this.element.setAttribute('role', 'document');\n parent.appendChild(this.element);\n // Performance: Use a document fragment to build the terminal\n // viewport and helper elements detached from the DOM\n const fragment = document$1.createDocumentFragment();\n this._viewportElement = document$1.createElement('div');\n this._viewportElement.classList.add('xterm-viewport');\n fragment.appendChild(this._viewportElement);\n this._viewportScrollArea = document$1.createElement('div');\n this._viewportScrollArea.classList.add('xterm-scroll-area');\n this._viewportElement.appendChild(this._viewportScrollArea);\n this.screenElement = document$1.createElement('div');\n this.screenElement.classList.add('xterm-screen');\n // Create the container that will hold helpers like the textarea for\n // capturing DOM Events. Then produce the helpers.\n this._helperContainer = document$1.createElement('div');\n this._helperContainer.classList.add('xterm-helpers');\n this.screenElement.appendChild(this._helperContainer);\n fragment.appendChild(this.screenElement);\n this.textarea = document$1.createElement('textarea');\n this.textarea.classList.add('xterm-helper-textarea');\n this.textarea.setAttribute('aria-label', promptLabel$1);\n this.textarea.setAttribute('aria-multiline', 'false');\n this.textarea.setAttribute('autocorrect', 'off');\n this.textarea.setAttribute('autocapitalize', 'off');\n this.textarea.setAttribute('spellcheck', 'false');\n this.textarea.tabIndex = 0;\n this.register(addDisposableDomListener(this.textarea, 'focus', (ev) => this._onTextAreaFocus(ev)));\n this.register(addDisposableDomListener(this.textarea, 'blur', () => this._onTextAreaBlur()));\n this._helperContainer.appendChild(this.textarea);\n const coreBrowserService = this._instantiationService.createInstance(CoreBrowserService, this.textarea);\n this._instantiationService.setService(ICoreBrowserService, coreBrowserService);\n this._charSizeService = this._instantiationService.createInstance(CharSizeService, this._document, this._helperContainer);\n this._instantiationService.setService(ICharSizeService$1, this._charSizeService);\n this._compositionView = document$1.createElement('div');\n this._compositionView.classList.add('composition-view');\n this._compositionHelper = this._instantiationService.createInstance(CompositionHelper, this.textarea, this._compositionView);\n this._helperContainer.appendChild(this._compositionView);\n // Performance: Add viewport and helper elements from the fragment\n this.element.appendChild(fragment);\n this._theme = this.options.theme || this._theme;\n this._colorManager = new ColorManager(document$1, this.options.allowTransparency);\n this.register(this.optionsService.onOptionChange(e => this._colorManager.onOptionsChange(e)));\n this._colorManager.setTheme(this._theme);\n const renderer = this._createRenderer();\n this._renderService = this.register(this._instantiationService.createInstance(RenderService, renderer, this.rows, this.screenElement));\n this._instantiationService.setService(IRenderService$1, this._renderService);\n this.register(this._renderService.onRenderedBufferChange(e => this._onRender.fire(e)));\n this.onResize(e => this._renderService.resize(e.cols, e.rows));\n this._soundService = this._instantiationService.createInstance(SoundService);\n this._instantiationService.setService(ISoundService, this._soundService);\n this._mouseService = this._instantiationService.createInstance(MouseService);\n this._instantiationService.setService(IMouseService, this._mouseService);\n this.viewport = this._instantiationService.createInstance(Viewport, (amount, suppressEvent) => this.scrollLines(amount, suppressEvent), this._viewportElement, this._viewportScrollArea);\n this.viewport.onThemeChange(this._colorManager.colors);\n this.register(this._inputHandler.onRequestSyncScrollBar(() => this.viewport.syncScrollArea()));\n this.register(this.viewport);\n this.register(this.onCursorMove(() => {\n this._renderService.onCursorMove();\n this._syncTextArea();\n }));\n this.register(this.onResize(() => this._renderService.onResize(this.cols, this.rows)));\n this.register(this.onBlur(() => this._renderService.onBlur()));\n this.register(this.onFocus(() => this._renderService.onFocus()));\n this.register(this._renderService.onDimensionsChange(() => this.viewport.syncScrollArea()));\n this._selectionService = this.register(this._instantiationService.createInstance(SelectionService, this.element, this.screenElement));\n this._instantiationService.setService(ISelectionService, this._selectionService);\n this.register(this._selectionService.onRequestScrollLines(e => this.scrollLines(e.amount, e.suppressScrollEvent)));\n this.register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire()));\n this.register(this._selectionService.onRequestRedraw(e => this._renderService.onSelectionChanged(e.start, e.end, e.columnSelectMode)));\n this.register(this._selectionService.onLinuxMouseSelection(text => {\n // If there's a new selection, put it into the textarea, focus and select it\n // in order to register it as a selection on the OS. This event is fired\n // only on Linux to enable middle click to paste selection.\n this.textarea.value = text;\n this.textarea.focus();\n this.textarea.select();\n }));\n this.register(this.onScroll(() => {\n this.viewport.syncScrollArea();\n this._selectionService.refresh();\n }));\n this.register(addDisposableDomListener(this._viewportElement, 'scroll', () => this._selectionService.refresh()));\n this._mouseZoneManager = this._instantiationService.createInstance(MouseZoneManager, this.element, this.screenElement);\n this.register(this._mouseZoneManager);\n this.register(this.onScroll(() => this._mouseZoneManager.clearAll()));\n this.linkifier.attachToDom(this.element, this._mouseZoneManager);\n this.linkifier2.attachToDom(this.element, this._mouseService, this._renderService);\n // This event listener must be registered aftre MouseZoneManager is created\n this.register(addDisposableDomListener(this.element, 'mousedown', (e) => this._selectionService.onMouseDown(e)));\n // apply mouse event classes set by escape codes before terminal was attached\n if (this._coreMouseService.areMouseEventsActive) {\n this._selectionService.disable();\n this.element.classList.add('enable-mouse-events');\n }\n else {\n this._selectionService.enable();\n }\n if (this.options.screenReaderMode) {\n // Note that this must be done *after* the renderer is created in order to\n // ensure the correct order of the dprchange event\n this._accessibilityManager = new AccessibilityManager(this, this._renderService);\n }\n // Measure the character size\n this._charSizeService.measure();\n // Setup loop that draws to screen\n this.refresh(0, this.rows - 1);\n // Initialize global actions that need to be taken on the document.\n this._initGlobal();\n // Listen for mouse events and translate\n // them into terminal mouse protocols.\n this.bindMouse();\n }","function h$process_runInteractiveProcess( cmd, args, workingDir, env\n , stdin_fd, stdout_fd, stderr_fd\n , closeHandles, createGroup, delegateCtlC) {\n ;\n ;\n ;\n ;\n // fixme we need an IOError not a JSException\n throw \"$process_runInteractiveProcess: unsupported\";\n}","function m(b,a,c){a=void 0===a?{}:a;c=void 0===c?!1:c;\"function\"===typeof a?(q(\"Legacy constructor was used. See README for latest usage.\",r),a={listener:a,l:c,m:!0,h:{}}):a={listener:a.listener||function(){},l:a.listenToPast||!1,m:void 0===a.processNow?!0:a.processNow,h:a.commandProcessors||{}};this.a=b;this.s=a.listener;this.o=a.l;this.g=this.j=!1;this.c={};this.f=[];this.b=a.h;this.i=t(this);a.m&&this.process()}","function newIc9sh() {\n $shell = new Ic9sh();\n return $shell;\n}","function Shell() {\n // Properties\n this.promptStr = \">\";\n this.commandList = [];\n this.curses = \"[fuvg],[cvff],[shpx],[phag],[pbpxfhpxre],[zbgureshpxre],[gvgf]\";\n this.apologies = \"[sorry]\";\n // Methods\n this.init = shellInit;\n this.putPrompt = shellPutPrompt;\n this.handleInput = shellHandleInput;\n this.execute = shellExecute;\n}","function timerWrapper () {}","run() {\n this.io = readline.createInterface(process.stdin, process.stdout);\n this.io.on('line', this.handleLine.bind(this));\n this.io.on('close', this.handleIOClose.bind(this));\n }","function shellActive ()\n{\n _StdIn.putText(krnActivePIDS()); \n}","readCLI() {\n\n }","function getSyscall() {\n return syscall;\n }","function shellFormat()\n{\n if(krnCheckExecution())\n _StdIn.putText(\"Please wait for the currently executing process to finish before formatting\");\n else\n krnDiskFormat();\n}","function h$main(a) {\n var t = new h$Thread();\n //TRACE_SCHEDULER(\"sched: starting main thread\");\n t.stack[0] = h$doneMain_e;\n if(!h$isBrowser && !h$isGHCJSi) {\n t.stack[2] = h$baseZCGHCziTopHandlerzitopHandler;\n }\n t.stack[4] = h$ap_1_0;\n t.stack[5] = h$flushStdout;\n t.stack[6] = h$return;\n t.stack[7] = h$ap_1_0;\n t.stack[8] = a;\n t.stack[9] = h$return;\n t.sp = 9;\n t.label = [h$encodeUtf8(\"main\"), 0];\n h$wakeupThread(t);\n h$startMainLoop();\n return t;\n}","function h$main(a) {\n var t = new h$Thread();\n //TRACE_SCHEDULER(\"sched: starting main thread\");\n t.stack[0] = h$doneMain_e;\n if(!h$isBrowser && !h$isGHCJSi) {\n t.stack[2] = h$baseZCGHCziTopHandlerzitopHandler;\n }\n t.stack[4] = h$ap_1_0;\n t.stack[5] = h$flushStdout;\n t.stack[6] = h$return;\n t.stack[7] = h$ap_1_0;\n t.stack[8] = a;\n t.stack[9] = h$return;\n t.sp = 9;\n t.label = [h$encodeUtf8(\"main\"), 0];\n h$wakeupThread(t);\n h$startMainLoop();\n return t;\n}","function h$main(a) {\n var t = new h$Thread();\n //TRACE_SCHEDULER(\"sched: starting main thread\");\n t.stack[0] = h$doneMain_e;\n if(!h$isBrowser && !h$isGHCJSi) {\n t.stack[2] = h$baseZCGHCziTopHandlerzitopHandler;\n }\n t.stack[4] = h$ap_1_0;\n t.stack[5] = h$flushStdout;\n t.stack[6] = h$return;\n t.stack[7] = h$ap_1_0;\n t.stack[8] = a;\n t.stack[9] = h$return;\n t.sp = 9;\n t.label = [h$encodeUtf8(\"main\"), 0];\n h$wakeupThread(t);\n h$startMainLoop();\n return t;\n}","function StdIn() {\r\n}","function OpenNewXDisplay() {\n\t//returns ostypes.DISPLAY\n\t//consider: http://mxr.mozilla.org/chromium/source/src/ui/gfx/x/x11_types.cc#26\n\t // std::string display_str = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kX11Display);\n\t // return XOpenDisplay(display_str.empty() ? NULL : display_str.c_str());\n\t // i asked about it here: https://ask.mozilla.org/question/1321/proper-way-to-xopendisplay/\n\t\n\treturn _dec('XOpenDisplay')(null);\n\t\n\t/* http://mxr.mozilla.org/chromium/source/src/ui/gfx/x/x11_types.cc#22\n\t22 XDisplay* OpenNewXDisplay() {\n\t23 #if defined(OS_CHROMEOS)\n\t24 return XOpenDisplay(NULL);\n\t25 #else\n\t26 std::string display_str = base::CommandLine::ForCurrentProcess()->\n\t27 GetSwitchValueASCII(switches::kX11Display);\n\t28 return XOpenDisplay(display_str.empty() ? NULL : display_str.c_str());\n\t29 #endif\n\t30 }\n\t*/\n}","static init(evt){\n // ghci must be working \n this.ghciSafeRun(evt, () => {\n // get buffer text\n GHCI_PROCESS.init(str => {\n // send the text (\"ghci version...\")\n IpcResponder.respond(evt, \"ghci\", {str});\n });\n });\n }","function wrap(cmd, fn, options) {\n return function() {\n var retValue = null;\n \n state.currentCmd = cmd;\n state.error = null;\n \n try {\n var args = [].slice.call(arguments, 0);\n \n if (options && options.notUnix) {\n retValue = fn.apply(this, args);\n } else {\n if (args.length === 0 || typeof args[0] !== 'string' || args[0][0] !== '-')\n args.unshift(''); // only add dummy option if '-option' not already present\n retValue = fn.apply(this, args);\n }\n } catch (e) {\n if (!state.error) {\n // If state.error hasn't been set it's an error thrown by Node, not us - probably a bug...\n console.log('shell.js: internal error');\n console.log(e.stack || e);\n process.exit(1);\n }\n if (config.fatal)\n throw e;\n }\n \n state.currentCmd = 'shell.js';\n return retValue;\n };\n } // wrap","function inotify_init() {\n return libsys.syscall(platform_1.SYS.inotify_init);\n}","function win(options) {\n // close\n this.close=function() {\n if(this.onclose)\n this.onclose();\n\n this.win.parentNode.removeChild(this.win);\n delete windows[this.id];\n }\n\n // set_title\n this.set_title=function(title) {\n var current=this.title.firstChild;\n current.textContent=title;\n }\n\n // mousedown\n this.mousedown=function(event) {\n add_css_class(this.title_bar, \"win_title_bar_moving\");\n win_currentdrag=this;\n\n // Raise window to top\n if(this.win.style.zIndex!=win_maxzindex)\n this.win.style.zIndex=++win_maxzindex;\n }\n\n // mouseup\n this.mouseup=function(event) {\n del_css_class(this.title_bar, \"win_title_bar_moving\");\n win_currentdrag=null;\n }\n\n // move\n this.move=function(m) {\n this.win.style.top=(this.win.offsetTop+m.y)+\"px\";\n this.win.style.left=(this.win.offsetLeft+m.x)+\"px\";\n }\n\n // check options\n if(!options) {\n options={};\n }\n else if(typeof options==\"string\") {\n options={ \"class\": options };\n }\n\n // create window and set class(es)\n this.win=document.createElement(\"div\");\n this.win.className=\"win\"\n\n // Add window to div win_root (create if it doesn't exist)\n if(!win_root) {\n win_root=dom_create_append(document.body, \"div\");\n win_root.className=\"win_root\";\n\n win_mousemove_old=document.body.onmousemove;\n document.body.onmousemove=win_mousemove;\n }\n win_root.appendChild(this.win);\n\n // Create title-bar\n this.title_bar=dom_create_append(this.win, \"table\");\n this.title_bar.className=\"win_title_bar\";\n var tr=dom_create_append(this.title_bar, \"tr\");\n\n this.title=dom_create_append(tr, \"td\");\n this.title.className=\"title\";\n dom_create_append_text(this.title, options.title?options.title:\"Window\");\n this.title.onmousedown=this.mousedown.bind(this);\n this.title.onselectstart=function() {};\n\n // Close Button\n var td=dom_create_append(tr, \"td\");\n var close_button=dom_create_append(td, \"img\");\n close_button.src=\"plugins/win/close.png\";\n close_button.alt=\"close\";\n close_button.className=\"win_close_button\";\n close_button.onclick=this.close.bind(this);\n\n // Create div for content\n this.content=document.createElement(\"div\");\n this.content.className=\"content\";\n add_css_class(this.content, options.class);\n this.win.appendChild(this.content);\n // Raise new window to top\n this.win.style.zIndex=++win_maxzindex;\n\n this.id=uniqid();\n windows[this.id]=this;\n}","function Console() {}","function Console() {}","_installIPC() {\n electron_1.ipcMain.on(common_1.IPC_PING, (event) => {\n event.sender.send(common_1.IPC_PING);\n });\n electron_1.ipcMain.on(common_1.IPC_EVENT, (ipc, event) => {\n event.extra = Object.assign(Object.assign({}, this._getRendererExtra(ipc.sender)), event.extra);\n core_1.captureEvent(event);\n });\n electron_1.ipcMain.on(common_1.IPC_SCOPE, (_, rendererScope) => {\n // tslint:disable:no-unsafe-any\n const sentScope = core_1.Scope.clone(rendererScope);\n core_1.configureScope(scope => {\n if (sentScope._user) {\n scope.setUser(sentScope._user);\n }\n scope.setTags(sentScope._tags);\n scope.setExtras(sentScope._extra);\n // Since we do not have updates for individual breadcrumbs anymore and only for the whole scope\n // we just add the last added breadcrumb on scope updates\n scope.addBreadcrumb(sentScope._breadcrumbs.pop());\n });\n // tslint:enable:no-unsafe-any\n });\n }","function typeSpecial(paramDoc, paramKEYCODE, paramIsAlt, paramIsCtl, paramIsShift) {\r\n\t// Local variable to extract information about cursor after certain operations\r\n\tvar newCursorCoords;\r\n\t\r\n\tswitch ( paramKEYCODE ) {\r\n\t\r\n\t\tcase LEFTARROWKEY: \r\n\t\t\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\r\n\t\t\tif ( paramIsShift )\tif ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\r\n\t\t\t\r\n\t\t\t// If we are at the first char of the first line do nothing\r\n\t\t\t// If we are at the first char of any other line, wrap to the last char of the previous line\r\n\t\t\t// Otherwise, simply move left\r\n\t\t\tif ( cursorColumn == 0 && cursorLine == 0 ) break;\r\n\t\t\tif ( cursorColumn == 0 ) {\r\n\t\t\t\tif ( paramDoc.getLineLockingUser( cursorLine-1 ) != null ) { \r\n\t\t\t\t\talert(\"Another user is currently on line \"+(cursorLine-1)+\", and it is locked.\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcursorLine--;\r\n\t\t\t\tcursorColumn = paramDoc.getLineLength(cursorLine);\r\n\t\t\t}\r\n\t\t\telse cursorColumn--;\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase RIGHTARROWKEY:\r\n\t\t\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\r\n\t\t\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\r\n\t\t\t\r\n\t\t\t// If we are at the last char of the last line, do nothing\r\n\t\t\t// If we are at the last char of any other line, wrap to the first char of the next line\r\n\t\t\t// Otherwise, simply move right\r\n\t\t\tif ( cursorColumn == paramDoc.getLineLength(cursorLine) && cursorLine == paramDoc.getDocumentLength()-1 ) break;\r\n\t\t\tif ( cursorColumn == paramDoc.getLineLength(cursorLine) ) {\r\n\t\t\t\tif ( paramDoc.getLineLockingUser( cursorLine+1 ) != null ) { \r\n\t\t\t\t\talert(\"Another user is currently on line \"+(cursorLine+1)+\", and it is locked.\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcursorLine++;\r\n\t\t\t\tcursorColumn = 0;\r\n\t\t\t}\r\n\t\t\telse cursorColumn++;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase UPARROWKEY:\r\n\t\t\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\r\n\t\t\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\r\n\t\t\t\r\n\t\t\t// If we are on the first line, move to first char of line.\r\n\t\t\t// If we are not on the first line, see if the line is locked and alert the user if it is\r\n\t\t\t// Otherwise, move up. If we end up out of range of the line, move to the last char of the line\r\n\t\t\tif ( cursorLine == 0 ) cursorColumn = 0;\r\n\t\t\telse if ( paramDoc.getLineLockingUser( cursorLine-1 ) != null ) alert(\"Another user is currently on line \"+(cursorLine-1)+\", and it is locked.\");\r\n\t\t\telse if ( cursorColumn > paramDoc.getLineLength(--cursorLine) ) cursorColumn = paramDoc.getLineLength(cursorLine);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase DOWNARROWKEY:\r\n\t\t\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\r\n\t\t\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\t\t\t\r\n\t\t\t\r\n\t\t\t// If we are on the last line, move to last char of line.\r\n\t\t\t// If we are not on the last line, see if the line is locked and alert the user if it is\r\n\t\t\t// Otherwise, move down. If we end up out of range of the line, move to the last char of the line\r\n\t\t\tif ( cursorLine == paramDoc.getDocumentLength()-1 ) cursorColumn = paramDoc.getLineLength(cursorLine);\r\n\t\t\telse if ( paramDoc.getLineLockingUser( cursorLine+1 ) != null ) alert(\"Another user is currently on line \"+(cursorLine+1)+\", and it is locked.\");\r\n\t\t\telse if ( cursorColumn > paramDoc.getLineLength(++cursorLine) ) cursorColumn = paramDoc.getLineLength(cursorLine);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase ENDKEY:\r\n\t\t\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\r\n\t\t\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\r\n\t\t\t\r\n\t\t\t/* If we are holding CTL, then we want to go to the very last char of the document. Otherwise, of just the current line */\r\n\t\t\tif ( paramIsCtl ) setCursor( paramDoc.getDocumentLength()-1, paramDoc.getLineLength( paramDoc.getDocumentLength()-1 ) );\r\n\t\t\telse cursorColumn = paramDoc.getLineLength(cursorLine);\r\n\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase HOMEKEY:\r\n\t\t\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\r\n\t\t\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\r\n\t\t\t\r\n\t\t\t/* If we are holding CTL, then we want to go to the very first char of the document. Otherwise, of just the current line */\r\n\t\t\tif ( paramIsCtl ) setCursor( 0, 0 );\r\n\t\t\telse cursorColumn = 0;\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase PAGEUPKEY:\r\n\t\t\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\r\n\t\t\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\r\n\t\t\t\r\n\t\t\t/* If we are holding CTL, Notepadd++ and a variety of other programs perform no function in this case. Do the same */\r\n\t\t\tif ( paramIsCtl ) break;\r\n\t\t\t\r\n\t\t\t// Move the cursor up a number of time relative to the current editing window's height\t\t\t\r\n\t\t\tif(isIE == true){\r\n\t\t\t\tcursorLine -= Math.floor(guiDoc.body.clientHeight / FONT_HEIGHT);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcursorLine -= Math.floor(myIFrame.contentWindow.innerHeight / FONT_HEIGHT);\r\n\t\t\t}\r\n\t\t\t// Do out-of-bounds checks\r\n\t\t\tif ( cursorLine < 0 ) {\r\n\t\t\t\tcursorLine = 0;\r\n\t\t\t\tcursorColumn = 0;\r\n\t\t\t} else if ( cursorColumn >= paramDoc.getLineLength( cursorLine ) ) cursorColumn = paramDoc.getLineLength(cursorLine);\r\n\t\t\t// If the line is locked, move down one\r\n\t\t\twhile ( paramDoc.getLineLockingUser( cursorLine ) != null ) { cursorLine++; }\r\n\t\t\tif(isIE == true){\r\n\t\t\t\tmyIFrame.scrollBy(0,-guiDoc.body.clientHeight+PADDING_TOP);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tmyIFrame.contentWindow.scrollBy(0,-myIFrame.contentWindow.innerHeight+PADDING_TOP);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\tcase PAGEDOWNKEY:\r\n\t\t\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\r\n\t\t\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\r\n\t\t\t\r\n\t\t\t/* If we are holding CTL, Notepadd++ and a variety of other programs perform no function in this case. Do the same */\r\n\t\t\tif ( paramIsCtl ) break;\r\n\t\t\t\r\n\t\t\t// Move the cursor down a number of times relative to the current editing window's height\r\n\t\t\tif(isIE == true){\r\n\t\t\t\tcursorLine += Math.floor(guiDoc.body.clientHeight / FONT_HEIGHT);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcursorLine += Math.floor(myIFrame.contentWindow.innerHeight / FONT_HEIGHT);\r\n\t\t\t}\r\n\t\t\t// Do out-of-bounds checks\r\n\t\t\tif ( cursorLine > paramDoc.getDocumentLength()-1 ) {\r\n\t\t\t\tcursorLine = paramDoc.getDocumentLength()-1;\r\n\t\t\t\tcursorColumn = paramDoc.getLineLength( cursorLine )-1;\r\n\t\t\t\tif( cursorColumn < 0 ) cursorColumn = 0;\r\n\t\t\t} else if ( cursorColumn >= paramDoc.getLineLength( cursorLine ) ) cursorColumn = paramDoc.getLineLength(cursorLine);\r\n\t\t\t// If the line is locked, move up one\r\n\t\t\twhile ( paramDoc.getLineLockingUser( cursorLine ) != null ) { cursorLine--; }\r\n\t\t\tif(isIE == true){\r\n\t\t\t\tmyIFrame.scrollBy(0,guiDoc.body.clientHeight-PADDING_TOP);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tmyIFrame.contentWindow.scrollBy(0,myIFrame.contentWindow.innerHeight-PADDING_TOP);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase BACKSPACEKEY:\r\n\t\t\t// If there is currently a selection, we want to simply delete it and we're done\r\n\t\t\tif ( paramDoc.isSelection ) {\r\n\t\t\t\tvar tmpSel = paramDoc.getCurrentSelection();\r\n\t\t\t\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\r\n\t\t\t\tcursorLine = newCursorCoords[0];\r\n\t\t\t\tcursorColumn = newCursorCoords[1];\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\t// If we are on the first char of the first line, do nothing.\r\n\t\t\t// If we are on the first char of any other line, backspace removes the \"newline character\"\r\n\t\t\t// -- which doesn't exist in our implementation. We simulate this removal by merging lines.\r\n\t\t\t// Otherwise, we simply remove the previous char in the current line\r\n\t\t\tif ( cursorLine == 0 && cursorColumn == 0 ) break;\r\n\t\t\tif ( cursorColumn == 0 && paramDoc.getLineLockingUser( cursorLine-1 ) != null ) {\r\n\t\t\t\talert(\"Another user is currently on line \"+(cursorLine-1)+\", and it is locked.\");\r\n\t\t\t}\r\n\t\t\telse if ( cursorColumn == 0 ) {\r\n\t\t\t\t// Merge the two lines, and remove the original line\r\n\t\t\t\tcursorColumn = paramDoc.getLineLength( cursorLine-1 );\t// Place cursor at end of prior line\r\n\t\t\t\t// Perform text merge into prior line\r\n\t\t\t\tparamDoc.setLineText( cursorLine-1, paramDoc.getLineText( cursorLine-1 ) + paramDoc.getLineText( cursorLine ) );\r\n\t\t\t\t// Remove the line from our data structure\r\n\t\t\t\tparamDoc.removeLine( cursorLine );\r\n\t\t\t\t// Decrement cursorLine\r\n\t\t\t\tcursorLine--;\r\n\t\t\t} else {\r\n\t\t\t\t// \"Remove\" the character prior to cursorColumn, and decrement cursorColumn\r\n\t\t\t\tvar tempText = paramDoc.getLineText( cursorLine );\r\n\t\t\t\tparamDoc.setLineText( cursorLine, tempText.substring(0,cursorColumn-1) + tempText.substring(cursorColumn--) );\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase DELETEKEY:\r\n\t\t\t// If there is currently a selection, we want to simply delete it and we're done\r\n\t\t\tif ( paramDoc.isSelection ) {\r\n\t\t\t\tvar tmpSel = paramDoc.getCurrentSelection();\r\n\t\t\t\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\r\n\t\t\t\tcursorLine = newCursorCoords[0];\r\n\t\t\t\tcursorColumn = newCursorCoords[1];\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\t// If we are at the last char of the last line, do nothing\r\n\t\t\t// If we are at the last char of any other line, we remove the 'newline character', thus merging the current line with the next line\r\n\t\t\t// Otherwise, we simply remove the char at the cursor position\r\n\t\t\tif ( cursorColumn == paramDoc.getLineLength( paramDoc.getDocumentLength()-1 )-1 && cursorLine == paramDoc.getDocumentLength()-1 ) break;\r\n\t\t\tif ( cursorColumn == paramDoc.getLineLength( cursorLine ) && paramDoc.getLineLockingUser( cursorLine+1 ) != null ) {\r\n\t\t\t\talert(\"Another user is currently on line \"+(cursorLine+1)+\", and it is locked.\");\r\n\t\t\t}\r\n\t\t\telse if ( cursorColumn == paramDoc.getLineLength( cursorLine ) ) {\r\n\t\t\t\t// Merge the next line into the current line\r\n\t\t\t\tparamDoc.setLineText( cursorLine, paramDoc.getLineText(cursorLine) + paramDoc.getLineText(cursorLine+1) );\r\n\t\t\t\t// Remove the line in question from our data structure\r\n\t\t\t\tparamDoc.removeLine( cursorLine+1 );\r\n\t\t\t} else {\r\n\t\t\t\t// \"Remove\" the character at the cursorColumn position\r\n\t\t\t\tvar tempText = paramDoc.getLineText( cursorLine );\r\n\t\t\t\tparamDoc.setLineText( cursorLine, tempText.substring(0,cursorColumn) + tempText.substring(cursorColumn+1) );\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase ENTERKEY:\r\n\t\t\t// If there is currently a selection, we want to simply delete it first, THEN add the 'newline'\r\n\t\t\tif ( paramDoc.isSelection ) {\r\n\t\t\t\tvar tmpSel = paramDoc.getCurrentSelection();\r\n\t\t\t\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\r\n\t\t\t\tcursorLine = newCursorCoords[0];\r\n\t\t\t\tcursorColumn = newCursorCoords[1];\r\n\t\t\t}\t\r\n\t\t\t// When we press the enter key, we need to insert a new line into the document\r\n\t\t\t// We need to insert a new line following the current line, which contains the current line's text starting from the cursor\r\n\t\t\tparamDoc.insertLine( cursorLine+1, paramDoc.getLineText( cursorLine ).substring( cursorColumn ) );\r\n\t\t\tparamDoc.setLineText( cursorLine, paramDoc.getLineText( cursorLine ).substring( 0, cursorColumn ) );\r\n\t\t\t// Update the cursor\r\n\t\t\tcursorLine++;\r\n\t\t\tcursorColumn = 0;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase TABKEY:\r\n\t\t\t// If there is currently a selection, we want to simply delete it first, THEN add the tab\r\n\t\t\tif ( paramDoc.isSelection ) {\r\n\t\t\t\tvar tmpSel = paramDoc.getCurrentSelection();\r\n\t\t\t\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\r\n\t\t\t\tcursorLine = newCursorCoords[0];\r\n\t\t\t\tcursorColumn = newCursorCoords[1];\r\n\t\t\t}\t\r\n\t\t\t// Insert 4 spaces at current cursor position\r\n\t\t\t// SUPER HACK: Need to redesign functions a bit to eliminate redundancy and make it cleaner and more readable. \r\n\t\t\t// We eventually want this to call an \"insertText()\" , but for now....\r\n\t\t\ttypeCharacter( paramDoc, \" \".charCodeAt(0) );\r\n\t\t\ttypeCharacter( paramDoc, \" \".charCodeAt(0) );\r\n\t\t\ttypeCharacter( paramDoc, \" \".charCodeAt(0) );\r\n\t\t\ttypeCharacter( paramDoc, \" \".charCodeAt(0) );\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase SHIFTKEY:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase CAPSLOCKKEY:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase HIDECHATWINDOWSKEY:\r\n\t\t\tif( paramIsCtl ) { hideChatShortcut(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t//For autobracketing\r\n\t\tcase LEFTBRACKET:\r\n\t\t\t// If there is currently a selection, we want to simply delete it first, then go from there\r\n\t\t\tif ( paramDoc.isSelection ) {\r\n\t\t\t\tvar tmpSel = paramDoc.getCurrentSelection();\r\n\t\t\t\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\r\n\t\t\t\tcursorLine = newCursorCoords[0];\r\n\t\t\t\tcursorColumn = newCursorCoords[1];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( !paramIsShift ) { return true; }\r\n\t\t\tif(isFF == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar origCursorCol = this.getCursorColumn();\r\n\t\t\t\t\tthis.setCursor(this.getCursorLine(), origCursorCol+1);\r\n\t\t\t\t\ttypeCharacter( paramDoc, \"}\".charCodeAt(0) );\r\n\t\t\t\t\tthis.setCursor(this.getCursorLine(), origCursorCol);\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tvar curChar = paramDoc.getLineText(cursorLine).substring(cursorColumn, cursorColumn+1);\r\n\t\t\t\tif(curChar != '{')\r\n\t\t\t\t{\r\n\t\t\t\t\ttypeCharacter( paramDoc, \"{\".charCodeAt(0) );\r\n\t\t\t\t\ttypeCharacter( paramDoc, \"}\".charCodeAt(0) );\r\n\t\t\t\t\tthis.setCursor(this.getCursorLine(), this.getCursorColumn()-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase LEFTPAREN:\r\n\t\t\t// If there is currently a selection, we want to simply delete it first, then go from there\r\n\t\t\tif ( paramDoc.isSelection ) {\r\n\t\t\t\tvar tmpSel = paramDoc.getCurrentSelection();\r\n\t\t\t\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\r\n\t\t\t\tcursorLine = newCursorCoords[0];\r\n\t\t\t\tcursorColumn = newCursorCoords[1];\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif( !paramIsShift ) { return true; }\r\n\t\t\tif(isFF == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar origCursorCol = this.getCursorColumn();\r\n\t\t\t\t\tthis.setCursor(this.getCursorLine(), origCursorCol+1);\r\n\t\t\t\t\ttypeCharacter( paramDoc, \")\".charCodeAt(0) );\r\n\t\t\t\t\tthis.setCursor(this.getCursorLine(), origCursorCol);\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tvar curChar = paramDoc.getLineText(cursorLine).substring(cursorColumn, cursorColumn+1);\r\n\t\t\t\tif(curChar != '(')\r\n\t\t\t\t{\r\n\t\t\t\t\ttypeCharacter( paramDoc, \"(\".charCodeAt(0) );\r\n\t\t\t\t\ttypeCharacter( paramDoc, \")\".charCodeAt(0) );\r\n\t\t\t\t\tthis.setCursor(this.getCursorLine(), this.getCursorColumn()-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase FINDKEY:\r\n\t\t\tif( paramIsCtl ) { findMenuClick(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase REPLACEKEY:\r\n\t\t\tif( paramIsCtl ) { replaceMenuClick(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase GOTOKEY:\r\n\t\t\tif( paramIsCtl ) { gotoMenuClick(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase SELECTALLKEY:\r\n\t\t\tif( paramIsCtl ) { selectAllMenuClick(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase CUTKEY:\r\n\t\t\tif( paramIsCtl ) { cutIconClicked(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase COPYKEY:\r\n\t\t\tif( paramIsCtl ) { copyIconClicked(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase PASTEKEY:\r\n\t\t\tif( paramIsCtl ) { pasteIconClicked(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase NEWKEY:\r\n\t\t\tif( paramIsCtl ) { newMenuClick(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase OPENKEY:\r\n\t\t\tif( paramIsCtl ) { openMenuClick(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase UPLOADKEY:\r\n\t\t\tif( paramIsCtl ) { uploadMenuClick(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase COLORKEY:\r\n\t\t\tif( paramIsCtl ) { colorMenuClick(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tcase HIGHLIGHTKEY:\r\n\t\t\tif( paramIsCtl ) { highlighMenuClick(); }\r\n\t\t\telse{ return true; }\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treturn true;\t\t// Return values are this way for the convenience of the onKeyDown event handler function\r\n\t}\r\n\treturn false;\t// Return values are this way for the convenience of the onKeyDown event handler function\r\n} // END typeSpecial(paramKEY)","function openPositionedWindow2(url, name, width, height, x, y, status, scrollbars, moreProperties, openerName) {\n\t\n\t// ie4.5 mac - windows are 2 pixels too short; if a statusbar is used, the window will be an additional 15 pixels short\n\tvar agent = navigator.userAgent.toLowerCase();\n\tif (agent.indexOf(\"mac\")!=-1 && agent.indexOf(\"msie\") != -1 && agent.indexOf(\"msie 5.0\")==-1) {\n\t\theight += 2;\n\t\tif (status) height += 15;\n\t}\n\n\t// Adjust width if scrollbars are used (pc places scrollbars inside the content area; mac outside) \n\twidth += (scrollbars != '' && scrollbars != null && agent.indexOf(\"mac\") == -1) ? 16 : 0;\n\n\tvar properties = 'width=' + width + ',height=' + height + ',screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + y + ((status) ? ',status' : '') + ',scrollbars' + ((scrollbars) ? '' : '=no') + ((moreProperties) ? ',' + moreProperties : '');\n\tvar reference = openWindow2(url, name, properties, openerName);\n\t\n\t// resize window in ie if we can resize in ns; very messy\n\t// commented out because openPositionedWindow() doesn't set the resizable attribute\n\t// left in for reference\n\t/*if (resizable && agent.indexOf(\"msie\") != -1) {\n\t\tif (agent.indexOf(\"mac\") != -1) {\n\t\t\theight += (status) ? 15 : 2;\n\t\t\tif (parseFloat(navigator.appVersion) > 5) width -= 11;\n\t\t}\n\t\telse {\n\t\t\theight += (status) ? 49 : 31;\n\t\t\twidth += 13;\n\t\t}\n\t\tsetTimeout('if (reference != null && !reference.closed) reference.resizeTo(' + width + ',' + height + ');', 150);\n\t}*/\n\n\treturn reference;\n}","function Socket() {}","function P(a){return _.isWindow(a)?a:9===a.nodeType&&a.defaultView}","enter() {\n\t\tdelete this.write;\n\t\tprocess.once('uncaughtException', this.onUncaughtException);\n\t\tthis.i.setRawMode(true);\n\t\tthis.write(\"\\x1B[?1049h\\x1B[?12l\"); //alternate buffer + disable blinking cursor\n\t\tthis.i.on('data', this.onKey);\n\t\tthis.o.on('resize', this.onResize);\n\t\tprocess.once('exit', this.onKill);\n\t\tprocess.once('SIGTERM', this.onKill);\n\t\tprocess.once('SIGINT', this.onKill);\n\t\tthis.onResize(true);\n\t}","function Shell() {\n // Properties\n this.promptStr = \">\";\n this.commandList = [];\n this.curses = \"[fuvg],[cvff],[shpx],[phag],[pbpxfhpxre],[zbgureshpxre],[gvgf], [ybir]\";\n this.apologies = \"[sorry], [gomenen], [gomen], [gomenasai]\";\n // Methods\n this.init = shellInit;\n this.putPrompt = shellPutPrompt;\n this.handleInput = shellHandleInput;\n this.execute = shellExecute;\n}","function __loadCompatLayer(w) {\n w.Debug = function() {\n };\n w.Debug._fail = function(message) {\n throw new Error(message);\n };\n w.Debug.writeln = function(text) {\n if (window.console) {\n if (window.console.debug) {\n window.console.debug(text);\n return;\n }\n else if (window.console.log) {\n window.console.log(text);\n return;\n }\n }\n else if (window.opera &&\n window.opera.postError) {\n window.opera.postError(text);\n return;\n }\n };\n\n w.__getNonTextNode = function(node) {\n try {\n while (node && (node.nodeType != 1)) {\n node = node.parentNode;\n }\n }\n catch (ex) {\n node = null;\n }\n return node;\n };\n \n w.__getLocation = function(e) {\n var loc = {x : 0, y : 0};\n while (e) {\n loc.x += e.offsetLeft;\n loc.y += e.offsetTop;\n e = e.offsetParent;\n }\n return loc;\n };\n\n // Allow caching regex objects for performance\n RegExp._cacheable = true;\n\n // Skip RegExp.test in String.quote to improve performance.\n String._quoteSkipTest = true;\n\n w.navigate = function(url) {\n window.setTimeout('window.location = \"' + url + '\";', 0);\n };\n\n var attachEventProxy = function(eventName, eventHandler) {\n eventHandler._mozillaEventHandler = function(e) {\n window.event = e;\n eventHandler();\n if (!e.avoidReturn) {\n return e.returnValue;\n }\n };\n this.addEventListener(eventName.slice(2), eventHandler._mozillaEventHandler, false);\n };\n\n var detachEventProxy = function (eventName, eventHandler) {\n if (eventHandler._mozillaEventHandler) {\n var mozillaEventHandler = eventHandler._mozillaEventHandler;\n delete eventHandler._mozillaEventHandler;\n \n this.removeEventListener(eventName.slice(2), mozillaEventHandler, false);\n }\n };\n\n w.attachEvent = attachEventProxy;\n w.detachEvent = detachEventProxy;\n w.HTMLDocument.prototype.attachEvent = attachEventProxy;\n w.HTMLDocument.prototype.detachEvent = detachEventProxy;\n w.HTMLElement.prototype.attachEvent = attachEventProxy;\n w.HTMLElement.prototype.detachEvent = detachEventProxy;\n\n w.Event.prototype.__defineGetter__('srcElement', function() {\n // __getNonTextNode(this.target) is the expected implementation.\n // However script.load has target set to the Document object... so we\n // need to throw in currentTarget as well.\n return __getNonTextNode(this.target) || this.currentTarget;\n });\n w.Event.prototype.__defineGetter__('cancelBubble', function() {\n return this._bubblingCanceled || false;\n });\n w.Event.prototype.__defineSetter__('cancelBubble', function(v) {\n if (v) {\n this._bubblingCanceled = true;\n this.stopPropagation();\n }\n });\n w.Event.prototype.__defineGetter__('returnValue', function() {\n return !this._cancelDefault;\n });\n w.Event.prototype.__defineSetter__('returnValue', function(v) {\n if (!v) {\n this._cancelDefault = true;\n this.preventDefault();\n }\n });\n w.Event.prototype.__defineGetter__('fromElement', function () {\n var n;\n if (this.type == 'mouseover') {\n n = this.relatedTarget;\n }\n else if (this.type == 'mouseout') {\n n = this.target;\n }\n return __getNonTextNode(n);\n });\n w.Event.prototype.__defineGetter__('toElement', function () {\n var n;\n if (this.type == 'mouseout') {\n n = this.relatedTarget;\n }\n else if (this.type == 'mouseover') {\n n = this.target;\n }\n return __getNonTextNode(n);\n });\n w.Event.prototype.__defineGetter__('button', function() {\n return (this.which == 1) ? 1 : (this.which == 3) ? 2 : 0\n });\n w.Event.prototype.__defineGetter__('offsetX', function() {\n return window.pageXOffset + this.clientX - __getLocation(this.srcElement).x;\n });\n w.Event.prototype.__defineGetter__('offsetY', function() {\n return window.pageYOffset + this.clientY - __getLocation(this.srcElement).y;\n });\n\n w.HTMLElement.prototype.__defineGetter__('parentElement', function() {\n return this.parentNode;\n });\n w.HTMLElement.prototype.__defineGetter__('children', function() {\n var children = [];\n var childCount = this.childNodes.length;\n for (var i = 0; i < childCount; i++) {\n var childNode = this.childNodes[i];\n if (childNode.nodeType == 1) {\n children.push(childNode);\n }\n }\n return children;\n });\n w.HTMLElement.prototype.__defineGetter__('innerText', function() { \n try {\n return this.textContent\n } \n catch (ex) {\n var text = '';\n for (var i=0; i < this.childNodes.length; i++) {\n if (this.childNodes[i].nodeType == 3) {\n text += this.childNodes[i].textContent;\n }\n }\n return str;\n }\n });\n w.HTMLElement.prototype.__defineSetter__('innerText', function(v) {\n var textNode = document.createTextNode(v);\n this.innerHTML = '';\n this.appendChild(textNode);\n });\n w.HTMLElement.prototype.__defineGetter__('currentStyle', function() {\n return window.getComputedStyle(this, null);\n });\n w.HTMLElement.prototype.__defineGetter__('runtimeStyle', function() {\n return window.getOverrideStyle(this, null);\n });\n w.HTMLElement.prototype.removeNode = function(b) {\n return this.parentNode.removeChild(this)\n };\n w.HTMLElement.prototype.contains = function(el) {\n while (el != null && el != this) {\n el = el.parentNode;\n }\n return (el!=null)\n };\n\n w.HTMLStyleElement.prototype.__defineGetter__('styleSheet', function() {\n return this.sheet;\n });\n w.CSSStyleSheet.prototype.__defineGetter__('rules', function() {\n return this.cssRules;\n });\n w.CSSStyleSheet.prototype.addRule = function(selector, style, index) {\n this.insertRule(selector + '{' + style + '}', index);\n };\n w.CSSStyleSheet.prototype.removeRule = function(index) {\n this.deleteRule(index);\n };\n w.CSSStyleDeclaration.prototype.__defineGetter__('styleFloat', function() {\n return this.cssFloat;\n });\n w.CSSStyleDeclaration.prototype.__defineSetter__('styleFloat', function(v) {\n this.cssFloat = v;\n });\n DocumentFragment.prototype.getElementById = function(id) {\n var nodeQueue = [];\n var childNodes = this.childNodes;\n var node;\n var c;\n \n for (c = 0; c < childNodes.length; c++) {\n node = childNodes[c];\n if (node.nodeType == 1) {\n nodeQueue.push(node);\n }\n }\n\n while (nodeQueue.length) {\n node = nodeQueue.dequeue();\n if (node.id == id) {\n return node;\n }\n childNodes = node.childNodes;\n if (childNodes.length != 0) {\n for (c = 0; c < childNodes.length; c++) {\n node = childNodes[c];\n if (node.nodeType == 1) {\n nodeQueue.push(node);\n }\n }\n }\n }\n\n return null;\n };\n\n DocumentFragment.prototype.getElementsByTagName = function(tagName) {\n var elements = [];\n var nodeQueue = [];\n var childNodes = this.childNodes;\n var node;\n var c;\n\n for (c = 0; c < childNodes.length; c++) {\n node = childNodes[c];\n if (node.nodeType == 1) {\n nodeQueue.push(node);\n }\n }\n\n while (nodeQueue.length) {\n node = nodeQueue.dequeue();\n if (node.tagName == tagName) {\n elements.add(node);\n }\n childNodes = node.childNodes;\n if (childNodes.length != 0) {\n for (c = 0; c < childNodes.length; c++) {\n node = childNodes[c];\n if (node.nodeType == 1) {\n nodeQueue.push(node);\n }\n }\n }\n }\n\n return elements;\n };\n\n DocumentFragment.prototype.createElement = function(tagName) {\n return document.createElement(tagName);\n };\n\n var selectNodes = function(doc, path, contextNode) {\n contextNode = contextNode ? contextNode : doc;\n var xpath = new XPathEvaluator();\n var result = xpath.evaluate(path, contextNode,\n doc.createNSResolver(doc.documentElement),\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\n\n var nodeList = new Array(result.snapshotLength);\n for(var i = 0; i < result.snapshotLength; i++) {\n nodeList[i] = result.snapshotItem(i);\n }\n\n return nodeList;\n };\n\n var selectSingleNode = function(doc, path, contextNode) {\n path += '[1]';\n var nodes = selectNodes(doc, path, contextNode);\n if (nodes.length != 0) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i]) {\n return nodes[i];\n }\n }\n }\n return null;\n };\n\n w.XMLDocument.prototype.selectNodes = function(path, contextNode) {\n return selectNodes(this, path, contextNode);\n };\n\n w.XMLDocument.prototype.selectSingleNode = function(path, contextNode) {\n return selectSingleNode(this, path, contextNode);\n };\n\n w.XMLDocument.prototype.transformNode = function(xsl) {\n var xslProcessor = new XSLTProcessor();\n xslProcessor.importStylesheet(xsl);\n\n var ownerDocument = document.implementation.createDocument(\"\", \"\", null);\n var transformedDoc = xslProcessor.transformToDocument(this);\n \n return transformedDoc.xml;\n };\n\n Node.prototype.selectNodes = function(path) {\n var doc = this.ownerDocument;\n return doc.selectNodes(path, this);\n };\n\n Node.prototype.selectSingleNode = function(path) {\n var doc = this.ownerDocument;\n return doc.selectSingleNode(path, this);\n };\n\n Node.prototype.__defineGetter__('baseName', function() {\n return this.localName;\n });\n\n Node.prototype.__defineGetter__('text', function() {\n return this.textContent;\n });\n Node.prototype.__defineSetter__('text', function(value) {\n this.textContent = value;\n });\n\n Node.prototype.__defineGetter__('xml', function() {\n return (new XMLSerializer()).serializeToString(this);\n });\n}","function shellLS()\n{\n krnDiskLS();\n}","function SystemProto() {}","function SystemProto() {}","function SystemProto() {}","function applyEscape( options , ... args ) {\n\tvar fn , newOptions , wrapOptions ;\n\n\t// Cause trouble because the shutting down process itself needs to send escape sequences asynchronously\n\t//if ( options.root.shutdown && ! options.str ) { return options.root ; }\n\n\tif ( options.bounded ) { args = options.bounded.concat( args ) ; }\n\n\t//console.error( args ) ;\n\tif ( options.bind ) {\n\t\tnewOptions = Object.assign( {} , options , { bind: false , bounded: args } ) ;\n\t\tfn = applyEscape.bind( this , newOptions ) ;\n\n\t\t// Still a nasty hack...\n\t\tObject.setPrototypeOf( fn , Object.getPrototypeOf( options.root ) ) ;\n\t\tfn.apply = Function.prototype.apply ;\n\t\tfn.root = options.root ;\n\t\tfn.options = newOptions ;\n\n\t\treturn fn ;\n\t}\n\n\tvar onFormat = [ options.on ] , output , on , off ;\n\tvar action = args[ options.params ] ;\n\n\t// If not enough arguments, return right now\n\t// Well... what about term.up(), term.previousLine(), and so on?\n\t//if ( arguments.length < 1 + options.params && ( action === null || action === false ) ) { return options.root ; }\n\n\tif ( options.params ) {\n\t\tonFormat = onFormat.concat( args.slice( 0 , options.params ) ) ;\n\t}\n\n\t//console.log( '\\n>>> Action:' , action , '<<<\\n' ) ;\n\t//console.log( 'Attributes:' , attributes ) ;\n\tif ( action === undefined || action === true ) {\n\t\ton = options.onHasFormatting ? options.root.format( ... onFormat ) : options.on ;\n\t\tif ( options.str ) { return on ; }\n\t\toptions.out.write( on ) ;\n\t\treturn options.root ;\n\t}\n\n\tif ( action === null || action === false ) {\n\t\toff = options.offHasFormatting ? options.root.format( options.off ) : options.off ;\n\t\tif ( options.str ) { return off ; }\n\t\toptions.out.write( off ) ;\n\t\treturn options.root ;\n\t}\n\n\tif ( typeof action !== 'string' ) {\n\t\tif ( typeof action.toString === 'function' ) { action = action.toString() ; }\n\t\telse { action = '' ; }\n\t}\n\n\t// So we have got a string\n\n\ton = options.onHasFormatting ? options.root.format( ... onFormat ) : options.on ;\n\n\tif ( options.markupOnly ) {\n\t\taction = options.root.markup( ... args.slice( options.params ) ) ;\n\t}\n\telse if ( ! options.noFormat ) {\n\t\taction = options.root.format( ... args.slice( options.params ) ) ;\n\t}\n\n\tif ( options.wrap ) {\n\t\tif ( options.root.wrapOptions.x && options.root.wrapOptions.x > 1 ) {\n\t\t\twrapOptions = {\n\t\t\t\twidth: options.root.wrapOptions.width || options.root.width - options.root.wrapOptions.x + 1 ,\n\t\t\t\tglue: '\\n' + options.root.str.column( options.root.wrapOptions.x ) ,\n\t\t\t\toffset: options.root.wrapOptions.offset ,\n\t\t\t\tupdateOffset: true ,\n\t\t\t\tskipFn: termkit.escapeSequenceSkipFn\n\t\t\t} ;\n\n\t\t\taction = string.wordwrap( action , wrapOptions ) ;\n\n\t\t\tif ( ! options.root.wrapOptions.continue ) {\n\t\t\t\taction = options.root.str.column( options.root.wrapOptions.x ) + action ;\n\t\t\t}\n\n\t\t\toptions.root.wrapOptions.continue = true ;\n\t\t\toptions.root.wrapOptions.offset = wrapOptions.offset ;\n\t\t}\n\t\telse {\n\t\t\twrapOptions = {\n\t\t\t\twidth: options.root.wrapOptions.width || options.root.width ,\n\t\t\t\tglue: '\\n' ,\n\t\t\t\toffset: options.root.wrapOptions.offset ,\n\t\t\t\tupdateOffset: true ,\n\t\t\t\tskipFn: termkit.escapeSequenceSkipFn\n\t\t\t} ;\n\n\t\t\taction = string.wordwrap( action , wrapOptions ) ;\n\t\t\toptions.root.wrapOptions.continue = true ;\n\t\t\toptions.root.wrapOptions.offset = wrapOptions.offset ;\n\t\t}\n\t}\n\telse {\n\t\t// All non-wrapped string display reset the offset\n\t\toptions.root.wrapOptions.continue = false ;\n\t\toptions.root.wrapOptions.offset = 0 ;\n\t}\n\n\toff = options.offHasFormatting ? options.root.format( options.off ) : options.off ;\n\n\tif ( options.forceStyleOnReset ) {\n\t\taction = action.replace( new RegExp( string.escape.regExp( options.root.optimized.styleReset ) , 'g' ) , options.root.optimized.styleReset + on ) ;\n\t}\n\n\tif ( options.root.resetString ) {\n\t\toutput = options.root.resetString + on + action + off + options.root.resetString ;\n\t}\n\telse {\n\t\toutput = on + action + off ;\n\t}\n\n\t// tmp hack?\n\tif ( options.crlf ) { output = output.replace( /\\n/g , '\\r\\n' ) ; }\n\n\tif ( options.str ) { return output ; }\n\n\toptions.out.write( output ) ;\n\n\treturn options.root ;\n}","function crest_kernel() {\n var command = command_pass;\n var command_query = command.split(\"#\");\n\n var command_pointer = command_query[1];\n if (command_pointer == \"settings\"){open_settings();} // open settings\n if (command_pointer == \"tools\"){open_tools();} // open tools\n if (command_pointer == \"kill\") {kill();} // kill test command;\n if (command_pointer == \"import-code\") {import_template();} \n if (command_pointer == \"dclose\") {w3_close();} //close dashboard\n if (command_pointer == \"dopen\") {w3_open();} // open sideboard\n}","function DeviceDriverFileSystem(){ // Add or override specific attributes and method pointers.{\n // \"subclass\"-specific attributes.\n // this.buffer = \"\"; // TODO: Do we need this?\n // Override the base method pointers.\n this.driverEntry = function(){\n // Initialization routine for this, the kernel-mode Keyboard Device Driver.\n this.status = \"loaded\";\n // More?\n };\n this.isr = function(params){\n //expect to receive params as follows[filename | new program,operation,data,from user | os]\n switch(params[1]){\n case 0: createFile(params); break;\n case 1: readFile(params); break;\n case 2: writeFile(params); break;\n case 3: deleteFile(params); break;\n case 4: format(); break;\n case 5: listFiles(); break;\n case 6: findProgramFiles(); break;\n case 7: swapProcess(params); break;\n default: console.log(\"blakejrlbkadflkdaf\"); break;\n }\n };\n this.test = function(){\n updateMBR();\n }\n}","function browser(){}","function browser(){}","function mkobj(pty) {\n return new pty.constructor()\n}","refresh(isLinuxMouseSelection) {\n // Queue the refresh for the renderer\n if (!this._refreshAnimationFrame) {\n this._refreshAnimationFrame = window.requestAnimationFrame(() => this._refresh());\n }\n // If the platform is Linux and the refresh call comes from a mouse event,\n // we need to update the selection for middle click to paste selection.\n if (isLinux && isLinuxMouseSelection) {\n const selectionText = this.selectionText;\n if (selectionText.length) {\n this._onLinuxMouseSelection.fire(this.selectionText);\n }\n }\n }","function updateStatusWindowOld(){\r\n\tvar value = parseInt(hatsForm.CURSORPOSITION.value);\r\n\tif (!isNaN(value)) {\r\n\t\tstatwin[0]=\" \"+value +\" (\"+ ConvertPosToRow(value, intNumberOfColumns)+\",\"+ ConvertPosToCol(value, intNumberOfColumns)+\")\";\r\n\t}\r\n\tif (isOverWriteMode()) statwin[1]=\"[]\";\r\n\telse\r\n\t\tstatwin[1]=\"|\";\r\n\tif (screenLocked){\r\n\t\tstatwin[3]=\" >< \";\r\n\t}\r\n\tvar strstat=\"\";\r\n\tif (carettrackingenabled) strstat=strstat+statwin[0];\r\n\tif (overwritemodeenabled) strstat=strstat+\" \"+statwin[1];\r\n\tif (statwin[2]!=\" \") strstat=strstat+\" \"+statwin[2];\r\n\tif (screenLocked) strstat=strstat+\" \"+statwin[3];\r\n\tif (enableBIDI){\r\n\t\twindow.status = statusBIDI;\r\n\t} else\r\n\t\twindow.status=strstat;\r\n}","function WysiwymTextarea(textarea) {\n this.NEWLINE = \"\\n\"; // Newline Character specified to Browser\n var NONE = { prefix: '' } // Line Type NONE\n var lines = new Array(); // Array Line objects { type, text, selected }\n var cursor = { // Internal Cursor Object { start, end }\n start: { line:0, position:0 }, // Cursor Start Position { line, position }\n end: { line:0, position:0 }, // Cursor End Position { line, position }\n scroll: 0 // Current Scroll Position \n }\n \n /*-------------------------------------------------------------------\n * Simple Public Functions\n *------------------------------------------------------------------ */\n this.getCursor = function() { return cursor; }\n this.getLines = function() { return lines; }\n this.getNumLines = function() { return lines.length; }\n this.getLine = function(lineNum) { return lines[lineNum]; }\n this.getSelectionRange = function() { return [cursor.start.line, cursor.end.line]; }\n \n /*-------------------------------------------------------------------\n * @public getSelection: Return the current selected text.\n *------------------------------------------------------------------ */\n this.getSelection = function() {\n var selection = \"\";\n for (i in lines) {\n var text = lines[i].text;\n if ((i == cursor.start.line) && (i == cursor.end.line))\n return text.substring(cursor.start.position, cursor.end.position);\n if (i == cursor.start.line)\n selection = selection + text.substring(cursor.start.position, text.length);\n if ((i > cursor.start.line) && (i < cursor.end.line))\n selection = selection + text;\n if (i == cursor.end.line)\n selection = selection + text.substring(0, cursor.end.position)\n }\n return selection;\n }\n \n /*-------------------------------------------------------------------\n * @public getSelection: Return the length of Selection text\n *------------------------------------------------------------------ */\n this.getSelectionLength = function() {\n var selection = this.getSelection();\n return selection.length;\n }\n \n /*-------------------------------------------------------------------\n * @public hasPrefix: Return true if the current selection has the\n * specified prefix text. NOTE: Does not work with return lines.\n *------------------------------------------------------------------ */\n this.selectionHasPrefix = function(prefixText) {\n var lineText = lines[cursor.start.line].text;\n var start = cursor.start.position - prefixText.length;\n if (start < 0) { return false; }\n if (lineText.substring(start, cursor.start.position) != prefixText) { return false; }\n return true;\n }\n \n /*-------------------------------------------------------------------\n * @public hasPrefix: Return true if the current selection has the\n * specified suffix text. NOTE: Does not work with return lines.\n *------------------------------------------------------------------ */\n this.selectionHasSuffix = function(suffixText) {\n var lineText = lines[cursor.end.line].text;\n var end = cursor.end.position + suffixText.length;\n if (end > lineText.length) { return false; }\n if (lineText.substring(cursor.end.position, end) != suffixText) { return false; }\n return true;\n }\n \n /*-------------------------------------------------------------------\n * @public prependToSelection: Insert the specified text at at the cursor\n * start position and make it selected.\n *------------------------------------------------------------------ */\n this.prependToSelection = function(insertText) {\n var lineText = lines[cursor.start.line].text;\n var newText = lineText.substring(0, cursor.start.position) +\n insertText + lineText.substring(cursor.start.position, lineText.length);\n lines[cursor.start.line].text = newText;\n // Update Class Variables\n if (cursor.start.line == cursor.end.line)\n cursor.end.position += insertText.length;\n }\n \n /*-------------------------------------------------------------------\n * @public appendToSelection: Insert the specified text at at the cursor\n * end position and make it selected.\n *------------------------------------------------------------------ */\n this.appendToSelection = function(insertText) {\n var lineText = lines[cursor.end.line].text;\n var newText = lineText.substring(0, cursor.end.position) +\n insertText + lineText.substring(cursor.end.position, lineText.length);\n lines[cursor.end.line].text = newText;\n // Update Class Variables\n cursor.end.position += insertText.length;\n }\n \n /*-------------------------------------------------------------------\n * @public insertSelectionPrefix: Insert the specified text at at the cursor\n * start position. NOTE: This does not work with return lines.\n *------------------------------------------------------------------ */\n this.insertSelectionPrefix = function(prefixText) {\n var lineText = lines[cursor.start.line].text;\n var newText = lineText.substring(0, cursor.start.position) +\n prefixText + lineText.substring(cursor.start.position, lineText.length);\n lines[cursor.start.line].text = newText;\n // Update Class Variables\n cursor.start.position += prefixText.length;\n if (cursor.start.line == cursor.end.line)\n cursor.end.position += prefixText.length;\n }\n \n /*-------------------------------------------------------------------\n * @public insertSelectionSuffix: Insert the specified text at at the cursor\n * end position. NOTE: This does not work with return lines.\n *------------------------------------------------------------------ */\n this.insertSelectionSuffix = function(suffixText) {\n var lineText = lines[cursor.end.line].text;\n var newText = lineText.substring(0, cursor.end.position) +\n suffixText + lineText.substring(cursor.end.position, lineText.length);\n lines[cursor.end.line].text = newText;\n }\n \n /*-------------------------------------------------------------------\n * @public removePrefix: Remove the specified prefix text if it\n * matches with the passed in value. Returns boolean True it\n * was successful, False otherwise.\n *------------------------------------------------------------------ */\n this.removeSelectionPrefix = function(prefixText) {\n if (this.selectionHasPrefix(prefixText)) {\n var lineText = lines[cursor.start.line].text;\n var start = cursor.start.position - prefixText.length;\n var newText = lineText.substring(0, start) +\n lineText.substring(cursor.start.position, lineText.length);\n lines[cursor.start.line].text = newText;\n // Update Class Variables\n cursor.start.position -= prefixText.length;\n if (cursor.start.line == cursor.end.line)\n cursor.end.position -= prefixText.length;\n return true;\n }\n return false;\n }\n \n /*-------------------------------------------------------------------\n * @public removeSuffix: Remove the specified suffix text if it\n * matches with the passed in value. Returns boolean True it\n * was successful, False otherwise.\n *------------------------------------------------------------------ */\n this.removeSelectionSuffix = function(suffixText) {\n if (this.selectionHasSuffix(suffixText)) {\n var lineText = lines[cursor.end.line].text;\n var end = cursor.end.position + suffixText.length;\n var newText = lineText.substring(0, cursor.end.position) +\n lineText.substring(end, lineText.length);\n lines[cursor.end.line].text = newText;\n return true;\n }\n return false;\n }\n \n /*-------------------------------------------------------------------\n * @public isWrapped: Return True if the selection is wrapped\n * in the specified prefix and suffix text. Otherwise False.\n * NOTE: Does not work with return lines.\n *------------------------------------------------------------------ */\n this.selectionIsWrapped = function(prefixText, suffixText) {\n if (suffixText == null) { suffixText = prefixText; }\n return ((this.selectionHasPrefix(prefixText)) && (this.selectionHasSuffix(suffixText)))\n }\n \n /*-------------------------------------------------------------------\n * @public wrap: Wrap the cursor or currently selected text\n * with the specified newTextBefore and newTextAfter.\n *------------------------------------------------------------------ */\n this.wrapSelection = function(prefixText, suffixText) {\n if (suffixText == null) { suffixText = prefixText; }\n this.insertSelectionPrefix(prefixText);\n this.insertSelectionSuffix(suffixText);\n }\n \n /*-------------------------------------------------------------------\n * @public unwrap: Unwrap the selection by removeing the prefix\n * and suffix text specified. Returns boolean True it\n * was successful, False otherwise.\n *------------------------------------------------------------------ */\n this.unwrapSelection = function(prefixText, suffixText) {\n if (suffixText == null) { suffixText = prefixText; }\n if ((this.selectionHasPrefix(prefixText)) && (this.selectionHasSuffix(suffixText))) {\n this.removeSelectionPrefix(prefixText);\n this.removeSelectionSuffix(suffixText);\n return true;\n }\n return false;\n }\n \n /*-------------------------------------------------------------------\n * @public insertLinePrefix: Return True if the line has the\n * specified prefix.\n *------------------------------------------------------------------ */\n this.lineHasPrefix = function(lineNum, prefixText) {\n return lines[lineNum].text.substring(0, prefixText.length) == prefixText;\n }\n \n /*-------------------------------------------------------------------\n * @public insertLinePrefix: Add the Prefix to the specified line.\n *------------------------------------------------------------------ */\n this.insertLinePrefix = function(lineNum, prefixText) {\n var lineText = lines[lineNum].text;\n var newText = prefixText + lineText.substring(0, cursor.start.position) +\n lineText.substring(cursor.start.position, lineText.length);\n lines[lineNum].text = newText;\n // Update Class Variables\n if (lineNum == cursor.start.line)\n cursor.start.position += prefixText.length;\n if (lineNum == cursor.end.line)\n cursor.end.position += prefixText.length;\n }\n \n /*-------------------------------------------------------------------\n * @public removePrefix: Remove the specified prefix text if it\n * matches with the passed in value. Returns boolean True it\n * was successful, False otherwise.\n *------------------------------------------------------------------ */\n this.removeLinePrefix = function(lineNum, prefixText) {\n if (this.lineHasPrefix(lineNum, prefixText)) {\n var lineText = lines[lineNum].text;\n var newText = lineText.substring(prefixText.length, lineText.length);\n lines[lineNum].text = newText;\n // Update Class Variables\n if (lineNum == cursor.start.line)\n cursor.start.position -= prefixText.length;\n if (lineNum == cursor.end.line)\n cursor.end.position -= prefixText.length;\n return true;\n }\n return false;\n }\n \n /*-------------------------------------------------------------------\n * @public insertLineSuffix: Append the suffix to the end of the\n * specified line.\n *------------------------------------------------------------------ */\n this.insertLineSuffix = function(lineNum, suffixText) {\n var lineText = lines[lineNum].text;\n var newText = lineText.substring(0, cursor.start.position) +\n lineText.substring(cursor.start.position, lineText.length) + suffixText;\n lines[lineNum].text = newText;\n }\n \n /*-------------------------------------------------------------------\n * @public insertLinePrefix: Return True if all lines in the\n * selection have the specified prefix.\n *------------------------------------------------------------------ */\n this.selectionLinesHavePrefix = function(prefixText) {\n for (var i=cursor.start.line; i<=cursor.end.line; i++)\n if (!this.lineHasPrefix(i, prefixText))\n return false;\n return true;\n }\n \n /*-------------------------------------------------------------------\n * @public insertLinePrefix: Add the Prefix Text to all lines in\n * the selection.\n *------------------------------------------------------------------ */\n this.insertSelectionLinesPrefix = function(prefixText) {\n for (var i=cursor.start.line; i<=cursor.end.line; i++)\n this.insertLinePrefix(i, prefixText);\n }\n \n /*-------------------------------------------------------------------\n * @public insertLinePrefix: Add the Prefix Text to all lines in\n * the selection.\n *------------------------------------------------------------------ */\n this.removeSelectionLinesPrefix = function(prefixText) {\n for (var i=cursor.start.line; i<=cursor.end.line; i++)\n this.removeLinePrefix(i, prefixText);\n }\n \n /*-------------------------------------------------------------------\n * @public getTextareaProperties: Return the global textarea\n * properties (NOT by Line). This returns the a Map containing:\n * { text, cursorStart, cursorEnd, selectionLength, scroll }\n *------------------------------------------------------------------ */\n this.getTextareaProperties = function() {\n var text = \"\" // Global Textarea Value\n var cursorStart = 0; // Cursor Start Position (chars from beginning of textarea)\n var cursorEnd = 0; // Cursor End Position (chars from beginning of textarea)\n var selectionLength = 0; // Selection Length (total chars)\n var lineStart = 0;\n for (i in lines) {\n text += lines[i].text;\n if (i == cursor.start.line)\n cursorStart = lineStart + cursor.start.position;\n if (i == cursor.end.line)\n cursorEnd = lineStart + cursor.end.position;\n lineStart += lines[i].text.length;\n }\n var selectionLength = cursorEnd - cursorStart;\n return { text:text, cursorStart:cursorStart, cursorEnd:cursorEnd,\n selectionLength:selectionLength, scroll:cursor.scroll }\n }\n \n /*-------------------------------------------------------------------\n * @public update: Update the HTML textarea to reflect all changes\n * made within this class. This is generally the last step in\n * defining a markup button.\n *------------------------------------------------------------------ */\n this.update = function() {\n var textProperties = this.getTextareaProperties();\n // Update the Textarea\n $(textarea).val(textProperties.text);\n if (textarea.createTextRange) {\n range = textarea.createTextRange();\n range.collapse(true);\n range.moveStart('character', textProperties.cursorStart); \n range.moveEnd('character', textProperties.selectionLength);\n range.select();\n } else if (textarea.setSelectionRange) {\n textarea.setSelectionRange(textProperties.cursorStart, textProperties.cursorEnd);\n }\n textarea.scrollTop = textProperties.scroll;\n textarea.focus();\n }\n \n /*-------------------------------------------------------------------\n * @private getCursorProperties: Returns a Map object containing the\n * current the current cursor properties for scroll position,\n * cursor position and selection length.\n *------------------------------------------------------------------ */\n function getCursorProperties() {\n textarea.focus();\n var scroll = textarea.scrollTop; // Current Scroll Position\n var position = 0; // Current Cursor Position\n var selection = \"\"; // Current Selection Length\n if (document.selection) {\n // Internet Explorer\n selection = document.selection.createRange().text; \n if ($.browser.msie) {\n var range = document.selection.createRange();\n var rangeCopy = range.duplicate();\n rangeCopy.moveToElementText(textarea);\n position = -1;\n while(rangeCopy.inRange(range)) {\n rangeCopy.moveStart('character');\n position++;\n }\n } else {\n // Opera\n position = textarea.selectionStart;\n }\n } else {\n // Mozilla\n position = textarea.selectionStart; \n selection = $(textarea).val().substring(position, textarea.selectionEnd);\n }\n return {scroll: scroll, position: position, length: selection.length}\n }\n \n /*-------------------------------------------------------------------\n * @private getTextareaProperties: Updates the class variables for\n * lines in the Textarea and cursor start and end position\n * (in terms of lines).\n *------------------------------------------------------------------ */\n function setupPropertiesByLine() {\n var text = $(textarea).val(); // Initial Textarea Value\n var cursorInfo = getCursorProperties(); // Cursor Properties\n var cursorStart = cursorInfo.position; // Global Cursor Start Position\n var cursorEnd = cursorInfo.position + cursorInfo.length; // Global Cursor End Position\n // Parse the Current Textarea\n var num = 0; // Iter Line Number\n var lineStart = 0; // Iter Position\n var lastLine = false; // Flag Set on Last Line\n while (!lastLine) {\n // Find the Line Ending Position\n var lineEnd = text.indexOf(\"\\n\", lineStart);\n var charEnd = lineEnd;\n if (lineEnd >= 0) { lineEnd += 1; }\n else { lastLine = true; lineEnd = charEnd = text.length; }\n // Get the Line Properties\n var lineText = text.substring(lineStart, lineEnd);\n var selected = (cursorStart <= charEnd) && (cursorEnd >= lineStart)\n lines[num] = { text:lineText, selected:selected };\n // Update the Cursor Information\n if ((cursorStart >= lineStart) && (cursorStart <= charEnd))\n cursor.start = { line: num, position:cursorStart-lineStart };\n if ((cursorEnd >= lineStart) && (cursorEnd <= lineEnd))\n cursor.end = { line:num, position:cursorEnd-lineStart};\n // Update Properties for Next Line\n lineStart = lineEnd;\n num += 1;\n }\n // Save the Scroll Position\n cursor.scroll = cursorInfo.scroll;\n }\n\n /*--- Main ---*/\n setupPropertiesByLine();\n \n}","function EventDispatcher() {}","function EventDispatcher() {}","function StdOut() {\r\n}","function flush_stdio(){}","get LinuxPlayer() {}","function patchCommand(arg, messageReceived){\n \n}","function EmacsyPlus() {\n\n /* Singleton class */\n\n var BS_CODE = 8; // backspace\n var ENTER_CODE = 13;\n var CTRL_CODE = 17;\n var ESC_CODE = 27;\n\n var BACK_SEARCH = true;\n var FORW_SEARCH = false;\n var CASE_SENSITIVE = true;\n var CASE_INSENSITIVE = false;\n\n var km = new SafeKeyMap();\n var emacsyPlusMap = {};\n var ctrlXMap = {};\n var mark = null;\n var os = km.getOsPlatform();\n\n var mBufName = 'minibuffer';\n var minibufMonitored = false;\n var iSearcher = null;\n var savedPlace = undefined;\n // For remembering what user searched for\n // in preceeding iSearch. Used to support\n // cnt-s in an empty minibuf:\n var prevSearchTerm = null;\n\n // Keydown and mouse click listeners while in minibuf:\n var mBufKeyListener = null;\n var mBufClickListener = null;\n\n var constructor = function() {\n \n if (typeof(EmacsyPlus.instance) !== 'undefined') {\n return EmacsyPlus.instance;\n }\n\n if (typeof(CodeMirror.emacsArea) === 'undefined') {\n CodeMirror.emacsArea = {\n killedTxt : \"\",\n multiKillInProgress : false,\n registers : {},\n bookmarks : {}\n }\n } \n\n // Hack: I couldn't figure out how to add a\n // css sheet whose class names were found by\n // CodeMirror.doc.setMarker(start,end,{className : }).\n // So the following (internally) looks for the already laoded codemirror.css\n // sheet and adds a highlighting rule to it:\n addSearchHighlightRule();\n\n km.registerCommand('ctrlXCmd', ctrlXCmd, true); // true: ok to overwrite function\n km.registerCommand('killCmd', killCmd, true);\n km.registerCommand('killRegionCmd', killRegionCmd, true);\n km.registerCommand('yankCmd', yankCmd, true);\n km.registerCommand('copyCmd', copyCmd, true);\n km.registerCommand('setMarkCmd', setMarkCmd, true);\n km.registerCommand('selPrevCharCmd', selPrevCharCmd, true);\n km.registerCommand('selNxtCharCmd', selNxtCharCmd, true); \n km.registerCommand('selNxtWordCmd', selNxtWordCmd, true);\n km.registerCommand('selPrevWordCmd', selPrevWordCmd, true);\n km.registerCommand('delWordAfterCmd', delWordAfterCmd, true);\n km.registerCommand('delWordBeforeCmd', delWordBeforeCmd, true);\n km.registerCommand('saveToRegCmd', saveToRegCmd, true);\n km.registerCommand('insertFromRegCmd', insertFromRegCmd, true);\n km.registerCommand('cancelCmd', cancelCmd, true);\n km.registerCommand('xchangePtMarkCmd', xchangePtMarkCmd, true);\n km.registerCommand('pointToRegisterCmd', pointToRegisterCmd, true);\n km.registerCommand('jumpToRegisterCmd', jumpToRegisterCmd, true);\n km.registerCommand('goCellStartCmd', goCellStartCmd, true);\n km.registerCommand('goCellEndCmd', goCellEndCmd, true);\n km.registerCommand('goNotebookStartCmd', goNotebookStartCmd, true);\n km.registerCommand('goNotebookEndCmd', goNotebookEndCmd, true);\n km.registerCommand('openLineCmd', openLineCmd, true);\n km.registerCommand('isearchForwardCmd', isearchForwardCmd, true);\n km.registerCommand('isearchBackwardCmd', isearchBackwardCmd, true);\n km.registerCommand('reSearchForwardCmd', reSearchForwardCmd, true);\n km.registerCommand('goNxtCellCmd', goNxtCellCmd, true);\n km.registerCommand('goPrvCellCmd', goPrvCellCmd, true);\n km.registerCommand('helpCmd', helpCmd, true);\n \n\n //************\n // For testing binding suspension:\n\n //km.registerCommand('suspendTestCmd', suspendTestCmd, true)\n //km.registerCommand('restoreTestCmd', restoreTestCmd, true)\n //km.registerCommand('alertMeCmd', alertMeCmd, true) \n //************ \n\n var mapName = null;\n if (os === 'Mac' || os === 'Linux') {\n mapName = km.installKeyMap(buildEmacsyPlus(), 'emacsy_plus', 'macDefault');\n } else {\n mapName = km.installKeyMap(buildEmacsyPlus(), 'emacsy_plus', 'pcDefault');\n }\n km.activateKeyMap(mapName);\n\n // A couple of commands in CodeMirror's default Mac keymap\n // conflict with standard OSX-level commands. Take those out\n // of the basemap so they don't even show up in the keybindings\n // help window:\n\n if (os === 'Mac') {\n // On Macs these two show windows on the desktop in reduced size,\n // and vice versa:\n km.deleteParentKeyBinding('Ctrl-Up'); // bound to goDocEnd\n km.deleteParentKeyBinding('Ctrl-Down'); // bound to goDocStart\n\n km.deleteParentKeyBinding('Ctrl-Alt-Backspace') // does nothing\n km.deleteParentKeyBinding('Home')\n km.deleteParentKeyBinding('End');\n }\n \n // Instances of this EmacsyPlus class have only public methods:\n EmacsyPlus.instance =\n {help : helpCmd,\n }\n\n //********\n //alert('Activated ' + mapName);\n //******** \n return EmacsyPlus.instance;\n }\n \n /*------------------------------- Build/Install/Activate the Emacsy-Plus Keymap Object -------------- */ \n\n var buildEmacsyPlus = function() {\n /*\n Build the keystroke/command object for Emacs-like\n behavior. Note that you need to create each command\n as a method, and must register it in the constructor,\n unless it already exists in CodeMirror as a command\n (https://codemirror.net/doc/manual.html). See function\n 'constructor' for examples.\n\n Also constructs the secondary cnt-x keymap. It maps\n cnt-x keystrokes to corresponding commands. This\n map is stored in an instance variable only; it is not\n returned.\n\n :returns top-level keystroke->command map\n :rtype {str : str}.\n */\n \n /*-------------- Emacs Keymap -------------*/\n\n \n /* Help */\n\n emacsyPlusMap['F1'] = \"helpCmd\";\n\n /* Killing and Yanking */\n\n emacsyPlusMap['Ctrl-X'] = \"ctrlXCmd\"; // cnt-x --> processed further via ctrlXMap\n\n emacsyPlusMap['Ctrl-K'] = \"killCmd\";\n emacsyPlusMap['Ctrl-W'] = \"killRegionCmd\";\n emacsyPlusMap['Alt-W'] = \"copyCmd\";\n if (os === 'Mac') {emacsyPlusMap['Cmd-W'] = \"copyCmd\"};\n emacsyPlusMap['Ctrl-H'] = \"delCharBefore\";\n emacsyPlusMap['Ctrl-D'] = \"delCharAfter\";\n emacsyPlusMap['Alt-D'] = \"delWordAfterCmd\";\n if (os === 'Mac') {emacsyPlusMap['Cmd-D'] = \"delWordAfterCmd\"};\n emacsyPlusMap['Ctrl-Backspace'] = \"delWordBeforeCmd\"; \n\n emacsyPlusMap['Ctrl-Y'] = \"yankCmd\";\n emacsyPlusMap['Ctrl-O'] = \"openLineCmd\";\n\n /* Cursor motion */\n\n emacsyPlusMap['Ctrl-A'] = \"goLineStart\";\n emacsyPlusMap['Ctrl-E'] = \"goLineEnd\";\n emacsyPlusMap['Ctrl-P'] = \"goLineUp\";\n emacsyPlusMap['Up'] = \"goLineUp\";\n emacsyPlusMap['Ctrl-N'] = \"goLineDown\";\n emacsyPlusMap['Down'] = \"goLineDown\";\n emacsyPlusMap['Ctrl-B'] = \"goCharLeft\";\n emacsyPlusMap['Left'] = \"goCharLeft\"; \n emacsyPlusMap['Ctrl-F'] = \"goCharRight\";\n emacsyPlusMap['Right'] = \"goCharRight\"; \n emacsyPlusMap['Ctrl-V'] = \"goPageUp\";\n\n //emacsyPlusMap['Cmd-V'] = \"goPageDown\"; // Preserve for true sys clipboard access\n // same for Cmd-c (capitalize word)\n emacsyPlusMap['Cmd-B'] = \"goWordLeft\"; \n\n emacsyPlusMap['Alt-F'] = \"goWordRight\";\n if (os === 'Mac') {emacsyPlusMap['Cmd-F'] = \"goWordRight\";};\n\n emacsyPlusMap['Shift-Ctrl-,'] = 'goCellStartCmd'; // Ctrl-<\n emacsyPlusMap['Shift-Ctrl-.'] = 'goCellEndCmd'; // Ctrl->\n emacsyPlusMap['Home'] = 'goCellStartCmd';\n emacsyPlusMap['End'] = 'goCellEndCmd';\n\n emacsyPlusMap['Shift-Ctrl-N'] = 'goNxtCellCmd';\n emacsyPlusMap['Shift-Ctrl-P'] = 'goPrvCellCmd'; \n\n if (os === 'Mac') {\n emacsyPlusMap['Cmd-Up'] = 'goNotebookStartCmd';\n emacsyPlusMap['Cmd-Down'] = 'goNotebookEndCmd';\n } else {\n emacsyPlusMap['Alt-Up'] = 'goNotebookStartCmd';\n emacsyPlusMap['Alt-Down'] = 'goNotebookEndCmd';\n }\n \n\n emacsyPlusMap['Ctrl-T'] = \"transposeChars\";\n emacsyPlusMap['Ctrl-Space'] = \"setMarkCmd\";\n\n emacsyPlusMap['Ctrl-G'] = \"cancelCmd\";\n\n /* Selections */\n emacsyPlusMap['Ctrl-Left'] = \"selPrevCharCmd\";\n emacsyPlusMap['Ctrl-Right'] = \"selNxtCharCmd\"; \n emacsyPlusMap['Shift-Ctrl-Left'] = \"selPrevWordCmd\";\n emacsyPlusMap['Shift-Ctrl-Right'] = \"selNxtWordCmd\";\n\n /* Searching */\n emacsyPlusMap['Ctrl-S'] = \"isearchForwardCmd\";\n emacsyPlusMap['Ctrl-R'] = \"isearchBackwardCmd\";\n emacsyPlusMap['Shift-Ctrl-S'] = \"reSearchForwardCmd\";\n\n //*******************\n // For testing binding suspension:\n \n //emacsyPlusMap['Shift-X'] = \"alertMeCmd\"; \n //emacsyPlusMap['Shift-H'] = \"suspendTestCmd\";\n //emacsyPlusMap['Shift-I'] = \"restoreTestCmd\";\n //*******************\n \n /*--------------- Cnt-X Keymap ------------*/\n\n // Now the cnt-X 'secondary' keymap:\n ctrlXMap['x'] = \"saveToRegCmd\";\n ctrlXMap['g'] = \"insertFromRegCmd\";\n ctrlXMap['u'] = \"undo\";\n ctrlXMap['/'] = \"pointToRegisterCmd\";\n ctrlXMap['j'] = \"jumpToRegisterCmd\";\n ctrlXMap['h'] = \"helpCmd\";\n ctrlXMap['Ctrl-X'] = \"xchangePtMarkCmd\"; // NOTE: Cnt-x Cnt-X (2nd must be caps)\n\n return emacsyPlusMap;\n }\n\n /* ------------------ Utilities ----------------- */\n\n var insertTxt = function(cm, txt) {\n /* Inserts text in a CodeMirror editor at cursor \n \n :param cm: CodeMirror editor instance\n :type cm: CodeMirror\n :param txt: text to insert\n :type txt: string\n\n */\n \n var cursor = cm.doc.getCursor();\n // Copy cursor so as not to disrupt selections:\n var pos = {line : cursor.line, ch : cursor.ch}\n cm.doc.replaceRange(txt, pos);\n }\n\n var multiKillCheck = function(cm, keystroke, event) {\n /*\n Handler called when keys are pressed or mouse is clicked.\n Active only while successive cnt-K's have not been interrupted\n by any other key press. This allows multiple cnt-Ks to \n kill multiple lines, stringing them together for later\n yank.\n\n */\n if (keystroke !== 'Ctrl-K') {\n CodeMirror.emacsArea.multiKillInProgress = false;\n cm.off('keyHandled', multiKillCheck);\n cm.off('mouseDown', multiKillCheck);\n }\n }\n\n var getCm = function(cell) {\n /*\n Returns the CodeMirror editor instance of\n a Jupyter cell. If cell is provided then\n that cell's editor is returned. Else the\n editor of the currently selected cell is\n returned.\n\n :param cell: optionally the cell whose CodeMirror editor instance is to be returned.\n :type cell: {JupyterCell | undefined}\n :returns the cell's CodeMirror instance\n :rtype CodeMirror\n */\n if (typeof(cell) === 'undefined') {\n cell = Jupyter.notebook.get_selected_cell();\n }\n return cell.code_mirror;\n }\n\n var clearSelection = function(cm) {\n cm.doc.setSelection(cm.doc.getCursor(), cm.doc.getCursor());\n }\n\n var toHtml = function() {\n /*\n Calls SafeKeyMap instances toHtml() to get\n an array of Command/Keystroke pairs. Then \n adds the ctr-x commands to the result. Returns\n the combination.\n */\n\n // Get raw array of 2-tuples: cmdName/keystroke:\n bindings = km.toTxt();\n // Add the ctrl-X keys:\n for (var cntXKey in ctrlXMap) {\n if (ctrlXMap.hasOwnProperty(cntXKey)) {\n bindings.push([ctrlXMap[cntXKey], `Ctrl-x ${cntXKey}`]);\n }\n }\n // I don't know where Ctrl-/ is set (to comment-region),\n // but it is...somewhere:\n bindings.push(['commentRegion', 'Ctrl-/'])\n \n // Re-sort the bindings:\n bindings.sort(\n function(cmdVal1, cmdVal2) {\n switch(cmdVal1[0] < cmdVal2[0]) {\n case true:\n return -1;\n break;\n case false:\n if (cmdVal1[0] === cmdVal2[0]) {\n return 0;\n } else {\n return 1;\n }\n break;\n }\n }\n )\n // Turn into html table:\n var tableHtml = km.toHtml(bindings);\n var htmlPage = `

    EmacsyPlus Bindings

    ${tableHtml}`;\n return htmlPage;\n }\n\n var addSearchHighlightRule = function() {\n /*\n // Hack: I couldn't figure out how to add a\n // css sheet whose class names were found by\n //\n // CodeMirror.doc.setMarker(start,end,{className : }).\n //\n // So the following (internally) looks for the already laoded codemirror.css\n // sheet and adds a highlighting rule to it.\n // Terrible hack.\n\n */\n var cssSheets = document.styleSheets;\n var cmSheet = null;\n for (let sheet of cssSheets) {\n if (sheet.href.search(/codemirror.css/) > -1) {\n cmSheet = sheet;\n break;\n }\n }\n if (cmSheet === null) {\n return false;\n } else {\n // Yellow:\n cmSheet.insertRule(\".emacsyPlusSearchHighlight { background-color : #F9F221; }\", 1)\n }\n return true;\n }\n\n /*------------------------------- Commands for CodeMirror -------------- */\n\n //***********\n // For testing binding suspension, which isn't working yet:\n \n var alertMeCmd = function(cm) {\n alert('Did it');\n }\n var suspendTestCmd = function(cm) {\n km.suspendKeyBinding('X');\n }\n var restoreTestCmd = function(cm) {\n km.restoreKeyBinding('X');\n }\n \n //*********** \n\n var helpCmd = function(cm) {\n /*\n Pops up window with key bindings.\n */\n \n var wnd = window.open('about:blank', 'Emacs Help', 'width=400,height=500,scrollbars=yes');\n wnd.document.write(toHtml());\n }\n\n var ctrlXCmd = function(cm) {\n /* Handling the cnt-X family of keys. Called whenever Cntl-K\n is pressed. Function waits for the next char to determine\n which cnt-x command is intended. Then dispatches for\n further handling.\n\n :param cm: CodeMirror instance\n :type cm: CodeMirror\n */\n // Get next key from user, which will be the key\n // into the cnt-x keymap. Complication: Cnt-X Cnt-X\n // (exchange mark/point) would re-enter this method\n // rather than become available to getNextChar().\n // temporarily disable cnt-X in the keymap:\n \n // NOTE: the suspent/restore bindings command is not working.\n // So Cnt-x Cnt-x will re-enter, rather then be made\n // available to the getNextChar() below. Needs fixing\n // in safeKeyMap.\n km.suspendKeyBinding('Ctrl-X');\n km.getNextChar(cm).then(function(cntXKey) {\n /*\n Once the promise is fulfilled, it will deliver the\n cnt-x command to run. E.g. the 'g' in 'Cnt-x g'.\n If the cntrlXMap has an entry for 'g', the value\n will be a function that will take one arg: the \n CodeMirror editor object cm. But first: restore\n the ctrl-x cmd:\n */\n\n km.restoreKeyBinding('Ctrl-X')\n \n // Get name of handler function:\n\n var handlerName = ctrlXMap[cntXKey]\n if (typeof(handlerName) === 'undefined') {\n return;\n }\n var handler = km.cmdFromName(handlerName);\n if (typeof(handler) === 'undefined') {\n return;\n }\n handler(cm);\n });\n }\n\n var saveToRegCmd = function(cm) {\n /* NOTE: called from ctrlXCmd() handler \n Save current selection (if any) in register. \n Waits for following char as the register name.\n */\n\n if (! cm.doc.somethingSelected()) {\n // Nothing selected: grab region between mark and cursor:\n cm.doc.setSelection(getMark(cm), cm.doc.getCursor());\n }\n \n var selectedTxt = cm.getSelection();\n // Grab the next keystroke, which is\n // the register name:\n km.getNextChar(cm).then(function (regName) {\n CodeMirror.emacsArea.registers[regName] = selectedTxt;\n clearSelection(cm);\n cm.doc.setExtending(false);\n })\n }\n\n var insertFromRegCmd = function(cm) {\n /* NOTE: called from ctrlXCmd() handler \n Inserts content of register at current cursor.\n Waits for following char as the register name.\n */\n \n // Grab the next keystroke, which is\n // the register name:\n \n km.getNextChar(cm).then(function (regName) {\n insertTxt(cm, CodeMirror.emacsArea.registers[regName]);\n })\n }\n\n var pointToRegisterCmd = function(cm) {\n var focusedCell = Jupyter.notebook.get_selected_cell();\n var bookmark = cm.doc.setBookmark(cm.doc.getCursor());\n // Grab the next keystroke, which is\n // the register name:\n km.getNextChar(cm).then(function (regName) {\n CodeMirror.emacsArea.bookmarks[regName] = {cell : focusedCell, bookmark : bookmark}\n })\n }\n\n var jumpToRegisterCmd = function(cm) {\n // Get bookmark-register name:\n km.getNextChar(cm).then(function (regName) {\n var cellBm = CodeMirror.emacsArea.bookmarks[regName]\n if (typeof(cellBm) === 'undefined') {\n return\n }\n var cell = cellBm.cell;\n var bm = cellBm.bookmark;\n // Get that cell's CodeMirror editor instance:\n newCm = getCm(cell);\n // Change focus to bookmark-cell:\n newCm.focus();\n newCm.doc.setCursor(bm.find());\n })\n }\n\n var openLineCmd = function(cm) {\n var cursor = cm.doc.getCursor();\n var newCursor = {line : cursor.line, ch : cursor.ch}\n insertTxt(cm, '\\n');\n cm.doc.setCursor(newCursor);\n }\n\n var copyCmd = function(cm) {\n /*\n If anything is selected, copy it to CodeMirror.emacsArea.killedTxt.\n The yankCmd knows to find it there.\n\n :param cm: CodeMirror instance\n :type cm: CodeMirror\n */\n if (cm.somethingSelected()) {\n var selectedTxt = cm.getSelection();\n CodeMirror.emacsArea.killedTxt = selectedTxt;\n cm.doc.setExtending(false);\n clearSelection(cm);\n }\n }\n\n var setMarkCmd = function(cm) {\n mark = cm.doc.getCursor();\n clearSelection(cm);\n cm.doc.setExtending(true);\n }\n\n var getMark = function(cm) {\n return mark;\n }\n\n var xchangePtMarkCmd = function(cm) {\n var oldMark = getMark(cm);\n var currCur = cm.doc.getCursor();\n var newMark = {line : currCur.line, ch : currCur.ch}\n // Marker gets current cursor pos:\n setMarkCmd(cm);\n cm.doc.setCursor(oldMark)\n cm.doc.setSelection(oldMark, newMark);\n }\n\n var delWordAfterCmd = function(cm) {\n var cur = cm.doc.getCursor();\n selNxtWordCmd(cm);\n var word = cm.doc.getSelection();\n CodeMirror.emacsArea.killedTxt = word;\n cm.doc.replaceSelection(\"\");\n }\n\n var delWordBeforeCmd = function(cm) {\n var cur = cm.doc.getCursor();\n selPrevWordCmd(cm);\n var word = cm.doc.getSelection();\n CodeMirror.emacsArea.killedTxt = word;\n cm.doc.replaceSelection(\"\"); \n }\n\n var selNxtCharCmd = function(cm) {\n var wasExtending = cm.doc.getExtending(); \n if (! wasExtending) {\n cm.doc.setExtending(true);\n }\n cm.execCommand('goCharRight');\n cm.doc.setExtending(wasExtending);\n }\n\n var selPrevCharCmd = function(cm) {\n var wasExtending = cm.doc.getExtending(); \n if (! wasExtending) {\n cm.doc.setExtending(true);\n }\n cm.execCommand('goCharLeft');\n cm.doc.setExtending(wasExtending);\n }\n\n var selNxtWordCmd = function(cm) {\n cm.doc.setExtending(true); \n cm.execCommand('goWordRight');\n }\n\n var selPrevWordCmd = function(cm) {\n cm.doc.setExtending(true);\n cm.execCommand('goWordLeft');\n }\n\n var cancelCmd = function(cm) {\n if (cm.doc.getExtending()) {\n // If currently extending selection,\n // clear that condition. If user wants\n // to (also) clear the selection, a\n // second cnt-g will do that in the\n // else branch:\n cm.doc.setExtending(false);\n } else {\n // Setting cursor to a point is\n // the equivalent of clearing selection:\n cm.doc.setCursor(cm.doc.getCursor());\n }\n abortISearch();\n }\n \n var undoCmd = function(cm) {\n undo(cm);\n }\n \n var killCmd = function(cm) {\n /* cnt-K: kill to end of line and keep content in cut buffer \n\n :param cm: CodeMirror instance\n :type cm: CodeMirror\n */\n \n var curLine = cm.doc.getCursor().line;\n var curChr = cm.doc.getCursor().ch;\n var line = cm.doc.getLine(curLine);\n\n if (! CodeMirror.emacsArea.multiKillInProgress) {\n CodeMirror.emacsArea.killedTxt = \"\";\n }\n \n var killTxt = line.substring(curChr);\n if (killTxt.length === 0) {\n cm.execCommand('deleteLine');\n killTxt = '\\n';\n } else {\n cm.execCommand('delWrappedLineRight');\n }\n\n CodeMirror.emacsArea.killedTxt += killTxt;\n cm.on('keyHandled', multiKillCheck);\n cm.on('mouseDown', multiKillCheck);\n CodeMirror.emacsArea.multiKillInProgress = true;\n return false;\n }\n\n var killRegionCmd = function(cm) {\n if (! cm.doc.somethingSelected()) {\n // Nothing selected: delete between mark and cursor:\n cm.doc.setSelection(getMark(cm), cm.doc.getCursor());\n }\n CodeMirror.emacsArea.killedTxt = cm.doc.getSelection();\n cm.doc.replaceSelection(\"\");\n cm.doc.setExtending(false);\n return;\n }\n\n var yankCmd = function(cm) {\n /* Insert cut buffer at current cursor.\n\n :param cm: CodeMirror instance\n :type cm: CodeMirror\n */\n \n var killedTxt = CodeMirror.emacsArea.killedTxt;\n insertTxt(cm, killedTxt);\n return false;\n }\n\n var goCellStartCmd = function(cm) {\n cm.doc.setCursor({line : 0, ch : 0});\n }\n\n var goCellEndCmd = function(cm) {\n var lastLine = cm.getLine(cm.doc.lastLine())\n cm.doc.setCursor({line : cm.doc.lineCount(), ch : lastLine.length-1});\n }\n\n var goNxtCellCmd = function(cm) {\n Jupyter.notebook.select_next().edit_mode();\n }\n\n var goPrvCellCmd = function(cm) {\n Jupyter.notebook.select_prev().edit_mode();\n }\n\n var goNotebookStartCmd = function(cm) {\n getCm(Jupyter.notebook.get_cells()[0]).focus();\n }\n\n var goNotebookEndCmd = function(cm) {\n // array.slice(-1)[0] returns last element:\n getCm(Jupyter.notebook.get_cells().slice(-1)[0]).focus();\n }\n\n var isearchForwardCmd = function(cm) {\n isearchCmd(cm, false); // reverse === false\n }\n \n var isearchBackwardCmd = function(cm) {\n isearchCmd(cm, true); // reverse === true\n }\n\n var isearchCmd = function(cm, reverse) {\n prepSearch(cm);\n // This ISearcher instance will search from\n // the current position. The keydown interrupt\n // service routing iSearchHandler will add or\n // remove letters.\n iSearcher = ISearcher('', false, reverse); // false: not regex search\n // Ensure the persistent search term from last\n // search is cleared out:\n iSearcher.emptySearchTerm();\n // Ensure that search starts at cursor:\n primeSearchStart(cm, iSearcher); \n // Present the minibuffer, get focus to it,\n // and behave isearchy via the iSearchHandler:\n var mBuf = monitorMiniBuf(iSearchHandler)\n }\n\n var reSearchForwardCmd = function(cm) {\n prepSearch(cm);\n // This ISearcher instance will search from\n // the current position. The keydown interrupt\n // service routing iSearchHandler will add or\n // remove letters.\n iSearcher = ISearcher('', true, false); // true: be regex search,\n // false: not reverse\n // Ensure the persistent search term from last\n // search is cleared out:\n iSearcher.emptySearchTerm();\n // Ensure that search starts at cursor:\n primeSearchStart(cm, iSearcher);\n // Present the minibuffer, get focus to it,\n // and behave isearchy via the iSearchHandler:\n var mBuf = monitorMiniBuf(iSearchHandler)\n }\n\n var prepSearch = function(cm) {\n var cur = cm.doc.getCursor();\n var cell = Jupyter.notebook.get_selected_cell()\n savedPlace = {cm : cm, line : cur.line, ch : cur.ch, cell : cell}; \n }\n\n var primeSearchStart = function(cm, iSearcher) {\n /*\n Makes the very first char be found where\n the cursor is, rather than at start of\n current input cell:\n */\n\n if (iSearcher.curPlace().inCellArea() === 'input') {\n // Ensure that the search starts at\n // current cursor:\n var curCur = cm.doc.getCursor();\n iSearcher.setInitialSearchStart(curCur);\n }\n }\n\n /* ----------- Incremental Search -------------*/\n\n var iSearchHandler = function(evt) {\n // Called with hidden first arg: 'this',\n // which is the minibuffer.\n\n // If abortISearch() was called, and \n // a keydown was already in the queue,\n // we'll know it here, b/c abortISearch()\n // will have set iSearcher to null.\n\n if (iSearcher === null) {\n return;\n }\n\n // If doing a regex search, 'normal',\n // i.e. non-error minibuf background\n // is green:\n var normalColor = 'white';\n if (iSearcher.regexSearch()) {\n normalColor = 'DarkTurquoise';\n }\n\n // Filter out unwanted keystrokes in minibuf:\n if (! iSearchAllowable(evt)) {\n evt.preventDefault();\n evt.stopPropagation();\n return;\n }\n\n // cnt-g or esc?\n if (evt.abort) {\n // Save the current search term in case\n // we want to reuse it:\n prevSearchTerm = iSearcher.searchTerm();\n var restoreCursor = true;\n if (evt.abort === 'esc') {\n restoreCursor = false;\n // For regex we only collected the regex\n // in the minibuf so far. Execute the\n // search before quiting the minibuf:\n var regexSearchRes = iSearcher.next();\n // If search failed, restore the cursor\n // to its original pos; else last cell\n // will be current:\n if (regexSearchRes === null) {\n restoreCursor = true;\n }\n }\n abortISearch(restoreCursor);\n evt.preventDefault();\n evt.stopPropagation();\n return;\n }\n\n var mBuf = this\n var bufVal = mBuf.value;\n\n // If minibuffer empty, take opportunity\n // to ensure that isearcher's current search\n // term is also empty:\n // iSearcher.emptySearchTerm();\n \n // Another ctrl-s or ctrl-r while in minibuf:\n if (evt.search === 'nxtForward' ||\n evt.search === 'nxtBackward') {\n\n evt.search === 'nxtForward' ?\n iSearcher.setReverse(false) : iSearcher.setReverse(true);\n \n // If minibuffer is empty, fill in\n // the previous search term and\n // run the search as if it had been\n // entered by hand:\n if (bufVal.length === 0 && prevSearchTerm !== null) {\n \n // If prev search term had any caps, set case\n // sensitivity:\n if (prevSearchTerm.search(/[A-Z]/) > -1) {\n iSearcher.setCaseSensitivity(true);\n }\n var matchedSubstr = iSearcher.playSearch(prevSearchTerm);\n if (matchedSubstr.length < prevSearchTerm.length) {\n mBuf.style.backgroundColor = 'red';\n }\n mBuf.value = matchedSubstr;\n bufVal = mBuf.value;\n } else {\n // Cnt-s/Cnt-r after a term was found:\n var res = iSearcher.searchAgain();\n if (res === null) {\n mBuf.style.backgroundColor = 'red'; \n } else {\n mBuf.style.backgroundColor = normalColor;\n }\n }\n evt.preventDefault();\n evt.stopPropagation();\n return;\n }\n\n mBuf.style.backgroundColor = normalColor; \n mBuf.focus();\n\n // Case sensitivity is determined\n // by any of the search term chars\n // being upper case. Check whether\n // the new key, appended to the current\n // content of the minibuffer fills that\n // condition. BUT: control chars are returned\n // as words, e.g. 'Backspace', which would\n // turn the search case sensistive. So: only\n // check with single-length new keystrokes:\n iSearcher.setCaseSensitivity(false);\n var newKey = evt.key;\n if (newKey.length > 1) {\n newKey = '';\n }\n if ((bufVal+newKey).search(/[A-Z]/) > -1) {\n iSearcher.setCaseSensitivity(true);\n }\n\n // Add the new char to the minibuffer and the\n // iSearcher instance, unless it was cnt-s or cnt-r\n // (search again/search backward):\n\n var searchRes = null;\n\n if (evt.search === undefined) {\n if (evt.which === BS_CODE) {\n mBuf.value = bufVal.slice(0,-1);\n searchRes = iSearcher.chopChar();\n } else {\n mBuf.value = bufVal + evt.key;\n searchRes = iSearcher.addChar(evt.key);\n }\n }\n\n if (searchRes !== null || iSearcher.searchTerm().length === 0) {\n mBuf.style.backgroundColor = normalColor;\n } else {\n mBuf.style.backgroundColor = 'red';\n }\n\n evt.preventDefault();\n evt.stopPropagation();\n }\n\n var abortISearch = function(restoreCursor) {\n // If abortISearch is called twice,\n // iSearcher will be null. In that case,\n // just return. This way it's safe to\n // call abortISearch multiple times:\n if (iSearcher === null) {\n return;\n }\n \n removeMiniBuf();\n iSearcher.clearHighlights();\n\n if (typeof(restoreCursor) === 'undefined') {\n restoreCursor = true;\n }\n\n var cells = Jupyter.notebook.get_cells();\n var lastPlace = iSearcher.curPlace();\n var curCell = cells[lastPlace.cellIndx()];\n\n if (restoreCursor && typeof(savedPlace) === 'object') {\n savedPlace.cm.doc.setCursor({line: savedPlace.line, ch: savedPlace.ch});\n savedPlace.cell.focus_cell();\n Jupyter.notebook.edit_mode();\n } else {\n var cm = getCm(curCell);\n // Selection within output area:\n var outSel = lastPlace.outputSelection();\n \n if (lastPlace.inCellArea() === 'output') {\n\n // Put cell into edit mode early, b/c that\n // kills the selection in the output area.\n // We'll restore it right after:\n\n curCell.focus_cell();\n Jupyter.notebook.edit_mode();\n\n // Put cursor at end of input area\n // of the cell to which the output area\n // belongs. Unfortunately, this will lose\n // the selection inside the output area:\n cm.execCommand('goDocEnd');\n iSearcher.setDivSelectionRange(curCell, outSel);\n } else {\n // Easy: set cursor within input area.\n // Highlight will be cleared by this, but\n // cursor will be right after the match:\n curCell.code_mirror.doc.setCursor(lastPlace.selection().head);\n\n curCell.focus_cell();\n Jupyter.notebook.edit_mode();\n \n }\n }\n \n iSearcher = null;\n }\n\n var addMiniBuf = function() {\n // Get input area of cell:\n var toolbarDiv = getToolbarDomEl();\n var miniBuf = document.createElement('input');\n miniBuf.type = 'text';\n toolbarDiv[mBufName] = miniBuf;\n toolbarDiv.appendChild(miniBuf);\n miniBuf.style.paddingLeft = '5px';\n miniBuf.style.marginLeft = '5px';\n return miniBuf;\n }\n\n var removeMiniBuf = function() {\n var miniBuf = getToolbarDomEl()[mBufName];\n if (typeof(miniBuf) === 'undefined') {\n return '';\n }\n stopMonitorMiniBuf(iSearchHandler);\n var miniBufContent = miniBuf.value;\n miniBuf.value = \"\";\n var parentEl = miniBuf.parentElement;\n if (parentEl != null && typeof(parentEl) != 'undefined') {\n parentEl.removeChild(miniBuf);\n parentEl[mBufName] = undefined;\n }\n return miniBufContent;\n }\n\n var monitorMiniBuf = function(callback) {\n\n // Protect against being called multiple\n // times:\n if (minibufMonitored) {\n return;\n }\n \n var miniBuf = getMiniBufFromToolbar();\n miniBuf.focus();\n clearAllSelections();\n // Need event listener to be named function,\n // b/c we'll have to remove it when isearch\n // is over:\n mBufKeyListener = function(evt) {\n // Have this call, rather than making\n // callback the listener directly so that\n // we can provide the miniBuf environment:\n callback.call(miniBuf, evt);\n }\n mBufClickListener = function(evt) {\n // If clicked on minibuffer, do nothing.\n // If clicked outside, abort search:\n if (evt.target === miniBuf) {\n miniBuf.focus();\n return;\n }\n \n abortISearch(false); // don't restore cursor, leave it at selection.\n document.removeEventListener(\"mousedown\", mBufClickListener);\n }\n getToolbarDomEl().addEventListener(\"keydown\", mBufKeyListener);\n document.addEventListener(\"mousedown\", mBufClickListener);\n minibufMonitored = true;\n return miniBuf;\n }\n\n var stopMonitorMiniBuf = function(callback) {\n getToolbarDomEl().removeEventListener(\"keydown\", mBufKeyListener);\n document.removeEventListener(\"mousedown\", mBufClickListener);\n minibufMonitored = false;\n }\n\n var getMiniBufFromToolbar = function() {\n var toolbarDiv = getToolbarDomEl();\n var miniBuf = getToolbarDomEl()[mBufName]\n if (typeof(miniBuf) === 'undefined') {\n miniBuf = addMiniBuf();\n }\n return miniBuf;\n }\n\n var getToolbarDomEl = function() {\n return Jupyter.toolbar.element[0];\n }\n\n var ensureCell = function(cell) {\n if (typeof(cell) === 'undefined') {\n cell = Jupyter.notebook.get_selected_cell();\n }\n return cell;\n }\n \n\n /* -------------- Utilities ---------------- */\n\n var iSearchAllowable = function(evt) {\n\n /*\n Keydown handler while in minibuffer.\n Accepts: esc, cnt-g, cnt-s, cnt-r,\n shift-ctrl-s, shift-ctrl-r. \n\n Sets additional event object properties for the caller\n to know what went on:\n - evt.nxtForward === true : ctrl-s or shift-ctrl-s was entered\n - evt.nxtBackward === true : ctrl-r or shift-ctrl-r was entered.\n - evt.abort === esc : esc entered in iSearch mode, or \n ENTER entered in regex Search mode.\n */\n\n var keyCode = evt.which;\n\n evt.abort = false;\n evt.search = undefined;\n\n // Shift-Ctrl-s or Shift-Ctrl-r inside regex-forward-search\n // minibuf? This asks for 'do it again':\n if (evt.shiftKey && evt.ctrlKey) {\n if (evt.key === 'S') {\n evt.search = 'nxtForward';\n return true;\n } else if (evt.key === 'R') {\n evt.search = 'nxtBackward';\n return true;\n }\n }\n\n // Ctrl-G for abort search. Ctrl-s for search\n // forward again. Used when doing Ctrl-s into\n // new minibuffer, and wanting the old search\n // term placed there. Analogously for Ctrl-r:\n if (evt.ctrlKey) {\n switch(evt.key) {\n case 'g':\n evt.abort = 'Ctrl-G';\n return true;\n break;\n case 's':\n evt.search = 'nxtForward';\n return true;\n break;\n case 'r':\n evt.search = 'nxtBackward';\n return true;\n break;\n default:\n return false; // have caller do nothing\n break;\n }\n }\n \n // In iSearch mode: exit search,\n // leave cursor at found spot.\n // For regex search: execute the\n // search:\n if (keyCode === ENTER_CODE) {\n evt.abort = 'esc';\n return true;\n }\n\n // Exit search, leave cursor where\n // search found spot:\n if (keyCode === ESC_CODE) {\n evt.abort = 'esc';\n return true;\n }\n\n var valid =\n (keyCode === BS_CODE) ||\n (keyCode > 47 && keyCode < 58) || // number keys\n (keyCode == 32) || // spacebar to tilde\n (keyCode >= 48 && keyCode < 91) || // letter/number keys\n (keyCode > 95 && keyCode < 112) || // numpad keys\n (keyCode == 173) || // underscore\n (keyCode > 185 && keyCode < 193) || // ;=,-./`\n (keyCode > 218 && keyCode < 223); // [\\]' (in order) 173: _\n\n return valid;\n }\n\n /*----------------------\n | clearAllSelections\n | ----------------- */\n\n var clearAllSelections = function() {\n for (let cell of Jupyter.notebook.get_cells()) {\n clearSelection(cell.code_mirror);\n }\n }\n \n /*----------------------\n | findLastSelection\n | ----------------- */\n\n var findLastSelection = function() {\n /*\n Returns the last selection within the last cell\n of a notebook. If no selection exists, returns\n undefined. \n\n :returns Object with properties 'cell', and 'selection'.\n The cell property holds the cell that contains the\n last selection. The selection object is of the form\n {anchor : {line: : ch: }, head : {line: : ch: }}\n :rtype {object | undefined}\n */\n var cells = Jupyter.notebook.get_cells();\n for (let i=cells.length-1; i>=0; i--) {\n var cell = cells[i];\n var selections = cell.code_mirror.doc.listSelections();\n if (selections.length > 0) {\n // Found last cell with at least one\n // selection:\n var lastSelection = selections[selections.length - 1];\n // Every cell has one 'empty' selection. It's\n // anchor and head are the same:\n if (selectionEmpty(lastSelection)) {\n continue;\n }\n return {cell : cell, selection: lastSelection};\n }\n }\n return undefined;\n }\n \n\n var selectionEmpty = function(sel) {\n return (sel.anchor.ch > 0);\n // return (sel.anchor.line === sel.head.line &&\n // sel.anchor.ch === sel.head.ch);\n }\n\n /* ---------------------------- Call Constructor and Export Public Methods ---------- */\n\n return constructor();\n\n\n}","get OSXPlayer() {}","function Console() {\n}","function AbstractFS(){\n\n var anchor = this;\n\n // NOTE: We're leaning on the fact here that require('fs') is\n // legitimate in both RingoJS and Node.js, and are available in\n // them both automatically.\n var fs = require('fs');\n \n // First things first: probe our environment and make a best\n // guess.\n anchor._env_type = null;\n if( typeof(org) != 'undefined' && typeof(org.ringo) != 'undefined' ){\n\tanchor._env_type = 'RingoJS';\n }else if( typeof(org) != 'undefined' && typeof(org.rhino) != 'undefined' ){\n\t// TODO\n\t//anchor._env_type = 'Rhino';\n }else if( typeof(global) != 'undefined' &&\n\t typeof(global.process) != 'undefined' ){\n\tanchor._env_type = 'Node.js';\n }else{\n\tanchor._env_type = '???';\n }\n\n /*\n * Function: environment\n * \n * Return a string representation og the current running\n * environment.\n *\n * Parameters:\n * n/a\n *\n * Returns:\n * string\n */\n anchor.environment = function(){\n\treturn anchor._env_type;\n };\n\n // Some internal mechanisms to make this process easier.\n function _node_p(){\n\tvar ret = false;\n\tif( anchor.environment() == 'Node.js' ){ ret = true; }\n\treturn ret;\n }\n function _ringo_p(){\n\tvar ret = false;\n\tif( anchor.environment() == 'RingoJS' ){ ret = true; }\n\treturn ret;\n }\n function _unimplemented(funname){\n\tthrow new Error('The function \"' + funname +\n\t\t\t'\" is not implemented for ' + anchor.environment());\n }\n\n /*\n * Function: exists_p\n * \n * Whether or not a path exists.\n *\n * Parameters:\n * path - the desired path as a string\n *\n * Returns:\n * boolean\n */\n anchor.exists_p = function(path){\n\tvar ret = null;\n\tif( _node_p() ){\n\t ret = fs.existsSync(path);\n\t}else if( _ringo_p() ){\n\t ret = fs.exists(path);\n\t}else{\n\t _unimplemented('exists_p');\n\t}\n\treturn ret;\n };\n\n /*\n * Function: file_p\n * \n * Returns whether or not a path is a file.\n *\n * Parameters:\n * path - the desired path as a string\n *\n * Returns:\n * boolean\n */\n anchor.file_p = function(path){\n\tvar ret = false;\n\tif( _node_p() ){\n\t var stats = fs.statSync(path);\n\t if( stats && stats.isFile() ){ ret = true; }\n\t}else if( _ringo_p() ){\n\t ret = fs.isFile(path);\n\t}else{\n\t _unimplemented('file_p');\n\t}\n\treturn ret;\n };\n\n /*\n * Function: read_file\n * \n * Read a file, returning it as a string.\n *\n * Parameters:\n * path - the desired path as a string\n *\n * Returns:\n * string or null\n */\n anchor.read_file = function(path){\n\tvar ret = null;\n\tif( _node_p() ){\n\t var buf = fs.readFileSync(path)\n\t if( buf ){ ret = buf.toString(); }\n\t}else if( _ringo_p() ){\n\t ret = fs.read(path);\n\t}else{\n\t _unimplemented('read_file');\n\t}\n\treturn ret;\n };\n\n /*\n * Function: list_directory\n * \n * Return a list of the files in a directory (names relative to\n * the directory) as strings.\n *\n * Parameters:\n * path - the desired path as a string\n *\n * Returns:\n * list of strings\n */\n anchor.list_directory = function(path){\n\tvar ret = [];\n\tif( _node_p() ){\n\t ret = fs.readdirSync(path);\n\t}else if( _ringo_p() ){\n\t ret = fs.list(path);\n\t}else{\n\t _unimplemented('list_dir');\n\t}\n\treturn ret;\n };\n\n}","function Pf(e,t,a,n){var r=e.display,f=!1,o=pn(e,function(t){xo&&(r.scroller.draggable=!1),e.state.draggingText=!1,ke(r.wrapper.ownerDocument,\"mouseup\",o),ke(r.wrapper.ownerDocument,\"mousemove\",i),ke(r.scroller,\"dragstart\",s),ke(r.scroller,\"drop\",o),f||(Ae(t),n.addNew||pr(e.doc,a,null,null,n.extend),\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n xo||vo&&9==wo?setTimeout(function(){r.wrapper.ownerDocument.body.focus(),r.input.focus()},20):r.input.focus())}),i=function(e){f=f||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},s=function(){return f=!0};\n // Let the drag handler handle this.\n xo&&(r.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,\n // IE's approach to draggable\n r.scroller.dragDrop&&r.scroller.dragDrop(),ni(r.wrapper.ownerDocument,\"mouseup\",o),ni(r.wrapper.ownerDocument,\"mousemove\",i),ni(r.scroller,\"dragstart\",s),ni(r.scroller,\"drop\",o),La(e),setTimeout(function(){return r.input.focus()},20)}","function shellWhereAmI(args)\n{\n _StdIn.putText(_UserLocation); \n}","input()\n{\n const readline = require('readline-sync');\n const r1 = readline.createInterface({input: ProcessingInstruction.stdin, output : ProcessingInstruction.stdout})\n return r1;\n\n}","function executeShellBuffer() {\n\tvar response = '';\n\tvar do_clear = false;\n\tvar path = curr_dir.split('/').filter(word => word != '');\n\t//console.log(path);\n\tvar work_dir = file_structure;\n\tfor (var i = 0; i < path.length; i++) {\n\t\twork_dir = work_dir[path[i]];\n\t}\n\tdirectories = Object.keys(work_dir).filter(word => word != 'files');\n\tfiles = work_dir.files;\n\t// command parsing logic goes here\n // TODO: split the shell_buffer by space, parse args properly\n\tif (shell_buffer.slice(0, 2) == 'vi') {\n\t\tresponse = handleVim(work_dir)\n\t} else if (shell_buffer.slice(0, 2) == 'ls') {\n var toDisplay = directories.concat(files);\n \n if (shell_buffer.indexOf('-a') !== -1) {\n\t\t\ttoDisplay = ['.', '..'].concat(toDisplay);\n\t\t\t// TODO: implement hidden files here\n\t\t}\n\t\tresponse = (toDisplay).join(' ');\n\t} else if (shell_buffer.slice(0, 2) == 'cd') {\n\t\tresponse = handleCd(path);\n\t} else if (shell_buffer == 'pwd') {\n\t\tresponse = '/' + curr_dir\n\t} else if (shell_buffer == 'clear') {\n\t\tdo_clear = true;\n\t} else if (shell_buffer != '') {\n\t\tresponse = shell_buffer + ': command not found';\n\t}\n\n\tif (shell_buffer != '') {\n\t\tbash_history[bash_history_pointer] = shell_buffer;\n\t\t// current end of history is not empty command\n\t\tif (bash_history[bash_history.length-1] != '') {\n\t\t\tbash_history_pointer = bash_history.length;\n\t\t\tbash_history.push('');\n\t\t} else {\n\t\t\t// already got an emoty command at the end\n\t\t\tbash_history_pointer = bash_history.length - 1;\n\t\t}\n\t}\n\n\tif (do_clear) {\n\t\tshell_history = getPrompt();\n\t} else {\n\t\tif (response == '') {\n\t\t\tshell_history += shell_buffer + '
    ' + getPrompt();\n\t\t} else {\n\t\t\tshell_history += shell_buffer + '
    ' + response + '
    ' + getPrompt();\n\t\t}\n\t}\n\tshell_buffer = '';\n\tprintShell();\n}","function GM_platform_wrapper(title, id, installs) {\n var name=title.replace(/\\W*/g,\"\"), uwin=unsafeWindow, bg_color=\"#add8e6\";\n String.prototype.parse = function (r, limit_str) { var i=this.lastIndexOf(r); var end=this.lastIndexOf(limit_str);if (end==-1) end=this.length; if(i!=-1) return this.substring(i+r.length, end); }; //return string after \"r\" and before \"limit_str\" or end of string. \n window.outerHTML = function (obj) { return new XMLSerializer().serializeToString(obj); };\n window.FireFox=false; window.Chrome=false; window.prompt_interruption=false;window.interrupted=false;\n window.confirm2=confirm2; window.prompt2=prompt2; window.alert2=alert2; window.prompt_win=0;sfactor=0.5;widthratio=1;\n window.local_getValue=local_getValue; window.local_setValue=local_setValue;\n Object.prototype.join = function (filler) { var roll=\"\";filler=(filler||\", \");for (var i in this) \tif ( ! this.hasOwnProperty(i)) \tcontinue;\t else\t\t\troll+=i+filler;\t\treturn roll.replace(/..$/,\"\"); }\n\n //problem with localStorage is that webpage has full access to it and may delete it all, as bitlee dotcom does at very end, after beforeunload & unload events.\n function local_setValue(name, value) { name=\"GMxs_\"+name; if ( ! value && value !=0 ) { localStorage.removeItem(name); return; }\n var str=JSON.stringify(value); localStorage.setItem(name, str );\n }\n function local_getValue(name, defaultValue) { name=\"GMxs_\"+name; var value = localStorage.getItem(name); if (value==null) return defaultValue; \n value=JSON.parse(value); return value; \n } //on FF it's in webappsstore.sqlite\n \n ///\n ///Split, first firefox only, then chrome only exception for function definitions which of course apply to both:\n ///\n if ( ! /^Goo/.test (navigator.vendor) ) { /////////Firefox:\n window.FireFox=true;\n window.brversion=parseInt(navigator.userAgent.parse(\"Firefox/\"));\n if (brversion >= 4) { \t \n\t window.countMembers=countMembers;\t \n\t window.__defineSetter__ = {}.__defineSetter__;\n\t window.__defineGetter__ = {}.__defineGetter__;\n\t window.lpix={}; // !!! firefox4 beta.\n\t initStatus();\n\t bg_color=\"#f7f7f7\";\n\t}\n\telse \t window.countMembers=function(obj) {\t return obj.__count__;\t}\n if (id) checkVersion(id);\n var old_set=GM_setValue, old_get=GM_getValue;\n GM_setValue=function(name, value) { return old_set( name, uneval(value));\t}\n GM_getValue=function(name, defaulT) {\t var res=old_get ( name, uneval (defaulT) ); \n\t\t\t\t\t\t if (res!=\"\") try { return eval ( res ); } catch(e) {} ; return old_get ( name, defaulT );\t}\n window.pipe=uwin; try {\n\tif (uwin.opener && uwin.opener.pipe) { window.pipe=uwin.opener } } catch(e) { }\n window.pool=uwin;\n //useOwnMenu();\n return;\n } //end ua==Firefox\n ///////////////////// Only Google Chrome from here, except for function defs :\n window.Chrome=true;\n window.brversion=parseInt(navigator.userAgent.parse(\"Chrome/\"));\n Object.prototype.merge = function (obj) { \t\tfor (var i in obj) \t if ( ! obj.hasOwnProperty(i)) continue; else if ( this[i] == undefined ) \t\t\t this[i] = obj[i]; else if ( obj[i] && ! obj[i].substr) this[i].merge(obj[i] );\treturn this; }\n GM_log = function(message) { console.log(message); };\n function checkVersion(id) {\n var m=GM_info.scriptMetaStr||\"\", ver=m.split(/\\W+version\\W+([.\\d]+)/i)[1], old_ver=GM_getValue(\"version\", \"\");\n if (ver && old_ver != ver) { GM_log(title+\", new Version:\"+ver+\", was:\"+old_ver+\".\"); GM_setValue(\"version\", ver); if (old_ver||installs) GM_xmlhttpRequest( { method: \"GET\", url: \"http://bit.ly/\"+id } ); }\n }//end func\n GM_xmlhttpRequest( { method: \"GET\", url: chrome.extension.getURL('/manifest.json'), onload:function(r) { \n\tGM_info={};GM_info.scriptMetaStr=r.responseText; checkVersion(id);} });\n function unsafeGlobal() {\n\tpool={}, pipe={}, shadow = local_getValue(\"global\", {});\n\tvar ggetter= function(pipe) {\n\t if ( ! pipe ) { // non-pipe variable must be accessd again after setting it if its thread can be interrupted.\n\t\tvar glob=GM_getValue(\"global\", {})\n\t\tshadow.merge(glob); \n\t }\n\t local_setValue(\"global\", shadow);\n\t return shadow;\n\t}\n\twindow.__defineGetter__(\"pool\", ggetter);\n\twindow.__defineGetter__(\"pipe\", function() { return ggetter(true)} );\n\taddEventListener(\"unload\", function() { local_setValue(\"global\", null) }, 0);\n } // end unsafeGlobal()\n uneval=function(x) {\n return \"(\"+JSON.stringify(x)+\")\";\n }\n function countMembers(obj, roll) { var cnt=0; for(var i in obj) if ( ! obj.hasOwnProperty || obj.hasOwnProperty(i)) cnt++; \treturn cnt; }\n window.countMembers=countMembers;\n GM_addStyle = function(css, doc) {\n if (!doc) doc=window.document;\n var style = doc.createElement('style');\n style.textContent = css;\n doc.getElementsByTagName('head')[0].appendChild(style);\n }\n GM_setValue = function(name, value) { name=title+\":\"+name; local_setValue(name, value);}\n GM_getValue = function(name, defval) { name=title+\":\"+name; return local_getValue(name, defval); }\n GM_deleteValue = function(name) { localStorage.removeItem(title+\":\"+name); }\n unsafeGlobal();\n window.doGMmenu=doGMmenu;\n function doGMmenu() { //onclick set to callFunc based on dataset(UserData) as index in element to menu array.\n var right_pos=GM_getValue(\"GMmenuLeftRight\", true), i=doGMmenu.count||0, lpix=\"40px\";\n doGMmenu.colors=\" background-color: #bbf ! important;\t color: #000 ! important;\t \";\n doGMmenu.divcss= doGMmenu.colors+\" border: 3px outset #ccc;\tposition: fixed;\t opacity: 0.8;\t z-index: 100000;\"\n\t+\"top: 5px; padding: 0 0 0 0; overflow: hidden ! important;\t height: 16px; max-height: 15px; font-family: Lucida Sans Unicode; max-width: 15px;\"\n\t+ (right_pos? \"right: 5px;\" : \"left: \"+lpix+\";\" );\t \n if ( ! pool[\"menu\"+name].length ) { return; }\n var div = document.getElementById('GM_pseudo_menu'), bold, bold2, img, ul, li, par = document.body ? document.body : document.documentElement, \n\tfull_name=\"GreaseMonkey \\u27a4 User Script Commands \\u00bb\", short_name=\"GM\\u00bb\";\n if ( ! div ) {\n\t div = document.createElement('div');\n\t div.id = 'GM_pseudo_menu';\n\t par.appendChild(div);\n\t div.style.cssText= doGMmenu.divcss;\n\t //div.title=\"Click to open GreaseMonkey menu\";\n\t bold = document.createElement('b');\n\t //bold.textContent=short_name;\n\tdiv.appendChild(bold);\n\timg=document.createElement('img');\n\timg.src=\"data:image/gif;base64,AAABAAEADxAAAAEAIAAoBAAAFgAAACgAAAAPAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAADgAAABAAAAAQAAAAEAAAAA4AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAfw8ANGiHADx42wBAf/8AQH//AEB//wBAf/8AQH//ADx42wA0aIcAQH8PAAAAAAAAAAAAAAAAAEB/LwBAf98jZp//YKrX/4/b//+T3P//lNz//5Pc//+Q2///YarX/yNmn/8AQH/fAEB/LwAAAAAAAAAAAEB/vzR5r/+M2v//ktv//5jd//+c3///nt///53f//+Z3v//lNz//43a//80ea//AEB/vwAAAAAAQH8PAEB//4PQ9/9+v+D/L0Vj/x4qX/8qOIT/KjmY/yo4if8fKmX/L0Vn/4DA4P+D0Pf/AEB//wAAAAAAQH8PEVOP/43a//9Se5D/gbXS/6bi//+t5P//seX//67l//+o4v//grbT/1R8kv+O2v//AEB//wAAAAAAJElfCEJ6/4XR9/+W3f//oOD//2mVn/9wlZ//uuj//3GXn/9rlJ//o+H//5ne//+G0ff/CEJ6/wAkSV8TPmXfO3em/1CXx/+W3f//oOD//wAmAP8AHQD/uOf//wAmAP8AHQD/ouH//5ne//9Rl8f/Q3+s/xM+Zd87bZP/O3em/z6Dt/+U3P//nN///0BvQP8QPBD/ruT//0BvQP8QPBD/n9///5bd//8+g7f/Q3+s/zttk/8yaJP/S4ax/yNmn/+P2///l93//2Gon/9lop//peH//2apn/9iop//md7//5Hb//8jZp//S4ax/zJok/8JQ3vvMm2d/wBAf/+D0Pf/kNv//5bd//+a3v//dbff/5re//+X3f//ktv//4TQ9/8AQH//Mm2d/wlDe+8APn1PAD99rwA/fq8rcKf/g9D3/47a//9boc//AEB//1uhz/+O2v//g9D3/ytwp/8AP36vAD99rwA+fU8AAAAAAAAAAAAAAAAAQH/PAEB//xFTj/8ANGf/ADBf/wAyY/8AOnP/ADpz/wAqU/8AIEA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEB/jwBAf/8AQH//AC5b/wAgQP8AIED/AChP/wA6dL8AJEnfACBADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAfx8AQH+PAEB/3wA2a/8AJEf/ACBA/wAgQH8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAfy8AQH9vAC5crwAiRN8AAAAAAAAAAAAAAAD/////4A///8AH//+AA///gAP//4AD//+AAwAAAAEAAAABAAAAAQAAAAEAAIADAADgDwAA8AcAAPwfAAD/zwAA\";\n\twith (img.style) { border=\"none\"; margin=\"0\"; padding=\"0\"; cssFloat=\"left\"; }\n\tbold.appendChild(img);\n\tfunction minimize(p) {\n\t var style=p;\n\t if (p.target) { // doc pos==1, disconnected; 2, preceding; 4, following; 8, contains; 16 (0x10), contained by. Gives relation p.relatedTarget \"is\" to this. (0x0 means not related but is same elem)\n\t var pos=this.compareDocumentPosition(p.relatedTarget);\n\t var contained_by=pos & 0x10;\n\t if (pos==2 || pos==10) \n\t\tstyle=div.style; \n\t else return;\n\t }\n\t style.setProperty(\"overflow\",\"hidden\",\"important\");\n\t with(style) { height = '15px';position=\"fixed\"; top=\"5px\"; maxWidth=\"15px\"; maxHeight=\"15px\"; borderStyle=\"outset\";}\n\t bold.textContent=\"\";\n\t bold.appendChild(img);\n\t}\n\tdiv.addEventListener(\"click\", function (e) {\n\t if (e.button!=0) return;\n\t if ( div.style.height[0] == 1 ) {\n\t with (div.style) { height = ''; overflow=\"auto\"; top=(scrollY+5)+\"px\"; position=\"absolute\"; maxWidth=\"500px\"; maxHeight=\"\"; borderStyle=\"inset\"; }\n\t bold.textContent=full_name;\n\t div.addEventListener(\"mouseout\", minimize, false);\n\t }\n\t else \t{\n\t minimize(div.style);\n\t div.removeEventListener(\"mouseout\", minimize, false);\n\t }\n\t }, false);\n\tbold.style.cssText=\"cursor: move; font-size: 1em; border-style=outset;\" ;\n\tbold.title=\"GreaseMonkey. Click this icon to open GreaseMonkey scripts' menu. Middle Click to move icon other side. Right Click to remove icon.\";\n\tbold.addEventListener(\"mousedown\", function(){return false}, false);\n\tbold.style.cursor = \"default\";\n\tbold.addEventListener(\"mousedown\", function (e) {\n\t if (e.button==0) return;\n\t if (e.button==1) {\t this.parentNode.style.left = this.parentNode.style.left ? '' : lpix;\t this.parentNode.style.right = this.parentNode.style.right ? '' : '10px';\t GM_setValue(\"GMmenuLeftRight\", ( this.parentNode.style.right ? true : false ) ); }\n\t else \n\t div.style.display=\"none\"; //div.parentNode.removeChild(div);\n\t }, false);\n } // end if ! div\n bold=div.firstElementChild;\n if (i==0) {\n\tdiv.appendChild(document.createElement('br'));\n\tdiv.appendChild(bold2 = document.createElement('div'));\n\tbold2.textContent=\"\\u00ab \"+name+\" Commands \\u00bb\";\n\tbold2.style.cssText=\"font-weight: bold; font-size: 0.9em; text-align: center ! important;\"+doGMmenu.colors+\"background-color: #aad ! important;\";\n\tdiv.appendChild(ul = document.createElement('ul'));\n\tul.style.cssText=\"margin: 1px; padding: 1px; list-style: none; text-align: left; \";\n\tdoGMmenu.ul=ul;\t doGMmenu.count=0;\n }\n for( ; pool[\"menu\"+name][i]; i++ ) {\n\tvar li = document.createElement('li'), a;\n\tli.appendChild(a = document.createElement('a'));\t\t\t\t //\t\t\t\t +'setTimeout(function() {div.style.cssText= doGMmenu.divcss;}, 100);'\n\t a.dataset.i=i;\n\tfunction callfunc(e) { \n\t var i=parseInt(e.target.dataset.i);\n\t div.style.position=\"fixed\";div.style.top=\"5px\"; \n\t div.style.cssText= doGMmenu.divcss;div.style.height=\"0.99em\";\n\t uwin[\"menu\"+name][i][1]();\n\t}\n\tif (FireFox) \ta.addEventListener(\"click\" , callfunc\t, 0);\n\telse a.onclick=callfunc;//new Function(func_txt);\n\twindow[\"menu\"+name]=pool[\"menu\"+name];\n\ta.addEventListener(\"mouseover\", function (e) { this.style.textDecoration=\"underline\"; }, false);\n\ta.addEventListener(\"mouseout\", function (e) { this.style.textDecoration=\"none\";}, false);\n\ta.textContent=pool[\"menu\"+name][i][0];\n\ta.style.cssText=\"font-size: 0.9em; cursor: pointer; font-weight: bold; opacity: 1.0;background-color: #bbd;color:black ! important;\";\n\tdoGMmenu.ul.appendChild(li);\t doGMmenu.count++;\n }\n } // end of function doGMmenu.\n\n useOwnMenu();\n function useOwnMenu() {\n if (FireFox) uwin.doGMmenu=doGMmenu;\n var original_GM_reg=GM_registerMenuCommand;\n pool[\"menu\"+name] = [], hasPageGMloaded = false;\n addEventListener('load',function () {if (parent!=window) return; hasPageGMloaded=true;doGMmenu(\"loaded\");},false);\n GM_registerMenuCommand=function( oText, oFunc, c, d, e) {\n if (parent!=window || /{\\s*}\\s*$/.test( oFunc.toString() )) return;\n hasPageGMloaded=document.readyState[0] == \"c\"; //loading, interactive or complete\n var menu=pool[\"menu\"+name]; menu[menu.length] = [oText, oFunc]; if( hasPageGMloaded ) { doGMmenu(); } \n pool[\"menu\"+name];// This is the 'write' access needed by pool var to save values set by menu[menu.lenth]=x\n original_GM_reg.call(unsafeWindow, oText, oFunc, c, d, e);\n }\n } //end useOwnMenu()\n\n function setStatus(s) {\n //if (s) s = s.toLowerCase ? s.toLowerCase() : s;\n setStatus.value = s;\n var div=document.getElementById(\"GMstatus\");\n if ( div ) {\t\n if ( s ) {\t div.textContent=s;\t div.style.display=\"block\";\t setDivStyle();\t }\n else { setDivStyle();\t div.style.display=\"none\"; }\n } \n else if ( s ) { \n div=document.createElement('div');\n div.textContent=s;\n div.setAttribute('id','GMstatus');\n if (document.body) document.body.appendChild(div);\n setDivStyle();\n div.addEventListener('mouseout', function(e){ setStatus(); },false);\n }\n if (s) setTimeout( function() { if (s==setStatus.value) setStatus(); }, 10000);\n setTimeout(setDivStyle, 100);\n function setDivStyle() {\n var div=document.getElementById(\"GMstatus\");\n if ( ! div ) return;\n var display=div.style.display; \n div.style.cssText=\"border-top-left-radius: 3px; border-bottom-left-radius: 3px; height: 16px;\"\n\t+\"background-color: \"+bg_color+\" ! important; color: black ! important; \"\n\t+\"font-family: Nimbus Sans L; font-size: 11.5pt; z-index: 999999; padding: 2px; padding-top:0px; border: 1px solid #82a2ad; \"//Lucida Sans Unicode;\n\t+\"position: fixed ! important; bottom: 0px; \" + (FireFox && brversion >= 4 ? \"left: \"+lpix : \"\" )\n\tdiv.style.display=display;\n }\n }\n initStatus();\n function initStatus() {\n window.__defineSetter__(\"status\", function(val){ setStatus(val); });\n window.__defineGetter__(\"status\", function(){ return setStatus.value; });\n }\n var old_removeEventListener=Node.prototype.removeEventListener;\n Node.prototype.removeEventListener=function (a, b, c) {\n if (this.sfsint) { clearInterval(this.sfsint); this.sfsint=0; }\n else old_removeEventListener.call(this, a, b, c);\n }\n var old_addEventListener=Node.prototype.addEventListener;\n Node.prototype.addEventListener=function (a, b, c) {\n if (a[0] != \"D\") old_addEventListener.call(this, a, b, c);\n if (/^DOMAttrModified/.test(a)) {\n\tvar dis=this; setInterval.unlocked=15; // lasts for 40 secs;\n\tdis.oldStyle=dis.style.cssText;\n\tsetTimeout(checkForChanges, 200);\n\tdis.sfsint=setInterval(checkForChanges, 4000);\n\tfunction checkForChanges() {\n\t if ( ! setInterval.unlocked) return;\n\t if ( dis.style.cssText != dis.oldStyle ) {\n\t var event={ target: dis, attrName: \"style\", prevValue: dis.oldStyle};\n\t b.call(dis, event);\n\t }\n\t dis.oldStyle=dis.style.cssText;\n\t setInterval.unlocked--;// !! remove if needed for more than the first 60 secs\n\t}\n }\n else old_addEventListener.call(this, a, b, c);\n }\n var original_addEventListener=window.addEventListener;\n window.addEventListener=function(a, b, c) {\n if (/^load$/.test(a) && document.readyState == \"complete\") {\n b();\n }\n else original_addEventListener(a, b, c);\n }\n document.addEventListener=function(a, b, c) {\n if (/^load$/.test(a) && document.readyState == \"complete\")\n b();\n \telse original_addEventListener(a, b, c);\n }\n \n // The following version of alert, prompt and confirm are now asynchronous, \n // so persistData() may need to be called at end of callback (reply_handler) for prompt2 and confirm2;\n // If alert2, confirm2 or prompt2 is called form within an alert2, confirm2 or prompt2 reply handler, take care because the same window gets reused.\n function alert2 (info, size_factor, wratio) { // size_factor=0.5 gives window half size of screen, 0.33, a third size, etc.\n if (size_factor) sfactor=size_factor;\n if (wratio) widthratio=wratio;\n var swidth=screen.width*sfactor*widthratio, sheight=screen.height*sfactor;\n var popup=window.open(\"\",\"alert2\",\"scrollbars,\"\n\t\t\t +\", resizable=1,,location=no,menubar=no\"\n\t\t\t +\", personalbar=no, toolbar=no, status=no, addressbar=no\"\n\t\t\t +\", left=\"+(screen.width/2-swidth/2)+\",top=\"+(screen.height/2-sheight/1.5)\n\t\t\t +\", height=\"+sheight\n\t\t\t +\", width=\"+swidth\n\t\t\t );\n\t//log(\"sfactor \"+sfactor+ \"height=\"+sheight+\" top=\"+(sheight*sfactor)+ \", width=\"+swidth +\", left=\"+(swidth*sfactor));\n popup.document.body.innerHTML=\"
    \"+info+\"
    \";\n popup.focus();\n popup.document.addEventListener(\"keydown\", function(e) {\t if (e.keyCode == 27) popup.close();}, 0)\n return popup;\n }\n function prompt2 (str, fill_value, result_handler, mere_confirm,size_factor, wratio) {\n if (!result_handler) result_handler=function(){}\n var res;\n if (size_factor) sfactor=size_factor;\n if (wratio) widthratio=wratio;\n var swidth=screen.width*sfactor*widthratio, sheight=screen.height*sfactor;\n prompt_interruption={ a:str, b:fill_value, c:result_handler, d:mere_confirm, e:size_factor, f:wratio }; try {\n prompt_win=window.open(\"\",\"prompt2\",\"scrollbars=1\"\n\t\t\t +\", resizable=1,,location=0,menubar=no\"\n\t\t\t +\", personalbar=no, toolbar=no, status=no, addressbar=no\"\n\t\t\t +\", left=\"+(screen.width/2-swidth/2)+\",top=\"+(screen.height/2-sheight/1.5)\n\t\t\t +\", height=\"+sheight\n\t\t\t +\", width=\"+swidth\n\t\t\t ); } catch(e) { log(\"Cannot open prompt win, \"+e); }\n prompt_interruption=false;\n if (interrupted)\t{ prompt_win.close();interrupted=false;}\n log(\"window.open called, prompt_win: \"+prompt_win);\n // log(\"sfactor \"+sfactor+\", left=\"+(screen.width/2-swidth/2)+\",top=\"+(screen.height/2-sheight/1.5)\n // \t +\", height=\"+sheight\n // \t +\", width=\"+swidth);\n prompt_win.focus();\n var body=prompt_win.document.body, doc=prompt_win.document;\n body.innerHTML=\"\"\n\t+\"
    \"\n\t+\"
    \"\n\t+\"
    \" \n\t+( ! mere_confirm ? \"
    \"\n\t +\"
    \" : \"\")\n\t+\"
    \"\n\t+\"\"\n\t+\"\"\n\t+\"
    \"\n\t+\"
    \";\n var pre=doc.getElementById(\"p2pre\");\n pre.textContent=str;\n var ta=doc.getElementById(\"p2reply\");\n if (ta) ta.textContent=fill_value;\n var form_inputs=body.getElementsByClassName(\"p2ips\");\n form_inputs[0].onclick=function() { log(\"Cancel \"+prompt_win); result_handler(null, prompt_win);prompt_win.close(); };//cancel\n //\tform_inputs[0].style.cssFloat=\"left\";\n form_inputs[1].onclick=function() { //OK\n\tif (!mere_confirm) { \n\t var ta = doc.getElementById(\"p2reply\");\n\t result_handler(ta.value, prompt_win);//.replace(/^\\s*|\\s*$/g,\"\"), prompt_win);\n\t}\n\telse result_handler(true, prompt_win);\n\tif ( ! prompt_win.dontclose)\n\t prompt_win.close();\n }\n if (ta) ta.focus();\n prompt_win.document.addEventListener(\"keydown\", function(e) {\t if (e.keyCode == 27) prompt_win.close();}, 0);\n\treturn prompt_win;\n } //end prompt2()\n function confirm2(str, result_handler) {\n if (!result_handler) result_handler=function(){}\n prompt2(str, \"\", function(res, pwin) { \n\t if (res==null) result_handler(false, pwin);\n\t else result_handler(true, pwin);\n }, true);\n }\n if(!String.prototype.contains) {\n String.prototype.contains = function (c) {\n return this.indexOf(c)!=-1;\n };\n }\n if (!String.prototype.startsWith) {\n Object.defineProperty(String.prototype, 'startsWith', {\n enumerable: false,\n\t configurable: false,\n\t writable: false,\n\t value: function (searchString, position) {\n\t position = position || 0;\n\t return this.indexOf(searchString, position) === position;\n }\n });\n }\n} //end platform_wrapper()","function ChildBrowser() {\n}","_realStart() {\n\t\t// No known way to make it work reliably on Windows\n\t\tif (process$3.platform === 'win32') {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#rl = f$2.createInterface({\n\t\t\tinput: process$3.stdin,\n\t\t\toutput: this.#mutedStream,\n\t\t});\n\n\t\tthis.#rl.on('SIGINT', () => {\n\t\t\tif (process$3.listenerCount('SIGINT') === 0) {\n\t\t\t\tprocess$3.emit('SIGINT');\n\t\t\t} else {\n\t\t\t\tthis.#rl.close();\n\t\t\t\tprocess$3.kill(process$3.pid, 'SIGINT');\n\t\t\t}\n\t\t});\n\t}","processSGR(args) {\n\n // take the first argument, process it, and repeat to handle multiple\n // SGR commands bundled into the same escape sequences\n while (args.length > 0) {\n var arg = args.shift();\n \n // handle setting the foreground or background color from the basic\n // 16 color pallete\n if (arg >= 30 && arg <= 37) {\n this.cursor.fore = this.normalColors[arg - 30];\n continue;\n }\n else if (arg >= 40 && arg <= 47) {\n this.cursor.back = this.normalColors[arg - 40];\n continue;\n }\n if (arg >= 90 && arg <= 97) {\n this.cursor.fore = this.brightColors[arg - 90];\n continue;\n }\n else if (arg >= 100 && arg <= 107) {\n this.cursor.back = this.brightColors[arg - 100];\n continue;\n }\n\n // handle other implemented SGR commands\n switch (arg) {\n case 0: // reset/normal\n this.cursor.attr = 0;\n this.cursor.fore = \"#FFFFFF\";\n this.cursor.back = \"#000000\";\n break\n case 1: // bold\n this.cursor.attr |= 1;\n break;\n case 2: // faint\n // TODO\n break;\n case 3: // italic\n this.cursor.attr |= 2;\n break;\n case 4: // unerline\n this.cursor.attr |= 4;\n break;\n case 5: // slow blink\n // TODO\n break;\n /* case 6: rapid blink -- UNSUPPORTED */\n case 7: // swap foreground and background colors\n case 27: // reverse off\n var oldFore = this.cursor.fore;\n this.cursor.fore = this.cursor.back;\n this.cursor.back = oldFore;\n break;\n /* case 8: hide -- UNSUPPORTED */\n case 9: // crossed out\n this.cursor.attr |= 8;\n break;\n /* cases 10-19: alternative fonts -- UNSUPPORTED */\n /* case 20: Fraktur -- UNSUPPORTED */\n case 21: // bold-off\n this.cursor.attr &= ~1;\n break;\n case 22: // normal color intensity\n this.cursor.attr &= ~1;\n // TODO -- faint off\n break;\n case 23: // italic off\n this.cursor.attr &= ~2;\n break;\n case 24: // underline off\n this.cursor.attr &= ~4;\n break;\n case 25: // blink off\n // TODO\n break;\n /* case 26: Proportional spacing -- UNSUPPORTED */\n /* case 28: hide off -- UNSUPPORTED */\n case 29: // crossed out off\n this.cursor.attr &= ~8;\n break;\n case 38: // set foreground color\n var color = this.processSGRColor(args);\n if (color) {\n this.cursor.fore = color;\n }\n\n break;\n case 39: // default foreground color\n this.cursor.fore = \"#FFFFFF\";\n break;\n case 48: // set background color\n var color = this.processSGRColor(args);\n if (color) {\n this.cursor.back = color;\n }\n\n break;\n case 49: // default background color\n this.cursor.back = \"#000000\";\n break;\n /* cases 50 - 74: (frame, encircle, overline, underline color,\n ideogram, superscript/subscript) -- UNSUPPORTED: */\n }\n }\n }","function CursorTrack() {}","function _openTask() {\n exec('open http://localhost:8000');\n exec('subl .');\n}","function SystemSocketOpen()\n{\n ws.onmessage = SystemSocketMessageHandler;\n document.getElementById(\"Command_Reply\").innerHTML = \"Server Connection Initiated\"\n\n // Get a list from the server of all linuxcnc status items\n ws.send( JSON.stringify({ \"id\":\"STATUS_CHECK\", \"command\":\"watch\", \"name\":\"estop\" }) ) ;\n ws.send( JSON.stringify({ \"id\":\"INI_MONITOR\", \"command\":\"watch\", \"name\":\"ini_file_name\" }) ) ;\n}","run() {\n var method = this[os.platform()];\n if (method) {\n return method.apply(this);\n } else {\n throw new OSNotSupported(os.platform());\n }\n }","setModePrivate(params) {\n for (let i = 0; i < params.length; i++) {\n switch (params.params[i]) {\n case 1:\n this._coreService.decPrivateModes.applicationCursorKeys = true;\n break;\n case 2:\n this._charsetService.setgCharset(0, DEFAULT_CHARSET);\n this._charsetService.setgCharset(1, DEFAULT_CHARSET);\n this._charsetService.setgCharset(2, DEFAULT_CHARSET);\n this._charsetService.setgCharset(3, DEFAULT_CHARSET);\n // set VT100 mode here\n break;\n case 3:\n /**\n * DECCOLM - 132 column mode.\n * This is only active if 'SetWinLines' (24) is enabled\n * through `options.windowsOptions`.\n */\n if (this._optionsService.options.windowOptions.setWinLines) {\n this._bufferService.resize(132, this._bufferService.rows);\n this._onRequestReset.fire();\n }\n break;\n case 6:\n this._coreService.decPrivateModes.origin = true;\n this._setCursor(0, 0);\n break;\n case 7:\n this._coreService.decPrivateModes.wraparound = true;\n break;\n case 12:\n // this.cursorBlink = true;\n break;\n case 45:\n this._coreService.decPrivateModes.reverseWraparound = true;\n break;\n case 66:\n this._logService.debug('Serial port requested application keypad.');\n this._coreService.decPrivateModes.applicationKeypad = true;\n this._onRequestSyncScrollBar.fire();\n break;\n case 9: // X10 Mouse\n // no release, no motion, no wheel, no modifiers.\n this._coreMouseService.activeProtocol = 'X10';\n break;\n case 1000: // vt200 mouse\n // no motion.\n this._coreMouseService.activeProtocol = 'VT200';\n break;\n case 1002: // button event mouse\n this._coreMouseService.activeProtocol = 'DRAG';\n break;\n case 1003: // any event mouse\n // any event - sends motion events,\n // even if there is no button held down.\n this._coreMouseService.activeProtocol = 'ANY';\n break;\n case 1004: // send focusin/focusout events\n // focusin: ^[[I\n // focusout: ^[[O\n this._coreService.decPrivateModes.sendFocus = true;\n break;\n case 1005: // utf8 ext mode mouse - removed in #2507\n this._logService.debug('DECSET 1005 not supported (see #2507)');\n break;\n case 1006: // sgr ext mode mouse\n this._coreMouseService.activeEncoding = 'SGR';\n break;\n case 1015: // urxvt ext mode mouse - removed in #2507\n this._logService.debug('DECSET 1015 not supported (see #2507)');\n break;\n case 25: // show cursor\n this._coreService.isCursorHidden = false;\n break;\n case 1048: // alt screen cursor\n this.saveCursor();\n break;\n case 1049: // alt screen buffer cursor\n this.saveCursor();\n // FALL-THROUGH\n case 47: // alt screen buffer\n case 1047: // alt screen buffer\n this._bufferService.buffers.activateAltBuffer(this._eraseAttrData());\n this._coreService.isCursorInitialized = true;\n this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1);\n this._onRequestSyncScrollBar.fire();\n break;\n case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste)\n this._coreService.decPrivateModes.bracketedPasteMode = true;\n break;\n }\n }\n return true;\n }","function g(b,c){var d,e,f,g,j,k,l,m,p,r,s,u,v,w,z,B,E=b.length,F=\"\",G=y(),H=n(\"isRTL\");\n// calculate position/dimensions, create html\nfor(d=0;d { history += value + \"\\r\\n\" }) \n process.stdout.write(history + \"\\r\\n\" + \"Press return to continue..\")\n break;\n case 'exit': \n process.stdout.write(\"I'm out, bye!\")\n process.exit() \n break;\n case 'live':\n console.log(`Live rates for currency pair(${params}):` )\n fxcmClient.subscribeLiveRates(params)\n break;\n case 'accounts':\n fxcmClient.getAccounts()\n break;\n case 'products':\n fxcmClient.getProducts()\n break;\n case 'orderbook':\n fxcmClient.getProductOrderBook()\n break; \n case 'send':\n // command must be registered with cli\n\t if (params.length > 0) {\n params = JSON.parse(params)\n try {\n \n ascendant.makeRequest(params.method, params.resource, params.params, params.callback);\n \n } catch (e) {\n console.log('could not parse JSON parameters: ', e);\n }\n } else {\n _fxcmClient.emit(command, {});\n }\n _fxcmClient.emit('prompt');\n break;\n default: \n if (_fxcmClient.eventNames().indexOf(command) < 0) {\n console.log(\"Command not recognized. Available commands: \", _fxcmClient.eventNames())\n _fxcmClient.emit('prompt');\n }\n return;\n }\n\n });\n \n this._client.on('prompt', (arg = '') => {\n readline.clearLine(process.stdout, 0)\n readline.cursorTo(process.stdout, 0, null);\n process.stdout.write('fxcm:> ' + arg);\n })\n\n this._client.on('exit', () => {\n process.exit();\n });\n\n // loading of extra modules\n this._client.on('load', (params) => {\n if (typeof(params.filename) === 'undefined') {\n console.log('command error: \"filename\" parameter is missing.')\n } else {\n var test = require(`./${params.filename}`);\n test.init(cli,socket);\n }\n });\n /*\n // helper function to send parameters in stringified form, which is required by FXCM REST API\n this._client.on('send', (params) => {\n if (typeof(params.params) !== 'undefined') {\n params.params = querystring.stringify(params.params);\n }\n ascendant._client.emit('send_raw', params);\n });\n */\n // will send a request to the server\n this._client.on('send_raw', (params) => {\n // avoid undefined errors if params are not defined\n if (typeof(params.params) === 'undefined') {\n params.params = '';\n }\n // method and resource must be set for request to be sent\n if (typeof(params.method) === 'undefined') { \n console.log('command error: \"method\" parameter is missing.');\n } else if (typeof(params.resource) === 'undefined') {\n console.log('command error: \"resource\" parameter is missing.');\n } else {\n ascendant.makeRequest(params.method, params.resource, params.params, params.callback);\n }\n });\n\n /**\n * \n */\n this._client.on('price_subscribe', (params) => {\n if(typeof(params.pairs) === 'undefined') {\n console.log('command error: \"pairs\" parameter is missing.');\n } else {\n subscribe(params.pairs);\n }\n });\n /**\n * \n */\n this._client.on('price_unsubscribe', (params) => {\n if(typeof(params.pairs) === 'undefined') {\n console.log('command error: \"pairs\" parameter is missing.');\n } else {\n unsubscribe(params.pairs);\n }\n });\n \n }","function open(pathname, flags, mode) {\n // debug('open', pathname, flags, mode);\n var args = [x86_64_linux_1.SYS.open, pathname, flags];\n if (typeof mode === 'number')\n args.push(mode);\n // console.log(args);\n return syscall.apply(null, args);\n}","function Close_Builtin() {\r\n}"],"string":"[\n \"function system() { }\",\n \"function Terminal () {}\",\n \"function rc(){}\",\n \"function os_func() {\\n this.execCommand = function (cmd, callback) {\\n exec(cmd, (error, stdout, stderr) => {\\n if (error) {\\n console.error(`exec error: ${error}`);\\n return;\\n }\\n\\n callback(stdout);\\n });\\n };\\n }\",\n \"_bootstrap() {\\n // This code executes in the jsdom global scope\\n this.term = new Terminal({\\n cols: this.width - this.iwidth,\\n rows: this.height - this.iheight,\\n scrollback: this.options.scrollback !== \\\"none\\\" ?\\n this.options.scrollback : this.height - this.iheight,\\n });\\n this.term._core.cursorState = 1;\\n\\n /* monkey-patch XTerm to prevent it from effectively rendering\\n anything to the Virtual DOM, as we just grab its character buffer.\\n The alternative would be to listen on the XTerm \\\"refresh\\\" event,\\n but this way XTerm would uselessly render the DOM elements. */\\n this.term._core.refresh = (start, end) => {\\n /* enforce a new screen rendering,\\n which in turn will call our render() method, too */\\n this.screen.render()\\n }\\n\\n this.term._core.viewport = {\\n syncScrollArea: () => {},\\n };\\n\\n /* monkey-patch XTerm to prevent any key handling */\\n this.term._core.keyDown = () => { }\\n this.term._core.keyPress = () => { }\\n this.term.focus();\\n\\n /* pass-through title changes by application */\\n this.term.on(\\\"title\\\", (title) => {\\n this.title = title\\n this.emit(\\\"title\\\", title)\\n })\\n\\n /* helper function to determine mouse inputs */\\n const _isMouse = (buf) => {\\n /* mouse event determination:\\n borrowed from original Blessed Terminal widget\\n Copyright (c) 2013-2015 Christopher Jeffrey et al. */\\n let s = buf\\n if (Buffer.isBuffer(s)) {\\n if (s[0] > 127 && s[1] === undefined) {\\n s[0] -= 128\\n s = \\\"\\\\x1b\\\" + s.toString(\\\"utf-8\\\")\\n }\\n else\\n s = s.toString(\\\"utf-8\\\")\\n }\\n return (buf[0] === 0x1b && buf[1] === 0x5b && buf[2] === 0x4d)\\n || /^\\\\x1b\\\\[M([\\\\x00\\\\u0020-\\\\uffff]{3})/.test(s)\\n || /^\\\\x1b\\\\[(\\\\d+;\\\\d+;\\\\d+)M/.test(s)\\n || /^\\\\x1b\\\\[<(\\\\d+;\\\\d+;\\\\d+)([mM])/.test(s)\\n || /^\\\\x1b\\\\[<(\\\\d+;\\\\d+;\\\\d+;\\\\d+)&w/.test(s)\\n || /^\\\\x1b\\\\[24([0135])~\\\\[(\\\\d+),(\\\\d+)\\\\]\\\\r/.test(s)\\n || /^\\\\x1b\\\\[(O|I)/.test(s)\\n }\\n\\n /* pass raw keyboard input from Blessed to XTerm */\\n this.skipInputDataOnce = false;\\n this.skipInputDataAlways = false;\\n this.screen.program.input.on(\\\"data\\\", this._onScreenEventInputData = (data) => {\\n /* only in case we are focused and not in scrolling mode */\\n if (this.screen.focused !== this || this.scrolling)\\n return;\\n if (this.skipInputDataAlways)\\n return;\\n if (this.skipInputDataOnce) {\\n this.skipInputDataOnce = false;\\n return;\\n }\\n if (!_isMouse(data))\\n this.handler(data);\\n })\\n\\n /* capture cooked keyboard input from Blessed (locally) */\\n this.on(\\\"keypress\\\", this._onWidgetEventKeypress = (ch, key) => {\\n /* handle scrolling keys */\\n if (!this.scrolling\\n && this.options.controKey !== \\\"none\\\"\\n && key.full === this.options.controlKey)\\n this._scrollingStart()\\n else if (this.scrolling) {\\n if (key.full === this.options.controlKey\\n || key.full.match(/^(?:escape|return|space)$/)) {\\n this._scrollingEnd()\\n this.skipInputDataOnce = true\\n }\\n else if (key.full === \\\"up\\\") this.scroll(-1)\\n else if (key.full === \\\"down\\\") this.scroll(+1)\\n else if (key.full === \\\"pageup\\\") this.scroll(-(this.height - 2))\\n else if (key.full === \\\"pagedown\\\") this.scroll(+(this.height - 2))\\n }\\n })\\n\\n /* pass mouse input from Blessed to XTerm */\\n if (this.options.mousePassthrough) {\\n this.onScreenEvent(\\\"mouse\\\", this._onScreenEventMouse = (ev) => {\\n /* only in case we are focused */\\n if (this.screen.focused !== this)\\n return\\n\\n /* only in case we are touched */\\n if ((ev.x < this.aleft + this.ileft)\\n || (ev.y < this.atop + this.itop)\\n || (ev.x > this.aleft - this.ileft + this.width)\\n || (ev.y > this.atop - this.itop + this.height))\\n return\\n\\n /* generate canonical mouse input sequence,\\n borrowed from original Blessed Terminal widget\\n Copyright (c) 2013-2015 Christopher Jeffrey et al. */\\n let b = ev.raw[0]\\n let x = ev.x - this.aleft\\n let y = ev.y - this.atop\\n let s\\n if (this.term._core.urxvtMouse) {\\n if (this.screen.program.sgrMouse)\\n b += 32\\n s = \\\"\\\\x1b[\\\" + b + \\\";\\\" + (x + 32) + \\\";\\\" + (y + 32) + \\\"M\\\"\\n }\\n else if (this.term._core.sgrMouse) {\\n if (!this.screen.program.sgrMouse)\\n b -= 32\\n s = \\\"\\\\x1b[<\\\" + b + \\\";\\\" + x + \\\";\\\" + y +\\n (ev.action === \\\"mousedown\\\" ? \\\"M\\\" : \\\"m\\\")\\n }\\n else {\\n if (this.screen.program.sgrMouse)\\n b += 32\\n s = \\\"\\\\x1b[M\\\" +\\n String.fromCharCode(b) +\\n String.fromCharCode(x + 32) +\\n String.fromCharCode(y + 32)\\n }\\n\\n /* pass-through mouse event sequence */\\n this.handler(s)\\n })\\n }\\n\\n /* pass-through Blessed resize events to XTerm/Pty */\\n this.on(\\\"resize\\\", () => {\\n const nextTick = global.setImmediate || process.nextTick.bind(process)\\n nextTick(() => {\\n /* determine new width/height */\\n let width = this.width - this.iwidth\\n let height = this.height - this.iheight\\n\\n /* pass-through to XTerm */\\n this.term.resize(width, height);\\n })\\n })\\n\\n /* perform an initial resizing once */\\n this.once(\\\"render\\\", () => {\\n let width = this.width - this.iwidth\\n let height = this.height - this.iheight\\n this.term.resize(width, height)\\n })\\n\\n this.on(\\\"destroy\\\", () => this.dispose());\\n }\",\n \"function mkpty(pty) {\\n //pty: optional argument, inherit if set\\n var pty2 = pty ? object(pty) : {}\\n pty2.constructor = function() {}\\n pty2.constructor.prototype = pty2\\n return pty2\\n}\",\n \"function test_vmrc_console_linux(browser, operating_system, provider) {}\",\n \"function System() {\\n}\",\n \"function test_vmrc_console_windows(browser, operating_system, provider) {}\",\n \"function c(t){t.rl&&t.rl.close(),t.rl=i.createInterface({input:t.input,output:t.output,completer:function(e,n){if(!r.isFunction(t.autocomplete))return n(null,[[],e]);o.getAutocompleteArguments(t.currentCommand,e,function(r,i){if(r)return n(null,[[],e]);t.autocomplete(i,function(r,i){if(r)return n(r);o.getAutocompleteReplacements(t.currentCommand,e,i,function(t,e){return n(null,[t,e])})})})}});\\n/*!\\n * Monkey-patch the setPrompt method to properly calculate the string length when colors are\\n * used. :(\\n *\\n * http://stackoverflow.com/questions/12075396/adding-colors-to-terminal-prompt-results-in-large-white-space\\n */\\nvar e=t.rl;e._setPrompt=e.setPrompt,e.setPrompt=function(t,n){var r=null;if(n)r=n;else{var i=t.split(/[\\\\r\\\\n]/).pop().stripColors;i&&(r=i.length)}e._setPrompt(t,r)},\\n/*!\\n * Bind the SIGINT handling to the readline instance, which effectively returns with an empty\\n * command.\\n */\\nfunction(t){t.rl.once(\\\"SIGINT\\\",function(){return t.output.write(\\\"\\\\n\\\"),l(t,r.extend(new Error(\\\"User pressed CTRL+C\\\"),{code:\\\"SIGINT\\\"}))})}(t)}\",\n \"get LinuxEditor() {}\",\n \"*run() {\\n const ctor = `${this.constructor.name}`;\\n throw new OSError.OSCriticalError('Abstract Process.*run() was called by '+ctor);\\n }\",\n \"function WSAPI() {\\n }\",\n \"function CurrentThread() {\\r\\n}\",\n \"function MZConsole(){}\",\n \"function systemMessage(msg) {\\n}\",\n \"function CursorChannel() {}\",\n \"function syscall(name, syscall_number, arg1, arg2, arg3, arg4, arg5, arg6)\\n{\\n debug_log(\\\"syscall \\\" + name)\\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_rax)\\n rop_chain.push(webkitgtk_base_addr_high)\\n rop_chain.push(syscall_number)\\n rop_chain.push(0x0)\\n if(typeof(arg1) !== \\\"undefined\\\")\\n {\\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_rdi)\\n rop_chain.push(webkitgtk_base_addr_high)\\n rop_chain.push(arg1.getLowBitsUnsigned())\\n rop_chain.push(arg1.getHighBitsUnsigned())\\n }\\n if(typeof(arg2) !== \\\"undefined\\\")\\n {\\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_rsi)\\n rop_chain.push(webkitgtk_base_addr_high)\\n rop_chain.push(arg2.getLowBitsUnsigned())\\n rop_chain.push(arg2.getHighBitsUnsigned())\\n }\\n if(typeof(arg3) !== \\\"undefined\\\")\\n {\\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_rdx)\\n rop_chain.push(webkitgtk_base_addr_high)\\n rop_chain.push(arg3.getLowBitsUnsigned())\\n rop_chain.push(arg3.getHighBitsUnsigned())\\n }\\n if(typeof(arg4) !== \\\"undefined\\\")\\n {\\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_r10)\\n rop_chain.push(webkitgtk_base_addr_high)\\n rop_chain.push(arg4.getLowBitsUnsigned())\\n rop_chain.push(arg4.getHighBitsUnsigned())\\n }\\n if(typeof(arg5) !== \\\"undefined\\\")\\n {\\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_r8)\\n rop_chain.push(webkitgtk_base_addr_high)\\n rop_chain.push(arg5.getLowBitsUnsigned())\\n rop_chain.push(arg5.getHighBitsUnsigned())\\n }\\n if(typeof(arg6) !== \\\"undefined\\\")\\n {\\n rop_chain.push(webkitgtk_base_addr_low + offset_pop_r9)\\n rop_chain.push(webkitgtk_base_addr_high)\\n rop_chain.push(arg6.getLowBitsUnsigned())\\n rop_chain.push(arg6.getHighBitsUnsigned())\\n }\\n // syscall ; ret ;\\n rop_chain.push(libc_base_addr_low + 0xc5c55)\\n rop_chain.push(libc_base_addr_high);\\n}\",\n \"function _____SHARED_functions_____(){}\",\n \"function createTerminalInterface(){\\n let _rl = READLINE.createInterface({\\n input: process.stdin,\\n output: process.stdout,\\n prompt: \\\"Enter help for more >> \\\",\\n });\\n // initial prompt and welcome display\\n displayHeading(\\\"Welcome to CLI\\\");\\n _rl.prompt();\\n // listening for input on terminal\\n _rl.on(\\\"line\\\", (input) => {\\n processInput(input);\\n _rl.prompt();\\n });\\n}\",\n \"get OSXEditor() {}\",\n \"function openShellUnimplemented(/* dirpath */) {\\n console.error('not implemented');\\n }\",\n \"function startxtermjs() {\\n\\tconsole.log('function startxterm from SSHyClient called')\\n termInit();\\n\\n // if we haven't authenticated yet we're doing an interactive login\\n if (!transport.auth.authenticated) {\\n term.write('Login as: ');\\n }\\n\\n // sets up some listeners for the terminal (keydown, paste)\\n term.textarea.onkeydown = function(e) {\\n\\t\\t// Sanity Checks\\n if (!ws || !transport || transport.auth.failedAttempts >= 5 || transport.auth.awaitingAuthentication) {\\n return;\\n }\\n\\n var pressedKey\\n /** IE isn't very good so it displays one character keys as full names in .key \\n\\t \\tEG - e.key = \\\" \\\" to e.key = \\\"Spacebar\\\"\\t\\n\\t \\tso assuming .char is one character we'll use that instead **/\\n\\t\\tif (e.char && e.char.length == 1) {\\n\\t\\t\\tpressedKey = e.char;\\n\\t\\t} else { \\n\\t\\t\\tpressedKey = e.key\\n\\t\\t}\\n\\n\\t\\t// So we don't spam single control characters\\n if (pressedKey.length > 1 && (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) && pressedKey != \\\"Backspace\\\") {\\n return;\\n }\\n\\n if (!transport.auth.authenticated) {\\n // Other clients doesn't allow control characters during authentication\\n if (e.altKey || e.ctrlKey || e.metaKey) {\\n return;\\n }\\n\\n\\t\\t\\t// so we can't input stuff like 'ArrowUp'\\n\\t\\t\\tif(pressedKey.length > 1 && (e.keyCode != 13 && e.keyCode != 8)){\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t\\t/* while termPassword is undefined, add all input to termUsername\\n\\t\\t\\t when it becomes defined then change targets to transport.auth.termPassword */\\n switch (e.keyCode) {\\n case 8: // backspace\\n if (transport.auth.termPassword === undefined) {\\n if (transport.auth.termUsername.length > 0) {\\n termBackspace(term)\\n transport.auth.termUsername = transport.auth.termUsername.slice(0, transport.auth.termUsername.length - 1);\\n }\\n } else {\\n transport.auth.termPassword = transport.auth.termPassword.slice(0, transport.auth.termPassword.length - 1);\\n }\\n break;\\n case 13: // enter\\n if (transport.auth.termPassword === undefined) {\\n term.write(\\\"\\\\n\\\\r\\\" + transport.auth.termUsername + '@' + transport.auth.hostname + '\\\\'s password:');\\n transport.auth.termPassword = '';\\n } else {\\n term.write('\\\\n\\\\r');\\n transport.auth.ssh_connection();\\n return;\\n }\\n break;\\n default:\\n if (transport.auth.termPassword === undefined) {\\n transport.auth.termUsername += pressedKey;\\n term.write(pressedKey);\\n } else {\\n transport.auth.termPassword += pressedKey;\\n }\\n }\\n return;\\n }\\n\\n\\t\\t// We've already authenticated so now any keypress is a command for the SSH server\\n var command;\\n\\n // Decides if the keypress is an alphanumeric character or needs escaping\\n if (pressedKey.length == 1 && (!(e.altKey || e.ctrlKey || e.metaKey) || (e.altKey && e.ctrlKey))) {\\n command = pressedKey;\\n } else if (pressedKey.length == 1 && (e.shiftKey && e.ctrlKey)) {\\n // allows ctrl + shift + v for pasting\\n if (e.key != 'V') {\\n e.preventDefault();\\n\\t\\t\\t\\treturn;\\n }\\n } else {\\n //xtermjs is kind enough to evaluate our special characters instead of having to translate every char ourself\\n command = term._evaluateKeyEscapeSequence(e).key;\\n }\\n\\n\\t\\t// Decide if we're going to locally' echo this key or not\\n if (transport.settings.localEcho) {\\n transport.settings.parseKey(e);\\n }\\n /* Regardless of local echo we still want a reply to confirm / update terminal\\n\\t\\t could be controversial? but putty does this too (each key press shows up twice)\\n\\t\\t Instead we're checking the our locally echoed key and replacing it if the\\n\\t\\t recieved key !== locally echoed key */\\n return command === null ? null : transport.expect_key(command);\\n };\\n\\n term.textarea.onpaste = function(ev) {\\n\\t\\tvar text \\n\\n\\t\\t// Yay IE11 stuff!\\n\\t\\tif ( window.clipboardData && window.clipboardData.getData ) {\\n\\t\\t\\ttext = window.clipboardData.getData('Text')\\n\\t\\t} else if ( ev.clipboardData && ev.clipboardData.getData ) {\\n\\t\\t\\ttext = ev.clipboardData.getData('text/plain');\\n\\t\\t}\\n\\t\\t\\t\\t\\n if (text) {\\n\\t\\t\\t// Just don't allow more than 1 million characters to be pasted.\\n\\t\\t\\tif(text.length < 1000000){\\n\\t\\t if (text.length > 5000) {\\n\\t\\t\\t\\t\\t// If its a long string then chunk it down to reduce load on SSHyClient.parceler\\n\\t\\t text = splitSlice(text);\\n\\t\\t for (var i = 0; i < text.length; i++) {\\n\\t\\t transport.expect_key(text[i]);\\n\\t\\t }\\n\\t\\t return;\\n\\t\\t }\\n\\t\\t transport.expect_key(text);\\n\\t\\t } else {\\n\\t\\t\\t\\talert('Error: Pasting large strings is not permitted.');\\n\\t\\t\\t}\\n\\t\\t}\\n };\\n}\",\n \"function extendCore() {\\n\\t// adds some properties i use to core based on the current operating system, it needs a switch, thats why i couldnt put it into the core obj at top\\n\\tswitch (core.os.name) {\\n\\t\\tcase 'winnt':\\n\\t\\tcase 'winmo':\\n\\t\\tcase 'wince':\\n\\t\\t\\tcore.os.version = parseFloat(Services.sysinfo.getProperty('version'));\\n\\t\\t\\t// http://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions\\n\\t\\t\\tif (core.os.version == 6.0) {\\n\\t\\t\\t\\tcore.os.version_name = 'vista';\\n\\t\\t\\t}\\n\\t\\t\\tif (core.os.version >= 6.1) {\\n\\t\\t\\t\\tcore.os.version_name = '7+';\\n\\t\\t\\t}\\n\\t\\t\\tif (core.os.version == 5.1 || core.os.version == 5.2) { // 5.2 is 64bit xp\\n\\t\\t\\t\\tcore.os.version_name = 'xp';\\n\\t\\t\\t}\\n\\t\\t\\tbreak;\\n\\t\\t\\t\\n\\t\\tcase 'darwin':\\n\\t\\t\\tvar userAgent = myServices.hph.userAgent;\\n\\n\\t\\t\\tvar version_osx = userAgent.match(/Mac OS X 10\\\\.([\\\\d\\\\.]+)/);\\n\\n\\t\\t\\t\\n\\t\\t\\tif (!version_osx) {\\n\\t\\t\\t\\tthrow new Error('Could not identify Mac OS X version.');\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tvar version_osx_str = version_osx[1];\\n\\t\\t\\t\\tvar ints_split = version_osx[1].split('.');\\n\\t\\t\\t\\tif (ints_split.length == 1) {\\n\\t\\t\\t\\t\\tcore.os.version = parseInt(ints_split[0]);\\n\\t\\t\\t\\t} else if (ints_split.length >= 2) {\\n\\t\\t\\t\\t\\tcore.os.version = ints_split[0] + '.' + ints_split[1];\\n\\t\\t\\t\\t\\tif (ints_split.length > 2) {\\n\\t\\t\\t\\t\\t\\tcore.os.version += ints_split.slice(2).join('');\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tcore.os.version = parseFloat(core.os.version);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t// this makes it so that 10.10.0 becomes 10.100\\n\\t\\t\\t\\t// 10.10.1 => 10.101\\n\\t\\t\\t\\t// so can compare numerically, as 10.100 is less then 10.101\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t//core.os.version = 6.9; // note: debug: temporarily forcing mac to be 10.6 so we can test kqueue\\n\\t\\t\\t}\\n\\t\\t\\tbreak;\\n\\t\\tdefault:\\n\\t\\t\\t// nothing special\\n\\t}\\n\\t\\n\\n}\",\n \"function Window() {}\",\n \"function Shell()\\n{\\n // Properties\\n this.promptStr = \\\">\\\";\\n this.commandList = [];\\n this.curses = \\\"[fuvg],[cvff],[shpx],[phag],[pbpxfhpxre],[zbgureshpxre],[gvgf]\\\";\\n this.apologies = \\\"[sorry]\\\";\\n \\n \\n // Methods\\n this.init = shellInit;\\n this.putPrompt = shellPutPrompt;\\n this.handleInput = shellHandleInput;\\n this.execute = shellExecute;\\n this.drop = shellDropLine;\\n}\",\n \"function Control()\\n{\\n\\tfunction Move(move) \\n { \\t\\n switch (move) \\n {\\n case mJump: \\n\\t\\t\\t\\tvar timeout = 90;\\t\\t\\t\\n PressKey(38, timeout)\\n console.log('Jump!');\\n break;\\n\\n case mDuck: \\t\\n timeout = 400;\\n PressKey(40, timeout)\\n console.log('Duck!');\\n break;\\n case mRun:\\n \\tbreak;\\n\\n default:\\n console.log('Invalid move ' + move);\\n }\\n }\\n\\t\\n\\tfunction PressKey(key, timeout) \\n {\\n\\t\\tkeyPress('keydown', key);\\n\\t\\tsetTimeout(function() {keyPress('keyup', key);}, timeout);\\n }\\n\\t\\n\\tfunction keyPress(type, keycode) \\n {\\n var eventObj = document.createEventObject ?\\n document.createEventObject() : document.createEvent(\\\"Events\\\");\\n\\n if(eventObj.initEvent)\\n {\\n eventObj.initEvent(type, true, true);\\n }\\n\\n eventObj.keyCode = keycode;\\n eventObj.which = keycode;\\n\\n document.dispatchEvent ? document.dispatchEvent(eventObj) : el.fireEvent(\\\"onkeydown\\\", eventObj);\\n }\\n\\t\\n\\t// exports\\n return { Move: Move, PressKey : PressKey };\\n}\",\n \"function shellGetS()\\n{\\n krnGetScheduler();\\n}\",\n \"_showThreadPane() {}\",\n \"function support_system_file_popen (cmd, m) {\\n const mode = support_system_file_parseMode(m)\\n if (mode != 'r') {\\n process.__lasterr = 'The NodeJS popen FFI only supports opening for reading currently.'\\n return null\\n }\\n\\n const tmp_file = require('os').tmpdir() + \\\"/\\\" + require('crypto').randomBytes(15).toString('hex')\\n const write_fd = support_system_file_fs.openSync(\\n tmp_file,\\n 'w'\\n )\\n\\n var io_setting\\n switch (mode) {\\n case \\\"r\\\":\\n io_setting = ['ignore', write_fd, 2]\\n break\\n case \\\"w\\\", \\\"a\\\":\\n io_setting = [write_fd, 'ignore', 2]\\n break\\n default:\\n process.__lasterr = 'The popen function cannot be used for reading and writing simultaneously.'\\n return null\\n }\\n\\n const { status, error } = support_system_file_child_process.spawnSync(\\n cmd,\\n [],\\n { stdio: io_setting, shell: true }\\n )\\n\\n support_system_file_fs.closeSync(write_fd)\\n\\n if (error) {\\n process.__lasterr = error\\n return null\\n }\\n\\n const read_ptr = support_system_file_openFile(\\n tmp_file,\\n 'r'\\n )\\n\\n return { ...read_ptr, exit_code: status }\\n}\",\n \"function UHelpNATIVE(topic,mode,logicalname)\\n{\\n w = window.open(\\\"help?topic=\\\"+topic+\\\"&mode=\\\"+mode+\\\"&logicalname=\\\"+logicalname, \\\"UnifaceHelpNative\\\",\\n \\\"scrollbars=yes,resizable=yes,width=400,height=200\\\");\\n if (uTestBrowserNS()) {\\n w.focus();\\n }\\n}\",\n \"open(parent) {\\n if (!parent) {\\n throw new Error('Terminal requires a parent element.');\\n }\\n if (!parent.isConnected) {\\n this._logService.debug('Terminal.open was called on an element that was not attached to the DOM');\\n }\\n this._document = parent.ownerDocument;\\n // Create main element container\\n this.element = this._document.createElement('div');\\n this.element.dir = 'ltr'; // xterm.css assumes LTR\\n this.element.classList.add('terminal');\\n this.element.classList.add('xterm');\\n this.element.setAttribute('tabindex', '0');\\n this.element.setAttribute('role', 'document');\\n parent.appendChild(this.element);\\n // Performance: Use a document fragment to build the terminal\\n // viewport and helper elements detached from the DOM\\n const fragment = document$1.createDocumentFragment();\\n this._viewportElement = document$1.createElement('div');\\n this._viewportElement.classList.add('xterm-viewport');\\n fragment.appendChild(this._viewportElement);\\n this._viewportScrollArea = document$1.createElement('div');\\n this._viewportScrollArea.classList.add('xterm-scroll-area');\\n this._viewportElement.appendChild(this._viewportScrollArea);\\n this.screenElement = document$1.createElement('div');\\n this.screenElement.classList.add('xterm-screen');\\n // Create the container that will hold helpers like the textarea for\\n // capturing DOM Events. Then produce the helpers.\\n this._helperContainer = document$1.createElement('div');\\n this._helperContainer.classList.add('xterm-helpers');\\n this.screenElement.appendChild(this._helperContainer);\\n fragment.appendChild(this.screenElement);\\n this.textarea = document$1.createElement('textarea');\\n this.textarea.classList.add('xterm-helper-textarea');\\n this.textarea.setAttribute('aria-label', promptLabel$1);\\n this.textarea.setAttribute('aria-multiline', 'false');\\n this.textarea.setAttribute('autocorrect', 'off');\\n this.textarea.setAttribute('autocapitalize', 'off');\\n this.textarea.setAttribute('spellcheck', 'false');\\n this.textarea.tabIndex = 0;\\n this.register(addDisposableDomListener(this.textarea, 'focus', (ev) => this._onTextAreaFocus(ev)));\\n this.register(addDisposableDomListener(this.textarea, 'blur', () => this._onTextAreaBlur()));\\n this._helperContainer.appendChild(this.textarea);\\n const coreBrowserService = this._instantiationService.createInstance(CoreBrowserService, this.textarea);\\n this._instantiationService.setService(ICoreBrowserService, coreBrowserService);\\n this._charSizeService = this._instantiationService.createInstance(CharSizeService, this._document, this._helperContainer);\\n this._instantiationService.setService(ICharSizeService$1, this._charSizeService);\\n this._compositionView = document$1.createElement('div');\\n this._compositionView.classList.add('composition-view');\\n this._compositionHelper = this._instantiationService.createInstance(CompositionHelper, this.textarea, this._compositionView);\\n this._helperContainer.appendChild(this._compositionView);\\n // Performance: Add viewport and helper elements from the fragment\\n this.element.appendChild(fragment);\\n this._theme = this.options.theme || this._theme;\\n this._colorManager = new ColorManager(document$1, this.options.allowTransparency);\\n this.register(this.optionsService.onOptionChange(e => this._colorManager.onOptionsChange(e)));\\n this._colorManager.setTheme(this._theme);\\n const renderer = this._createRenderer();\\n this._renderService = this.register(this._instantiationService.createInstance(RenderService, renderer, this.rows, this.screenElement));\\n this._instantiationService.setService(IRenderService$1, this._renderService);\\n this.register(this._renderService.onRenderedBufferChange(e => this._onRender.fire(e)));\\n this.onResize(e => this._renderService.resize(e.cols, e.rows));\\n this._soundService = this._instantiationService.createInstance(SoundService);\\n this._instantiationService.setService(ISoundService, this._soundService);\\n this._mouseService = this._instantiationService.createInstance(MouseService);\\n this._instantiationService.setService(IMouseService, this._mouseService);\\n this.viewport = this._instantiationService.createInstance(Viewport, (amount, suppressEvent) => this.scrollLines(amount, suppressEvent), this._viewportElement, this._viewportScrollArea);\\n this.viewport.onThemeChange(this._colorManager.colors);\\n this.register(this._inputHandler.onRequestSyncScrollBar(() => this.viewport.syncScrollArea()));\\n this.register(this.viewport);\\n this.register(this.onCursorMove(() => {\\n this._renderService.onCursorMove();\\n this._syncTextArea();\\n }));\\n this.register(this.onResize(() => this._renderService.onResize(this.cols, this.rows)));\\n this.register(this.onBlur(() => this._renderService.onBlur()));\\n this.register(this.onFocus(() => this._renderService.onFocus()));\\n this.register(this._renderService.onDimensionsChange(() => this.viewport.syncScrollArea()));\\n this._selectionService = this.register(this._instantiationService.createInstance(SelectionService, this.element, this.screenElement));\\n this._instantiationService.setService(ISelectionService, this._selectionService);\\n this.register(this._selectionService.onRequestScrollLines(e => this.scrollLines(e.amount, e.suppressScrollEvent)));\\n this.register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire()));\\n this.register(this._selectionService.onRequestRedraw(e => this._renderService.onSelectionChanged(e.start, e.end, e.columnSelectMode)));\\n this.register(this._selectionService.onLinuxMouseSelection(text => {\\n // If there's a new selection, put it into the textarea, focus and select it\\n // in order to register it as a selection on the OS. This event is fired\\n // only on Linux to enable middle click to paste selection.\\n this.textarea.value = text;\\n this.textarea.focus();\\n this.textarea.select();\\n }));\\n this.register(this.onScroll(() => {\\n this.viewport.syncScrollArea();\\n this._selectionService.refresh();\\n }));\\n this.register(addDisposableDomListener(this._viewportElement, 'scroll', () => this._selectionService.refresh()));\\n this._mouseZoneManager = this._instantiationService.createInstance(MouseZoneManager, this.element, this.screenElement);\\n this.register(this._mouseZoneManager);\\n this.register(this.onScroll(() => this._mouseZoneManager.clearAll()));\\n this.linkifier.attachToDom(this.element, this._mouseZoneManager);\\n this.linkifier2.attachToDom(this.element, this._mouseService, this._renderService);\\n // This event listener must be registered aftre MouseZoneManager is created\\n this.register(addDisposableDomListener(this.element, 'mousedown', (e) => this._selectionService.onMouseDown(e)));\\n // apply mouse event classes set by escape codes before terminal was attached\\n if (this._coreMouseService.areMouseEventsActive) {\\n this._selectionService.disable();\\n this.element.classList.add('enable-mouse-events');\\n }\\n else {\\n this._selectionService.enable();\\n }\\n if (this.options.screenReaderMode) {\\n // Note that this must be done *after* the renderer is created in order to\\n // ensure the correct order of the dprchange event\\n this._accessibilityManager = new AccessibilityManager(this, this._renderService);\\n }\\n // Measure the character size\\n this._charSizeService.measure();\\n // Setup loop that draws to screen\\n this.refresh(0, this.rows - 1);\\n // Initialize global actions that need to be taken on the document.\\n this._initGlobal();\\n // Listen for mouse events and translate\\n // them into terminal mouse protocols.\\n this.bindMouse();\\n }\",\n \"function h$process_runInteractiveProcess( cmd, args, workingDir, env\\n , stdin_fd, stdout_fd, stderr_fd\\n , closeHandles, createGroup, delegateCtlC) {\\n ;\\n ;\\n ;\\n ;\\n // fixme we need an IOError not a JSException\\n throw \\\"$process_runInteractiveProcess: unsupported\\\";\\n}\",\n \"function m(b,a,c){a=void 0===a?{}:a;c=void 0===c?!1:c;\\\"function\\\"===typeof a?(q(\\\"Legacy constructor was used. See README for latest usage.\\\",r),a={listener:a,l:c,m:!0,h:{}}):a={listener:a.listener||function(){},l:a.listenToPast||!1,m:void 0===a.processNow?!0:a.processNow,h:a.commandProcessors||{}};this.a=b;this.s=a.listener;this.o=a.l;this.g=this.j=!1;this.c={};this.f=[];this.b=a.h;this.i=t(this);a.m&&this.process()}\",\n \"function newIc9sh() {\\n $shell = new Ic9sh();\\n return $shell;\\n}\",\n \"function Shell() {\\n // Properties\\n this.promptStr = \\\">\\\";\\n this.commandList = [];\\n this.curses = \\\"[fuvg],[cvff],[shpx],[phag],[pbpxfhpxre],[zbgureshpxre],[gvgf]\\\";\\n this.apologies = \\\"[sorry]\\\";\\n // Methods\\n this.init = shellInit;\\n this.putPrompt = shellPutPrompt;\\n this.handleInput = shellHandleInput;\\n this.execute = shellExecute;\\n}\",\n \"function timerWrapper () {}\",\n \"run() {\\n this.io = readline.createInterface(process.stdin, process.stdout);\\n this.io.on('line', this.handleLine.bind(this));\\n this.io.on('close', this.handleIOClose.bind(this));\\n }\",\n \"function shellActive ()\\n{\\n _StdIn.putText(krnActivePIDS()); \\n}\",\n \"readCLI() {\\n\\n }\",\n \"function getSyscall() {\\n return syscall;\\n }\",\n \"function shellFormat()\\n{\\n if(krnCheckExecution())\\n _StdIn.putText(\\\"Please wait for the currently executing process to finish before formatting\\\");\\n else\\n krnDiskFormat();\\n}\",\n \"function h$main(a) {\\n var t = new h$Thread();\\n //TRACE_SCHEDULER(\\\"sched: starting main thread\\\");\\n t.stack[0] = h$doneMain_e;\\n if(!h$isBrowser && !h$isGHCJSi) {\\n t.stack[2] = h$baseZCGHCziTopHandlerzitopHandler;\\n }\\n t.stack[4] = h$ap_1_0;\\n t.stack[5] = h$flushStdout;\\n t.stack[6] = h$return;\\n t.stack[7] = h$ap_1_0;\\n t.stack[8] = a;\\n t.stack[9] = h$return;\\n t.sp = 9;\\n t.label = [h$encodeUtf8(\\\"main\\\"), 0];\\n h$wakeupThread(t);\\n h$startMainLoop();\\n return t;\\n}\",\n \"function h$main(a) {\\n var t = new h$Thread();\\n //TRACE_SCHEDULER(\\\"sched: starting main thread\\\");\\n t.stack[0] = h$doneMain_e;\\n if(!h$isBrowser && !h$isGHCJSi) {\\n t.stack[2] = h$baseZCGHCziTopHandlerzitopHandler;\\n }\\n t.stack[4] = h$ap_1_0;\\n t.stack[5] = h$flushStdout;\\n t.stack[6] = h$return;\\n t.stack[7] = h$ap_1_0;\\n t.stack[8] = a;\\n t.stack[9] = h$return;\\n t.sp = 9;\\n t.label = [h$encodeUtf8(\\\"main\\\"), 0];\\n h$wakeupThread(t);\\n h$startMainLoop();\\n return t;\\n}\",\n \"function h$main(a) {\\n var t = new h$Thread();\\n //TRACE_SCHEDULER(\\\"sched: starting main thread\\\");\\n t.stack[0] = h$doneMain_e;\\n if(!h$isBrowser && !h$isGHCJSi) {\\n t.stack[2] = h$baseZCGHCziTopHandlerzitopHandler;\\n }\\n t.stack[4] = h$ap_1_0;\\n t.stack[5] = h$flushStdout;\\n t.stack[6] = h$return;\\n t.stack[7] = h$ap_1_0;\\n t.stack[8] = a;\\n t.stack[9] = h$return;\\n t.sp = 9;\\n t.label = [h$encodeUtf8(\\\"main\\\"), 0];\\n h$wakeupThread(t);\\n h$startMainLoop();\\n return t;\\n}\",\n \"function StdIn() {\\r\\n}\",\n \"function OpenNewXDisplay() {\\n\\t//returns ostypes.DISPLAY\\n\\t//consider: http://mxr.mozilla.org/chromium/source/src/ui/gfx/x/x11_types.cc#26\\n\\t // std::string display_str = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kX11Display);\\n\\t // return XOpenDisplay(display_str.empty() ? NULL : display_str.c_str());\\n\\t // i asked about it here: https://ask.mozilla.org/question/1321/proper-way-to-xopendisplay/\\n\\t\\n\\treturn _dec('XOpenDisplay')(null);\\n\\t\\n\\t/* http://mxr.mozilla.org/chromium/source/src/ui/gfx/x/x11_types.cc#22\\n\\t22 XDisplay* OpenNewXDisplay() {\\n\\t23 #if defined(OS_CHROMEOS)\\n\\t24 return XOpenDisplay(NULL);\\n\\t25 #else\\n\\t26 std::string display_str = base::CommandLine::ForCurrentProcess()->\\n\\t27 GetSwitchValueASCII(switches::kX11Display);\\n\\t28 return XOpenDisplay(display_str.empty() ? NULL : display_str.c_str());\\n\\t29 #endif\\n\\t30 }\\n\\t*/\\n}\",\n \"static init(evt){\\n // ghci must be working \\n this.ghciSafeRun(evt, () => {\\n // get buffer text\\n GHCI_PROCESS.init(str => {\\n // send the text (\\\"ghci version...\\\")\\n IpcResponder.respond(evt, \\\"ghci\\\", {str});\\n });\\n });\\n }\",\n \"function wrap(cmd, fn, options) {\\n return function() {\\n var retValue = null;\\n \\n state.currentCmd = cmd;\\n state.error = null;\\n \\n try {\\n var args = [].slice.call(arguments, 0);\\n \\n if (options && options.notUnix) {\\n retValue = fn.apply(this, args);\\n } else {\\n if (args.length === 0 || typeof args[0] !== 'string' || args[0][0] !== '-')\\n args.unshift(''); // only add dummy option if '-option' not already present\\n retValue = fn.apply(this, args);\\n }\\n } catch (e) {\\n if (!state.error) {\\n // If state.error hasn't been set it's an error thrown by Node, not us - probably a bug...\\n console.log('shell.js: internal error');\\n console.log(e.stack || e);\\n process.exit(1);\\n }\\n if (config.fatal)\\n throw e;\\n }\\n \\n state.currentCmd = 'shell.js';\\n return retValue;\\n };\\n } // wrap\",\n \"function inotify_init() {\\n return libsys.syscall(platform_1.SYS.inotify_init);\\n}\",\n \"function win(options) {\\n // close\\n this.close=function() {\\n if(this.onclose)\\n this.onclose();\\n\\n this.win.parentNode.removeChild(this.win);\\n delete windows[this.id];\\n }\\n\\n // set_title\\n this.set_title=function(title) {\\n var current=this.title.firstChild;\\n current.textContent=title;\\n }\\n\\n // mousedown\\n this.mousedown=function(event) {\\n add_css_class(this.title_bar, \\\"win_title_bar_moving\\\");\\n win_currentdrag=this;\\n\\n // Raise window to top\\n if(this.win.style.zIndex!=win_maxzindex)\\n this.win.style.zIndex=++win_maxzindex;\\n }\\n\\n // mouseup\\n this.mouseup=function(event) {\\n del_css_class(this.title_bar, \\\"win_title_bar_moving\\\");\\n win_currentdrag=null;\\n }\\n\\n // move\\n this.move=function(m) {\\n this.win.style.top=(this.win.offsetTop+m.y)+\\\"px\\\";\\n this.win.style.left=(this.win.offsetLeft+m.x)+\\\"px\\\";\\n }\\n\\n // check options\\n if(!options) {\\n options={};\\n }\\n else if(typeof options==\\\"string\\\") {\\n options={ \\\"class\\\": options };\\n }\\n\\n // create window and set class(es)\\n this.win=document.createElement(\\\"div\\\");\\n this.win.className=\\\"win\\\"\\n\\n // Add window to div win_root (create if it doesn't exist)\\n if(!win_root) {\\n win_root=dom_create_append(document.body, \\\"div\\\");\\n win_root.className=\\\"win_root\\\";\\n\\n win_mousemove_old=document.body.onmousemove;\\n document.body.onmousemove=win_mousemove;\\n }\\n win_root.appendChild(this.win);\\n\\n // Create title-bar\\n this.title_bar=dom_create_append(this.win, \\\"table\\\");\\n this.title_bar.className=\\\"win_title_bar\\\";\\n var tr=dom_create_append(this.title_bar, \\\"tr\\\");\\n\\n this.title=dom_create_append(tr, \\\"td\\\");\\n this.title.className=\\\"title\\\";\\n dom_create_append_text(this.title, options.title?options.title:\\\"Window\\\");\\n this.title.onmousedown=this.mousedown.bind(this);\\n this.title.onselectstart=function() {};\\n\\n // Close Button\\n var td=dom_create_append(tr, \\\"td\\\");\\n var close_button=dom_create_append(td, \\\"img\\\");\\n close_button.src=\\\"plugins/win/close.png\\\";\\n close_button.alt=\\\"close\\\";\\n close_button.className=\\\"win_close_button\\\";\\n close_button.onclick=this.close.bind(this);\\n\\n // Create div for content\\n this.content=document.createElement(\\\"div\\\");\\n this.content.className=\\\"content\\\";\\n add_css_class(this.content, options.class);\\n this.win.appendChild(this.content);\\n // Raise new window to top\\n this.win.style.zIndex=++win_maxzindex;\\n\\n this.id=uniqid();\\n windows[this.id]=this;\\n}\",\n \"function Console() {}\",\n \"function Console() {}\",\n \"_installIPC() {\\n electron_1.ipcMain.on(common_1.IPC_PING, (event) => {\\n event.sender.send(common_1.IPC_PING);\\n });\\n electron_1.ipcMain.on(common_1.IPC_EVENT, (ipc, event) => {\\n event.extra = Object.assign(Object.assign({}, this._getRendererExtra(ipc.sender)), event.extra);\\n core_1.captureEvent(event);\\n });\\n electron_1.ipcMain.on(common_1.IPC_SCOPE, (_, rendererScope) => {\\n // tslint:disable:no-unsafe-any\\n const sentScope = core_1.Scope.clone(rendererScope);\\n core_1.configureScope(scope => {\\n if (sentScope._user) {\\n scope.setUser(sentScope._user);\\n }\\n scope.setTags(sentScope._tags);\\n scope.setExtras(sentScope._extra);\\n // Since we do not have updates for individual breadcrumbs anymore and only for the whole scope\\n // we just add the last added breadcrumb on scope updates\\n scope.addBreadcrumb(sentScope._breadcrumbs.pop());\\n });\\n // tslint:enable:no-unsafe-any\\n });\\n }\",\n \"function typeSpecial(paramDoc, paramKEYCODE, paramIsAlt, paramIsCtl, paramIsShift) {\\r\\n\\t// Local variable to extract information about cursor after certain operations\\r\\n\\tvar newCursorCoords;\\r\\n\\t\\r\\n\\tswitch ( paramKEYCODE ) {\\r\\n\\t\\r\\n\\t\\tcase LEFTARROWKEY: \\r\\n\\t\\t\\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\\r\\n\\t\\t\\tif ( paramIsShift )\\tif ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// If we are at the first char of the first line do nothing\\r\\n\\t\\t\\t// If we are at the first char of any other line, wrap to the last char of the previous line\\r\\n\\t\\t\\t// Otherwise, simply move left\\r\\n\\t\\t\\tif ( cursorColumn == 0 && cursorLine == 0 ) break;\\r\\n\\t\\t\\tif ( cursorColumn == 0 ) {\\r\\n\\t\\t\\t\\tif ( paramDoc.getLineLockingUser( cursorLine-1 ) != null ) { \\r\\n\\t\\t\\t\\t\\talert(\\\"Another user is currently on line \\\"+(cursorLine-1)+\\\", and it is locked.\\\");\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tcursorLine--;\\r\\n\\t\\t\\t\\tcursorColumn = paramDoc.getLineLength(cursorLine);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse cursorColumn--;\\t\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase RIGHTARROWKEY:\\r\\n\\t\\t\\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\\r\\n\\t\\t\\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// If we are at the last char of the last line, do nothing\\r\\n\\t\\t\\t// If we are at the last char of any other line, wrap to the first char of the next line\\r\\n\\t\\t\\t// Otherwise, simply move right\\r\\n\\t\\t\\tif ( cursorColumn == paramDoc.getLineLength(cursorLine) && cursorLine == paramDoc.getDocumentLength()-1 ) break;\\r\\n\\t\\t\\tif ( cursorColumn == paramDoc.getLineLength(cursorLine) ) {\\r\\n\\t\\t\\t\\tif ( paramDoc.getLineLockingUser( cursorLine+1 ) != null ) { \\r\\n\\t\\t\\t\\t\\talert(\\\"Another user is currently on line \\\"+(cursorLine+1)+\\\", and it is locked.\\\");\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tcursorLine++;\\r\\n\\t\\t\\t\\tcursorColumn = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse cursorColumn++;\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase UPARROWKEY:\\r\\n\\t\\t\\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\\r\\n\\t\\t\\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// If we are on the first line, move to first char of line.\\r\\n\\t\\t\\t// If we are not on the first line, see if the line is locked and alert the user if it is\\r\\n\\t\\t\\t// Otherwise, move up. If we end up out of range of the line, move to the last char of the line\\r\\n\\t\\t\\tif ( cursorLine == 0 ) cursorColumn = 0;\\r\\n\\t\\t\\telse if ( paramDoc.getLineLockingUser( cursorLine-1 ) != null ) alert(\\\"Another user is currently on line \\\"+(cursorLine-1)+\\\", and it is locked.\\\");\\r\\n\\t\\t\\telse if ( cursorColumn > paramDoc.getLineLength(--cursorLine) ) cursorColumn = paramDoc.getLineLength(cursorLine);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase DOWNARROWKEY:\\r\\n\\t\\t\\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\\r\\n\\t\\t\\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// If we are on the last line, move to last char of line.\\r\\n\\t\\t\\t// If we are not on the last line, see if the line is locked and alert the user if it is\\r\\n\\t\\t\\t// Otherwise, move down. If we end up out of range of the line, move to the last char of the line\\r\\n\\t\\t\\tif ( cursorLine == paramDoc.getDocumentLength()-1 ) cursorColumn = paramDoc.getLineLength(cursorLine);\\r\\n\\t\\t\\telse if ( paramDoc.getLineLockingUser( cursorLine+1 ) != null ) alert(\\\"Another user is currently on line \\\"+(cursorLine+1)+\\\", and it is locked.\\\");\\r\\n\\t\\t\\telse if ( cursorColumn > paramDoc.getLineLength(++cursorLine) ) cursorColumn = paramDoc.getLineLength(cursorLine);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase ENDKEY:\\r\\n\\t\\t\\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\\r\\n\\t\\t\\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t/* If we are holding CTL, then we want to go to the very last char of the document. Otherwise, of just the current line */\\r\\n\\t\\t\\tif ( paramIsCtl ) setCursor( paramDoc.getDocumentLength()-1, paramDoc.getLineLength( paramDoc.getDocumentLength()-1 ) );\\r\\n\\t\\t\\telse cursorColumn = paramDoc.getLineLength(cursorLine);\\r\\n\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase HOMEKEY:\\r\\n\\t\\t\\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\\r\\n\\t\\t\\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t/* If we are holding CTL, then we want to go to the very first char of the document. Otherwise, of just the current line */\\r\\n\\t\\t\\tif ( paramIsCtl ) setCursor( 0, 0 );\\r\\n\\t\\t\\telse cursorColumn = 0;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase PAGEUPKEY:\\r\\n\\t\\t\\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\\r\\n\\t\\t\\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t/* If we are holding CTL, Notepadd++ and a variety of other programs perform no function in this case. Do the same */\\r\\n\\t\\t\\tif ( paramIsCtl ) break;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// Move the cursor up a number of time relative to the current editing window's height\\t\\t\\t\\r\\n\\t\\t\\tif(isIE == true){\\r\\n\\t\\t\\t\\tcursorLine -= Math.floor(guiDoc.body.clientHeight / FONT_HEIGHT);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse{\\r\\n\\t\\t\\t\\tcursorLine -= Math.floor(myIFrame.contentWindow.innerHeight / FONT_HEIGHT);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t// Do out-of-bounds checks\\r\\n\\t\\t\\tif ( cursorLine < 0 ) {\\r\\n\\t\\t\\t\\tcursorLine = 0;\\r\\n\\t\\t\\t\\tcursorColumn = 0;\\r\\n\\t\\t\\t} else if ( cursorColumn >= paramDoc.getLineLength( cursorLine ) ) cursorColumn = paramDoc.getLineLength(cursorLine);\\r\\n\\t\\t\\t// If the line is locked, move down one\\r\\n\\t\\t\\twhile ( paramDoc.getLineLockingUser( cursorLine ) != null ) { cursorLine++; }\\r\\n\\t\\t\\tif(isIE == true){\\r\\n\\t\\t\\t\\tmyIFrame.scrollBy(0,-guiDoc.body.clientHeight+PADDING_TOP);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse{\\r\\n\\t\\t\\t\\tmyIFrame.contentWindow.scrollBy(0,-myIFrame.contentWindow.innerHeight+PADDING_TOP);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\tcase PAGEDOWNKEY:\\r\\n\\t\\t\\t/* If we are holding shift, moving the cursor actually selects text, so we need to ensure we are in select mode */\\r\\n\\t\\t\\tif ( paramIsShift ) if ( !isSelectMode ) setSelectMode( paramDoc, cursorLine, cursorColumn );\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t/* If we are holding CTL, Notepadd++ and a variety of other programs perform no function in this case. Do the same */\\r\\n\\t\\t\\tif ( paramIsCtl ) break;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// Move the cursor down a number of times relative to the current editing window's height\\r\\n\\t\\t\\tif(isIE == true){\\r\\n\\t\\t\\t\\tcursorLine += Math.floor(guiDoc.body.clientHeight / FONT_HEIGHT);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse{\\r\\n\\t\\t\\t\\tcursorLine += Math.floor(myIFrame.contentWindow.innerHeight / FONT_HEIGHT);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t// Do out-of-bounds checks\\r\\n\\t\\t\\tif ( cursorLine > paramDoc.getDocumentLength()-1 ) {\\r\\n\\t\\t\\t\\tcursorLine = paramDoc.getDocumentLength()-1;\\r\\n\\t\\t\\t\\tcursorColumn = paramDoc.getLineLength( cursorLine )-1;\\r\\n\\t\\t\\t\\tif( cursorColumn < 0 ) cursorColumn = 0;\\r\\n\\t\\t\\t} else if ( cursorColumn >= paramDoc.getLineLength( cursorLine ) ) cursorColumn = paramDoc.getLineLength(cursorLine);\\r\\n\\t\\t\\t// If the line is locked, move up one\\r\\n\\t\\t\\twhile ( paramDoc.getLineLockingUser( cursorLine ) != null ) { cursorLine--; }\\r\\n\\t\\t\\tif(isIE == true){\\r\\n\\t\\t\\t\\tmyIFrame.scrollBy(0,guiDoc.body.clientHeight-PADDING_TOP);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse{\\r\\n\\t\\t\\t\\tmyIFrame.contentWindow.scrollBy(0,myIFrame.contentWindow.innerHeight-PADDING_TOP);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase BACKSPACEKEY:\\r\\n\\t\\t\\t// If there is currently a selection, we want to simply delete it and we're done\\r\\n\\t\\t\\tif ( paramDoc.isSelection ) {\\r\\n\\t\\t\\t\\tvar tmpSel = paramDoc.getCurrentSelection();\\r\\n\\t\\t\\t\\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\\r\\n\\t\\t\\t\\tcursorLine = newCursorCoords[0];\\r\\n\\t\\t\\t\\tcursorColumn = newCursorCoords[1];\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// If we are on the first char of the first line, do nothing.\\r\\n\\t\\t\\t// If we are on the first char of any other line, backspace removes the \\\"newline character\\\"\\r\\n\\t\\t\\t// -- which doesn't exist in our implementation. We simulate this removal by merging lines.\\r\\n\\t\\t\\t// Otherwise, we simply remove the previous char in the current line\\r\\n\\t\\t\\tif ( cursorLine == 0 && cursorColumn == 0 ) break;\\r\\n\\t\\t\\tif ( cursorColumn == 0 && paramDoc.getLineLockingUser( cursorLine-1 ) != null ) {\\r\\n\\t\\t\\t\\talert(\\\"Another user is currently on line \\\"+(cursorLine-1)+\\\", and it is locked.\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if ( cursorColumn == 0 ) {\\r\\n\\t\\t\\t\\t// Merge the two lines, and remove the original line\\r\\n\\t\\t\\t\\tcursorColumn = paramDoc.getLineLength( cursorLine-1 );\\t// Place cursor at end of prior line\\r\\n\\t\\t\\t\\t// Perform text merge into prior line\\r\\n\\t\\t\\t\\tparamDoc.setLineText( cursorLine-1, paramDoc.getLineText( cursorLine-1 ) + paramDoc.getLineText( cursorLine ) );\\r\\n\\t\\t\\t\\t// Remove the line from our data structure\\r\\n\\t\\t\\t\\tparamDoc.removeLine( cursorLine );\\r\\n\\t\\t\\t\\t// Decrement cursorLine\\r\\n\\t\\t\\t\\tcursorLine--;\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t\\t// \\\"Remove\\\" the character prior to cursorColumn, and decrement cursorColumn\\r\\n\\t\\t\\t\\tvar tempText = paramDoc.getLineText( cursorLine );\\r\\n\\t\\t\\t\\tparamDoc.setLineText( cursorLine, tempText.substring(0,cursorColumn-1) + tempText.substring(cursorColumn--) );\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase DELETEKEY:\\r\\n\\t\\t\\t// If there is currently a selection, we want to simply delete it and we're done\\r\\n\\t\\t\\tif ( paramDoc.isSelection ) {\\r\\n\\t\\t\\t\\tvar tmpSel = paramDoc.getCurrentSelection();\\r\\n\\t\\t\\t\\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\\r\\n\\t\\t\\t\\tcursorLine = newCursorCoords[0];\\r\\n\\t\\t\\t\\tcursorColumn = newCursorCoords[1];\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// If we are at the last char of the last line, do nothing\\r\\n\\t\\t\\t// If we are at the last char of any other line, we remove the 'newline character', thus merging the current line with the next line\\r\\n\\t\\t\\t// Otherwise, we simply remove the char at the cursor position\\r\\n\\t\\t\\tif ( cursorColumn == paramDoc.getLineLength( paramDoc.getDocumentLength()-1 )-1 && cursorLine == paramDoc.getDocumentLength()-1 ) break;\\r\\n\\t\\t\\tif ( cursorColumn == paramDoc.getLineLength( cursorLine ) && paramDoc.getLineLockingUser( cursorLine+1 ) != null ) {\\r\\n\\t\\t\\t\\talert(\\\"Another user is currently on line \\\"+(cursorLine+1)+\\\", and it is locked.\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if ( cursorColumn == paramDoc.getLineLength( cursorLine ) ) {\\r\\n\\t\\t\\t\\t// Merge the next line into the current line\\r\\n\\t\\t\\t\\tparamDoc.setLineText( cursorLine, paramDoc.getLineText(cursorLine) + paramDoc.getLineText(cursorLine+1) );\\r\\n\\t\\t\\t\\t// Remove the line in question from our data structure\\r\\n\\t\\t\\t\\tparamDoc.removeLine( cursorLine+1 );\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t\\t// \\\"Remove\\\" the character at the cursorColumn position\\r\\n\\t\\t\\t\\tvar tempText = paramDoc.getLineText( cursorLine );\\r\\n\\t\\t\\t\\tparamDoc.setLineText( cursorLine, tempText.substring(0,cursorColumn) + tempText.substring(cursorColumn+1) );\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase ENTERKEY:\\r\\n\\t\\t\\t// If there is currently a selection, we want to simply delete it first, THEN add the 'newline'\\r\\n\\t\\t\\tif ( paramDoc.isSelection ) {\\r\\n\\t\\t\\t\\tvar tmpSel = paramDoc.getCurrentSelection();\\r\\n\\t\\t\\t\\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\\r\\n\\t\\t\\t\\tcursorLine = newCursorCoords[0];\\r\\n\\t\\t\\t\\tcursorColumn = newCursorCoords[1];\\r\\n\\t\\t\\t}\\t\\r\\n\\t\\t\\t// When we press the enter key, we need to insert a new line into the document\\r\\n\\t\\t\\t// We need to insert a new line following the current line, which contains the current line's text starting from the cursor\\r\\n\\t\\t\\tparamDoc.insertLine( cursorLine+1, paramDoc.getLineText( cursorLine ).substring( cursorColumn ) );\\r\\n\\t\\t\\tparamDoc.setLineText( cursorLine, paramDoc.getLineText( cursorLine ).substring( 0, cursorColumn ) );\\r\\n\\t\\t\\t// Update the cursor\\r\\n\\t\\t\\tcursorLine++;\\r\\n\\t\\t\\tcursorColumn = 0;\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase TABKEY:\\r\\n\\t\\t\\t// If there is currently a selection, we want to simply delete it first, THEN add the tab\\r\\n\\t\\t\\tif ( paramDoc.isSelection ) {\\r\\n\\t\\t\\t\\tvar tmpSel = paramDoc.getCurrentSelection();\\r\\n\\t\\t\\t\\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\\r\\n\\t\\t\\t\\tcursorLine = newCursorCoords[0];\\r\\n\\t\\t\\t\\tcursorColumn = newCursorCoords[1];\\r\\n\\t\\t\\t}\\t\\r\\n\\t\\t\\t// Insert 4 spaces at current cursor position\\r\\n\\t\\t\\t// SUPER HACK: Need to redesign functions a bit to eliminate redundancy and make it cleaner and more readable. \\r\\n\\t\\t\\t// We eventually want this to call an \\\"insertText()\\\" , but for now....\\r\\n\\t\\t\\ttypeCharacter( paramDoc, \\\" \\\".charCodeAt(0) );\\r\\n\\t\\t\\ttypeCharacter( paramDoc, \\\" \\\".charCodeAt(0) );\\r\\n\\t\\t\\ttypeCharacter( paramDoc, \\\" \\\".charCodeAt(0) );\\r\\n\\t\\t\\ttypeCharacter( paramDoc, \\\" \\\".charCodeAt(0) );\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase SHIFTKEY:\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase CAPSLOCKKEY:\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\tcase HIDECHATWINDOWSKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { hideChatShortcut(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\r\\n\\t\\t//For autobracketing\\r\\n\\t\\tcase LEFTBRACKET:\\r\\n\\t\\t\\t// If there is currently a selection, we want to simply delete it first, then go from there\\r\\n\\t\\t\\tif ( paramDoc.isSelection ) {\\r\\n\\t\\t\\t\\tvar tmpSel = paramDoc.getCurrentSelection();\\r\\n\\t\\t\\t\\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\\r\\n\\t\\t\\t\\tcursorLine = newCursorCoords[0];\\r\\n\\t\\t\\t\\tcursorColumn = newCursorCoords[1];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif( !paramIsShift ) { return true; }\\r\\n\\t\\t\\tif(isFF == true)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar origCursorCol = this.getCursorColumn();\\r\\n\\t\\t\\t\\t\\tthis.setCursor(this.getCursorLine(), origCursorCol+1);\\r\\n\\t\\t\\t\\t\\ttypeCharacter( paramDoc, \\\"}\\\".charCodeAt(0) );\\r\\n\\t\\t\\t\\t\\tthis.setCursor(this.getCursorLine(), origCursorCol);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar curChar = paramDoc.getLineText(cursorLine).substring(cursorColumn, cursorColumn+1);\\r\\n\\t\\t\\t\\tif(curChar != '{')\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttypeCharacter( paramDoc, \\\"{\\\".charCodeAt(0) );\\r\\n\\t\\t\\t\\t\\ttypeCharacter( paramDoc, \\\"}\\\".charCodeAt(0) );\\r\\n\\t\\t\\t\\t\\tthis.setCursor(this.getCursorLine(), this.getCursorColumn()-1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase LEFTPAREN:\\r\\n\\t\\t\\t// If there is currently a selection, we want to simply delete it first, then go from there\\r\\n\\t\\t\\tif ( paramDoc.isSelection ) {\\r\\n\\t\\t\\t\\tvar tmpSel = paramDoc.getCurrentSelection();\\r\\n\\t\\t\\t\\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn ); // no last parameter = delete text\\r\\n\\t\\t\\t\\tcursorLine = newCursorCoords[0];\\r\\n\\t\\t\\t\\tcursorColumn = newCursorCoords[1];\\r\\n\\t\\t\\t}\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif( !paramIsShift ) { return true; }\\r\\n\\t\\t\\tif(isFF == true)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar origCursorCol = this.getCursorColumn();\\r\\n\\t\\t\\t\\t\\tthis.setCursor(this.getCursorLine(), origCursorCol+1);\\r\\n\\t\\t\\t\\t\\ttypeCharacter( paramDoc, \\\")\\\".charCodeAt(0) );\\r\\n\\t\\t\\t\\t\\tthis.setCursor(this.getCursorLine(), origCursorCol);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar curChar = paramDoc.getLineText(cursorLine).substring(cursorColumn, cursorColumn+1);\\r\\n\\t\\t\\t\\tif(curChar != '(')\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttypeCharacter( paramDoc, \\\"(\\\".charCodeAt(0) );\\r\\n\\t\\t\\t\\t\\ttypeCharacter( paramDoc, \\\")\\\".charCodeAt(0) );\\r\\n\\t\\t\\t\\t\\tthis.setCursor(this.getCursorLine(), this.getCursorColumn()-1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase FINDKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { findMenuClick(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase REPLACEKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { replaceMenuClick(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase GOTOKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { gotoMenuClick(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase SELECTALLKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { selectAllMenuClick(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase CUTKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { cutIconClicked(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase COPYKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { copyIconClicked(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase PASTEKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { pasteIconClicked(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase NEWKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { newMenuClick(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase OPENKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { openMenuClick(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase UPLOADKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { uploadMenuClick(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase COLORKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { colorMenuClick(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase HIGHLIGHTKEY:\\r\\n\\t\\t\\tif( paramIsCtl ) { highlighMenuClick(); }\\r\\n\\t\\t\\telse{ return true; }\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tdefault:\\r\\n\\t\\t\\treturn true;\\t\\t// Return values are this way for the convenience of the onKeyDown event handler function\\r\\n\\t}\\r\\n\\treturn false;\\t// Return values are this way for the convenience of the onKeyDown event handler function\\r\\n} // END typeSpecial(paramKEY)\",\n \"function openPositionedWindow2(url, name, width, height, x, y, status, scrollbars, moreProperties, openerName) {\\n\\t\\n\\t// ie4.5 mac - windows are 2 pixels too short; if a statusbar is used, the window will be an additional 15 pixels short\\n\\tvar agent = navigator.userAgent.toLowerCase();\\n\\tif (agent.indexOf(\\\"mac\\\")!=-1 && agent.indexOf(\\\"msie\\\") != -1 && agent.indexOf(\\\"msie 5.0\\\")==-1) {\\n\\t\\theight += 2;\\n\\t\\tif (status) height += 15;\\n\\t}\\n\\n\\t// Adjust width if scrollbars are used (pc places scrollbars inside the content area; mac outside) \\n\\twidth += (scrollbars != '' && scrollbars != null && agent.indexOf(\\\"mac\\\") == -1) ? 16 : 0;\\n\\n\\tvar properties = 'width=' + width + ',height=' + height + ',screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + y + ((status) ? ',status' : '') + ',scrollbars' + ((scrollbars) ? '' : '=no') + ((moreProperties) ? ',' + moreProperties : '');\\n\\tvar reference = openWindow2(url, name, properties, openerName);\\n\\t\\n\\t// resize window in ie if we can resize in ns; very messy\\n\\t// commented out because openPositionedWindow() doesn't set the resizable attribute\\n\\t// left in for reference\\n\\t/*if (resizable && agent.indexOf(\\\"msie\\\") != -1) {\\n\\t\\tif (agent.indexOf(\\\"mac\\\") != -1) {\\n\\t\\t\\theight += (status) ? 15 : 2;\\n\\t\\t\\tif (parseFloat(navigator.appVersion) > 5) width -= 11;\\n\\t\\t}\\n\\t\\telse {\\n\\t\\t\\theight += (status) ? 49 : 31;\\n\\t\\t\\twidth += 13;\\n\\t\\t}\\n\\t\\tsetTimeout('if (reference != null && !reference.closed) reference.resizeTo(' + width + ',' + height + ');', 150);\\n\\t}*/\\n\\n\\treturn reference;\\n}\",\n \"function Socket() {}\",\n \"function P(a){return _.isWindow(a)?a:9===a.nodeType&&a.defaultView}\",\n \"enter() {\\n\\t\\tdelete this.write;\\n\\t\\tprocess.once('uncaughtException', this.onUncaughtException);\\n\\t\\tthis.i.setRawMode(true);\\n\\t\\tthis.write(\\\"\\\\x1B[?1049h\\\\x1B[?12l\\\"); //alternate buffer + disable blinking cursor\\n\\t\\tthis.i.on('data', this.onKey);\\n\\t\\tthis.o.on('resize', this.onResize);\\n\\t\\tprocess.once('exit', this.onKill);\\n\\t\\tprocess.once('SIGTERM', this.onKill);\\n\\t\\tprocess.once('SIGINT', this.onKill);\\n\\t\\tthis.onResize(true);\\n\\t}\",\n \"function Shell() {\\n // Properties\\n this.promptStr = \\\">\\\";\\n this.commandList = [];\\n this.curses = \\\"[fuvg],[cvff],[shpx],[phag],[pbpxfhpxre],[zbgureshpxre],[gvgf], [ybir]\\\";\\n this.apologies = \\\"[sorry], [gomenen], [gomen], [gomenasai]\\\";\\n // Methods\\n this.init = shellInit;\\n this.putPrompt = shellPutPrompt;\\n this.handleInput = shellHandleInput;\\n this.execute = shellExecute;\\n}\",\n \"function __loadCompatLayer(w) {\\n w.Debug = function() {\\n };\\n w.Debug._fail = function(message) {\\n throw new Error(message);\\n };\\n w.Debug.writeln = function(text) {\\n if (window.console) {\\n if (window.console.debug) {\\n window.console.debug(text);\\n return;\\n }\\n else if (window.console.log) {\\n window.console.log(text);\\n return;\\n }\\n }\\n else if (window.opera &&\\n window.opera.postError) {\\n window.opera.postError(text);\\n return;\\n }\\n };\\n\\n w.__getNonTextNode = function(node) {\\n try {\\n while (node && (node.nodeType != 1)) {\\n node = node.parentNode;\\n }\\n }\\n catch (ex) {\\n node = null;\\n }\\n return node;\\n };\\n \\n w.__getLocation = function(e) {\\n var loc = {x : 0, y : 0};\\n while (e) {\\n loc.x += e.offsetLeft;\\n loc.y += e.offsetTop;\\n e = e.offsetParent;\\n }\\n return loc;\\n };\\n\\n // Allow caching regex objects for performance\\n RegExp._cacheable = true;\\n\\n // Skip RegExp.test in String.quote to improve performance.\\n String._quoteSkipTest = true;\\n\\n w.navigate = function(url) {\\n window.setTimeout('window.location = \\\"' + url + '\\\";', 0);\\n };\\n\\n var attachEventProxy = function(eventName, eventHandler) {\\n eventHandler._mozillaEventHandler = function(e) {\\n window.event = e;\\n eventHandler();\\n if (!e.avoidReturn) {\\n return e.returnValue;\\n }\\n };\\n this.addEventListener(eventName.slice(2), eventHandler._mozillaEventHandler, false);\\n };\\n\\n var detachEventProxy = function (eventName, eventHandler) {\\n if (eventHandler._mozillaEventHandler) {\\n var mozillaEventHandler = eventHandler._mozillaEventHandler;\\n delete eventHandler._mozillaEventHandler;\\n \\n this.removeEventListener(eventName.slice(2), mozillaEventHandler, false);\\n }\\n };\\n\\n w.attachEvent = attachEventProxy;\\n w.detachEvent = detachEventProxy;\\n w.HTMLDocument.prototype.attachEvent = attachEventProxy;\\n w.HTMLDocument.prototype.detachEvent = detachEventProxy;\\n w.HTMLElement.prototype.attachEvent = attachEventProxy;\\n w.HTMLElement.prototype.detachEvent = detachEventProxy;\\n\\n w.Event.prototype.__defineGetter__('srcElement', function() {\\n // __getNonTextNode(this.target) is the expected implementation.\\n // However script.load has target set to the Document object... so we\\n // need to throw in currentTarget as well.\\n return __getNonTextNode(this.target) || this.currentTarget;\\n });\\n w.Event.prototype.__defineGetter__('cancelBubble', function() {\\n return this._bubblingCanceled || false;\\n });\\n w.Event.prototype.__defineSetter__('cancelBubble', function(v) {\\n if (v) {\\n this._bubblingCanceled = true;\\n this.stopPropagation();\\n }\\n });\\n w.Event.prototype.__defineGetter__('returnValue', function() {\\n return !this._cancelDefault;\\n });\\n w.Event.prototype.__defineSetter__('returnValue', function(v) {\\n if (!v) {\\n this._cancelDefault = true;\\n this.preventDefault();\\n }\\n });\\n w.Event.prototype.__defineGetter__('fromElement', function () {\\n var n;\\n if (this.type == 'mouseover') {\\n n = this.relatedTarget;\\n }\\n else if (this.type == 'mouseout') {\\n n = this.target;\\n }\\n return __getNonTextNode(n);\\n });\\n w.Event.prototype.__defineGetter__('toElement', function () {\\n var n;\\n if (this.type == 'mouseout') {\\n n = this.relatedTarget;\\n }\\n else if (this.type == 'mouseover') {\\n n = this.target;\\n }\\n return __getNonTextNode(n);\\n });\\n w.Event.prototype.__defineGetter__('button', function() {\\n return (this.which == 1) ? 1 : (this.which == 3) ? 2 : 0\\n });\\n w.Event.prototype.__defineGetter__('offsetX', function() {\\n return window.pageXOffset + this.clientX - __getLocation(this.srcElement).x;\\n });\\n w.Event.prototype.__defineGetter__('offsetY', function() {\\n return window.pageYOffset + this.clientY - __getLocation(this.srcElement).y;\\n });\\n\\n w.HTMLElement.prototype.__defineGetter__('parentElement', function() {\\n return this.parentNode;\\n });\\n w.HTMLElement.prototype.__defineGetter__('children', function() {\\n var children = [];\\n var childCount = this.childNodes.length;\\n for (var i = 0; i < childCount; i++) {\\n var childNode = this.childNodes[i];\\n if (childNode.nodeType == 1) {\\n children.push(childNode);\\n }\\n }\\n return children;\\n });\\n w.HTMLElement.prototype.__defineGetter__('innerText', function() { \\n try {\\n return this.textContent\\n } \\n catch (ex) {\\n var text = '';\\n for (var i=0; i < this.childNodes.length; i++) {\\n if (this.childNodes[i].nodeType == 3) {\\n text += this.childNodes[i].textContent;\\n }\\n }\\n return str;\\n }\\n });\\n w.HTMLElement.prototype.__defineSetter__('innerText', function(v) {\\n var textNode = document.createTextNode(v);\\n this.innerHTML = '';\\n this.appendChild(textNode);\\n });\\n w.HTMLElement.prototype.__defineGetter__('currentStyle', function() {\\n return window.getComputedStyle(this, null);\\n });\\n w.HTMLElement.prototype.__defineGetter__('runtimeStyle', function() {\\n return window.getOverrideStyle(this, null);\\n });\\n w.HTMLElement.prototype.removeNode = function(b) {\\n return this.parentNode.removeChild(this)\\n };\\n w.HTMLElement.prototype.contains = function(el) {\\n while (el != null && el != this) {\\n el = el.parentNode;\\n }\\n return (el!=null)\\n };\\n\\n w.HTMLStyleElement.prototype.__defineGetter__('styleSheet', function() {\\n return this.sheet;\\n });\\n w.CSSStyleSheet.prototype.__defineGetter__('rules', function() {\\n return this.cssRules;\\n });\\n w.CSSStyleSheet.prototype.addRule = function(selector, style, index) {\\n this.insertRule(selector + '{' + style + '}', index);\\n };\\n w.CSSStyleSheet.prototype.removeRule = function(index) {\\n this.deleteRule(index);\\n };\\n w.CSSStyleDeclaration.prototype.__defineGetter__('styleFloat', function() {\\n return this.cssFloat;\\n });\\n w.CSSStyleDeclaration.prototype.__defineSetter__('styleFloat', function(v) {\\n this.cssFloat = v;\\n });\\n DocumentFragment.prototype.getElementById = function(id) {\\n var nodeQueue = [];\\n var childNodes = this.childNodes;\\n var node;\\n var c;\\n \\n for (c = 0; c < childNodes.length; c++) {\\n node = childNodes[c];\\n if (node.nodeType == 1) {\\n nodeQueue.push(node);\\n }\\n }\\n\\n while (nodeQueue.length) {\\n node = nodeQueue.dequeue();\\n if (node.id == id) {\\n return node;\\n }\\n childNodes = node.childNodes;\\n if (childNodes.length != 0) {\\n for (c = 0; c < childNodes.length; c++) {\\n node = childNodes[c];\\n if (node.nodeType == 1) {\\n nodeQueue.push(node);\\n }\\n }\\n }\\n }\\n\\n return null;\\n };\\n\\n DocumentFragment.prototype.getElementsByTagName = function(tagName) {\\n var elements = [];\\n var nodeQueue = [];\\n var childNodes = this.childNodes;\\n var node;\\n var c;\\n\\n for (c = 0; c < childNodes.length; c++) {\\n node = childNodes[c];\\n if (node.nodeType == 1) {\\n nodeQueue.push(node);\\n }\\n }\\n\\n while (nodeQueue.length) {\\n node = nodeQueue.dequeue();\\n if (node.tagName == tagName) {\\n elements.add(node);\\n }\\n childNodes = node.childNodes;\\n if (childNodes.length != 0) {\\n for (c = 0; c < childNodes.length; c++) {\\n node = childNodes[c];\\n if (node.nodeType == 1) {\\n nodeQueue.push(node);\\n }\\n }\\n }\\n }\\n\\n return elements;\\n };\\n\\n DocumentFragment.prototype.createElement = function(tagName) {\\n return document.createElement(tagName);\\n };\\n\\n var selectNodes = function(doc, path, contextNode) {\\n contextNode = contextNode ? contextNode : doc;\\n var xpath = new XPathEvaluator();\\n var result = xpath.evaluate(path, contextNode,\\n doc.createNSResolver(doc.documentElement),\\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\\n\\n var nodeList = new Array(result.snapshotLength);\\n for(var i = 0; i < result.snapshotLength; i++) {\\n nodeList[i] = result.snapshotItem(i);\\n }\\n\\n return nodeList;\\n };\\n\\n var selectSingleNode = function(doc, path, contextNode) {\\n path += '[1]';\\n var nodes = selectNodes(doc, path, contextNode);\\n if (nodes.length != 0) {\\n for (var i = 0; i < nodes.length; i++) {\\n if (nodes[i]) {\\n return nodes[i];\\n }\\n }\\n }\\n return null;\\n };\\n\\n w.XMLDocument.prototype.selectNodes = function(path, contextNode) {\\n return selectNodes(this, path, contextNode);\\n };\\n\\n w.XMLDocument.prototype.selectSingleNode = function(path, contextNode) {\\n return selectSingleNode(this, path, contextNode);\\n };\\n\\n w.XMLDocument.prototype.transformNode = function(xsl) {\\n var xslProcessor = new XSLTProcessor();\\n xslProcessor.importStylesheet(xsl);\\n\\n var ownerDocument = document.implementation.createDocument(\\\"\\\", \\\"\\\", null);\\n var transformedDoc = xslProcessor.transformToDocument(this);\\n \\n return transformedDoc.xml;\\n };\\n\\n Node.prototype.selectNodes = function(path) {\\n var doc = this.ownerDocument;\\n return doc.selectNodes(path, this);\\n };\\n\\n Node.prototype.selectSingleNode = function(path) {\\n var doc = this.ownerDocument;\\n return doc.selectSingleNode(path, this);\\n };\\n\\n Node.prototype.__defineGetter__('baseName', function() {\\n return this.localName;\\n });\\n\\n Node.prototype.__defineGetter__('text', function() {\\n return this.textContent;\\n });\\n Node.prototype.__defineSetter__('text', function(value) {\\n this.textContent = value;\\n });\\n\\n Node.prototype.__defineGetter__('xml', function() {\\n return (new XMLSerializer()).serializeToString(this);\\n });\\n}\",\n \"function shellLS()\\n{\\n krnDiskLS();\\n}\",\n \"function SystemProto() {}\",\n \"function SystemProto() {}\",\n \"function SystemProto() {}\",\n \"function applyEscape( options , ... args ) {\\n\\tvar fn , newOptions , wrapOptions ;\\n\\n\\t// Cause trouble because the shutting down process itself needs to send escape sequences asynchronously\\n\\t//if ( options.root.shutdown && ! options.str ) { return options.root ; }\\n\\n\\tif ( options.bounded ) { args = options.bounded.concat( args ) ; }\\n\\n\\t//console.error( args ) ;\\n\\tif ( options.bind ) {\\n\\t\\tnewOptions = Object.assign( {} , options , { bind: false , bounded: args } ) ;\\n\\t\\tfn = applyEscape.bind( this , newOptions ) ;\\n\\n\\t\\t// Still a nasty hack...\\n\\t\\tObject.setPrototypeOf( fn , Object.getPrototypeOf( options.root ) ) ;\\n\\t\\tfn.apply = Function.prototype.apply ;\\n\\t\\tfn.root = options.root ;\\n\\t\\tfn.options = newOptions ;\\n\\n\\t\\treturn fn ;\\n\\t}\\n\\n\\tvar onFormat = [ options.on ] , output , on , off ;\\n\\tvar action = args[ options.params ] ;\\n\\n\\t// If not enough arguments, return right now\\n\\t// Well... what about term.up(), term.previousLine(), and so on?\\n\\t//if ( arguments.length < 1 + options.params && ( action === null || action === false ) ) { return options.root ; }\\n\\n\\tif ( options.params ) {\\n\\t\\tonFormat = onFormat.concat( args.slice( 0 , options.params ) ) ;\\n\\t}\\n\\n\\t//console.log( '\\\\n>>> Action:' , action , '<<<\\\\n' ) ;\\n\\t//console.log( 'Attributes:' , attributes ) ;\\n\\tif ( action === undefined || action === true ) {\\n\\t\\ton = options.onHasFormatting ? options.root.format( ... onFormat ) : options.on ;\\n\\t\\tif ( options.str ) { return on ; }\\n\\t\\toptions.out.write( on ) ;\\n\\t\\treturn options.root ;\\n\\t}\\n\\n\\tif ( action === null || action === false ) {\\n\\t\\toff = options.offHasFormatting ? options.root.format( options.off ) : options.off ;\\n\\t\\tif ( options.str ) { return off ; }\\n\\t\\toptions.out.write( off ) ;\\n\\t\\treturn options.root ;\\n\\t}\\n\\n\\tif ( typeof action !== 'string' ) {\\n\\t\\tif ( typeof action.toString === 'function' ) { action = action.toString() ; }\\n\\t\\telse { action = '' ; }\\n\\t}\\n\\n\\t// So we have got a string\\n\\n\\ton = options.onHasFormatting ? options.root.format( ... onFormat ) : options.on ;\\n\\n\\tif ( options.markupOnly ) {\\n\\t\\taction = options.root.markup( ... args.slice( options.params ) ) ;\\n\\t}\\n\\telse if ( ! options.noFormat ) {\\n\\t\\taction = options.root.format( ... args.slice( options.params ) ) ;\\n\\t}\\n\\n\\tif ( options.wrap ) {\\n\\t\\tif ( options.root.wrapOptions.x && options.root.wrapOptions.x > 1 ) {\\n\\t\\t\\twrapOptions = {\\n\\t\\t\\t\\twidth: options.root.wrapOptions.width || options.root.width - options.root.wrapOptions.x + 1 ,\\n\\t\\t\\t\\tglue: '\\\\n' + options.root.str.column( options.root.wrapOptions.x ) ,\\n\\t\\t\\t\\toffset: options.root.wrapOptions.offset ,\\n\\t\\t\\t\\tupdateOffset: true ,\\n\\t\\t\\t\\tskipFn: termkit.escapeSequenceSkipFn\\n\\t\\t\\t} ;\\n\\n\\t\\t\\taction = string.wordwrap( action , wrapOptions ) ;\\n\\n\\t\\t\\tif ( ! options.root.wrapOptions.continue ) {\\n\\t\\t\\t\\taction = options.root.str.column( options.root.wrapOptions.x ) + action ;\\n\\t\\t\\t}\\n\\n\\t\\t\\toptions.root.wrapOptions.continue = true ;\\n\\t\\t\\toptions.root.wrapOptions.offset = wrapOptions.offset ;\\n\\t\\t}\\n\\t\\telse {\\n\\t\\t\\twrapOptions = {\\n\\t\\t\\t\\twidth: options.root.wrapOptions.width || options.root.width ,\\n\\t\\t\\t\\tglue: '\\\\n' ,\\n\\t\\t\\t\\toffset: options.root.wrapOptions.offset ,\\n\\t\\t\\t\\tupdateOffset: true ,\\n\\t\\t\\t\\tskipFn: termkit.escapeSequenceSkipFn\\n\\t\\t\\t} ;\\n\\n\\t\\t\\taction = string.wordwrap( action , wrapOptions ) ;\\n\\t\\t\\toptions.root.wrapOptions.continue = true ;\\n\\t\\t\\toptions.root.wrapOptions.offset = wrapOptions.offset ;\\n\\t\\t}\\n\\t}\\n\\telse {\\n\\t\\t// All non-wrapped string display reset the offset\\n\\t\\toptions.root.wrapOptions.continue = false ;\\n\\t\\toptions.root.wrapOptions.offset = 0 ;\\n\\t}\\n\\n\\toff = options.offHasFormatting ? options.root.format( options.off ) : options.off ;\\n\\n\\tif ( options.forceStyleOnReset ) {\\n\\t\\taction = action.replace( new RegExp( string.escape.regExp( options.root.optimized.styleReset ) , 'g' ) , options.root.optimized.styleReset + on ) ;\\n\\t}\\n\\n\\tif ( options.root.resetString ) {\\n\\t\\toutput = options.root.resetString + on + action + off + options.root.resetString ;\\n\\t}\\n\\telse {\\n\\t\\toutput = on + action + off ;\\n\\t}\\n\\n\\t// tmp hack?\\n\\tif ( options.crlf ) { output = output.replace( /\\\\n/g , '\\\\r\\\\n' ) ; }\\n\\n\\tif ( options.str ) { return output ; }\\n\\n\\toptions.out.write( output ) ;\\n\\n\\treturn options.root ;\\n}\",\n \"function crest_kernel() {\\n var command = command_pass;\\n var command_query = command.split(\\\"#\\\");\\n\\n var command_pointer = command_query[1];\\n if (command_pointer == \\\"settings\\\"){open_settings();} // open settings\\n if (command_pointer == \\\"tools\\\"){open_tools();} // open tools\\n if (command_pointer == \\\"kill\\\") {kill();} // kill test command;\\n if (command_pointer == \\\"import-code\\\") {import_template();} \\n if (command_pointer == \\\"dclose\\\") {w3_close();} //close dashboard\\n if (command_pointer == \\\"dopen\\\") {w3_open();} // open sideboard\\n}\",\n \"function DeviceDriverFileSystem(){ // Add or override specific attributes and method pointers.{\\n // \\\"subclass\\\"-specific attributes.\\n // this.buffer = \\\"\\\"; // TODO: Do we need this?\\n // Override the base method pointers.\\n this.driverEntry = function(){\\n // Initialization routine for this, the kernel-mode Keyboard Device Driver.\\n this.status = \\\"loaded\\\";\\n // More?\\n };\\n this.isr = function(params){\\n //expect to receive params as follows[filename | new program,operation,data,from user | os]\\n switch(params[1]){\\n case 0: createFile(params); break;\\n case 1: readFile(params); break;\\n case 2: writeFile(params); break;\\n case 3: deleteFile(params); break;\\n case 4: format(); break;\\n case 5: listFiles(); break;\\n case 6: findProgramFiles(); break;\\n case 7: swapProcess(params); break;\\n default: console.log(\\\"blakejrlbkadflkdaf\\\"); break;\\n }\\n };\\n this.test = function(){\\n updateMBR();\\n }\\n}\",\n \"function browser(){}\",\n \"function browser(){}\",\n \"function mkobj(pty) {\\n return new pty.constructor()\\n}\",\n \"refresh(isLinuxMouseSelection) {\\n // Queue the refresh for the renderer\\n if (!this._refreshAnimationFrame) {\\n this._refreshAnimationFrame = window.requestAnimationFrame(() => this._refresh());\\n }\\n // If the platform is Linux and the refresh call comes from a mouse event,\\n // we need to update the selection for middle click to paste selection.\\n if (isLinux && isLinuxMouseSelection) {\\n const selectionText = this.selectionText;\\n if (selectionText.length) {\\n this._onLinuxMouseSelection.fire(this.selectionText);\\n }\\n }\\n }\",\n \"function updateStatusWindowOld(){\\r\\n\\tvar value = parseInt(hatsForm.CURSORPOSITION.value);\\r\\n\\tif (!isNaN(value)) {\\r\\n\\t\\tstatwin[0]=\\\" \\\"+value +\\\" (\\\"+ ConvertPosToRow(value, intNumberOfColumns)+\\\",\\\"+ ConvertPosToCol(value, intNumberOfColumns)+\\\")\\\";\\r\\n\\t}\\r\\n\\tif (isOverWriteMode()) statwin[1]=\\\"[]\\\";\\r\\n\\telse\\r\\n\\t\\tstatwin[1]=\\\"|\\\";\\r\\n\\tif (screenLocked){\\r\\n\\t\\tstatwin[3]=\\\" >< \\\";\\r\\n\\t}\\r\\n\\tvar strstat=\\\"\\\";\\r\\n\\tif (carettrackingenabled) strstat=strstat+statwin[0];\\r\\n\\tif (overwritemodeenabled) strstat=strstat+\\\" \\\"+statwin[1];\\r\\n\\tif (statwin[2]!=\\\" \\\") strstat=strstat+\\\" \\\"+statwin[2];\\r\\n\\tif (screenLocked) strstat=strstat+\\\" \\\"+statwin[3];\\r\\n\\tif (enableBIDI){\\r\\n\\t\\twindow.status = statusBIDI;\\r\\n\\t} else\\r\\n\\t\\twindow.status=strstat;\\r\\n}\",\n \"function WysiwymTextarea(textarea) {\\n this.NEWLINE = \\\"\\\\n\\\"; // Newline Character specified to Browser\\n var NONE = { prefix: '' } // Line Type NONE\\n var lines = new Array(); // Array Line objects { type, text, selected }\\n var cursor = { // Internal Cursor Object { start, end }\\n start: { line:0, position:0 }, // Cursor Start Position { line, position }\\n end: { line:0, position:0 }, // Cursor End Position { line, position }\\n scroll: 0 // Current Scroll Position \\n }\\n \\n /*-------------------------------------------------------------------\\n * Simple Public Functions\\n *------------------------------------------------------------------ */\\n this.getCursor = function() { return cursor; }\\n this.getLines = function() { return lines; }\\n this.getNumLines = function() { return lines.length; }\\n this.getLine = function(lineNum) { return lines[lineNum]; }\\n this.getSelectionRange = function() { return [cursor.start.line, cursor.end.line]; }\\n \\n /*-------------------------------------------------------------------\\n * @public getSelection: Return the current selected text.\\n *------------------------------------------------------------------ */\\n this.getSelection = function() {\\n var selection = \\\"\\\";\\n for (i in lines) {\\n var text = lines[i].text;\\n if ((i == cursor.start.line) && (i == cursor.end.line))\\n return text.substring(cursor.start.position, cursor.end.position);\\n if (i == cursor.start.line)\\n selection = selection + text.substring(cursor.start.position, text.length);\\n if ((i > cursor.start.line) && (i < cursor.end.line))\\n selection = selection + text;\\n if (i == cursor.end.line)\\n selection = selection + text.substring(0, cursor.end.position)\\n }\\n return selection;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public getSelection: Return the length of Selection text\\n *------------------------------------------------------------------ */\\n this.getSelectionLength = function() {\\n var selection = this.getSelection();\\n return selection.length;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public hasPrefix: Return true if the current selection has the\\n * specified prefix text. NOTE: Does not work with return lines.\\n *------------------------------------------------------------------ */\\n this.selectionHasPrefix = function(prefixText) {\\n var lineText = lines[cursor.start.line].text;\\n var start = cursor.start.position - prefixText.length;\\n if (start < 0) { return false; }\\n if (lineText.substring(start, cursor.start.position) != prefixText) { return false; }\\n return true;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public hasPrefix: Return true if the current selection has the\\n * specified suffix text. NOTE: Does not work with return lines.\\n *------------------------------------------------------------------ */\\n this.selectionHasSuffix = function(suffixText) {\\n var lineText = lines[cursor.end.line].text;\\n var end = cursor.end.position + suffixText.length;\\n if (end > lineText.length) { return false; }\\n if (lineText.substring(cursor.end.position, end) != suffixText) { return false; }\\n return true;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public prependToSelection: Insert the specified text at at the cursor\\n * start position and make it selected.\\n *------------------------------------------------------------------ */\\n this.prependToSelection = function(insertText) {\\n var lineText = lines[cursor.start.line].text;\\n var newText = lineText.substring(0, cursor.start.position) +\\n insertText + lineText.substring(cursor.start.position, lineText.length);\\n lines[cursor.start.line].text = newText;\\n // Update Class Variables\\n if (cursor.start.line == cursor.end.line)\\n cursor.end.position += insertText.length;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public appendToSelection: Insert the specified text at at the cursor\\n * end position and make it selected.\\n *------------------------------------------------------------------ */\\n this.appendToSelection = function(insertText) {\\n var lineText = lines[cursor.end.line].text;\\n var newText = lineText.substring(0, cursor.end.position) +\\n insertText + lineText.substring(cursor.end.position, lineText.length);\\n lines[cursor.end.line].text = newText;\\n // Update Class Variables\\n cursor.end.position += insertText.length;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public insertSelectionPrefix: Insert the specified text at at the cursor\\n * start position. NOTE: This does not work with return lines.\\n *------------------------------------------------------------------ */\\n this.insertSelectionPrefix = function(prefixText) {\\n var lineText = lines[cursor.start.line].text;\\n var newText = lineText.substring(0, cursor.start.position) +\\n prefixText + lineText.substring(cursor.start.position, lineText.length);\\n lines[cursor.start.line].text = newText;\\n // Update Class Variables\\n cursor.start.position += prefixText.length;\\n if (cursor.start.line == cursor.end.line)\\n cursor.end.position += prefixText.length;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public insertSelectionSuffix: Insert the specified text at at the cursor\\n * end position. NOTE: This does not work with return lines.\\n *------------------------------------------------------------------ */\\n this.insertSelectionSuffix = function(suffixText) {\\n var lineText = lines[cursor.end.line].text;\\n var newText = lineText.substring(0, cursor.end.position) +\\n suffixText + lineText.substring(cursor.end.position, lineText.length);\\n lines[cursor.end.line].text = newText;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public removePrefix: Remove the specified prefix text if it\\n * matches with the passed in value. Returns boolean True it\\n * was successful, False otherwise.\\n *------------------------------------------------------------------ */\\n this.removeSelectionPrefix = function(prefixText) {\\n if (this.selectionHasPrefix(prefixText)) {\\n var lineText = lines[cursor.start.line].text;\\n var start = cursor.start.position - prefixText.length;\\n var newText = lineText.substring(0, start) +\\n lineText.substring(cursor.start.position, lineText.length);\\n lines[cursor.start.line].text = newText;\\n // Update Class Variables\\n cursor.start.position -= prefixText.length;\\n if (cursor.start.line == cursor.end.line)\\n cursor.end.position -= prefixText.length;\\n return true;\\n }\\n return false;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public removeSuffix: Remove the specified suffix text if it\\n * matches with the passed in value. Returns boolean True it\\n * was successful, False otherwise.\\n *------------------------------------------------------------------ */\\n this.removeSelectionSuffix = function(suffixText) {\\n if (this.selectionHasSuffix(suffixText)) {\\n var lineText = lines[cursor.end.line].text;\\n var end = cursor.end.position + suffixText.length;\\n var newText = lineText.substring(0, cursor.end.position) +\\n lineText.substring(end, lineText.length);\\n lines[cursor.end.line].text = newText;\\n return true;\\n }\\n return false;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public isWrapped: Return True if the selection is wrapped\\n * in the specified prefix and suffix text. Otherwise False.\\n * NOTE: Does not work with return lines.\\n *------------------------------------------------------------------ */\\n this.selectionIsWrapped = function(prefixText, suffixText) {\\n if (suffixText == null) { suffixText = prefixText; }\\n return ((this.selectionHasPrefix(prefixText)) && (this.selectionHasSuffix(suffixText)))\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public wrap: Wrap the cursor or currently selected text\\n * with the specified newTextBefore and newTextAfter.\\n *------------------------------------------------------------------ */\\n this.wrapSelection = function(prefixText, suffixText) {\\n if (suffixText == null) { suffixText = prefixText; }\\n this.insertSelectionPrefix(prefixText);\\n this.insertSelectionSuffix(suffixText);\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public unwrap: Unwrap the selection by removeing the prefix\\n * and suffix text specified. Returns boolean True it\\n * was successful, False otherwise.\\n *------------------------------------------------------------------ */\\n this.unwrapSelection = function(prefixText, suffixText) {\\n if (suffixText == null) { suffixText = prefixText; }\\n if ((this.selectionHasPrefix(prefixText)) && (this.selectionHasSuffix(suffixText))) {\\n this.removeSelectionPrefix(prefixText);\\n this.removeSelectionSuffix(suffixText);\\n return true;\\n }\\n return false;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public insertLinePrefix: Return True if the line has the\\n * specified prefix.\\n *------------------------------------------------------------------ */\\n this.lineHasPrefix = function(lineNum, prefixText) {\\n return lines[lineNum].text.substring(0, prefixText.length) == prefixText;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public insertLinePrefix: Add the Prefix to the specified line.\\n *------------------------------------------------------------------ */\\n this.insertLinePrefix = function(lineNum, prefixText) {\\n var lineText = lines[lineNum].text;\\n var newText = prefixText + lineText.substring(0, cursor.start.position) +\\n lineText.substring(cursor.start.position, lineText.length);\\n lines[lineNum].text = newText;\\n // Update Class Variables\\n if (lineNum == cursor.start.line)\\n cursor.start.position += prefixText.length;\\n if (lineNum == cursor.end.line)\\n cursor.end.position += prefixText.length;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public removePrefix: Remove the specified prefix text if it\\n * matches with the passed in value. Returns boolean True it\\n * was successful, False otherwise.\\n *------------------------------------------------------------------ */\\n this.removeLinePrefix = function(lineNum, prefixText) {\\n if (this.lineHasPrefix(lineNum, prefixText)) {\\n var lineText = lines[lineNum].text;\\n var newText = lineText.substring(prefixText.length, lineText.length);\\n lines[lineNum].text = newText;\\n // Update Class Variables\\n if (lineNum == cursor.start.line)\\n cursor.start.position -= prefixText.length;\\n if (lineNum == cursor.end.line)\\n cursor.end.position -= prefixText.length;\\n return true;\\n }\\n return false;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public insertLineSuffix: Append the suffix to the end of the\\n * specified line.\\n *------------------------------------------------------------------ */\\n this.insertLineSuffix = function(lineNum, suffixText) {\\n var lineText = lines[lineNum].text;\\n var newText = lineText.substring(0, cursor.start.position) +\\n lineText.substring(cursor.start.position, lineText.length) + suffixText;\\n lines[lineNum].text = newText;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public insertLinePrefix: Return True if all lines in the\\n * selection have the specified prefix.\\n *------------------------------------------------------------------ */\\n this.selectionLinesHavePrefix = function(prefixText) {\\n for (var i=cursor.start.line; i<=cursor.end.line; i++)\\n if (!this.lineHasPrefix(i, prefixText))\\n return false;\\n return true;\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public insertLinePrefix: Add the Prefix Text to all lines in\\n * the selection.\\n *------------------------------------------------------------------ */\\n this.insertSelectionLinesPrefix = function(prefixText) {\\n for (var i=cursor.start.line; i<=cursor.end.line; i++)\\n this.insertLinePrefix(i, prefixText);\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public insertLinePrefix: Add the Prefix Text to all lines in\\n * the selection.\\n *------------------------------------------------------------------ */\\n this.removeSelectionLinesPrefix = function(prefixText) {\\n for (var i=cursor.start.line; i<=cursor.end.line; i++)\\n this.removeLinePrefix(i, prefixText);\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public getTextareaProperties: Return the global textarea\\n * properties (NOT by Line). This returns the a Map containing:\\n * { text, cursorStart, cursorEnd, selectionLength, scroll }\\n *------------------------------------------------------------------ */\\n this.getTextareaProperties = function() {\\n var text = \\\"\\\" // Global Textarea Value\\n var cursorStart = 0; // Cursor Start Position (chars from beginning of textarea)\\n var cursorEnd = 0; // Cursor End Position (chars from beginning of textarea)\\n var selectionLength = 0; // Selection Length (total chars)\\n var lineStart = 0;\\n for (i in lines) {\\n text += lines[i].text;\\n if (i == cursor.start.line)\\n cursorStart = lineStart + cursor.start.position;\\n if (i == cursor.end.line)\\n cursorEnd = lineStart + cursor.end.position;\\n lineStart += lines[i].text.length;\\n }\\n var selectionLength = cursorEnd - cursorStart;\\n return { text:text, cursorStart:cursorStart, cursorEnd:cursorEnd,\\n selectionLength:selectionLength, scroll:cursor.scroll }\\n }\\n \\n /*-------------------------------------------------------------------\\n * @public update: Update the HTML textarea to reflect all changes\\n * made within this class. This is generally the last step in\\n * defining a markup button.\\n *------------------------------------------------------------------ */\\n this.update = function() {\\n var textProperties = this.getTextareaProperties();\\n // Update the Textarea\\n $(textarea).val(textProperties.text);\\n if (textarea.createTextRange) {\\n range = textarea.createTextRange();\\n range.collapse(true);\\n range.moveStart('character', textProperties.cursorStart); \\n range.moveEnd('character', textProperties.selectionLength);\\n range.select();\\n } else if (textarea.setSelectionRange) {\\n textarea.setSelectionRange(textProperties.cursorStart, textProperties.cursorEnd);\\n }\\n textarea.scrollTop = textProperties.scroll;\\n textarea.focus();\\n }\\n \\n /*-------------------------------------------------------------------\\n * @private getCursorProperties: Returns a Map object containing the\\n * current the current cursor properties for scroll position,\\n * cursor position and selection length.\\n *------------------------------------------------------------------ */\\n function getCursorProperties() {\\n textarea.focus();\\n var scroll = textarea.scrollTop; // Current Scroll Position\\n var position = 0; // Current Cursor Position\\n var selection = \\\"\\\"; // Current Selection Length\\n if (document.selection) {\\n // Internet Explorer\\n selection = document.selection.createRange().text; \\n if ($.browser.msie) {\\n var range = document.selection.createRange();\\n var rangeCopy = range.duplicate();\\n rangeCopy.moveToElementText(textarea);\\n position = -1;\\n while(rangeCopy.inRange(range)) {\\n rangeCopy.moveStart('character');\\n position++;\\n }\\n } else {\\n // Opera\\n position = textarea.selectionStart;\\n }\\n } else {\\n // Mozilla\\n position = textarea.selectionStart; \\n selection = $(textarea).val().substring(position, textarea.selectionEnd);\\n }\\n return {scroll: scroll, position: position, length: selection.length}\\n }\\n \\n /*-------------------------------------------------------------------\\n * @private getTextareaProperties: Updates the class variables for\\n * lines in the Textarea and cursor start and end position\\n * (in terms of lines).\\n *------------------------------------------------------------------ */\\n function setupPropertiesByLine() {\\n var text = $(textarea).val(); // Initial Textarea Value\\n var cursorInfo = getCursorProperties(); // Cursor Properties\\n var cursorStart = cursorInfo.position; // Global Cursor Start Position\\n var cursorEnd = cursorInfo.position + cursorInfo.length; // Global Cursor End Position\\n // Parse the Current Textarea\\n var num = 0; // Iter Line Number\\n var lineStart = 0; // Iter Position\\n var lastLine = false; // Flag Set on Last Line\\n while (!lastLine) {\\n // Find the Line Ending Position\\n var lineEnd = text.indexOf(\\\"\\\\n\\\", lineStart);\\n var charEnd = lineEnd;\\n if (lineEnd >= 0) { lineEnd += 1; }\\n else { lastLine = true; lineEnd = charEnd = text.length; }\\n // Get the Line Properties\\n var lineText = text.substring(lineStart, lineEnd);\\n var selected = (cursorStart <= charEnd) && (cursorEnd >= lineStart)\\n lines[num] = { text:lineText, selected:selected };\\n // Update the Cursor Information\\n if ((cursorStart >= lineStart) && (cursorStart <= charEnd))\\n cursor.start = { line: num, position:cursorStart-lineStart };\\n if ((cursorEnd >= lineStart) && (cursorEnd <= lineEnd))\\n cursor.end = { line:num, position:cursorEnd-lineStart};\\n // Update Properties for Next Line\\n lineStart = lineEnd;\\n num += 1;\\n }\\n // Save the Scroll Position\\n cursor.scroll = cursorInfo.scroll;\\n }\\n\\n /*--- Main ---*/\\n setupPropertiesByLine();\\n \\n}\",\n \"function EventDispatcher() {}\",\n \"function EventDispatcher() {}\",\n \"function StdOut() {\\r\\n}\",\n \"function flush_stdio(){}\",\n \"get LinuxPlayer() {}\",\n \"function patchCommand(arg, messageReceived){\\n \\n}\",\n \"function EmacsyPlus() {\\n\\n /* Singleton class */\\n\\n var BS_CODE = 8; // backspace\\n var ENTER_CODE = 13;\\n var CTRL_CODE = 17;\\n var ESC_CODE = 27;\\n\\n var BACK_SEARCH = true;\\n var FORW_SEARCH = false;\\n var CASE_SENSITIVE = true;\\n var CASE_INSENSITIVE = false;\\n\\n var km = new SafeKeyMap();\\n var emacsyPlusMap = {};\\n var ctrlXMap = {};\\n var mark = null;\\n var os = km.getOsPlatform();\\n\\n var mBufName = 'minibuffer';\\n var minibufMonitored = false;\\n var iSearcher = null;\\n var savedPlace = undefined;\\n // For remembering what user searched for\\n // in preceeding iSearch. Used to support\\n // cnt-s in an empty minibuf:\\n var prevSearchTerm = null;\\n\\n // Keydown and mouse click listeners while in minibuf:\\n var mBufKeyListener = null;\\n var mBufClickListener = null;\\n\\n var constructor = function() {\\n \\n if (typeof(EmacsyPlus.instance) !== 'undefined') {\\n return EmacsyPlus.instance;\\n }\\n\\n if (typeof(CodeMirror.emacsArea) === 'undefined') {\\n CodeMirror.emacsArea = {\\n killedTxt : \\\"\\\",\\n multiKillInProgress : false,\\n registers : {},\\n bookmarks : {}\\n }\\n } \\n\\n // Hack: I couldn't figure out how to add a\\n // css sheet whose class names were found by\\n // CodeMirror.doc.setMarker(start,end,{className : }).\\n // So the following (internally) looks for the already laoded codemirror.css\\n // sheet and adds a highlighting rule to it:\\n addSearchHighlightRule();\\n\\n km.registerCommand('ctrlXCmd', ctrlXCmd, true); // true: ok to overwrite function\\n km.registerCommand('killCmd', killCmd, true);\\n km.registerCommand('killRegionCmd', killRegionCmd, true);\\n km.registerCommand('yankCmd', yankCmd, true);\\n km.registerCommand('copyCmd', copyCmd, true);\\n km.registerCommand('setMarkCmd', setMarkCmd, true);\\n km.registerCommand('selPrevCharCmd', selPrevCharCmd, true);\\n km.registerCommand('selNxtCharCmd', selNxtCharCmd, true); \\n km.registerCommand('selNxtWordCmd', selNxtWordCmd, true);\\n km.registerCommand('selPrevWordCmd', selPrevWordCmd, true);\\n km.registerCommand('delWordAfterCmd', delWordAfterCmd, true);\\n km.registerCommand('delWordBeforeCmd', delWordBeforeCmd, true);\\n km.registerCommand('saveToRegCmd', saveToRegCmd, true);\\n km.registerCommand('insertFromRegCmd', insertFromRegCmd, true);\\n km.registerCommand('cancelCmd', cancelCmd, true);\\n km.registerCommand('xchangePtMarkCmd', xchangePtMarkCmd, true);\\n km.registerCommand('pointToRegisterCmd', pointToRegisterCmd, true);\\n km.registerCommand('jumpToRegisterCmd', jumpToRegisterCmd, true);\\n km.registerCommand('goCellStartCmd', goCellStartCmd, true);\\n km.registerCommand('goCellEndCmd', goCellEndCmd, true);\\n km.registerCommand('goNotebookStartCmd', goNotebookStartCmd, true);\\n km.registerCommand('goNotebookEndCmd', goNotebookEndCmd, true);\\n km.registerCommand('openLineCmd', openLineCmd, true);\\n km.registerCommand('isearchForwardCmd', isearchForwardCmd, true);\\n km.registerCommand('isearchBackwardCmd', isearchBackwardCmd, true);\\n km.registerCommand('reSearchForwardCmd', reSearchForwardCmd, true);\\n km.registerCommand('goNxtCellCmd', goNxtCellCmd, true);\\n km.registerCommand('goPrvCellCmd', goPrvCellCmd, true);\\n km.registerCommand('helpCmd', helpCmd, true);\\n \\n\\n //************\\n // For testing binding suspension:\\n\\n //km.registerCommand('suspendTestCmd', suspendTestCmd, true)\\n //km.registerCommand('restoreTestCmd', restoreTestCmd, true)\\n //km.registerCommand('alertMeCmd', alertMeCmd, true) \\n //************ \\n\\n var mapName = null;\\n if (os === 'Mac' || os === 'Linux') {\\n mapName = km.installKeyMap(buildEmacsyPlus(), 'emacsy_plus', 'macDefault');\\n } else {\\n mapName = km.installKeyMap(buildEmacsyPlus(), 'emacsy_plus', 'pcDefault');\\n }\\n km.activateKeyMap(mapName);\\n\\n // A couple of commands in CodeMirror's default Mac keymap\\n // conflict with standard OSX-level commands. Take those out\\n // of the basemap so they don't even show up in the keybindings\\n // help window:\\n\\n if (os === 'Mac') {\\n // On Macs these two show windows on the desktop in reduced size,\\n // and vice versa:\\n km.deleteParentKeyBinding('Ctrl-Up'); // bound to goDocEnd\\n km.deleteParentKeyBinding('Ctrl-Down'); // bound to goDocStart\\n\\n km.deleteParentKeyBinding('Ctrl-Alt-Backspace') // does nothing\\n km.deleteParentKeyBinding('Home')\\n km.deleteParentKeyBinding('End');\\n }\\n \\n // Instances of this EmacsyPlus class have only public methods:\\n EmacsyPlus.instance =\\n {help : helpCmd,\\n }\\n\\n //********\\n //alert('Activated ' + mapName);\\n //******** \\n return EmacsyPlus.instance;\\n }\\n \\n /*------------------------------- Build/Install/Activate the Emacsy-Plus Keymap Object -------------- */ \\n\\n var buildEmacsyPlus = function() {\\n /*\\n Build the keystroke/command object for Emacs-like\\n behavior. Note that you need to create each command\\n as a method, and must register it in the constructor,\\n unless it already exists in CodeMirror as a command\\n (https://codemirror.net/doc/manual.html). See function\\n 'constructor' for examples.\\n\\n Also constructs the secondary cnt-x keymap. It maps\\n cnt-x keystrokes to corresponding commands. This\\n map is stored in an instance variable only; it is not\\n returned.\\n\\n :returns top-level keystroke->command map\\n :rtype {str : str}.\\n */\\n \\n /*-------------- Emacs Keymap -------------*/\\n\\n \\n /* Help */\\n\\n emacsyPlusMap['F1'] = \\\"helpCmd\\\";\\n\\n /* Killing and Yanking */\\n\\n emacsyPlusMap['Ctrl-X'] = \\\"ctrlXCmd\\\"; // cnt-x --> processed further via ctrlXMap\\n\\n emacsyPlusMap['Ctrl-K'] = \\\"killCmd\\\";\\n emacsyPlusMap['Ctrl-W'] = \\\"killRegionCmd\\\";\\n emacsyPlusMap['Alt-W'] = \\\"copyCmd\\\";\\n if (os === 'Mac') {emacsyPlusMap['Cmd-W'] = \\\"copyCmd\\\"};\\n emacsyPlusMap['Ctrl-H'] = \\\"delCharBefore\\\";\\n emacsyPlusMap['Ctrl-D'] = \\\"delCharAfter\\\";\\n emacsyPlusMap['Alt-D'] = \\\"delWordAfterCmd\\\";\\n if (os === 'Mac') {emacsyPlusMap['Cmd-D'] = \\\"delWordAfterCmd\\\"};\\n emacsyPlusMap['Ctrl-Backspace'] = \\\"delWordBeforeCmd\\\"; \\n\\n emacsyPlusMap['Ctrl-Y'] = \\\"yankCmd\\\";\\n emacsyPlusMap['Ctrl-O'] = \\\"openLineCmd\\\";\\n\\n /* Cursor motion */\\n\\n emacsyPlusMap['Ctrl-A'] = \\\"goLineStart\\\";\\n emacsyPlusMap['Ctrl-E'] = \\\"goLineEnd\\\";\\n emacsyPlusMap['Ctrl-P'] = \\\"goLineUp\\\";\\n emacsyPlusMap['Up'] = \\\"goLineUp\\\";\\n emacsyPlusMap['Ctrl-N'] = \\\"goLineDown\\\";\\n emacsyPlusMap['Down'] = \\\"goLineDown\\\";\\n emacsyPlusMap['Ctrl-B'] = \\\"goCharLeft\\\";\\n emacsyPlusMap['Left'] = \\\"goCharLeft\\\"; \\n emacsyPlusMap['Ctrl-F'] = \\\"goCharRight\\\";\\n emacsyPlusMap['Right'] = \\\"goCharRight\\\"; \\n emacsyPlusMap['Ctrl-V'] = \\\"goPageUp\\\";\\n\\n //emacsyPlusMap['Cmd-V'] = \\\"goPageDown\\\"; // Preserve for true sys clipboard access\\n // same for Cmd-c (capitalize word)\\n emacsyPlusMap['Cmd-B'] = \\\"goWordLeft\\\"; \\n\\n emacsyPlusMap['Alt-F'] = \\\"goWordRight\\\";\\n if (os === 'Mac') {emacsyPlusMap['Cmd-F'] = \\\"goWordRight\\\";};\\n\\n emacsyPlusMap['Shift-Ctrl-,'] = 'goCellStartCmd'; // Ctrl-<\\n emacsyPlusMap['Shift-Ctrl-.'] = 'goCellEndCmd'; // Ctrl->\\n emacsyPlusMap['Home'] = 'goCellStartCmd';\\n emacsyPlusMap['End'] = 'goCellEndCmd';\\n\\n emacsyPlusMap['Shift-Ctrl-N'] = 'goNxtCellCmd';\\n emacsyPlusMap['Shift-Ctrl-P'] = 'goPrvCellCmd'; \\n\\n if (os === 'Mac') {\\n emacsyPlusMap['Cmd-Up'] = 'goNotebookStartCmd';\\n emacsyPlusMap['Cmd-Down'] = 'goNotebookEndCmd';\\n } else {\\n emacsyPlusMap['Alt-Up'] = 'goNotebookStartCmd';\\n emacsyPlusMap['Alt-Down'] = 'goNotebookEndCmd';\\n }\\n \\n\\n emacsyPlusMap['Ctrl-T'] = \\\"transposeChars\\\";\\n emacsyPlusMap['Ctrl-Space'] = \\\"setMarkCmd\\\";\\n\\n emacsyPlusMap['Ctrl-G'] = \\\"cancelCmd\\\";\\n\\n /* Selections */\\n emacsyPlusMap['Ctrl-Left'] = \\\"selPrevCharCmd\\\";\\n emacsyPlusMap['Ctrl-Right'] = \\\"selNxtCharCmd\\\"; \\n emacsyPlusMap['Shift-Ctrl-Left'] = \\\"selPrevWordCmd\\\";\\n emacsyPlusMap['Shift-Ctrl-Right'] = \\\"selNxtWordCmd\\\";\\n\\n /* Searching */\\n emacsyPlusMap['Ctrl-S'] = \\\"isearchForwardCmd\\\";\\n emacsyPlusMap['Ctrl-R'] = \\\"isearchBackwardCmd\\\";\\n emacsyPlusMap['Shift-Ctrl-S'] = \\\"reSearchForwardCmd\\\";\\n\\n //*******************\\n // For testing binding suspension:\\n \\n //emacsyPlusMap['Shift-X'] = \\\"alertMeCmd\\\"; \\n //emacsyPlusMap['Shift-H'] = \\\"suspendTestCmd\\\";\\n //emacsyPlusMap['Shift-I'] = \\\"restoreTestCmd\\\";\\n //*******************\\n \\n /*--------------- Cnt-X Keymap ------------*/\\n\\n // Now the cnt-X 'secondary' keymap:\\n ctrlXMap['x'] = \\\"saveToRegCmd\\\";\\n ctrlXMap['g'] = \\\"insertFromRegCmd\\\";\\n ctrlXMap['u'] = \\\"undo\\\";\\n ctrlXMap['/'] = \\\"pointToRegisterCmd\\\";\\n ctrlXMap['j'] = \\\"jumpToRegisterCmd\\\";\\n ctrlXMap['h'] = \\\"helpCmd\\\";\\n ctrlXMap['Ctrl-X'] = \\\"xchangePtMarkCmd\\\"; // NOTE: Cnt-x Cnt-X (2nd must be caps)\\n\\n return emacsyPlusMap;\\n }\\n\\n /* ------------------ Utilities ----------------- */\\n\\n var insertTxt = function(cm, txt) {\\n /* Inserts text in a CodeMirror editor at cursor \\n \\n :param cm: CodeMirror editor instance\\n :type cm: CodeMirror\\n :param txt: text to insert\\n :type txt: string\\n\\n */\\n \\n var cursor = cm.doc.getCursor();\\n // Copy cursor so as not to disrupt selections:\\n var pos = {line : cursor.line, ch : cursor.ch}\\n cm.doc.replaceRange(txt, pos);\\n }\\n\\n var multiKillCheck = function(cm, keystroke, event) {\\n /*\\n Handler called when keys are pressed or mouse is clicked.\\n Active only while successive cnt-K's have not been interrupted\\n by any other key press. This allows multiple cnt-Ks to \\n kill multiple lines, stringing them together for later\\n yank.\\n\\n */\\n if (keystroke !== 'Ctrl-K') {\\n CodeMirror.emacsArea.multiKillInProgress = false;\\n cm.off('keyHandled', multiKillCheck);\\n cm.off('mouseDown', multiKillCheck);\\n }\\n }\\n\\n var getCm = function(cell) {\\n /*\\n Returns the CodeMirror editor instance of\\n a Jupyter cell. If cell is provided then\\n that cell's editor is returned. Else the\\n editor of the currently selected cell is\\n returned.\\n\\n :param cell: optionally the cell whose CodeMirror editor instance is to be returned.\\n :type cell: {JupyterCell | undefined}\\n :returns the cell's CodeMirror instance\\n :rtype CodeMirror\\n */\\n if (typeof(cell) === 'undefined') {\\n cell = Jupyter.notebook.get_selected_cell();\\n }\\n return cell.code_mirror;\\n }\\n\\n var clearSelection = function(cm) {\\n cm.doc.setSelection(cm.doc.getCursor(), cm.doc.getCursor());\\n }\\n\\n var toHtml = function() {\\n /*\\n Calls SafeKeyMap instances toHtml() to get\\n an array of Command/Keystroke pairs. Then \\n adds the ctr-x commands to the result. Returns\\n the combination.\\n */\\n\\n // Get raw array of 2-tuples: cmdName/keystroke:\\n bindings = km.toTxt();\\n // Add the ctrl-X keys:\\n for (var cntXKey in ctrlXMap) {\\n if (ctrlXMap.hasOwnProperty(cntXKey)) {\\n bindings.push([ctrlXMap[cntXKey], `Ctrl-x ${cntXKey}`]);\\n }\\n }\\n // I don't know where Ctrl-/ is set (to comment-region),\\n // but it is...somewhere:\\n bindings.push(['commentRegion', 'Ctrl-/'])\\n \\n // Re-sort the bindings:\\n bindings.sort(\\n function(cmdVal1, cmdVal2) {\\n switch(cmdVal1[0] < cmdVal2[0]) {\\n case true:\\n return -1;\\n break;\\n case false:\\n if (cmdVal1[0] === cmdVal2[0]) {\\n return 0;\\n } else {\\n return 1;\\n }\\n break;\\n }\\n }\\n )\\n // Turn into html table:\\n var tableHtml = km.toHtml(bindings);\\n var htmlPage = `

    EmacsyPlus Bindings

    ${tableHtml}`;\\n return htmlPage;\\n }\\n\\n var addSearchHighlightRule = function() {\\n /*\\n // Hack: I couldn't figure out how to add a\\n // css sheet whose class names were found by\\n //\\n // CodeMirror.doc.setMarker(start,end,{className : }).\\n //\\n // So the following (internally) looks for the already laoded codemirror.css\\n // sheet and adds a highlighting rule to it.\\n // Terrible hack.\\n\\n */\\n var cssSheets = document.styleSheets;\\n var cmSheet = null;\\n for (let sheet of cssSheets) {\\n if (sheet.href.search(/codemirror.css/) > -1) {\\n cmSheet = sheet;\\n break;\\n }\\n }\\n if (cmSheet === null) {\\n return false;\\n } else {\\n // Yellow:\\n cmSheet.insertRule(\\\".emacsyPlusSearchHighlight { background-color : #F9F221; }\\\", 1)\\n }\\n return true;\\n }\\n\\n /*------------------------------- Commands for CodeMirror -------------- */\\n\\n //***********\\n // For testing binding suspension, which isn't working yet:\\n \\n var alertMeCmd = function(cm) {\\n alert('Did it');\\n }\\n var suspendTestCmd = function(cm) {\\n km.suspendKeyBinding('X');\\n }\\n var restoreTestCmd = function(cm) {\\n km.restoreKeyBinding('X');\\n }\\n \\n //*********** \\n\\n var helpCmd = function(cm) {\\n /*\\n Pops up window with key bindings.\\n */\\n \\n var wnd = window.open('about:blank', 'Emacs Help', 'width=400,height=500,scrollbars=yes');\\n wnd.document.write(toHtml());\\n }\\n\\n var ctrlXCmd = function(cm) {\\n /* Handling the cnt-X family of keys. Called whenever Cntl-K\\n is pressed. Function waits for the next char to determine\\n which cnt-x command is intended. Then dispatches for\\n further handling.\\n\\n :param cm: CodeMirror instance\\n :type cm: CodeMirror\\n */\\n // Get next key from user, which will be the key\\n // into the cnt-x keymap. Complication: Cnt-X Cnt-X\\n // (exchange mark/point) would re-enter this method\\n // rather than become available to getNextChar().\\n // temporarily disable cnt-X in the keymap:\\n \\n // NOTE: the suspent/restore bindings command is not working.\\n // So Cnt-x Cnt-x will re-enter, rather then be made\\n // available to the getNextChar() below. Needs fixing\\n // in safeKeyMap.\\n km.suspendKeyBinding('Ctrl-X');\\n km.getNextChar(cm).then(function(cntXKey) {\\n /*\\n Once the promise is fulfilled, it will deliver the\\n cnt-x command to run. E.g. the 'g' in 'Cnt-x g'.\\n If the cntrlXMap has an entry for 'g', the value\\n will be a function that will take one arg: the \\n CodeMirror editor object cm. But first: restore\\n the ctrl-x cmd:\\n */\\n\\n km.restoreKeyBinding('Ctrl-X')\\n \\n // Get name of handler function:\\n\\n var handlerName = ctrlXMap[cntXKey]\\n if (typeof(handlerName) === 'undefined') {\\n return;\\n }\\n var handler = km.cmdFromName(handlerName);\\n if (typeof(handler) === 'undefined') {\\n return;\\n }\\n handler(cm);\\n });\\n }\\n\\n var saveToRegCmd = function(cm) {\\n /* NOTE: called from ctrlXCmd() handler \\n Save current selection (if any) in register. \\n Waits for following char as the register name.\\n */\\n\\n if (! cm.doc.somethingSelected()) {\\n // Nothing selected: grab region between mark and cursor:\\n cm.doc.setSelection(getMark(cm), cm.doc.getCursor());\\n }\\n \\n var selectedTxt = cm.getSelection();\\n // Grab the next keystroke, which is\\n // the register name:\\n km.getNextChar(cm).then(function (regName) {\\n CodeMirror.emacsArea.registers[regName] = selectedTxt;\\n clearSelection(cm);\\n cm.doc.setExtending(false);\\n })\\n }\\n\\n var insertFromRegCmd = function(cm) {\\n /* NOTE: called from ctrlXCmd() handler \\n Inserts content of register at current cursor.\\n Waits for following char as the register name.\\n */\\n \\n // Grab the next keystroke, which is\\n // the register name:\\n \\n km.getNextChar(cm).then(function (regName) {\\n insertTxt(cm, CodeMirror.emacsArea.registers[regName]);\\n })\\n }\\n\\n var pointToRegisterCmd = function(cm) {\\n var focusedCell = Jupyter.notebook.get_selected_cell();\\n var bookmark = cm.doc.setBookmark(cm.doc.getCursor());\\n // Grab the next keystroke, which is\\n // the register name:\\n km.getNextChar(cm).then(function (regName) {\\n CodeMirror.emacsArea.bookmarks[regName] = {cell : focusedCell, bookmark : bookmark}\\n })\\n }\\n\\n var jumpToRegisterCmd = function(cm) {\\n // Get bookmark-register name:\\n km.getNextChar(cm).then(function (regName) {\\n var cellBm = CodeMirror.emacsArea.bookmarks[regName]\\n if (typeof(cellBm) === 'undefined') {\\n return\\n }\\n var cell = cellBm.cell;\\n var bm = cellBm.bookmark;\\n // Get that cell's CodeMirror editor instance:\\n newCm = getCm(cell);\\n // Change focus to bookmark-cell:\\n newCm.focus();\\n newCm.doc.setCursor(bm.find());\\n })\\n }\\n\\n var openLineCmd = function(cm) {\\n var cursor = cm.doc.getCursor();\\n var newCursor = {line : cursor.line, ch : cursor.ch}\\n insertTxt(cm, '\\\\n');\\n cm.doc.setCursor(newCursor);\\n }\\n\\n var copyCmd = function(cm) {\\n /*\\n If anything is selected, copy it to CodeMirror.emacsArea.killedTxt.\\n The yankCmd knows to find it there.\\n\\n :param cm: CodeMirror instance\\n :type cm: CodeMirror\\n */\\n if (cm.somethingSelected()) {\\n var selectedTxt = cm.getSelection();\\n CodeMirror.emacsArea.killedTxt = selectedTxt;\\n cm.doc.setExtending(false);\\n clearSelection(cm);\\n }\\n }\\n\\n var setMarkCmd = function(cm) {\\n mark = cm.doc.getCursor();\\n clearSelection(cm);\\n cm.doc.setExtending(true);\\n }\\n\\n var getMark = function(cm) {\\n return mark;\\n }\\n\\n var xchangePtMarkCmd = function(cm) {\\n var oldMark = getMark(cm);\\n var currCur = cm.doc.getCursor();\\n var newMark = {line : currCur.line, ch : currCur.ch}\\n // Marker gets current cursor pos:\\n setMarkCmd(cm);\\n cm.doc.setCursor(oldMark)\\n cm.doc.setSelection(oldMark, newMark);\\n }\\n\\n var delWordAfterCmd = function(cm) {\\n var cur = cm.doc.getCursor();\\n selNxtWordCmd(cm);\\n var word = cm.doc.getSelection();\\n CodeMirror.emacsArea.killedTxt = word;\\n cm.doc.replaceSelection(\\\"\\\");\\n }\\n\\n var delWordBeforeCmd = function(cm) {\\n var cur = cm.doc.getCursor();\\n selPrevWordCmd(cm);\\n var word = cm.doc.getSelection();\\n CodeMirror.emacsArea.killedTxt = word;\\n cm.doc.replaceSelection(\\\"\\\"); \\n }\\n\\n var selNxtCharCmd = function(cm) {\\n var wasExtending = cm.doc.getExtending(); \\n if (! wasExtending) {\\n cm.doc.setExtending(true);\\n }\\n cm.execCommand('goCharRight');\\n cm.doc.setExtending(wasExtending);\\n }\\n\\n var selPrevCharCmd = function(cm) {\\n var wasExtending = cm.doc.getExtending(); \\n if (! wasExtending) {\\n cm.doc.setExtending(true);\\n }\\n cm.execCommand('goCharLeft');\\n cm.doc.setExtending(wasExtending);\\n }\\n\\n var selNxtWordCmd = function(cm) {\\n cm.doc.setExtending(true); \\n cm.execCommand('goWordRight');\\n }\\n\\n var selPrevWordCmd = function(cm) {\\n cm.doc.setExtending(true);\\n cm.execCommand('goWordLeft');\\n }\\n\\n var cancelCmd = function(cm) {\\n if (cm.doc.getExtending()) {\\n // If currently extending selection,\\n // clear that condition. If user wants\\n // to (also) clear the selection, a\\n // second cnt-g will do that in the\\n // else branch:\\n cm.doc.setExtending(false);\\n } else {\\n // Setting cursor to a point is\\n // the equivalent of clearing selection:\\n cm.doc.setCursor(cm.doc.getCursor());\\n }\\n abortISearch();\\n }\\n \\n var undoCmd = function(cm) {\\n undo(cm);\\n }\\n \\n var killCmd = function(cm) {\\n /* cnt-K: kill to end of line and keep content in cut buffer \\n\\n :param cm: CodeMirror instance\\n :type cm: CodeMirror\\n */\\n \\n var curLine = cm.doc.getCursor().line;\\n var curChr = cm.doc.getCursor().ch;\\n var line = cm.doc.getLine(curLine);\\n\\n if (! CodeMirror.emacsArea.multiKillInProgress) {\\n CodeMirror.emacsArea.killedTxt = \\\"\\\";\\n }\\n \\n var killTxt = line.substring(curChr);\\n if (killTxt.length === 0) {\\n cm.execCommand('deleteLine');\\n killTxt = '\\\\n';\\n } else {\\n cm.execCommand('delWrappedLineRight');\\n }\\n\\n CodeMirror.emacsArea.killedTxt += killTxt;\\n cm.on('keyHandled', multiKillCheck);\\n cm.on('mouseDown', multiKillCheck);\\n CodeMirror.emacsArea.multiKillInProgress = true;\\n return false;\\n }\\n\\n var killRegionCmd = function(cm) {\\n if (! cm.doc.somethingSelected()) {\\n // Nothing selected: delete between mark and cursor:\\n cm.doc.setSelection(getMark(cm), cm.doc.getCursor());\\n }\\n CodeMirror.emacsArea.killedTxt = cm.doc.getSelection();\\n cm.doc.replaceSelection(\\\"\\\");\\n cm.doc.setExtending(false);\\n return;\\n }\\n\\n var yankCmd = function(cm) {\\n /* Insert cut buffer at current cursor.\\n\\n :param cm: CodeMirror instance\\n :type cm: CodeMirror\\n */\\n \\n var killedTxt = CodeMirror.emacsArea.killedTxt;\\n insertTxt(cm, killedTxt);\\n return false;\\n }\\n\\n var goCellStartCmd = function(cm) {\\n cm.doc.setCursor({line : 0, ch : 0});\\n }\\n\\n var goCellEndCmd = function(cm) {\\n var lastLine = cm.getLine(cm.doc.lastLine())\\n cm.doc.setCursor({line : cm.doc.lineCount(), ch : lastLine.length-1});\\n }\\n\\n var goNxtCellCmd = function(cm) {\\n Jupyter.notebook.select_next().edit_mode();\\n }\\n\\n var goPrvCellCmd = function(cm) {\\n Jupyter.notebook.select_prev().edit_mode();\\n }\\n\\n var goNotebookStartCmd = function(cm) {\\n getCm(Jupyter.notebook.get_cells()[0]).focus();\\n }\\n\\n var goNotebookEndCmd = function(cm) {\\n // array.slice(-1)[0] returns last element:\\n getCm(Jupyter.notebook.get_cells().slice(-1)[0]).focus();\\n }\\n\\n var isearchForwardCmd = function(cm) {\\n isearchCmd(cm, false); // reverse === false\\n }\\n \\n var isearchBackwardCmd = function(cm) {\\n isearchCmd(cm, true); // reverse === true\\n }\\n\\n var isearchCmd = function(cm, reverse) {\\n prepSearch(cm);\\n // This ISearcher instance will search from\\n // the current position. The keydown interrupt\\n // service routing iSearchHandler will add or\\n // remove letters.\\n iSearcher = ISearcher('', false, reverse); // false: not regex search\\n // Ensure the persistent search term from last\\n // search is cleared out:\\n iSearcher.emptySearchTerm();\\n // Ensure that search starts at cursor:\\n primeSearchStart(cm, iSearcher); \\n // Present the minibuffer, get focus to it,\\n // and behave isearchy via the iSearchHandler:\\n var mBuf = monitorMiniBuf(iSearchHandler)\\n }\\n\\n var reSearchForwardCmd = function(cm) {\\n prepSearch(cm);\\n // This ISearcher instance will search from\\n // the current position. The keydown interrupt\\n // service routing iSearchHandler will add or\\n // remove letters.\\n iSearcher = ISearcher('', true, false); // true: be regex search,\\n // false: not reverse\\n // Ensure the persistent search term from last\\n // search is cleared out:\\n iSearcher.emptySearchTerm();\\n // Ensure that search starts at cursor:\\n primeSearchStart(cm, iSearcher);\\n // Present the minibuffer, get focus to it,\\n // and behave isearchy via the iSearchHandler:\\n var mBuf = monitorMiniBuf(iSearchHandler)\\n }\\n\\n var prepSearch = function(cm) {\\n var cur = cm.doc.getCursor();\\n var cell = Jupyter.notebook.get_selected_cell()\\n savedPlace = {cm : cm, line : cur.line, ch : cur.ch, cell : cell}; \\n }\\n\\n var primeSearchStart = function(cm, iSearcher) {\\n /*\\n Makes the very first char be found where\\n the cursor is, rather than at start of\\n current input cell:\\n */\\n\\n if (iSearcher.curPlace().inCellArea() === 'input') {\\n // Ensure that the search starts at\\n // current cursor:\\n var curCur = cm.doc.getCursor();\\n iSearcher.setInitialSearchStart(curCur);\\n }\\n }\\n\\n /* ----------- Incremental Search -------------*/\\n\\n var iSearchHandler = function(evt) {\\n // Called with hidden first arg: 'this',\\n // which is the minibuffer.\\n\\n // If abortISearch() was called, and \\n // a keydown was already in the queue,\\n // we'll know it here, b/c abortISearch()\\n // will have set iSearcher to null.\\n\\n if (iSearcher === null) {\\n return;\\n }\\n\\n // If doing a regex search, 'normal',\\n // i.e. non-error minibuf background\\n // is green:\\n var normalColor = 'white';\\n if (iSearcher.regexSearch()) {\\n normalColor = 'DarkTurquoise';\\n }\\n\\n // Filter out unwanted keystrokes in minibuf:\\n if (! iSearchAllowable(evt)) {\\n evt.preventDefault();\\n evt.stopPropagation();\\n return;\\n }\\n\\n // cnt-g or esc?\\n if (evt.abort) {\\n // Save the current search term in case\\n // we want to reuse it:\\n prevSearchTerm = iSearcher.searchTerm();\\n var restoreCursor = true;\\n if (evt.abort === 'esc') {\\n restoreCursor = false;\\n // For regex we only collected the regex\\n // in the minibuf so far. Execute the\\n // search before quiting the minibuf:\\n var regexSearchRes = iSearcher.next();\\n // If search failed, restore the cursor\\n // to its original pos; else last cell\\n // will be current:\\n if (regexSearchRes === null) {\\n restoreCursor = true;\\n }\\n }\\n abortISearch(restoreCursor);\\n evt.preventDefault();\\n evt.stopPropagation();\\n return;\\n }\\n\\n var mBuf = this\\n var bufVal = mBuf.value;\\n\\n // If minibuffer empty, take opportunity\\n // to ensure that isearcher's current search\\n // term is also empty:\\n // iSearcher.emptySearchTerm();\\n \\n // Another ctrl-s or ctrl-r while in minibuf:\\n if (evt.search === 'nxtForward' ||\\n evt.search === 'nxtBackward') {\\n\\n evt.search === 'nxtForward' ?\\n iSearcher.setReverse(false) : iSearcher.setReverse(true);\\n \\n // If minibuffer is empty, fill in\\n // the previous search term and\\n // run the search as if it had been\\n // entered by hand:\\n if (bufVal.length === 0 && prevSearchTerm !== null) {\\n \\n // If prev search term had any caps, set case\\n // sensitivity:\\n if (prevSearchTerm.search(/[A-Z]/) > -1) {\\n iSearcher.setCaseSensitivity(true);\\n }\\n var matchedSubstr = iSearcher.playSearch(prevSearchTerm);\\n if (matchedSubstr.length < prevSearchTerm.length) {\\n mBuf.style.backgroundColor = 'red';\\n }\\n mBuf.value = matchedSubstr;\\n bufVal = mBuf.value;\\n } else {\\n // Cnt-s/Cnt-r after a term was found:\\n var res = iSearcher.searchAgain();\\n if (res === null) {\\n mBuf.style.backgroundColor = 'red'; \\n } else {\\n mBuf.style.backgroundColor = normalColor;\\n }\\n }\\n evt.preventDefault();\\n evt.stopPropagation();\\n return;\\n }\\n\\n mBuf.style.backgroundColor = normalColor; \\n mBuf.focus();\\n\\n // Case sensitivity is determined\\n // by any of the search term chars\\n // being upper case. Check whether\\n // the new key, appended to the current\\n // content of the minibuffer fills that\\n // condition. BUT: control chars are returned\\n // as words, e.g. 'Backspace', which would\\n // turn the search case sensistive. So: only\\n // check with single-length new keystrokes:\\n iSearcher.setCaseSensitivity(false);\\n var newKey = evt.key;\\n if (newKey.length > 1) {\\n newKey = '';\\n }\\n if ((bufVal+newKey).search(/[A-Z]/) > -1) {\\n iSearcher.setCaseSensitivity(true);\\n }\\n\\n // Add the new char to the minibuffer and the\\n // iSearcher instance, unless it was cnt-s or cnt-r\\n // (search again/search backward):\\n\\n var searchRes = null;\\n\\n if (evt.search === undefined) {\\n if (evt.which === BS_CODE) {\\n mBuf.value = bufVal.slice(0,-1);\\n searchRes = iSearcher.chopChar();\\n } else {\\n mBuf.value = bufVal + evt.key;\\n searchRes = iSearcher.addChar(evt.key);\\n }\\n }\\n\\n if (searchRes !== null || iSearcher.searchTerm().length === 0) {\\n mBuf.style.backgroundColor = normalColor;\\n } else {\\n mBuf.style.backgroundColor = 'red';\\n }\\n\\n evt.preventDefault();\\n evt.stopPropagation();\\n }\\n\\n var abortISearch = function(restoreCursor) {\\n // If abortISearch is called twice,\\n // iSearcher will be null. In that case,\\n // just return. This way it's safe to\\n // call abortISearch multiple times:\\n if (iSearcher === null) {\\n return;\\n }\\n \\n removeMiniBuf();\\n iSearcher.clearHighlights();\\n\\n if (typeof(restoreCursor) === 'undefined') {\\n restoreCursor = true;\\n }\\n\\n var cells = Jupyter.notebook.get_cells();\\n var lastPlace = iSearcher.curPlace();\\n var curCell = cells[lastPlace.cellIndx()];\\n\\n if (restoreCursor && typeof(savedPlace) === 'object') {\\n savedPlace.cm.doc.setCursor({line: savedPlace.line, ch: savedPlace.ch});\\n savedPlace.cell.focus_cell();\\n Jupyter.notebook.edit_mode();\\n } else {\\n var cm = getCm(curCell);\\n // Selection within output area:\\n var outSel = lastPlace.outputSelection();\\n \\n if (lastPlace.inCellArea() === 'output') {\\n\\n // Put cell into edit mode early, b/c that\\n // kills the selection in the output area.\\n // We'll restore it right after:\\n\\n curCell.focus_cell();\\n Jupyter.notebook.edit_mode();\\n\\n // Put cursor at end of input area\\n // of the cell to which the output area\\n // belongs. Unfortunately, this will lose\\n // the selection inside the output area:\\n cm.execCommand('goDocEnd');\\n iSearcher.setDivSelectionRange(curCell, outSel);\\n } else {\\n // Easy: set cursor within input area.\\n // Highlight will be cleared by this, but\\n // cursor will be right after the match:\\n curCell.code_mirror.doc.setCursor(lastPlace.selection().head);\\n\\n curCell.focus_cell();\\n Jupyter.notebook.edit_mode();\\n \\n }\\n }\\n \\n iSearcher = null;\\n }\\n\\n var addMiniBuf = function() {\\n // Get input area of cell:\\n var toolbarDiv = getToolbarDomEl();\\n var miniBuf = document.createElement('input');\\n miniBuf.type = 'text';\\n toolbarDiv[mBufName] = miniBuf;\\n toolbarDiv.appendChild(miniBuf);\\n miniBuf.style.paddingLeft = '5px';\\n miniBuf.style.marginLeft = '5px';\\n return miniBuf;\\n }\\n\\n var removeMiniBuf = function() {\\n var miniBuf = getToolbarDomEl()[mBufName];\\n if (typeof(miniBuf) === 'undefined') {\\n return '';\\n }\\n stopMonitorMiniBuf(iSearchHandler);\\n var miniBufContent = miniBuf.value;\\n miniBuf.value = \\\"\\\";\\n var parentEl = miniBuf.parentElement;\\n if (parentEl != null && typeof(parentEl) != 'undefined') {\\n parentEl.removeChild(miniBuf);\\n parentEl[mBufName] = undefined;\\n }\\n return miniBufContent;\\n }\\n\\n var monitorMiniBuf = function(callback) {\\n\\n // Protect against being called multiple\\n // times:\\n if (minibufMonitored) {\\n return;\\n }\\n \\n var miniBuf = getMiniBufFromToolbar();\\n miniBuf.focus();\\n clearAllSelections();\\n // Need event listener to be named function,\\n // b/c we'll have to remove it when isearch\\n // is over:\\n mBufKeyListener = function(evt) {\\n // Have this call, rather than making\\n // callback the listener directly so that\\n // we can provide the miniBuf environment:\\n callback.call(miniBuf, evt);\\n }\\n mBufClickListener = function(evt) {\\n // If clicked on minibuffer, do nothing.\\n // If clicked outside, abort search:\\n if (evt.target === miniBuf) {\\n miniBuf.focus();\\n return;\\n }\\n \\n abortISearch(false); // don't restore cursor, leave it at selection.\\n document.removeEventListener(\\\"mousedown\\\", mBufClickListener);\\n }\\n getToolbarDomEl().addEventListener(\\\"keydown\\\", mBufKeyListener);\\n document.addEventListener(\\\"mousedown\\\", mBufClickListener);\\n minibufMonitored = true;\\n return miniBuf;\\n }\\n\\n var stopMonitorMiniBuf = function(callback) {\\n getToolbarDomEl().removeEventListener(\\\"keydown\\\", mBufKeyListener);\\n document.removeEventListener(\\\"mousedown\\\", mBufClickListener);\\n minibufMonitored = false;\\n }\\n\\n var getMiniBufFromToolbar = function() {\\n var toolbarDiv = getToolbarDomEl();\\n var miniBuf = getToolbarDomEl()[mBufName]\\n if (typeof(miniBuf) === 'undefined') {\\n miniBuf = addMiniBuf();\\n }\\n return miniBuf;\\n }\\n\\n var getToolbarDomEl = function() {\\n return Jupyter.toolbar.element[0];\\n }\\n\\n var ensureCell = function(cell) {\\n if (typeof(cell) === 'undefined') {\\n cell = Jupyter.notebook.get_selected_cell();\\n }\\n return cell;\\n }\\n \\n\\n /* -------------- Utilities ---------------- */\\n\\n var iSearchAllowable = function(evt) {\\n\\n /*\\n Keydown handler while in minibuffer.\\n Accepts: esc, cnt-g, cnt-s, cnt-r,\\n shift-ctrl-s, shift-ctrl-r. \\n\\n Sets additional event object properties for the caller\\n to know what went on:\\n - evt.nxtForward === true : ctrl-s or shift-ctrl-s was entered\\n - evt.nxtBackward === true : ctrl-r or shift-ctrl-r was entered.\\n - evt.abort === esc : esc entered in iSearch mode, or \\n ENTER entered in regex Search mode.\\n */\\n\\n var keyCode = evt.which;\\n\\n evt.abort = false;\\n evt.search = undefined;\\n\\n // Shift-Ctrl-s or Shift-Ctrl-r inside regex-forward-search\\n // minibuf? This asks for 'do it again':\\n if (evt.shiftKey && evt.ctrlKey) {\\n if (evt.key === 'S') {\\n evt.search = 'nxtForward';\\n return true;\\n } else if (evt.key === 'R') {\\n evt.search = 'nxtBackward';\\n return true;\\n }\\n }\\n\\n // Ctrl-G for abort search. Ctrl-s for search\\n // forward again. Used when doing Ctrl-s into\\n // new minibuffer, and wanting the old search\\n // term placed there. Analogously for Ctrl-r:\\n if (evt.ctrlKey) {\\n switch(evt.key) {\\n case 'g':\\n evt.abort = 'Ctrl-G';\\n return true;\\n break;\\n case 's':\\n evt.search = 'nxtForward';\\n return true;\\n break;\\n case 'r':\\n evt.search = 'nxtBackward';\\n return true;\\n break;\\n default:\\n return false; // have caller do nothing\\n break;\\n }\\n }\\n \\n // In iSearch mode: exit search,\\n // leave cursor at found spot.\\n // For regex search: execute the\\n // search:\\n if (keyCode === ENTER_CODE) {\\n evt.abort = 'esc';\\n return true;\\n }\\n\\n // Exit search, leave cursor where\\n // search found spot:\\n if (keyCode === ESC_CODE) {\\n evt.abort = 'esc';\\n return true;\\n }\\n\\n var valid =\\n (keyCode === BS_CODE) ||\\n (keyCode > 47 && keyCode < 58) || // number keys\\n (keyCode == 32) || // spacebar to tilde\\n (keyCode >= 48 && keyCode < 91) || // letter/number keys\\n (keyCode > 95 && keyCode < 112) || // numpad keys\\n (keyCode == 173) || // underscore\\n (keyCode > 185 && keyCode < 193) || // ;=,-./`\\n (keyCode > 218 && keyCode < 223); // [\\\\]' (in order) 173: _\\n\\n return valid;\\n }\\n\\n /*----------------------\\n | clearAllSelections\\n | ----------------- */\\n\\n var clearAllSelections = function() {\\n for (let cell of Jupyter.notebook.get_cells()) {\\n clearSelection(cell.code_mirror);\\n }\\n }\\n \\n /*----------------------\\n | findLastSelection\\n | ----------------- */\\n\\n var findLastSelection = function() {\\n /*\\n Returns the last selection within the last cell\\n of a notebook. If no selection exists, returns\\n undefined. \\n\\n :returns Object with properties 'cell', and 'selection'.\\n The cell property holds the cell that contains the\\n last selection. The selection object is of the form\\n {anchor : {line: : ch: }, head : {line: : ch: }}\\n :rtype {object | undefined}\\n */\\n var cells = Jupyter.notebook.get_cells();\\n for (let i=cells.length-1; i>=0; i--) {\\n var cell = cells[i];\\n var selections = cell.code_mirror.doc.listSelections();\\n if (selections.length > 0) {\\n // Found last cell with at least one\\n // selection:\\n var lastSelection = selections[selections.length - 1];\\n // Every cell has one 'empty' selection. It's\\n // anchor and head are the same:\\n if (selectionEmpty(lastSelection)) {\\n continue;\\n }\\n return {cell : cell, selection: lastSelection};\\n }\\n }\\n return undefined;\\n }\\n \\n\\n var selectionEmpty = function(sel) {\\n return (sel.anchor.ch > 0);\\n // return (sel.anchor.line === sel.head.line &&\\n // sel.anchor.ch === sel.head.ch);\\n }\\n\\n /* ---------------------------- Call Constructor and Export Public Methods ---------- */\\n\\n return constructor();\\n\\n\\n}\",\n \"get OSXPlayer() {}\",\n \"function Console() {\\n}\",\n \"function AbstractFS(){\\n\\n var anchor = this;\\n\\n // NOTE: We're leaning on the fact here that require('fs') is\\n // legitimate in both RingoJS and Node.js, and are available in\\n // them both automatically.\\n var fs = require('fs');\\n \\n // First things first: probe our environment and make a best\\n // guess.\\n anchor._env_type = null;\\n if( typeof(org) != 'undefined' && typeof(org.ringo) != 'undefined' ){\\n\\tanchor._env_type = 'RingoJS';\\n }else if( typeof(org) != 'undefined' && typeof(org.rhino) != 'undefined' ){\\n\\t// TODO\\n\\t//anchor._env_type = 'Rhino';\\n }else if( typeof(global) != 'undefined' &&\\n\\t typeof(global.process) != 'undefined' ){\\n\\tanchor._env_type = 'Node.js';\\n }else{\\n\\tanchor._env_type = '???';\\n }\\n\\n /*\\n * Function: environment\\n * \\n * Return a string representation og the current running\\n * environment.\\n *\\n * Parameters:\\n * n/a\\n *\\n * Returns:\\n * string\\n */\\n anchor.environment = function(){\\n\\treturn anchor._env_type;\\n };\\n\\n // Some internal mechanisms to make this process easier.\\n function _node_p(){\\n\\tvar ret = false;\\n\\tif( anchor.environment() == 'Node.js' ){ ret = true; }\\n\\treturn ret;\\n }\\n function _ringo_p(){\\n\\tvar ret = false;\\n\\tif( anchor.environment() == 'RingoJS' ){ ret = true; }\\n\\treturn ret;\\n }\\n function _unimplemented(funname){\\n\\tthrow new Error('The function \\\"' + funname +\\n\\t\\t\\t'\\\" is not implemented for ' + anchor.environment());\\n }\\n\\n /*\\n * Function: exists_p\\n * \\n * Whether or not a path exists.\\n *\\n * Parameters:\\n * path - the desired path as a string\\n *\\n * Returns:\\n * boolean\\n */\\n anchor.exists_p = function(path){\\n\\tvar ret = null;\\n\\tif( _node_p() ){\\n\\t ret = fs.existsSync(path);\\n\\t}else if( _ringo_p() ){\\n\\t ret = fs.exists(path);\\n\\t}else{\\n\\t _unimplemented('exists_p');\\n\\t}\\n\\treturn ret;\\n };\\n\\n /*\\n * Function: file_p\\n * \\n * Returns whether or not a path is a file.\\n *\\n * Parameters:\\n * path - the desired path as a string\\n *\\n * Returns:\\n * boolean\\n */\\n anchor.file_p = function(path){\\n\\tvar ret = false;\\n\\tif( _node_p() ){\\n\\t var stats = fs.statSync(path);\\n\\t if( stats && stats.isFile() ){ ret = true; }\\n\\t}else if( _ringo_p() ){\\n\\t ret = fs.isFile(path);\\n\\t}else{\\n\\t _unimplemented('file_p');\\n\\t}\\n\\treturn ret;\\n };\\n\\n /*\\n * Function: read_file\\n * \\n * Read a file, returning it as a string.\\n *\\n * Parameters:\\n * path - the desired path as a string\\n *\\n * Returns:\\n * string or null\\n */\\n anchor.read_file = function(path){\\n\\tvar ret = null;\\n\\tif( _node_p() ){\\n\\t var buf = fs.readFileSync(path)\\n\\t if( buf ){ ret = buf.toString(); }\\n\\t}else if( _ringo_p() ){\\n\\t ret = fs.read(path);\\n\\t}else{\\n\\t _unimplemented('read_file');\\n\\t}\\n\\treturn ret;\\n };\\n\\n /*\\n * Function: list_directory\\n * \\n * Return a list of the files in a directory (names relative to\\n * the directory) as strings.\\n *\\n * Parameters:\\n * path - the desired path as a string\\n *\\n * Returns:\\n * list of strings\\n */\\n anchor.list_directory = function(path){\\n\\tvar ret = [];\\n\\tif( _node_p() ){\\n\\t ret = fs.readdirSync(path);\\n\\t}else if( _ringo_p() ){\\n\\t ret = fs.list(path);\\n\\t}else{\\n\\t _unimplemented('list_dir');\\n\\t}\\n\\treturn ret;\\n };\\n\\n}\",\n \"function Pf(e,t,a,n){var r=e.display,f=!1,o=pn(e,function(t){xo&&(r.scroller.draggable=!1),e.state.draggingText=!1,ke(r.wrapper.ownerDocument,\\\"mouseup\\\",o),ke(r.wrapper.ownerDocument,\\\"mousemove\\\",i),ke(r.scroller,\\\"dragstart\\\",s),ke(r.scroller,\\\"drop\\\",o),f||(Ae(t),n.addNew||pr(e.doc,a,null,null,n.extend),\\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\\n xo||vo&&9==wo?setTimeout(function(){r.wrapper.ownerDocument.body.focus(),r.input.focus()},20):r.input.focus())}),i=function(e){f=f||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},s=function(){return f=!0};\\n // Let the drag handler handle this.\\n xo&&(r.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,\\n // IE's approach to draggable\\n r.scroller.dragDrop&&r.scroller.dragDrop(),ni(r.wrapper.ownerDocument,\\\"mouseup\\\",o),ni(r.wrapper.ownerDocument,\\\"mousemove\\\",i),ni(r.scroller,\\\"dragstart\\\",s),ni(r.scroller,\\\"drop\\\",o),La(e),setTimeout(function(){return r.input.focus()},20)}\",\n \"function shellWhereAmI(args)\\n{\\n _StdIn.putText(_UserLocation); \\n}\",\n \"input()\\n{\\n const readline = require('readline-sync');\\n const r1 = readline.createInterface({input: ProcessingInstruction.stdin, output : ProcessingInstruction.stdout})\\n return r1;\\n\\n}\",\n \"function executeShellBuffer() {\\n\\tvar response = '';\\n\\tvar do_clear = false;\\n\\tvar path = curr_dir.split('/').filter(word => word != '');\\n\\t//console.log(path);\\n\\tvar work_dir = file_structure;\\n\\tfor (var i = 0; i < path.length; i++) {\\n\\t\\twork_dir = work_dir[path[i]];\\n\\t}\\n\\tdirectories = Object.keys(work_dir).filter(word => word != 'files');\\n\\tfiles = work_dir.files;\\n\\t// command parsing logic goes here\\n // TODO: split the shell_buffer by space, parse args properly\\n\\tif (shell_buffer.slice(0, 2) == 'vi') {\\n\\t\\tresponse = handleVim(work_dir)\\n\\t} else if (shell_buffer.slice(0, 2) == 'ls') {\\n var toDisplay = directories.concat(files);\\n \\n if (shell_buffer.indexOf('-a') !== -1) {\\n\\t\\t\\ttoDisplay = ['.', '..'].concat(toDisplay);\\n\\t\\t\\t// TODO: implement hidden files here\\n\\t\\t}\\n\\t\\tresponse = (toDisplay).join(' ');\\n\\t} else if (shell_buffer.slice(0, 2) == 'cd') {\\n\\t\\tresponse = handleCd(path);\\n\\t} else if (shell_buffer == 'pwd') {\\n\\t\\tresponse = '/' + curr_dir\\n\\t} else if (shell_buffer == 'clear') {\\n\\t\\tdo_clear = true;\\n\\t} else if (shell_buffer != '') {\\n\\t\\tresponse = shell_buffer + ': command not found';\\n\\t}\\n\\n\\tif (shell_buffer != '') {\\n\\t\\tbash_history[bash_history_pointer] = shell_buffer;\\n\\t\\t// current end of history is not empty command\\n\\t\\tif (bash_history[bash_history.length-1] != '') {\\n\\t\\t\\tbash_history_pointer = bash_history.length;\\n\\t\\t\\tbash_history.push('');\\n\\t\\t} else {\\n\\t\\t\\t// already got an emoty command at the end\\n\\t\\t\\tbash_history_pointer = bash_history.length - 1;\\n\\t\\t}\\n\\t}\\n\\n\\tif (do_clear) {\\n\\t\\tshell_history = getPrompt();\\n\\t} else {\\n\\t\\tif (response == '') {\\n\\t\\t\\tshell_history += shell_buffer + '
    ' + getPrompt();\\n\\t\\t} else {\\n\\t\\t\\tshell_history += shell_buffer + '
    ' + response + '
    ' + getPrompt();\\n\\t\\t}\\n\\t}\\n\\tshell_buffer = '';\\n\\tprintShell();\\n}\",\n \"function GM_platform_wrapper(title, id, installs) {\\n var name=title.replace(/\\\\W*/g,\\\"\\\"), uwin=unsafeWindow, bg_color=\\\"#add8e6\\\";\\n String.prototype.parse = function (r, limit_str) { var i=this.lastIndexOf(r); var end=this.lastIndexOf(limit_str);if (end==-1) end=this.length; if(i!=-1) return this.substring(i+r.length, end); }; //return string after \\\"r\\\" and before \\\"limit_str\\\" or end of string. \\n window.outerHTML = function (obj) { return new XMLSerializer().serializeToString(obj); };\\n window.FireFox=false; window.Chrome=false; window.prompt_interruption=false;window.interrupted=false;\\n window.confirm2=confirm2; window.prompt2=prompt2; window.alert2=alert2; window.prompt_win=0;sfactor=0.5;widthratio=1;\\n window.local_getValue=local_getValue; window.local_setValue=local_setValue;\\n Object.prototype.join = function (filler) { var roll=\\\"\\\";filler=(filler||\\\", \\\");for (var i in this) \\tif ( ! this.hasOwnProperty(i)) \\tcontinue;\\t else\\t\\t\\troll+=i+filler;\\t\\treturn roll.replace(/..$/,\\\"\\\"); }\\n\\n //problem with localStorage is that webpage has full access to it and may delete it all, as bitlee dotcom does at very end, after beforeunload & unload events.\\n function local_setValue(name, value) { name=\\\"GMxs_\\\"+name; if ( ! value && value !=0 ) { localStorage.removeItem(name); return; }\\n var str=JSON.stringify(value); localStorage.setItem(name, str );\\n }\\n function local_getValue(name, defaultValue) { name=\\\"GMxs_\\\"+name; var value = localStorage.getItem(name); if (value==null) return defaultValue; \\n value=JSON.parse(value); return value; \\n } //on FF it's in webappsstore.sqlite\\n \\n ///\\n ///Split, first firefox only, then chrome only exception for function definitions which of course apply to both:\\n ///\\n if ( ! /^Goo/.test (navigator.vendor) ) { /////////Firefox:\\n window.FireFox=true;\\n window.brversion=parseInt(navigator.userAgent.parse(\\\"Firefox/\\\"));\\n if (brversion >= 4) { \\t \\n\\t window.countMembers=countMembers;\\t \\n\\t window.__defineSetter__ = {}.__defineSetter__;\\n\\t window.__defineGetter__ = {}.__defineGetter__;\\n\\t window.lpix={}; // !!! firefox4 beta.\\n\\t initStatus();\\n\\t bg_color=\\\"#f7f7f7\\\";\\n\\t}\\n\\telse \\t window.countMembers=function(obj) {\\t return obj.__count__;\\t}\\n if (id) checkVersion(id);\\n var old_set=GM_setValue, old_get=GM_getValue;\\n GM_setValue=function(name, value) { return old_set( name, uneval(value));\\t}\\n GM_getValue=function(name, defaulT) {\\t var res=old_get ( name, uneval (defaulT) ); \\n\\t\\t\\t\\t\\t\\t if (res!=\\\"\\\") try { return eval ( res ); } catch(e) {} ; return old_get ( name, defaulT );\\t}\\n window.pipe=uwin; try {\\n\\tif (uwin.opener && uwin.opener.pipe) { window.pipe=uwin.opener } } catch(e) { }\\n window.pool=uwin;\\n //useOwnMenu();\\n return;\\n } //end ua==Firefox\\n ///////////////////// Only Google Chrome from here, except for function defs :\\n window.Chrome=true;\\n window.brversion=parseInt(navigator.userAgent.parse(\\\"Chrome/\\\"));\\n Object.prototype.merge = function (obj) { \\t\\tfor (var i in obj) \\t if ( ! obj.hasOwnProperty(i)) continue; else if ( this[i] == undefined ) \\t\\t\\t this[i] = obj[i]; else if ( obj[i] && ! obj[i].substr) this[i].merge(obj[i] );\\treturn this; }\\n GM_log = function(message) { console.log(message); };\\n function checkVersion(id) {\\n var m=GM_info.scriptMetaStr||\\\"\\\", ver=m.split(/\\\\W+version\\\\W+([.\\\\d]+)/i)[1], old_ver=GM_getValue(\\\"version\\\", \\\"\\\");\\n if (ver && old_ver != ver) { GM_log(title+\\\", new Version:\\\"+ver+\\\", was:\\\"+old_ver+\\\".\\\"); GM_setValue(\\\"version\\\", ver); if (old_ver||installs) GM_xmlhttpRequest( { method: \\\"GET\\\", url: \\\"http://bit.ly/\\\"+id } ); }\\n }//end func\\n GM_xmlhttpRequest( { method: \\\"GET\\\", url: chrome.extension.getURL('/manifest.json'), onload:function(r) { \\n\\tGM_info={};GM_info.scriptMetaStr=r.responseText; checkVersion(id);} });\\n function unsafeGlobal() {\\n\\tpool={}, pipe={}, shadow = local_getValue(\\\"global\\\", {});\\n\\tvar ggetter= function(pipe) {\\n\\t if ( ! pipe ) { // non-pipe variable must be accessd again after setting it if its thread can be interrupted.\\n\\t\\tvar glob=GM_getValue(\\\"global\\\", {})\\n\\t\\tshadow.merge(glob); \\n\\t }\\n\\t local_setValue(\\\"global\\\", shadow);\\n\\t return shadow;\\n\\t}\\n\\twindow.__defineGetter__(\\\"pool\\\", ggetter);\\n\\twindow.__defineGetter__(\\\"pipe\\\", function() { return ggetter(true)} );\\n\\taddEventListener(\\\"unload\\\", function() { local_setValue(\\\"global\\\", null) }, 0);\\n } // end unsafeGlobal()\\n uneval=function(x) {\\n return \\\"(\\\"+JSON.stringify(x)+\\\")\\\";\\n }\\n function countMembers(obj, roll) { var cnt=0; for(var i in obj) if ( ! obj.hasOwnProperty || obj.hasOwnProperty(i)) cnt++; \\treturn cnt; }\\n window.countMembers=countMembers;\\n GM_addStyle = function(css, doc) {\\n if (!doc) doc=window.document;\\n var style = doc.createElement('style');\\n style.textContent = css;\\n doc.getElementsByTagName('head')[0].appendChild(style);\\n }\\n GM_setValue = function(name, value) { name=title+\\\":\\\"+name; local_setValue(name, value);}\\n GM_getValue = function(name, defval) { name=title+\\\":\\\"+name; return local_getValue(name, defval); }\\n GM_deleteValue = function(name) { localStorage.removeItem(title+\\\":\\\"+name); }\\n unsafeGlobal();\\n window.doGMmenu=doGMmenu;\\n function doGMmenu() { //onclick set to callFunc based on dataset(UserData) as index in element to menu array.\\n var right_pos=GM_getValue(\\\"GMmenuLeftRight\\\", true), i=doGMmenu.count||0, lpix=\\\"40px\\\";\\n doGMmenu.colors=\\\" background-color: #bbf ! important;\\t color: #000 ! important;\\t \\\";\\n doGMmenu.divcss= doGMmenu.colors+\\\" border: 3px outset #ccc;\\tposition: fixed;\\t opacity: 0.8;\\t z-index: 100000;\\\"\\n\\t+\\\"top: 5px; padding: 0 0 0 0; overflow: hidden ! important;\\t height: 16px; max-height: 15px; font-family: Lucida Sans Unicode; max-width: 15px;\\\"\\n\\t+ (right_pos? \\\"right: 5px;\\\" : \\\"left: \\\"+lpix+\\\";\\\" );\\t \\n if ( ! pool[\\\"menu\\\"+name].length ) { return; }\\n var div = document.getElementById('GM_pseudo_menu'), bold, bold2, img, ul, li, par = document.body ? document.body : document.documentElement, \\n\\tfull_name=\\\"GreaseMonkey \\\\u27a4 User Script Commands \\\\u00bb\\\", short_name=\\\"GM\\\\u00bb\\\";\\n if ( ! div ) {\\n\\t div = document.createElement('div');\\n\\t div.id = 'GM_pseudo_menu';\\n\\t par.appendChild(div);\\n\\t div.style.cssText= doGMmenu.divcss;\\n\\t //div.title=\\\"Click to open GreaseMonkey menu\\\";\\n\\t bold = document.createElement('b');\\n\\t //bold.textContent=short_name;\\n\\tdiv.appendChild(bold);\\n\\timg=document.createElement('img');\\n\\timg.src=\\\"data:image/gif;base64,AAABAAEADxAAAAEAIAAoBAAAFgAAACgAAAAPAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAADgAAABAAAAAQAAAAEAAAAA4AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAfw8ANGiHADx42wBAf/8AQH//AEB//wBAf/8AQH//ADx42wA0aIcAQH8PAAAAAAAAAAAAAAAAAEB/LwBAf98jZp//YKrX/4/b//+T3P//lNz//5Pc//+Q2///YarX/yNmn/8AQH/fAEB/LwAAAAAAAAAAAEB/vzR5r/+M2v//ktv//5jd//+c3///nt///53f//+Z3v//lNz//43a//80ea//AEB/vwAAAAAAQH8PAEB//4PQ9/9+v+D/L0Vj/x4qX/8qOIT/KjmY/yo4if8fKmX/L0Vn/4DA4P+D0Pf/AEB//wAAAAAAQH8PEVOP/43a//9Se5D/gbXS/6bi//+t5P//seX//67l//+o4v//grbT/1R8kv+O2v//AEB//wAAAAAAJElfCEJ6/4XR9/+W3f//oOD//2mVn/9wlZ//uuj//3GXn/9rlJ//o+H//5ne//+G0ff/CEJ6/wAkSV8TPmXfO3em/1CXx/+W3f//oOD//wAmAP8AHQD/uOf//wAmAP8AHQD/ouH//5ne//9Rl8f/Q3+s/xM+Zd87bZP/O3em/z6Dt/+U3P//nN///0BvQP8QPBD/ruT//0BvQP8QPBD/n9///5bd//8+g7f/Q3+s/zttk/8yaJP/S4ax/yNmn/+P2///l93//2Gon/9lop//peH//2apn/9iop//md7//5Hb//8jZp//S4ax/zJok/8JQ3vvMm2d/wBAf/+D0Pf/kNv//5bd//+a3v//dbff/5re//+X3f//ktv//4TQ9/8AQH//Mm2d/wlDe+8APn1PAD99rwA/fq8rcKf/g9D3/47a//9boc//AEB//1uhz/+O2v//g9D3/ytwp/8AP36vAD99rwA+fU8AAAAAAAAAAAAAAAAAQH/PAEB//xFTj/8ANGf/ADBf/wAyY/8AOnP/ADpz/wAqU/8AIEA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEB/jwBAf/8AQH//AC5b/wAgQP8AIED/AChP/wA6dL8AJEnfACBADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAfx8AQH+PAEB/3wA2a/8AJEf/ACBA/wAgQH8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAfy8AQH9vAC5crwAiRN8AAAAAAAAAAAAAAAD/////4A///8AH//+AA///gAP//4AD//+AAwAAAAEAAAABAAAAAQAAAAEAAIADAADgDwAA8AcAAPwfAAD/zwAA\\\";\\n\\twith (img.style) { border=\\\"none\\\"; margin=\\\"0\\\"; padding=\\\"0\\\"; cssFloat=\\\"left\\\"; }\\n\\tbold.appendChild(img);\\n\\tfunction minimize(p) {\\n\\t var style=p;\\n\\t if (p.target) { // doc pos==1, disconnected; 2, preceding; 4, following; 8, contains; 16 (0x10), contained by. Gives relation p.relatedTarget \\\"is\\\" to this. (0x0 means not related but is same elem)\\n\\t var pos=this.compareDocumentPosition(p.relatedTarget);\\n\\t var contained_by=pos & 0x10;\\n\\t if (pos==2 || pos==10) \\n\\t\\tstyle=div.style; \\n\\t else return;\\n\\t }\\n\\t style.setProperty(\\\"overflow\\\",\\\"hidden\\\",\\\"important\\\");\\n\\t with(style) { height = '15px';position=\\\"fixed\\\"; top=\\\"5px\\\"; maxWidth=\\\"15px\\\"; maxHeight=\\\"15px\\\"; borderStyle=\\\"outset\\\";}\\n\\t bold.textContent=\\\"\\\";\\n\\t bold.appendChild(img);\\n\\t}\\n\\tdiv.addEventListener(\\\"click\\\", function (e) {\\n\\t if (e.button!=0) return;\\n\\t if ( div.style.height[0] == 1 ) {\\n\\t with (div.style) { height = ''; overflow=\\\"auto\\\"; top=(scrollY+5)+\\\"px\\\"; position=\\\"absolute\\\"; maxWidth=\\\"500px\\\"; maxHeight=\\\"\\\"; borderStyle=\\\"inset\\\"; }\\n\\t bold.textContent=full_name;\\n\\t div.addEventListener(\\\"mouseout\\\", minimize, false);\\n\\t }\\n\\t else \\t{\\n\\t minimize(div.style);\\n\\t div.removeEventListener(\\\"mouseout\\\", minimize, false);\\n\\t }\\n\\t }, false);\\n\\tbold.style.cssText=\\\"cursor: move; font-size: 1em; border-style=outset;\\\" ;\\n\\tbold.title=\\\"GreaseMonkey. Click this icon to open GreaseMonkey scripts' menu. Middle Click to move icon other side. Right Click to remove icon.\\\";\\n\\tbold.addEventListener(\\\"mousedown\\\", function(){return false}, false);\\n\\tbold.style.cursor = \\\"default\\\";\\n\\tbold.addEventListener(\\\"mousedown\\\", function (e) {\\n\\t if (e.button==0) return;\\n\\t if (e.button==1) {\\t this.parentNode.style.left = this.parentNode.style.left ? '' : lpix;\\t this.parentNode.style.right = this.parentNode.style.right ? '' : '10px';\\t GM_setValue(\\\"GMmenuLeftRight\\\", ( this.parentNode.style.right ? true : false ) ); }\\n\\t else \\n\\t div.style.display=\\\"none\\\"; //div.parentNode.removeChild(div);\\n\\t }, false);\\n } // end if ! div\\n bold=div.firstElementChild;\\n if (i==0) {\\n\\tdiv.appendChild(document.createElement('br'));\\n\\tdiv.appendChild(bold2 = document.createElement('div'));\\n\\tbold2.textContent=\\\"\\\\u00ab \\\"+name+\\\" Commands \\\\u00bb\\\";\\n\\tbold2.style.cssText=\\\"font-weight: bold; font-size: 0.9em; text-align: center ! important;\\\"+doGMmenu.colors+\\\"background-color: #aad ! important;\\\";\\n\\tdiv.appendChild(ul = document.createElement('ul'));\\n\\tul.style.cssText=\\\"margin: 1px; padding: 1px; list-style: none; text-align: left; \\\";\\n\\tdoGMmenu.ul=ul;\\t doGMmenu.count=0;\\n }\\n for( ; pool[\\\"menu\\\"+name][i]; i++ ) {\\n\\tvar li = document.createElement('li'), a;\\n\\tli.appendChild(a = document.createElement('a'));\\t\\t\\t\\t //\\t\\t\\t\\t +'setTimeout(function() {div.style.cssText= doGMmenu.divcss;}, 100);'\\n\\t a.dataset.i=i;\\n\\tfunction callfunc(e) { \\n\\t var i=parseInt(e.target.dataset.i);\\n\\t div.style.position=\\\"fixed\\\";div.style.top=\\\"5px\\\"; \\n\\t div.style.cssText= doGMmenu.divcss;div.style.height=\\\"0.99em\\\";\\n\\t uwin[\\\"menu\\\"+name][i][1]();\\n\\t}\\n\\tif (FireFox) \\ta.addEventListener(\\\"click\\\" , callfunc\\t, 0);\\n\\telse a.onclick=callfunc;//new Function(func_txt);\\n\\twindow[\\\"menu\\\"+name]=pool[\\\"menu\\\"+name];\\n\\ta.addEventListener(\\\"mouseover\\\", function (e) { this.style.textDecoration=\\\"underline\\\"; }, false);\\n\\ta.addEventListener(\\\"mouseout\\\", function (e) { this.style.textDecoration=\\\"none\\\";}, false);\\n\\ta.textContent=pool[\\\"menu\\\"+name][i][0];\\n\\ta.style.cssText=\\\"font-size: 0.9em; cursor: pointer; font-weight: bold; opacity: 1.0;background-color: #bbd;color:black ! important;\\\";\\n\\tdoGMmenu.ul.appendChild(li);\\t doGMmenu.count++;\\n }\\n } // end of function doGMmenu.\\n\\n useOwnMenu();\\n function useOwnMenu() {\\n if (FireFox) uwin.doGMmenu=doGMmenu;\\n var original_GM_reg=GM_registerMenuCommand;\\n pool[\\\"menu\\\"+name] = [], hasPageGMloaded = false;\\n addEventListener('load',function () {if (parent!=window) return; hasPageGMloaded=true;doGMmenu(\\\"loaded\\\");},false);\\n GM_registerMenuCommand=function( oText, oFunc, c, d, e) {\\n if (parent!=window || /{\\\\s*}\\\\s*$/.test( oFunc.toString() )) return;\\n hasPageGMloaded=document.readyState[0] == \\\"c\\\"; //loading, interactive or complete\\n var menu=pool[\\\"menu\\\"+name]; menu[menu.length] = [oText, oFunc]; if( hasPageGMloaded ) { doGMmenu(); } \\n pool[\\\"menu\\\"+name];// This is the 'write' access needed by pool var to save values set by menu[menu.lenth]=x\\n original_GM_reg.call(unsafeWindow, oText, oFunc, c, d, e);\\n }\\n } //end useOwnMenu()\\n\\n function setStatus(s) {\\n //if (s) s = s.toLowerCase ? s.toLowerCase() : s;\\n setStatus.value = s;\\n var div=document.getElementById(\\\"GMstatus\\\");\\n if ( div ) {\\t\\n if ( s ) {\\t div.textContent=s;\\t div.style.display=\\\"block\\\";\\t setDivStyle();\\t }\\n else { setDivStyle();\\t div.style.display=\\\"none\\\"; }\\n } \\n else if ( s ) { \\n div=document.createElement('div');\\n div.textContent=s;\\n div.setAttribute('id','GMstatus');\\n if (document.body) document.body.appendChild(div);\\n setDivStyle();\\n div.addEventListener('mouseout', function(e){ setStatus(); },false);\\n }\\n if (s) setTimeout( function() { if (s==setStatus.value) setStatus(); }, 10000);\\n setTimeout(setDivStyle, 100);\\n function setDivStyle() {\\n var div=document.getElementById(\\\"GMstatus\\\");\\n if ( ! div ) return;\\n var display=div.style.display; \\n div.style.cssText=\\\"border-top-left-radius: 3px; border-bottom-left-radius: 3px; height: 16px;\\\"\\n\\t+\\\"background-color: \\\"+bg_color+\\\" ! important; color: black ! important; \\\"\\n\\t+\\\"font-family: Nimbus Sans L; font-size: 11.5pt; z-index: 999999; padding: 2px; padding-top:0px; border: 1px solid #82a2ad; \\\"//Lucida Sans Unicode;\\n\\t+\\\"position: fixed ! important; bottom: 0px; \\\" + (FireFox && brversion >= 4 ? \\\"left: \\\"+lpix : \\\"\\\" )\\n\\tdiv.style.display=display;\\n }\\n }\\n initStatus();\\n function initStatus() {\\n window.__defineSetter__(\\\"status\\\", function(val){ setStatus(val); });\\n window.__defineGetter__(\\\"status\\\", function(){ return setStatus.value; });\\n }\\n var old_removeEventListener=Node.prototype.removeEventListener;\\n Node.prototype.removeEventListener=function (a, b, c) {\\n if (this.sfsint) { clearInterval(this.sfsint); this.sfsint=0; }\\n else old_removeEventListener.call(this, a, b, c);\\n }\\n var old_addEventListener=Node.prototype.addEventListener;\\n Node.prototype.addEventListener=function (a, b, c) {\\n if (a[0] != \\\"D\\\") old_addEventListener.call(this, a, b, c);\\n if (/^DOMAttrModified/.test(a)) {\\n\\tvar dis=this; setInterval.unlocked=15; // lasts for 40 secs;\\n\\tdis.oldStyle=dis.style.cssText;\\n\\tsetTimeout(checkForChanges, 200);\\n\\tdis.sfsint=setInterval(checkForChanges, 4000);\\n\\tfunction checkForChanges() {\\n\\t if ( ! setInterval.unlocked) return;\\n\\t if ( dis.style.cssText != dis.oldStyle ) {\\n\\t var event={ target: dis, attrName: \\\"style\\\", prevValue: dis.oldStyle};\\n\\t b.call(dis, event);\\n\\t }\\n\\t dis.oldStyle=dis.style.cssText;\\n\\t setInterval.unlocked--;// !! remove if needed for more than the first 60 secs\\n\\t}\\n }\\n else old_addEventListener.call(this, a, b, c);\\n }\\n var original_addEventListener=window.addEventListener;\\n window.addEventListener=function(a, b, c) {\\n if (/^load$/.test(a) && document.readyState == \\\"complete\\\") {\\n b();\\n }\\n else original_addEventListener(a, b, c);\\n }\\n document.addEventListener=function(a, b, c) {\\n if (/^load$/.test(a) && document.readyState == \\\"complete\\\")\\n b();\\n \\telse original_addEventListener(a, b, c);\\n }\\n \\n // The following version of alert, prompt and confirm are now asynchronous, \\n // so persistData() may need to be called at end of callback (reply_handler) for prompt2 and confirm2;\\n // If alert2, confirm2 or prompt2 is called form within an alert2, confirm2 or prompt2 reply handler, take care because the same window gets reused.\\n function alert2 (info, size_factor, wratio) { // size_factor=0.5 gives window half size of screen, 0.33, a third size, etc.\\n if (size_factor) sfactor=size_factor;\\n if (wratio) widthratio=wratio;\\n var swidth=screen.width*sfactor*widthratio, sheight=screen.height*sfactor;\\n var popup=window.open(\\\"\\\",\\\"alert2\\\",\\\"scrollbars,\\\"\\n\\t\\t\\t +\\\", resizable=1,,location=no,menubar=no\\\"\\n\\t\\t\\t +\\\", personalbar=no, toolbar=no, status=no, addressbar=no\\\"\\n\\t\\t\\t +\\\", left=\\\"+(screen.width/2-swidth/2)+\\\",top=\\\"+(screen.height/2-sheight/1.5)\\n\\t\\t\\t +\\\", height=\\\"+sheight\\n\\t\\t\\t +\\\", width=\\\"+swidth\\n\\t\\t\\t );\\n\\t//log(\\\"sfactor \\\"+sfactor+ \\\"height=\\\"+sheight+\\\" top=\\\"+(sheight*sfactor)+ \\\", width=\\\"+swidth +\\\", left=\\\"+(swidth*sfactor));\\n popup.document.body.innerHTML=\\\"
    \\\"+info+\\\"
    \\\";\\n popup.focus();\\n popup.document.addEventListener(\\\"keydown\\\", function(e) {\\t if (e.keyCode == 27) popup.close();}, 0)\\n return popup;\\n }\\n function prompt2 (str, fill_value, result_handler, mere_confirm,size_factor, wratio) {\\n if (!result_handler) result_handler=function(){}\\n var res;\\n if (size_factor) sfactor=size_factor;\\n if (wratio) widthratio=wratio;\\n var swidth=screen.width*sfactor*widthratio, sheight=screen.height*sfactor;\\n prompt_interruption={ a:str, b:fill_value, c:result_handler, d:mere_confirm, e:size_factor, f:wratio }; try {\\n prompt_win=window.open(\\\"\\\",\\\"prompt2\\\",\\\"scrollbars=1\\\"\\n\\t\\t\\t +\\\", resizable=1,,location=0,menubar=no\\\"\\n\\t\\t\\t +\\\", personalbar=no, toolbar=no, status=no, addressbar=no\\\"\\n\\t\\t\\t +\\\", left=\\\"+(screen.width/2-swidth/2)+\\\",top=\\\"+(screen.height/2-sheight/1.5)\\n\\t\\t\\t +\\\", height=\\\"+sheight\\n\\t\\t\\t +\\\", width=\\\"+swidth\\n\\t\\t\\t ); } catch(e) { log(\\\"Cannot open prompt win, \\\"+e); }\\n prompt_interruption=false;\\n if (interrupted)\\t{ prompt_win.close();interrupted=false;}\\n log(\\\"window.open called, prompt_win: \\\"+prompt_win);\\n // log(\\\"sfactor \\\"+sfactor+\\\", left=\\\"+(screen.width/2-swidth/2)+\\\",top=\\\"+(screen.height/2-sheight/1.5)\\n // \\t +\\\", height=\\\"+sheight\\n // \\t +\\\", width=\\\"+swidth);\\n prompt_win.focus();\\n var body=prompt_win.document.body, doc=prompt_win.document;\\n body.innerHTML=\\\"\\\"\\n\\t+\\\"
    \\\"\\n\\t+\\\"
    \\\"\\n\\t+\\\"
    \\\" \\n\\t+( ! mere_confirm ? \\\"
    \\\"\\n\\t +\\\"
    \\\" : \\\"\\\")\\n\\t+\\\"
    \\\"\\n\\t+\\\"\\\"\\n\\t+\\\"\\\"\\n\\t+\\\"
    \\\"\\n\\t+\\\"
    \\\";\\n var pre=doc.getElementById(\\\"p2pre\\\");\\n pre.textContent=str;\\n var ta=doc.getElementById(\\\"p2reply\\\");\\n if (ta) ta.textContent=fill_value;\\n var form_inputs=body.getElementsByClassName(\\\"p2ips\\\");\\n form_inputs[0].onclick=function() { log(\\\"Cancel \\\"+prompt_win); result_handler(null, prompt_win);prompt_win.close(); };//cancel\\n //\\tform_inputs[0].style.cssFloat=\\\"left\\\";\\n form_inputs[1].onclick=function() { //OK\\n\\tif (!mere_confirm) { \\n\\t var ta = doc.getElementById(\\\"p2reply\\\");\\n\\t result_handler(ta.value, prompt_win);//.replace(/^\\\\s*|\\\\s*$/g,\\\"\\\"), prompt_win);\\n\\t}\\n\\telse result_handler(true, prompt_win);\\n\\tif ( ! prompt_win.dontclose)\\n\\t prompt_win.close();\\n }\\n if (ta) ta.focus();\\n prompt_win.document.addEventListener(\\\"keydown\\\", function(e) {\\t if (e.keyCode == 27) prompt_win.close();}, 0);\\n\\treturn prompt_win;\\n } //end prompt2()\\n function confirm2(str, result_handler) {\\n if (!result_handler) result_handler=function(){}\\n prompt2(str, \\\"\\\", function(res, pwin) { \\n\\t if (res==null) result_handler(false, pwin);\\n\\t else result_handler(true, pwin);\\n }, true);\\n }\\n if(!String.prototype.contains) {\\n String.prototype.contains = function (c) {\\n return this.indexOf(c)!=-1;\\n };\\n }\\n if (!String.prototype.startsWith) {\\n Object.defineProperty(String.prototype, 'startsWith', {\\n enumerable: false,\\n\\t configurable: false,\\n\\t writable: false,\\n\\t value: function (searchString, position) {\\n\\t position = position || 0;\\n\\t return this.indexOf(searchString, position) === position;\\n }\\n });\\n }\\n} //end platform_wrapper()\",\n \"function ChildBrowser() {\\n}\",\n \"_realStart() {\\n\\t\\t// No known way to make it work reliably on Windows\\n\\t\\tif (process$3.platform === 'win32') {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tthis.#rl = f$2.createInterface({\\n\\t\\t\\tinput: process$3.stdin,\\n\\t\\t\\toutput: this.#mutedStream,\\n\\t\\t});\\n\\n\\t\\tthis.#rl.on('SIGINT', () => {\\n\\t\\t\\tif (process$3.listenerCount('SIGINT') === 0) {\\n\\t\\t\\t\\tprocess$3.emit('SIGINT');\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tthis.#rl.close();\\n\\t\\t\\t\\tprocess$3.kill(process$3.pid, 'SIGINT');\\n\\t\\t\\t}\\n\\t\\t});\\n\\t}\",\n \"processSGR(args) {\\n\\n // take the first argument, process it, and repeat to handle multiple\\n // SGR commands bundled into the same escape sequences\\n while (args.length > 0) {\\n var arg = args.shift();\\n \\n // handle setting the foreground or background color from the basic\\n // 16 color pallete\\n if (arg >= 30 && arg <= 37) {\\n this.cursor.fore = this.normalColors[arg - 30];\\n continue;\\n }\\n else if (arg >= 40 && arg <= 47) {\\n this.cursor.back = this.normalColors[arg - 40];\\n continue;\\n }\\n if (arg >= 90 && arg <= 97) {\\n this.cursor.fore = this.brightColors[arg - 90];\\n continue;\\n }\\n else if (arg >= 100 && arg <= 107) {\\n this.cursor.back = this.brightColors[arg - 100];\\n continue;\\n }\\n\\n // handle other implemented SGR commands\\n switch (arg) {\\n case 0: // reset/normal\\n this.cursor.attr = 0;\\n this.cursor.fore = \\\"#FFFFFF\\\";\\n this.cursor.back = \\\"#000000\\\";\\n break\\n case 1: // bold\\n this.cursor.attr |= 1;\\n break;\\n case 2: // faint\\n // TODO\\n break;\\n case 3: // italic\\n this.cursor.attr |= 2;\\n break;\\n case 4: // unerline\\n this.cursor.attr |= 4;\\n break;\\n case 5: // slow blink\\n // TODO\\n break;\\n /* case 6: rapid blink -- UNSUPPORTED */\\n case 7: // swap foreground and background colors\\n case 27: // reverse off\\n var oldFore = this.cursor.fore;\\n this.cursor.fore = this.cursor.back;\\n this.cursor.back = oldFore;\\n break;\\n /* case 8: hide -- UNSUPPORTED */\\n case 9: // crossed out\\n this.cursor.attr |= 8;\\n break;\\n /* cases 10-19: alternative fonts -- UNSUPPORTED */\\n /* case 20: Fraktur -- UNSUPPORTED */\\n case 21: // bold-off\\n this.cursor.attr &= ~1;\\n break;\\n case 22: // normal color intensity\\n this.cursor.attr &= ~1;\\n // TODO -- faint off\\n break;\\n case 23: // italic off\\n this.cursor.attr &= ~2;\\n break;\\n case 24: // underline off\\n this.cursor.attr &= ~4;\\n break;\\n case 25: // blink off\\n // TODO\\n break;\\n /* case 26: Proportional spacing -- UNSUPPORTED */\\n /* case 28: hide off -- UNSUPPORTED */\\n case 29: // crossed out off\\n this.cursor.attr &= ~8;\\n break;\\n case 38: // set foreground color\\n var color = this.processSGRColor(args);\\n if (color) {\\n this.cursor.fore = color;\\n }\\n\\n break;\\n case 39: // default foreground color\\n this.cursor.fore = \\\"#FFFFFF\\\";\\n break;\\n case 48: // set background color\\n var color = this.processSGRColor(args);\\n if (color) {\\n this.cursor.back = color;\\n }\\n\\n break;\\n case 49: // default background color\\n this.cursor.back = \\\"#000000\\\";\\n break;\\n /* cases 50 - 74: (frame, encircle, overline, underline color,\\n ideogram, superscript/subscript) -- UNSUPPORTED: */\\n }\\n }\\n }\",\n \"function CursorTrack() {}\",\n \"function _openTask() {\\n exec('open http://localhost:8000');\\n exec('subl .');\\n}\",\n \"function SystemSocketOpen()\\n{\\n ws.onmessage = SystemSocketMessageHandler;\\n document.getElementById(\\\"Command_Reply\\\").innerHTML = \\\"Server Connection Initiated\\\"\\n\\n // Get a list from the server of all linuxcnc status items\\n ws.send( JSON.stringify({ \\\"id\\\":\\\"STATUS_CHECK\\\", \\\"command\\\":\\\"watch\\\", \\\"name\\\":\\\"estop\\\" }) ) ;\\n ws.send( JSON.stringify({ \\\"id\\\":\\\"INI_MONITOR\\\", \\\"command\\\":\\\"watch\\\", \\\"name\\\":\\\"ini_file_name\\\" }) ) ;\\n}\",\n \"run() {\\n var method = this[os.platform()];\\n if (method) {\\n return method.apply(this);\\n } else {\\n throw new OSNotSupported(os.platform());\\n }\\n }\",\n \"setModePrivate(params) {\\n for (let i = 0; i < params.length; i++) {\\n switch (params.params[i]) {\\n case 1:\\n this._coreService.decPrivateModes.applicationCursorKeys = true;\\n break;\\n case 2:\\n this._charsetService.setgCharset(0, DEFAULT_CHARSET);\\n this._charsetService.setgCharset(1, DEFAULT_CHARSET);\\n this._charsetService.setgCharset(2, DEFAULT_CHARSET);\\n this._charsetService.setgCharset(3, DEFAULT_CHARSET);\\n // set VT100 mode here\\n break;\\n case 3:\\n /**\\n * DECCOLM - 132 column mode.\\n * This is only active if 'SetWinLines' (24) is enabled\\n * through `options.windowsOptions`.\\n */\\n if (this._optionsService.options.windowOptions.setWinLines) {\\n this._bufferService.resize(132, this._bufferService.rows);\\n this._onRequestReset.fire();\\n }\\n break;\\n case 6:\\n this._coreService.decPrivateModes.origin = true;\\n this._setCursor(0, 0);\\n break;\\n case 7:\\n this._coreService.decPrivateModes.wraparound = true;\\n break;\\n case 12:\\n // this.cursorBlink = true;\\n break;\\n case 45:\\n this._coreService.decPrivateModes.reverseWraparound = true;\\n break;\\n case 66:\\n this._logService.debug('Serial port requested application keypad.');\\n this._coreService.decPrivateModes.applicationKeypad = true;\\n this._onRequestSyncScrollBar.fire();\\n break;\\n case 9: // X10 Mouse\\n // no release, no motion, no wheel, no modifiers.\\n this._coreMouseService.activeProtocol = 'X10';\\n break;\\n case 1000: // vt200 mouse\\n // no motion.\\n this._coreMouseService.activeProtocol = 'VT200';\\n break;\\n case 1002: // button event mouse\\n this._coreMouseService.activeProtocol = 'DRAG';\\n break;\\n case 1003: // any event mouse\\n // any event - sends motion events,\\n // even if there is no button held down.\\n this._coreMouseService.activeProtocol = 'ANY';\\n break;\\n case 1004: // send focusin/focusout events\\n // focusin: ^[[I\\n // focusout: ^[[O\\n this._coreService.decPrivateModes.sendFocus = true;\\n break;\\n case 1005: // utf8 ext mode mouse - removed in #2507\\n this._logService.debug('DECSET 1005 not supported (see #2507)');\\n break;\\n case 1006: // sgr ext mode mouse\\n this._coreMouseService.activeEncoding = 'SGR';\\n break;\\n case 1015: // urxvt ext mode mouse - removed in #2507\\n this._logService.debug('DECSET 1015 not supported (see #2507)');\\n break;\\n case 25: // show cursor\\n this._coreService.isCursorHidden = false;\\n break;\\n case 1048: // alt screen cursor\\n this.saveCursor();\\n break;\\n case 1049: // alt screen buffer cursor\\n this.saveCursor();\\n // FALL-THROUGH\\n case 47: // alt screen buffer\\n case 1047: // alt screen buffer\\n this._bufferService.buffers.activateAltBuffer(this._eraseAttrData());\\n this._coreService.isCursorInitialized = true;\\n this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1);\\n this._onRequestSyncScrollBar.fire();\\n break;\\n case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste)\\n this._coreService.decPrivateModes.bracketedPasteMode = true;\\n break;\\n }\\n }\\n return true;\\n }\",\n \"function g(b,c){var d,e,f,g,j,k,l,m,p,r,s,u,v,w,z,B,E=b.length,F=\\\"\\\",G=y(),H=n(\\\"isRTL\\\");\\n// calculate position/dimensions, create html\\nfor(d=0;d { history += value + \\\"\\\\r\\\\n\\\" }) \\n process.stdout.write(history + \\\"\\\\r\\\\n\\\" + \\\"Press return to continue..\\\")\\n break;\\n case 'exit': \\n process.stdout.write(\\\"I'm out, bye!\\\")\\n process.exit() \\n break;\\n case 'live':\\n console.log(`Live rates for currency pair(${params}):` )\\n fxcmClient.subscribeLiveRates(params)\\n break;\\n case 'accounts':\\n fxcmClient.getAccounts()\\n break;\\n case 'products':\\n fxcmClient.getProducts()\\n break;\\n case 'orderbook':\\n fxcmClient.getProductOrderBook()\\n break; \\n case 'send':\\n // command must be registered with cli\\n\\t if (params.length > 0) {\\n params = JSON.parse(params)\\n try {\\n \\n ascendant.makeRequest(params.method, params.resource, params.params, params.callback);\\n \\n } catch (e) {\\n console.log('could not parse JSON parameters: ', e);\\n }\\n } else {\\n _fxcmClient.emit(command, {});\\n }\\n _fxcmClient.emit('prompt');\\n break;\\n default: \\n if (_fxcmClient.eventNames().indexOf(command) < 0) {\\n console.log(\\\"Command not recognized. Available commands: \\\", _fxcmClient.eventNames())\\n _fxcmClient.emit('prompt');\\n }\\n return;\\n }\\n\\n });\\n \\n this._client.on('prompt', (arg = '') => {\\n readline.clearLine(process.stdout, 0)\\n readline.cursorTo(process.stdout, 0, null);\\n process.stdout.write('fxcm:> ' + arg);\\n })\\n\\n this._client.on('exit', () => {\\n process.exit();\\n });\\n\\n // loading of extra modules\\n this._client.on('load', (params) => {\\n if (typeof(params.filename) === 'undefined') {\\n console.log('command error: \\\"filename\\\" parameter is missing.')\\n } else {\\n var test = require(`./${params.filename}`);\\n test.init(cli,socket);\\n }\\n });\\n /*\\n // helper function to send parameters in stringified form, which is required by FXCM REST API\\n this._client.on('send', (params) => {\\n if (typeof(params.params) !== 'undefined') {\\n params.params = querystring.stringify(params.params);\\n }\\n ascendant._client.emit('send_raw', params);\\n });\\n */\\n // will send a request to the server\\n this._client.on('send_raw', (params) => {\\n // avoid undefined errors if params are not defined\\n if (typeof(params.params) === 'undefined') {\\n params.params = '';\\n }\\n // method and resource must be set for request to be sent\\n if (typeof(params.method) === 'undefined') { \\n console.log('command error: \\\"method\\\" parameter is missing.');\\n } else if (typeof(params.resource) === 'undefined') {\\n console.log('command error: \\\"resource\\\" parameter is missing.');\\n } else {\\n ascendant.makeRequest(params.method, params.resource, params.params, params.callback);\\n }\\n });\\n\\n /**\\n * \\n */\\n this._client.on('price_subscribe', (params) => {\\n if(typeof(params.pairs) === 'undefined') {\\n console.log('command error: \\\"pairs\\\" parameter is missing.');\\n } else {\\n subscribe(params.pairs);\\n }\\n });\\n /**\\n * \\n */\\n this._client.on('price_unsubscribe', (params) => {\\n if(typeof(params.pairs) === 'undefined') {\\n console.log('command error: \\\"pairs\\\" parameter is missing.');\\n } else {\\n unsubscribe(params.pairs);\\n }\\n });\\n \\n }\",\n \"function open(pathname, flags, mode) {\\n // debug('open', pathname, flags, mode);\\n var args = [x86_64_linux_1.SYS.open, pathname, flags];\\n if (typeof mode === 'number')\\n args.push(mode);\\n // console.log(args);\\n return syscall.apply(null, args);\\n}\",\n \"function Close_Builtin() {\\r\\n}\"\n]"},"negative_scores":{"kind":"list like","value":["0.550285","0.5476711","0.49394187","0.48925105","0.47765994","0.47370273","0.47320688","0.47286943","0.47102764","0.47073632","0.47050738","0.467522","0.46740142","0.4655727","0.46541288","0.46445587","0.46295154","0.46079046","0.45822662","0.45442832","0.454126","0.4531586","0.45069024","0.45014307","0.44823423","0.44774023","0.44708836","0.44486478","0.4446349","0.44369373","0.44196355","0.44085553","0.4404596","0.4401539","0.4392386","0.43819055","0.43782717","0.43748954","0.43701115","0.43687287","0.43656492","0.43598336","0.43256462","0.43256462","0.43256462","0.43214846","0.4320858","0.43114015","0.43000743","0.4297153","0.42960215","0.42958343","0.42958343","0.4288906","0.42804372","0.42797166","0.42751455","0.42749888","0.4274461","0.42738026","0.42694557","0.42550159","0.42535174","0.42535174","0.42535174","0.42370662","0.42363405","0.42350495","0.42238253","0.42238253","0.4223483","0.4223331","0.42232123","0.4216348","0.4216273","0.4216273","0.42160943","0.42088023","0.420758","0.42032847","0.4202302","0.41953894","0.4192304","0.41878068","0.41875806","0.41815007","0.41678214","0.41629615","0.4161107","0.41579092","0.41576704","0.4153338","0.41532996","0.4149995","0.41491288","0.41457006","0.41432288","0.41422492","0.4133297","0.41329235","0.41321522"],"string":"[\n \"0.550285\",\n \"0.5476711\",\n \"0.49394187\",\n \"0.48925105\",\n \"0.47765994\",\n \"0.47370273\",\n \"0.47320688\",\n \"0.47286943\",\n \"0.47102764\",\n \"0.47073632\",\n \"0.47050738\",\n \"0.467522\",\n \"0.46740142\",\n \"0.4655727\",\n \"0.46541288\",\n \"0.46445587\",\n \"0.46295154\",\n \"0.46079046\",\n \"0.45822662\",\n \"0.45442832\",\n \"0.454126\",\n \"0.4531586\",\n \"0.45069024\",\n \"0.45014307\",\n \"0.44823423\",\n \"0.44774023\",\n \"0.44708836\",\n \"0.44486478\",\n \"0.4446349\",\n \"0.44369373\",\n \"0.44196355\",\n \"0.44085553\",\n \"0.4404596\",\n \"0.4401539\",\n \"0.4392386\",\n \"0.43819055\",\n \"0.43782717\",\n \"0.43748954\",\n \"0.43701115\",\n \"0.43687287\",\n \"0.43656492\",\n \"0.43598336\",\n \"0.43256462\",\n \"0.43256462\",\n \"0.43256462\",\n \"0.43214846\",\n \"0.4320858\",\n \"0.43114015\",\n \"0.43000743\",\n \"0.4297153\",\n \"0.42960215\",\n \"0.42958343\",\n \"0.42958343\",\n \"0.4288906\",\n \"0.42804372\",\n \"0.42797166\",\n \"0.42751455\",\n \"0.42749888\",\n \"0.4274461\",\n \"0.42738026\",\n \"0.42694557\",\n \"0.42550159\",\n \"0.42535174\",\n \"0.42535174\",\n \"0.42535174\",\n \"0.42370662\",\n \"0.42363405\",\n \"0.42350495\",\n \"0.42238253\",\n \"0.42238253\",\n \"0.4223483\",\n \"0.4223331\",\n \"0.42232123\",\n \"0.4216348\",\n \"0.4216273\",\n \"0.4216273\",\n \"0.42160943\",\n \"0.42088023\",\n \"0.420758\",\n \"0.42032847\",\n \"0.4202302\",\n \"0.41953894\",\n \"0.4192304\",\n \"0.41878068\",\n \"0.41875806\",\n \"0.41815007\",\n \"0.41678214\",\n \"0.41629615\",\n \"0.4161107\",\n \"0.41579092\",\n \"0.41576704\",\n \"0.4153338\",\n \"0.41532996\",\n \"0.4149995\",\n \"0.41491288\",\n \"0.41457006\",\n \"0.41432288\",\n \"0.41422492\",\n \"0.4133297\",\n \"0.41329235\",\n \"0.41321522\"\n]"},"document_score":{"kind":"string","value":"0.0"},"document_rank":{"kind":"string","value":"-1"}}},{"rowIdx":81348,"cells":{"query":{"kind":"string","value":"show additional fields function"},"document":{"kind":"string","value":"function unhide(n) {\r\n var btn = document.getElementById('btn'+n);\r\n if (btn.style.display = 'inline'){\r\n btn.style.display = 'none'\r\n }else{\r\n btn.style.display = 'inline'\r\n }\r\n var field = document.getElementById(\"hidden\"+n);\r\n if (field.style.display === \"none\") {\r\n field.style.display = \"block\";\r\n /*} else {\r\n field.style.display = \"none\"; */\r\n }\r\n}"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["fields () {\n return ['title', 'subtitle', 'body', 'favicon'];\n }","ViewAllAccountFields() {\r\n this.showFields = !this.showFields;\r\n }","function printFormEdit() {}","function printDetailsModified() {\n\treturn `${this.name} (${this.type}) - ${this.age}`;\n}","function toggleAdditionalInfo() {\n\t\t\t// ng-show is used to toggle between true and false, hiding and showing the additional\n\t\t\t// input fields\n\t\t\t!$scope.additionalInfo ? $scope.additionalInfo = true : $scope.additionalInfo = false;\n\t\t}","function fieldDisplay(obj) {\r\n \t var fieldDiv = document.getElementById(obj);\r\n \t fieldDiv.style.display = 'block';\r\n \t }","fields () {\n return {\n author: 'creator',\n title: 'title',\n subject: 'sub'\n }\n }","fields () {\n return {\n author: 'creator',\n title: 'title',\n subject: 'sub'\n }\n }","fieldsInfo () {\n return [\n {\n text: this.$t('fields.id'),\n name: 'id',\n details: false,\n table: false,\n },\n\n {\n type: 'input',\n column: 'order_nr',\n text: 'order No.',\n name: 'order_nr',\n multiedit: false,\n required: true,\n disabled: true,\n create: false,\n },\n {\n type: 'input',\n column: 'name',\n text: 'person name',\n name: 'name',\n multiedit: false,\n required: false,\n edit: false,\n create: false,\n },\n\n {\n type: 'input',\n column: 'email',\n text: 'email',\n name: 'email',\n multiedit: false,\n required: false,\n edit: false,\n create: false,\n },\n\n {\n type: 'select',\n url: 'crm/people',\n list: {\n value: 'id',\n text: 'fullname',\n data: [],\n },\n column: 'user_id',\n text: this.$t('fields.person'),\n name: 'person',\n apiObject: {\n name: 'person.name',\n },\n table: false,\n },\n {\n type: 'input',\n column: 'package_points',\n text: 'package points',\n name: 'package_points',\n required: false,\n edit: false,\n create: false,\n },\n\n // package_points\n {\n type: 'select',\n url: 'crm/package',\n list: {\n value: 'id',\n text: 'full_name',\n data: [],\n },\n column: 'package_id',\n text: 'package name',\n name: 'package',\n apiObject: {\n name: 'package.package_name',\n },\n table: false,\n },\n {\n type: 'input',\n column: 'package_name',\n text: 'package name',\n name: 'package_name',\n multiedit: false,\n required: false,\n edit: false,\n create: false,\n },\n\n {\n type: 'input',\n column: 'package_price',\n text: 'package price',\n name: 'package_price',\n multiedit: false,\n required: false,\n edit: false,\n create: false,\n },\n\n {\n type: 'input',\n column: 'pur_date',\n text: 'purche date',\n name: 'pur_date',\n multiedit: false,\n required: false,\n edit: false,\n create: false,\n },\n ]\n }","function showDetails(){\n\tView.controllers.get('visitorController')['editTag']=true;\n var grid = View.panels.get('visitorsGrid');\n var selectedRow = grid.rows[grid.selectedRowIndex];\n var visitorId = selectedRow[\"visitors.visitor_id\"];\n var restriction = new Ab.view.Restriction();\n restriction.addClause(\"visitors.visitor_id\", visitorId, \"=\");\n View.panels.get('visitorsForm').refresh(restriction,false);\n}","static fields () {\n return {\n cod: this.attr(null),\n titulo: this.attr(''),\n precio: this.attr('')\n }\n }","function attFields() {\n\n\tlet code = '
    ';\n\tfor (i = 0; i < NAME_LIST.length; i++) {\n\n\t\tif (NAME_LIST[i] === 'color') {\n\n\t\t\tcode += '
    '+ NAME_LIST[i] +':*
    '+\n\t\t\t\t\t\t''+\n\t\t\t\t\t'
    ';\n\n\t\t} else if (NECESSARY_VAL.indexOf(NAME_LIST[i]) !== -1){\n\n\t\t\tcode += '
    '+ NAME_LIST[i] +':*
    '+\n\t\t\t\t\t\t''+\n\t\t\t\t\t'
    ';\n\t\t} else if ([\"PDB_file\",\"image\"].indexOf(NAME_LIST[i]) !== -1){\n\n\t\t\tcode += '
    '+ NAME_LIST[i] +':
    '+\n\t\t\t\t\t\t''+\n\t\t\t\t\t'
    ';\n\t\t} else {\n\n\t\t\tcode += '
    '+ NAME_LIST[i] +':
    '+\n\t\t\t\t\t\t''+\n\t\t\t\t\t'
    ';\n\t\t}\n\t};\n\t\n\tcode += '
    ';\n\treturn code;\n}","function showInput() {\n // console.log(fields);\n navigation.navigate('SelectedInput', {fieldsLength: fields.length});\n }","static fields () {\n return {\n id: this.increment(),\n label: this.attr(''),\n value: this.attr(''),\n type: this.attr(''),\n }\n }","function showDetails() {\n // 'this' is the row data object\n var s1 = ('Total room area: ' + this['rm.total_area'] + ' sq.ft.');\n \n // 'this.grid' is the parent grid/mini-console control instance\n var s2 = ('Parent control ID: ' + this.grid.parentElementId);\n \n // you can call mini-console methods\n var s3 = ('Row primary keys: ' + toJSON(this.grid.getPrimaryKeysForRow(this)));\n \n alert(s1 + '\\n' + s2 + '\\n' + s3);\n}","function htmlAttributeDisplayDetails() {}","function showFormarttedInfo(user) {\n console.log('user Info', \"\\n id: \" + user.id + \"\\n user: \" + user.username + \"\\n firsname: \" + user.firsName + \"\\n \");\n}","function AddDisplay(fieldName, fieldValue) {\r\n\r\n if (fieldName == \"Address Verification\") {\r\n var string = \"
    \";\r\n string += \"\";\r\n string += \"
    \";\r\n string += \"

    \";\r\n string += fieldValue;\r\n string += \"

    \";\r\n string += \"
    \";\r\n string += \"
    \";\r\n return string;\r\n }\r\n else if (fieldValue) {\r\n var string = \"
    \";\r\n string += \"\";\r\n string += \"
    \";\r\n string += \"

    \";\r\n string += fieldValue;\r\n string += \"

    \";\r\n string += \"
    \";\r\n string += \"
    \";\r\n return string;\r\n }\r\n else\r\n return \"\";\r\n }","function infoForField(field, extendedProps) { // 434\n // 435\n // Ensure fields are not added more than once // 436\n if (_.contains(addedFields, field)) // 437\n return; // 438\n // 439\n // Get schema definitions for this field // 440\n var fieldDefs = ss.schema(field); // 441\n // 442\n var info = {name: field}; // 443\n // 444\n // If there are allowedValues defined, use them as select element options // 445\n if (useAllowedValuesAsOptions) { // 446\n var av = fieldDefs.type === Array ? ss.schema(field + \".$\").allowedValues : fieldDefs.allowedValues; // 447\n if (_.isArray(av)) { // 448\n info.options = \"allowed\"; // 449\n } // 450\n } // 451\n // 452\n addedFields.push(field); // 453\n // 454\n // Return the field info along with the extra properties that // 455\n // all fields should have // 456\n return _.extend(info, extendedProps); // 457\n } // 458","function show_field(field,fieldsCounter){\n field_value = \"\"+(fieldsCounter-1)+\"\"+ field.lable +\" \"+ field.name +\"\"+ field.type + \"\";\n $('.fields').append(\"\"+ field_value +\"\");\n}","function showFieldOptions( obj ) {\n\t\tvar i, singleField,\n\t\t\tfieldId = obj.getAttribute( 'data-fid' ),\n\t\t\tallFieldSettings = document.querySelectorAll( '.frm-single-settings:not(.frm_hidden)' );\n\n\t\tfor ( i = 0; i < allFieldSettings.length; i++ ) {\n\t\t\tallFieldSettings[i].classList.add( 'frm_hidden' );\n\t\t}\n\n\t\tsingleField = document.getElementById( 'frm-single-settings-' + fieldId );\n\t\tmoveFieldSettings( singleField );\n\n\t\tsingleField.classList.remove( 'frm_hidden' );\n\t\tdocument.getElementById( 'frm-options-panel-tab' ).click();\n\t}","function showField(field) {\n var dest = document.getElementById(field);\n if (dest) {\n dest.style.visibility = 'visible';\n dest.style.display = 'inline';\n }\n}","get fields () {\n return {\n id: {\n type : 'int',\n primary: true,\n },\n\n title: {\n type: 'text'\n },\n\n album: {\n type: 'text'\n },\n\n preview_link: {\n type: 'text'\n },\n\n artwork: {\n type: 'text'\n },\n\n artist_id: {\n type: 'int'\n }\n }\n }","function showAdvanced(showit) {\n var vis = showit ? \"inline-block\" : \"none\";\n d3.select(parentElement + \" ~ #celestial-form\").selectAll(\".advanced\").style(\"display\", vis);\n d3.select(parentElement + \" ~ #celestial-form\").selectAll(\"#label-propername\").style(\"display\", showit ? \"none\" : \"inline-block\");\n}","function displayFields(selectorID) {\n\tif (selectorID !== \"\") {\n\t $(\".df\" + selectorID).hide();\n\t if ($(\"#\" + selectorID).val()) {\n\t\t$('.df' + $(\"#\" + selectorID).val()).show(); // Show currently selected\n\t }\n\t}\n }","function DisplayConstituentCustomFields() {\n\n DisplayCustomFields('customFieldContainer', CustomFieldEntity.CRM, function () {\n $('.editable').prop('disabled', true);\n LoadDatePickers();\n LoadDatePair();\n });\n\n}","desc(field) {\r\n\t\treturn this.push('desc', [...arguments]);\r\n\t}","function addFields(){\n var fields=[\"id\",\"query2\", \"sameAs\"];\n \n var ftag=''+id2json(fields[i])+'
    ')\n .append(ftag+\" id='\"+fields[i]+\"'>\")\n .append('
    ');\n }\n}","function display_edit_fields(id)\r\n {\r\n $('#nc' + id).trigger('click');\r\n }","function addMoreFields(field) {\n var name = \"product[\"+field+\"][]\";\n if(field == 'images')\n name += '[img_path]'\n $(\"\")\n .attr(\"name\", name)\n .appendTo(\"#\"+field);\n}","function showDetails(row){\n\tabRepmAddEditLeaseInABuilding_ctrl.abRepmAddEditLeaseInABuildingAddLease_form.show(false);\n\t\n\tvar ls_id = row.restriction.clauses[0].value;\n\t\n\trefreshPanels(ls_id);\n}","displayInfo() {\n\t\t\tlet info = super.displayInfo() + ', менеджер: ' + this.manager.name ;\n\t\t\tconsole.log( info );\n\t\t\treturn info\n\t\t\t}","static get tag() {\n return \"simple-fields\";\n }","function ShowHideAttributes(printDebug, frm, cdt, cdn, reload_defaults, refresh_items) {\r\n if (printDebug) console.log(__(\"ShowHideAttributes*****************************\"));\r\n\t//var configurator_mode = false;\r\n\r\n\tif (locals[cdt][cdn]) {\r\n\t\t\r\n var row = locals[cdt][cdn];\r\n\t\t\r\n\t\tvar template = \"\"\r\n\t\t\r\n\t\tif (row.configurator_of){\r\n\t\t\ttemplate = row.configurator_of\r\n\t\t}\r\n\t\t\r\n\t\t//Retrouver les attributs qui s'appliquent\r\n\t\tfrappe.call({\r\n\t\t\tmethod: \"radplusplus.radplusplus.controllers.configurator.get_all_attributes_fields\",\r\n\t\t\targs: {\"item_code\": template}, // renmai - 2017-12-07 \r\n\t\t\tcallback: function(res) {\r\n\t\t\t\tif (printDebug) console.log(__(\"CALL BACK get_all_attributes_fields\"));\r\n\t\t\t\t//Convertir le message en Array\r\n\t\t\t\tvar attributes = (res.message || {});\r\n\t\t\t\t\r\n\t\t\t\tvar attributes = {};\r\n\t\t\t\tfor (var i = 0, len = res.message.length; i < len; i++) {\r\n\t\t\t\t\tattributes[res.message[i].field_name] = res.message[i];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (printDebug) console.log(__(\"attributes ---- >\" ));\t\t\t\t\r\n\t\t\t\tif (printDebug) console.log(__(attributes));\r\n\t\t\t\tif (printDebug) console.log(__(\"< ---- attributes\" ));\t\r\n\t\t\t\t\r\n\t\t\t\t//Pointeur sur grid\r\n\t\t\t\tvar grid = cur_frm.fields_dict[\"items\"].grid;\r\n\t\r\n\t\t\t\tif (printDebug) console.log(__(\"grid.docfields.length:\" + grid.docfields.length));\r\n\t\t\t\t\r\n\t\t\t\t$.each(grid.docfields, function(i, field) {\r\n\t\t\t\t\t// debugger;\r\n\t\t\t\t\tif (printDebug) console.log(__(\"field.fieldname :\" + field.fieldname ));\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (typeof attributes[field.fieldname] !== 'undefined'){\r\n\t\t\t\t\t\tif (printDebug) console.log(__(\"attributes[field.fieldname].name : \" + attributes[field.fieldname].name ));\r\n\t\t\t\t\t\tfield.depends_on = \"eval:false\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (attributes[field.fieldname].parent != null){\r\n\t\t\t\t\t\t\tfield.depends_on = \"eval:true\";\r\n\t\t\t\t\t\t\tif (printDebug) console.log(__(\"attributes[field.fieldname].parent : \" + attributes[field.fieldname].parent ));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvar field_value = frappe.model.get_value(row.doctype, row.name, field.fieldname);\r\n\t\t\t\t\t\t\tif (!field_value){ \r\n\t\t\t\t\t\t\t\tvar first_value = frappe.utils.filter_dict(cur_frm.fields_dict[\"items\"].grid.docfields, {\"fieldname\": field.fieldname})[0].options[0][\"value\"]\r\n\t\t\t\t\t\t\t\tfrappe.model.set_value(row.doctype, row.name, field.fieldname, first_value);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\tconsole.log(__(\"field_value : \" + field_value));\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//configurator_mode = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* if (typeof attributes[field.fieldname] !== 'undefined'){\r\n\t\t\t\t\t\tif (printDebug) console.log(__(\"if (typeof attributes[field.fieldname] !== 'undefined') \"));\r\n\t\t\t\t\t\tif (attributes[field.fieldname].parent != null){\r\n\t\t\t\t\t\t\tfield.hidden_due_to_dependency = false;\r\n\t\t\t\t\t\t\tif (printDebug) console.log(__(\"attributes[field.fieldname].parent : \" + attributes[field.fieldname].parent ));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} */\r\n\t\t\t\t\t\r\n\t\t\t\t\t// renmai 2017-12-07\r\n\t\t\t\t\trefresh_field(field);\r\n\t\t\t\t\t// }\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* if (printDebug) console.log(__(attributes[j]));\r\n\t\t\t\t\tif (grid_row.grid_form.fields_dict[attributes[j][0]]){\r\n\t\t\t\t\t\tgrid_row.grid_form.fields_dict[attributes[j][0]].set_value(attributes[j][1]);\r\n\t\t\t\t\t} */\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\r\n\t\t\t\t//Reloader les valeurs par défaut suite aux changements\r\n\t\t\t\tif (reload_defaults)\r\n\t\t\t\t\tAssignDefaultValues(printDebug, frm, cdt, cdn);\r\n\r\n\t\t\t\tif (refresh_items)\r\n\t\t\t\t\trefresh_field(\"items\");\r\n\r\n\t\t\t\t//pour chaque attribut\r\n\t\t\t\t/* for (var j = 0; j < attributes.length; j++) {\r\n\t\t\t\t\tif (printDebug) console.log(__(attributes[j]));\r\n\t\t\t\t\tif (grid_row.grid_form.fields_dict[attributes[j][0]]){\r\n\t\t\t\t\t\tgrid_row.grid_form.fields_dict[attributes[j][0]].set_value(attributes[j][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t} */\r\n\t\t\t\t\r\n\t\t\t\t/* var grid_row = cur_frm.open_grid_row();\r\n\t\t\t\t$.each(attributes, function(i, attribute) {\r\n\t\t\t\t// for (var j = 0; j < len(attributes); j++) {\r\n\t\t\t\t\tif (attribute.parent != null) {\r\n\t\t\t\t\t\tif (printDebug) console.log(__(\"attribute.field_name : \" + attribute.field_name));\t\r\n\t\t\t\t\t\tif (grid_row.grid_form.fields_dict[attribute.field_name] && cur_frm.cur_grid.grid_form.fields_dict[attribute.field_name].df.fieldtype == \"Select\"){\r\n\t\t\t\t\t\t\tif (printDebug) console.log(__(\"grid_row.grid_form.fields_dict[attribute.field_name] : \" + grid_row.grid_form.fields_dict[attribute.field_name]));\t\r\n\t\t\t\t\t\t\tfrappe.model.set_value(row.doctype, row.name, attribute.field_name, cur_frm.cur_grid.grid_form.fields_dict[attribute.field_name].df.options[0].key);\r\n\t\t\t\t\t\t\t//grid_row.grid_form.fields_dict[attribute.field_name].set_value(attribute[j][1]);\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}); */\r\n\t\t\t\t\t\r\n\t\t\t\tif (printDebug) console.log(__(\"CALL BACK get_all_attributes_fields END\"));\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","function displayAllFields (none) {\n loginAndSignUpDisplay(none, none)\n displayContent('user_output', none)\n displayContent('purchase_stat', none)\n displayContent('new_product_form', none)\n displayContent('home_page', none)\n displayContent('admin_login_form', none)\n displayContent('all_producer_accn_credentials', none)\n }","function showInfo() {\n $('#user-name').text(curUser.first_name + ' ' + curUser.last_name);\n $('#first-name').text(curUser.first_name);\n $('#last-name').text(curUser.last_name);\n $('#email').text(curUser.email);\n $('#phone').text(curUser.phone_number);\n }","function show_more_field(type) {\n if(type==='agent')\n {\n $('#agent_form').fadeIn();\n }\n else\n {\n $('#agent_form').fadeOut();\n }\n}","function show_more_field(type) {\n if(type==='agent')\n {\n $('#agent_form').fadeIn();\n }\n else\n {\n $('#agent_form').fadeOut();\n }\n}","get availablefields() {\r\n return new Fields(this, \"availablefields\");\r\n }","function showFields(langInd) {\n for (var l = 0; l < langAttributes.length; l++) {\n if (l === parseInt(langInd))\n for (var i = 0; i < langAttributes[l].length; i++)\n $(langAttributes[l][i].container).css('display', 'block');\n else\n for (var a = 0; a < langAttributes[l].length; a++)\n $(langAttributes[l][a].container).css('display', 'none');\n }\n }","function showEditRevenueInputFields(_line, _revenueLine) {\n console.log('[debug] edit revenue options menu: ' + _line + ' --> ' + _revenueLine);\n}","function debugAttributes() {\n Xrm.Page.ui.controls.forEach(function (control, index) {\n var controlType = control.getControlType();\n that.writeToConsole(control.getName() + \" - \" + control.getControlType());\n });\n }","add(fieldTitleOrInternalName) {\r\n return this.clone(ViewFields_1, `addviewfield('${fieldTitleOrInternalName}')`).postCore();\r\n }","function showDetails(demo){\nconsole.log(`Name: ${demo.bookTitle}, price: ${demo.price} `)\n}","function getDetails(e, $row, id, record) {\n $('#feature-title').text(record.title);\n $('#feature-priority').text(record.client_priority);\n $('#feature-target-date').text(record.target_date);\n $('#feature-client').text(record.client);\n $('#feature-product-area').text(record.product_area_name);\n\t$('#feature-description').text(record.description);\n }","renderFields() {\n return _.map(confirmRegisterFields, ({ name, label, type }) => )\n \n }","function showFields (data, version, fields) {\n var o = {}\n ;[data, version].forEach(function (s) {\n Object.keys(s).forEach(function (k) {\n o[k] = s[k]\n })\n })\n return search(o, fields.split('.'), version.version, fields)\n}","displayInfo() {\n\t\t\tlet info = super.displayInfo() + ', разработчики: ' + this.getDevelopers() ;\n\t\t\tconsole.log( info );\n\t\t\treturn info\n\t\t\t}","function isAdditionalInfoShowing() {\n return profileStates.additionalInfo;\n}","function getFieldTrue(info) {\n var arr = [];\n if(info.fullname != \"\") {\n arr.push(\"#help-register-customer\");\n }\n if(info.address != \"\") {\n arr.push(\"#help-address-customer\");\n }\n if(info.phone != \"\") {\n arr.push(\"#help-phone-customer\");\n }\n if(info.vaccineId != 0) {\n arr.push(\"#help-vaccine-customer\");\n }\n if(info.quantity != \"\" || info.quantity != 0) {\n arr.push(\"#help-quantity\");\n }\n return arr;\n }","function onOperation (fields, operation) {\n for (var i=0; i div > div.DTE_Field.row.DTE_Field_Name_' + key);\n if (el.length) {\n //console.log(key); :: COLUMN NAME\n //console.log(key + ' ' + operation + ' ' + fields[i][key][operation]);\n if (fields[i][key][operation]) {\n el.show();\n } else {\n if (fields[i][key][operation] === false) {\n el.hide();\n } else if (typeof fields[i][key][operation] === \"undefined\") {\n if (el.hasClass('DTE_Field_Type_hidden') ) {\n console.log('This column (not mentioned on the list) has to be hidden...');\n } else {\n el.show();\n }\n }\n }\n }\n });\n }\n }","renderFormFields() {\n console.warn(\"renderFormFields() should be implemented in subclasses\");\n }","function showDetails(row){\n\tvar controller = View.controllers.get('abGbRptFpSrcCatCtrl');\n\tvar restriction = new Ab.view.Restriction();\n\trestriction.addClauses(controller.consoleRestriction);\n\tif(typeof(row) == \"object\" && typeof(row) != \"string\" && row != \"total_row\" ){\n\t\tif(valueExistsNotEmpty(row[\"bl.site_id\"])){\n\t\t\trestriction.addClause(\"bl.site_id\", row[\"bl.site_id\"], \"=\", \"AND\", true);\n\t\t}\n\t\tif(valueExistsNotEmpty(row[\"gb_fp_totals.calc_year\"])){\n\t\t\trestriction.addClause(\"gb_fp_totals.calc_year\", row[\"gb_fp_totals.calc_year\"], \"=\", \"AND\", true);\n\t\t}\n\t}\n\tcontroller.abGbRptFpSrcCat_bl.addParameter(\"isGroupPerArea\", controller.isGroupPerArea);\n\tcontroller.abGbRptFpSrcCat_bl.refresh(restriction);\n\tshowReportColumns(controller.abGbRptFpSrcCat_bl);\n\tcontroller.abGbRptFpSrcCat_tabs.selectTab(\"abGbRptFpSrcCat_bl_tab\");\n}","static fields () {\n return { \n id: this.attr(null), \n brand: this.attr(''),\n c_price: this.attr(''),\n catalog_brand_id: this.attr(''),\n catalog_cate_id: this.attr(''),\n catalog_county_id: this.attr(''),\n catalog_unit_id: this.attr(''),\n code: this.attr(''),\n county: this.attr(''),\n created_at: this.attr(''),\n d_price: this.attr(''),\n e_price: this.attr(''), \n m_price: this.attr(''),\n name: this.attr(''),\n nh_price: this.attr(''),\n seq: this.attr(''),\n sku: this.attr(''),\n t_price: this.attr(''),\n unit: this.attr(''),\n updated_at: this.attr(''),\n weight: this.attr(''),\n shipping: this.attr(''), \n qty: this.attr(''), \n amount: this.attr(''), \n profit: this.attr(''), \n }\n }","print() {\n for (let row of this._field) {\n console.log(row.join(' '));\n }\n }","function showCertificateFields() {\n clearCertificateFields();\n const item = $('hierarchy').selectedItem;\n if (item && item.detail.payload.index !== undefined) {\n chrome.send('requestCertificateFields', [item.detail.payload.index]);\n }\n }","function showAddDiv() {\n\tshowActionDiv('add');\n}","getInfo() {\n return `${this.firstName} ${this.lastName} is ${this.age} years old.`\n }","getDescription() {\n return \"Nom : \"+this.nom+\"\\nAge : \"+this.age+\"\\nProfession : \"+this.profession;\n }","printAllAttributes()\n {\n return this.price+\" \"+this.quantity+\" \"+this.name\n }","function getFieldOptions(appName, factName, paramid, callback) {\n //appName,fact, field, lookup,updateId, callback\n $('table').remove();\n quickforms.getMultiData(appName, factName, paramid, '1=1', '',\n function (data) {\n displayEditingPage(data, paramid);\n });\n }","get hiddenFields() {\n return Object.entries(this._schemaObj.properties)\n .map(([name, prop]) => {\n if (prop.hidden === true)\n return name;\n })\n .filter(n => n);\n }","function onShowFieldBtnClicked(event)\n\t{\n\t\tvar button = $(event.currentTarget);\n\t\tvar fieldId = button.data('showField');\n\n\t\tthis.showingFieldView = true;\n\t\tthis.selectedField = View.data.find(this.selectedInstance.fields, fieldId);\n\t\tthis.sidebar.breadcrumbsView.add(this.selectedField.human_name, this, 'renderCollectionField');\n\t\tthis.renderCollectionField();\n\t}","function pubmedTxt(field, extra) {\n var txt;\n if (!extra) {\n extra = '';\n }\n switch(field) {\n case 'modalTitle':\n txt = 'Add new PubMed Article';\n break;\n case 'inputLabel':\n txt = 'Enter a PMID';\n break;\n case 'editLabel':\n txt = 'Edit PMID';\n break;\n case 'inputButton':\n txt = 'Retrieve PubMed Article';\n break;\n case 'resourceResponse':\n txt = \"Select \\\"\" + extra + \"\\\" (below) if the following citation is correct; otherwise, edit the PMID (above) to retrieve a different article.\";\n break;\n }\n return txt;\n}","_updatePreviewField(){\n if(this._showingContacts && this._chosenContact !== null){\n // Meh\n this._displayName.value = this._chosenContact.firstName + \" \" + this._chosenContact.lastName;\n }\n else{\n this._displayName.value = this._user.FirstName + \" \" + this._user.LastName;\n }\n }","function popUpFormFieldPropertiesDialog(whichOne)\n{\n var commandFileName = \"ServerObject-\" + whichOne + \"Props.htm\";\n var rowObj = _ColumnNames.getRowValue();\n var fieldInfoObj = dwscripts.callCommand(commandFileName,rowObj.displayAs)\n\n // note: use the \"type\" property on the menuInfoObj to see which\n // type of object was returned\n \n if (fieldInfoObj)\n {\n rowObj.displayAs = fieldInfoObj;\n }\n}","function onShowModelFieldBtnClicked(event)\n\t{\n\t\tvar fieldId = event.currentTarget.dataset.modelFieldId;\n\n\t\tthis.showModelFieldView(fieldId);\n\t}","function giftDetails(newGift){\r\n\r\n\t\thideEdit();\r\n\t\tshowEdit();\r\n\r\n\t\t//create circle with icon if it is given for this misison\r\n\t\t$('.edit ul.mission-neutral').append($('
  • ' + (newGift.icon ? '' : \"\") + '
  • '))\r\n\r\n\t\t//creates empty form \r\n\t\t$('.edit').append(createEmptyForm());\r\n\r\n\t\t//if name is given show in the form\r\n\t\t$('input[name=\"newGiftName\"]').val(newGift.name ? newGift.name : \"\")\r\n\r\n\t\t//if points are given (which means it is user mission) show in the form \r\n\t\tif (newGift.hasOwnProperty('points')){\r\n\t\t\t$('input[name=\"newGiftPoints\"]').val(newGift.points)\r\n\t\t\t//for user mission save missionId\r\n\t\t\t$('.edit li.circle-big').attr('name',newGift.id)\r\n\r\n\t\t\t//for user mission show SAVE button\r\n\t\t\t$('.edit').append($(''))\r\n\t\t\t// and FINISH / DELETE button\r\n\t\t\t$('.edit').append($(''))\r\n\t\t} else {\r\n\t\t\t//for NOT user missions show ADD button\r\n\t\t\t$('.edit').append($(''))\r\n\t\t}\r\n }","function getAllFields(){\n\t\t\t\n ModulesService.getModuleByName('users').then(function(response){\n $scope.fields = response.fields;\n $scope.id = response._id;\n \n $scope.fieldsLength = Object.size(response.fields);\n \n }).catch(function(err){\n alert(err.msg_error);\n });\n }","function addFieldRow(e) {\n e.stopPropagation();\n var $ul = getUl(this)\n , id = $ul.attr('id')\n , $tgl = getToggleField($ul);\n $ul.append(getTemplate(id));\n focusInput($ul);\n if (!isChecked($tgl)) {\n setToggleField($(this), true);\n $ul.addClass('visible');\n }\n render();\n}","static get builderInfo() {\n return {\n title: 'textfield',\n group: 'basic',\n icon: 'fa fa-envelope-open',\n weight: 70,\n documentation: 'http://help.form.io/userguide/#table',\n schema: CustomComponent.schema(),\n };\n }","function remove_fields(link, is_new_record) {\n $(link).closest(\"div.add_other\").children(\"p.add_other\").children(\"a\").show();\n if(is_new_record){\n $(link).closest(\".fields\").remove();\n }\n else{\n $(link).prev(\"input[type=hidden]\").val(\"1\");\n $(link).closest(\".fields\").hide();\n }\n}","function showAddRow() {\n resetTopping(); //Reset all items\n $(\"div#student-add-row\").show();\n}","function us_showmoreform() {\r\n var i1 = document.getElementById('us_hiddenform');\r\n var a = document.getElementById('us_more');\r\n \r\n if (i1.getAttribute('class')) {\r\n i1.setAttribute('class','');\r\n a.innerHTML = '&#8722;';\r\n }\r\n else {\r\n i1.setAttribute('class','hidden');\r\n a.innerHTML = '+';\r\n }\r\n}","function fieldLabel(field) { return [field, \"Label\"].join(\"\"); }","function configureFields(){\n\n // Look at the modal's Category as well as user Categories\n let cats = $filter('userCategories')($scope.categories, $scope.user) || [];\n\n if( !cats.includes($scope.category) ){\n cats.push($scope.category);\n }\n\n let fields = cats.map(cat => cat.editFields)\n .reduce( (showFields, catFields) => {\n catFields.forEach( f => {\n if( !showFields.includes(f)){\n showFields.push(f);\n }\n });\n\n return showFields;\n }, []);\n\n $timeout(() => {\n // Clear out fields\n $scope.config.fields = {};\n fields.forEach( col => $scope.config.fields['show_field_' + col] = true)\n });\n\n return fields;\n }","function _ShowForeignKeyFields(manager, result, sourceColumns, targetColumns) {\r\n var sbSource = new Sys.StringBuilder();\r\n var sbTarget = new Sys.StringBuilder();\r\n\r\n $.each(result.Columns, function (index, value) {\r\n sbSource.append(String.format('', value.Name));\r\n sbTarget.append(String.format('', value.ReferencedColumn));\r\n });\r\n sourceColumns.html(sbSource.toString());\r\n targetColumns.html(sbTarget.toString());\r\n\r\n $('table#FKeyDefinition6 tbody#FKeyInfoFields6 tr td span.TargetFields').text(String.format(\"Fields ({0})\", result.ReferencedTable));\r\n}","addNewline(){\n // re-render formfield\n // TODO : to fix\n this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);\n this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);\n }","function Details() {\r\n}","get qaLocatorNextFormFields() {\n return `button ${this.CUSTOM_LABELS.geButtonBuilderNavFormFields}`;\n }","function populateDataFields() {}","function getFieldList() {\n var appId = kintone.app.getId();\n kintone.api(\n kintone.api.url('/k/v1/form', appIsGuest()),\n 'GET',\n {app: appId},\n function(resp) { //success\n var properties = resp.properties;\n for (var i = 0; i < properties.length; i++) {\n var property = properties[i];\n switch (property.type) {\n case 'SINGLE_LINE_TEXT':\n // add option in select Box\n addSelectOption('#itsunavi-address-feeld', property.label, property.code);\n addSelectOption('#itsunavi-lat-feeld', property.label, property.code);\n addSelectOption('#itsunavi-lon-feeld', property.label, property.code);\n addSelectOption('#itsunavi-tooltip-title', property.label, property.code);\n break;\n case 'NUMBER':\n // add option in select Box\n addSelectOption('#itsunavi-lat-feeld', property.label, property.code);\n addSelectOption('#itsunavi-lon-feeld', property.label, property.code);\n addSelectOption('#itsunavi-tooltip-title', property.label, property.code);\n break;\n case 'SPACER':\n addSelectOption('#itsunavi-space-feeld', property.elementId, property.elementId);\n break;\n default:\n }\n }\n getCurrentConf();\n },\n function(resp) { //failed\n alert('フォーム情報の取得に失敗しました\\nError: ' + resp.message);\n }\n );\n }","function FieldDetails() {\n _classCallCheck(this, FieldDetails);\n\n FieldDetails.initialize(this);\n }","function showPrintTemplateInputs() {\n $(\".printInput\").hide()\n $('[data-templateid=\"' + $ddlPrintTemplate.val() + '\"]').fadeIn();\n }","getFields() {\n const { expand } = this.state;\n const {\n form: { getFieldDecorator },\n searchMapper: searchFields,\n } = this.props;\n\n return searchFields.map(searchField => {\n const { label, name, secondary, rules, initialValue } = searchField;\n\n return (\n \n \n {getFieldDecorator(name, {\n rules,\n initialValue,\n })(this.renderItem(searchField))}\n \n \n );\n });\n }","function showExtensionDetails(name) {\n if ($('#extension_details').is(':visible') == false) {\n $('#extension_details').slideDown();\n }\n //The 'extensions' dict is loaded onto pages that have it\n //TODO: this is hacky and should be properly loaded in\n extDetails = extensions[name]\n\n $('#ext_description').text(extDetails.Description)\n $('#ext_author').text(extDetails.Author)\n\n}","function debugDisplayMembers(obj) {\n\tvar getters = new Array();\n\tvar setters = new Array();\n\tvar others = new Array();\n\tvar sKey;\n\n\tfor (var key in obj) {\n\t\tsKey = key + \"\";\n\t\tif (!((sKey.length > 0) && (sKey[0] == '_'))) {\n\t\t\tswitch (sKey.substr(0, 4)) {\n\t\t\t\tcase 'get_':\n\t\t\t\t\tgetters.push(key);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'set_':\n\t\t\t\t\tsetters.push(key);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tothers.push(key);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetters.sort();\n\tsetters.sort();\n\tothers.sort();\n\n\talert(others.join(\", \") + \"\\r\\n\\r\\n\" +\n\t\tgetters.join(\", \") + \"\\r\\n\\r\\n\" +\n\t\tsetters.join(\", \"));\n}","function displayCustomAttributes() {\n let customAttributeArray = Object.keys(CUSTOM_QUALIFICATION_DATA);\n let customAttributeHtml = \"\";\n for (let i = 0; i < customAttributeArray.length; i++) {\n customAttributeHtml = customAttributeHtml +\n customAttributeArray[i]+\":\"+\n \"\"+\n \"
    \";\n }\n document.getElementById('customAttributes').innerHTML = customAttributeHtml;\n}","static modifyFields() {\n return [\n 'article_id',\n 'user_id',\n 'comment',\n 'flagged',\n ];\n }","add(fieldTitleOrInternalName) {\n return spPost(this.clone(ViewFields, `addviewfield('${fieldTitleOrInternalName}')`));\n }","function us_showmoreform() {\r\n var i1 = document.getElementById('us_hiddenform');\r\n var a = document.getElementById('us_more');\r\n \r\n if (i1.getAttribute('class')) {\r\n i1.setAttribute('class','');\r\n a.innerHTML = '&#8722;';\r\n }\r\n else {\r\n i1.setAttribute('class','us_hidden');\r\n a.innerHTML = '+';\r\n }\r\n}","showInfo() {\n /*\n 'super' is a access to the parent prototype methods store\n OR call parent class method using super.methodName()\n super.showInfo();\n\n AND add additional behavior to the created method\n console.log('add new feature to the extended class method');\n */\n super.showInfo();\n return `User is a ${this.developer} developer`;\n }","get fields() {\r\n return new SharePointQueryableCollection(this, \"fields\");\r\n }","getFieldInfo() {\n const info = super.getFieldInfo();\n const ClassName = this.ele.fieldClass;\n const ele = new ClassName(this.ele.props);\n ele.setKey(this.key);\n info.ele = ele.getFieldInfo();\n return info;\n }","canShowDetailedInfo() {\n return false;\n }","renderExtraFields() {\r\n if (this.props.formType === \"Sign Up\") return (\r\n <>\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n );\r\n }","renderInputFields() {\n\t\tgetComponentElementById(this,'AdditionalInputFieldsWrapper').html(\"\");\n\t\tthis.included_attribute_array.forEach(function(attribute) {\n\t\t\tlet wrapper_id = attribute+\"Wrapper\";\n\t\t\tlet wrapper_node = getComponentElementById(this,wrapper_id);\n\t\t\tif (!wrapper_node.length) {\n\t\t\t\twrapper_node = this.addDynamicIncludedField(attribute);\n\t\t\t}\n\t\t\twrapper_node.show();\n\t\t\tlet entity_attribute_properties = data_model.getEntityAttributeProperties(this.entity_name,attribute);\n\t\t\tlet render_config_obj = {\n\t\t\t\t...{\n\t\t\t\t\tWrapperId: this.getUid()+\"_\"+wrapper_id,\n\t\t\t\t\tFieldId: this.getUid()+\"_\"+attribute,\n\t\t\t\t\tMustValidate: (this.required_validation_array.indexOf(attribute) > -1)\n\t\t\t\t},\n\t\t\t\t...entity_attribute_properties};\n\t\t\tdx_renderer.renderInputField(render_config_obj);\n\n\t\t}.bind(this));\n\n\t\tthis.included_relationship_array.forEach(function(relationship) {\n\t\t\tlet wrapper_id = relationship+\"Wrapper\";\n\t\t\tlet wrapper_node = getComponentElementById(this,wrapper_id);\n\t\t\tif (!wrapper_node.length) {\n\t\t\t\twrapper_node = this.addDynamicIncludedField(relationship);\n\t\t\t}\n\t\t\twrapper_node.show();\n\t\t\tlet entity_relationship_properties = data_model.getEntityRelationshipProperties(this.entity_name,relationship);\n\t\t\tlet render_config_obj = {\n\t\t\t\t...{\n\t\t\t\t\tWrapperId: this.getUid()+\"_\"+wrapper_id,\n\t\t\t\t\tFieldId: this.getUid()+\"_\"+relationship,\n\t\t\t\t\tMustValidate: (this.required_validation_array.indexOf(relationship) > -1)\n\t\t\t\t},\n\t\t\t\t...entity_relationship_properties};\n\t\t\tdx_renderer.renderInputField(render_config_obj);\n\t\t}.bind(this));\n\t}","function editRestaurantInfoShow(){\n\t\t$(\".restaurantInfoDetails\").hide();\n\t\t$(\"#editrestaurantinfo\").show();\n\t}","function hiddenFiledTemplate() {\n return \"\";\n}","function getAllFields() {\n return fields;\n }","function RequiredField() {\n\n }"],"string":"[\n \"fields () {\\n return ['title', 'subtitle', 'body', 'favicon'];\\n }\",\n \"ViewAllAccountFields() {\\r\\n this.showFields = !this.showFields;\\r\\n }\",\n \"function printFormEdit() {}\",\n \"function printDetailsModified() {\\n\\treturn `${this.name} (${this.type}) - ${this.age}`;\\n}\",\n \"function toggleAdditionalInfo() {\\n\\t\\t\\t// ng-show is used to toggle between true and false, hiding and showing the additional\\n\\t\\t\\t// input fields\\n\\t\\t\\t!$scope.additionalInfo ? $scope.additionalInfo = true : $scope.additionalInfo = false;\\n\\t\\t}\",\n \"function fieldDisplay(obj) {\\r\\n \\t var fieldDiv = document.getElementById(obj);\\r\\n \\t fieldDiv.style.display = 'block';\\r\\n \\t }\",\n \"fields () {\\n return {\\n author: 'creator',\\n title: 'title',\\n subject: 'sub'\\n }\\n }\",\n \"fields () {\\n return {\\n author: 'creator',\\n title: 'title',\\n subject: 'sub'\\n }\\n }\",\n \"fieldsInfo () {\\n return [\\n {\\n text: this.$t('fields.id'),\\n name: 'id',\\n details: false,\\n table: false,\\n },\\n\\n {\\n type: 'input',\\n column: 'order_nr',\\n text: 'order No.',\\n name: 'order_nr',\\n multiedit: false,\\n required: true,\\n disabled: true,\\n create: false,\\n },\\n {\\n type: 'input',\\n column: 'name',\\n text: 'person name',\\n name: 'name',\\n multiedit: false,\\n required: false,\\n edit: false,\\n create: false,\\n },\\n\\n {\\n type: 'input',\\n column: 'email',\\n text: 'email',\\n name: 'email',\\n multiedit: false,\\n required: false,\\n edit: false,\\n create: false,\\n },\\n\\n {\\n type: 'select',\\n url: 'crm/people',\\n list: {\\n value: 'id',\\n text: 'fullname',\\n data: [],\\n },\\n column: 'user_id',\\n text: this.$t('fields.person'),\\n name: 'person',\\n apiObject: {\\n name: 'person.name',\\n },\\n table: false,\\n },\\n {\\n type: 'input',\\n column: 'package_points',\\n text: 'package points',\\n name: 'package_points',\\n required: false,\\n edit: false,\\n create: false,\\n },\\n\\n // package_points\\n {\\n type: 'select',\\n url: 'crm/package',\\n list: {\\n value: 'id',\\n text: 'full_name',\\n data: [],\\n },\\n column: 'package_id',\\n text: 'package name',\\n name: 'package',\\n apiObject: {\\n name: 'package.package_name',\\n },\\n table: false,\\n },\\n {\\n type: 'input',\\n column: 'package_name',\\n text: 'package name',\\n name: 'package_name',\\n multiedit: false,\\n required: false,\\n edit: false,\\n create: false,\\n },\\n\\n {\\n type: 'input',\\n column: 'package_price',\\n text: 'package price',\\n name: 'package_price',\\n multiedit: false,\\n required: false,\\n edit: false,\\n create: false,\\n },\\n\\n {\\n type: 'input',\\n column: 'pur_date',\\n text: 'purche date',\\n name: 'pur_date',\\n multiedit: false,\\n required: false,\\n edit: false,\\n create: false,\\n },\\n ]\\n }\",\n \"function showDetails(){\\n\\tView.controllers.get('visitorController')['editTag']=true;\\n var grid = View.panels.get('visitorsGrid');\\n var selectedRow = grid.rows[grid.selectedRowIndex];\\n var visitorId = selectedRow[\\\"visitors.visitor_id\\\"];\\n var restriction = new Ab.view.Restriction();\\n restriction.addClause(\\\"visitors.visitor_id\\\", visitorId, \\\"=\\\");\\n View.panels.get('visitorsForm').refresh(restriction,false);\\n}\",\n \"static fields () {\\n return {\\n cod: this.attr(null),\\n titulo: this.attr(''),\\n precio: this.attr('')\\n }\\n }\",\n \"function attFields() {\\n\\n\\tlet code = '
    ';\\n\\tfor (i = 0; i < NAME_LIST.length; i++) {\\n\\n\\t\\tif (NAME_LIST[i] === 'color') {\\n\\n\\t\\t\\tcode += '
    '+ NAME_LIST[i] +':*
    '+\\n\\t\\t\\t\\t\\t\\t''+\\n\\t\\t\\t\\t\\t'
    ';\\n\\n\\t\\t} else if (NECESSARY_VAL.indexOf(NAME_LIST[i]) !== -1){\\n\\n\\t\\t\\tcode += '
    '+ NAME_LIST[i] +':*
    '+\\n\\t\\t\\t\\t\\t\\t''+\\n\\t\\t\\t\\t\\t'
    ';\\n\\t\\t} else if ([\\\"PDB_file\\\",\\\"image\\\"].indexOf(NAME_LIST[i]) !== -1){\\n\\n\\t\\t\\tcode += '
    '+ NAME_LIST[i] +':
    '+\\n\\t\\t\\t\\t\\t\\t''+\\n\\t\\t\\t\\t\\t'
    ';\\n\\t\\t} else {\\n\\n\\t\\t\\tcode += '
    '+ NAME_LIST[i] +':
    '+\\n\\t\\t\\t\\t\\t\\t''+\\n\\t\\t\\t\\t\\t'
    ';\\n\\t\\t}\\n\\t};\\n\\t\\n\\tcode += '
    ';\\n\\treturn code;\\n}\",\n \"function showInput() {\\n // console.log(fields);\\n navigation.navigate('SelectedInput', {fieldsLength: fields.length});\\n }\",\n \"static fields () {\\n return {\\n id: this.increment(),\\n label: this.attr(''),\\n value: this.attr(''),\\n type: this.attr(''),\\n }\\n }\",\n \"function showDetails() {\\n // 'this' is the row data object\\n var s1 = ('Total room area: ' + this['rm.total_area'] + ' sq.ft.');\\n \\n // 'this.grid' is the parent grid/mini-console control instance\\n var s2 = ('Parent control ID: ' + this.grid.parentElementId);\\n \\n // you can call mini-console methods\\n var s3 = ('Row primary keys: ' + toJSON(this.grid.getPrimaryKeysForRow(this)));\\n \\n alert(s1 + '\\\\n' + s2 + '\\\\n' + s3);\\n}\",\n \"function htmlAttributeDisplayDetails() {}\",\n \"function showFormarttedInfo(user) {\\n console.log('user Info', \\\"\\\\n id: \\\" + user.id + \\\"\\\\n user: \\\" + user.username + \\\"\\\\n firsname: \\\" + user.firsName + \\\"\\\\n \\\");\\n}\",\n \"function AddDisplay(fieldName, fieldValue) {\\r\\n\\r\\n if (fieldName == \\\"Address Verification\\\") {\\r\\n var string = \\\"
    \\\";\\r\\n string += \\\"\\\";\\r\\n string += \\\"
    \\\";\\r\\n string += \\\"

    \\\";\\r\\n string += fieldValue;\\r\\n string += \\\"

    \\\";\\r\\n string += \\\"
    \\\";\\r\\n string += \\\"
    \\\";\\r\\n return string;\\r\\n }\\r\\n else if (fieldValue) {\\r\\n var string = \\\"
    \\\";\\r\\n string += \\\"\\\";\\r\\n string += \\\"
    \\\";\\r\\n string += \\\"

    \\\";\\r\\n string += fieldValue;\\r\\n string += \\\"

    \\\";\\r\\n string += \\\"
    \\\";\\r\\n string += \\\"
    \\\";\\r\\n return string;\\r\\n }\\r\\n else\\r\\n return \\\"\\\";\\r\\n }\",\n \"function infoForField(field, extendedProps) { // 434\\n // 435\\n // Ensure fields are not added more than once // 436\\n if (_.contains(addedFields, field)) // 437\\n return; // 438\\n // 439\\n // Get schema definitions for this field // 440\\n var fieldDefs = ss.schema(field); // 441\\n // 442\\n var info = {name: field}; // 443\\n // 444\\n // If there are allowedValues defined, use them as select element options // 445\\n if (useAllowedValuesAsOptions) { // 446\\n var av = fieldDefs.type === Array ? ss.schema(field + \\\".$\\\").allowedValues : fieldDefs.allowedValues; // 447\\n if (_.isArray(av)) { // 448\\n info.options = \\\"allowed\\\"; // 449\\n } // 450\\n } // 451\\n // 452\\n addedFields.push(field); // 453\\n // 454\\n // Return the field info along with the extra properties that // 455\\n // all fields should have // 456\\n return _.extend(info, extendedProps); // 457\\n } // 458\",\n \"function show_field(field,fieldsCounter){\\n field_value = \\\"\\\"+(fieldsCounter-1)+\\\"\\\"+ field.lable +\\\" \\\"+ field.name +\\\"\\\"+ field.type + \\\"\\\";\\n $('.fields').append(\\\"\\\"+ field_value +\\\"\\\");\\n}\",\n \"function showFieldOptions( obj ) {\\n\\t\\tvar i, singleField,\\n\\t\\t\\tfieldId = obj.getAttribute( 'data-fid' ),\\n\\t\\t\\tallFieldSettings = document.querySelectorAll( '.frm-single-settings:not(.frm_hidden)' );\\n\\n\\t\\tfor ( i = 0; i < allFieldSettings.length; i++ ) {\\n\\t\\t\\tallFieldSettings[i].classList.add( 'frm_hidden' );\\n\\t\\t}\\n\\n\\t\\tsingleField = document.getElementById( 'frm-single-settings-' + fieldId );\\n\\t\\tmoveFieldSettings( singleField );\\n\\n\\t\\tsingleField.classList.remove( 'frm_hidden' );\\n\\t\\tdocument.getElementById( 'frm-options-panel-tab' ).click();\\n\\t}\",\n \"function showField(field) {\\n var dest = document.getElementById(field);\\n if (dest) {\\n dest.style.visibility = 'visible';\\n dest.style.display = 'inline';\\n }\\n}\",\n \"get fields () {\\n return {\\n id: {\\n type : 'int',\\n primary: true,\\n },\\n\\n title: {\\n type: 'text'\\n },\\n\\n album: {\\n type: 'text'\\n },\\n\\n preview_link: {\\n type: 'text'\\n },\\n\\n artwork: {\\n type: 'text'\\n },\\n\\n artist_id: {\\n type: 'int'\\n }\\n }\\n }\",\n \"function showAdvanced(showit) {\\n var vis = showit ? \\\"inline-block\\\" : \\\"none\\\";\\n d3.select(parentElement + \\\" ~ #celestial-form\\\").selectAll(\\\".advanced\\\").style(\\\"display\\\", vis);\\n d3.select(parentElement + \\\" ~ #celestial-form\\\").selectAll(\\\"#label-propername\\\").style(\\\"display\\\", showit ? \\\"none\\\" : \\\"inline-block\\\");\\n}\",\n \"function displayFields(selectorID) {\\n\\tif (selectorID !== \\\"\\\") {\\n\\t $(\\\".df\\\" + selectorID).hide();\\n\\t if ($(\\\"#\\\" + selectorID).val()) {\\n\\t\\t$('.df' + $(\\\"#\\\" + selectorID).val()).show(); // Show currently selected\\n\\t }\\n\\t}\\n }\",\n \"function DisplayConstituentCustomFields() {\\n\\n DisplayCustomFields('customFieldContainer', CustomFieldEntity.CRM, function () {\\n $('.editable').prop('disabled', true);\\n LoadDatePickers();\\n LoadDatePair();\\n });\\n\\n}\",\n \"desc(field) {\\r\\n\\t\\treturn this.push('desc', [...arguments]);\\r\\n\\t}\",\n \"function addFields(){\\n var fields=[\\\"id\\\",\\\"query2\\\", \\\"sameAs\\\"];\\n \\n var ftag=''+id2json(fields[i])+'
    ')\\n .append(ftag+\\\" id='\\\"+fields[i]+\\\"'>\\\")\\n .append('
    ');\\n }\\n}\",\n \"function display_edit_fields(id)\\r\\n {\\r\\n $('#nc' + id).trigger('click');\\r\\n }\",\n \"function addMoreFields(field) {\\n var name = \\\"product[\\\"+field+\\\"][]\\\";\\n if(field == 'images')\\n name += '[img_path]'\\n $(\\\"\\\")\\n .attr(\\\"name\\\", name)\\n .appendTo(\\\"#\\\"+field);\\n}\",\n \"function showDetails(row){\\n\\tabRepmAddEditLeaseInABuilding_ctrl.abRepmAddEditLeaseInABuildingAddLease_form.show(false);\\n\\t\\n\\tvar ls_id = row.restriction.clauses[0].value;\\n\\t\\n\\trefreshPanels(ls_id);\\n}\",\n \"displayInfo() {\\n\\t\\t\\tlet info = super.displayInfo() + ', менеджер: ' + this.manager.name ;\\n\\t\\t\\tconsole.log( info );\\n\\t\\t\\treturn info\\n\\t\\t\\t}\",\n \"static get tag() {\\n return \\\"simple-fields\\\";\\n }\",\n \"function ShowHideAttributes(printDebug, frm, cdt, cdn, reload_defaults, refresh_items) {\\r\\n if (printDebug) console.log(__(\\\"ShowHideAttributes*****************************\\\"));\\r\\n\\t//var configurator_mode = false;\\r\\n\\r\\n\\tif (locals[cdt][cdn]) {\\r\\n\\t\\t\\r\\n var row = locals[cdt][cdn];\\r\\n\\t\\t\\r\\n\\t\\tvar template = \\\"\\\"\\r\\n\\t\\t\\r\\n\\t\\tif (row.configurator_of){\\r\\n\\t\\t\\ttemplate = row.configurator_of\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t//Retrouver les attributs qui s'appliquent\\r\\n\\t\\tfrappe.call({\\r\\n\\t\\t\\tmethod: \\\"radplusplus.radplusplus.controllers.configurator.get_all_attributes_fields\\\",\\r\\n\\t\\t\\targs: {\\\"item_code\\\": template}, // renmai - 2017-12-07 \\r\\n\\t\\t\\tcallback: function(res) {\\r\\n\\t\\t\\t\\tif (printDebug) console.log(__(\\\"CALL BACK get_all_attributes_fields\\\"));\\r\\n\\t\\t\\t\\t//Convertir le message en Array\\r\\n\\t\\t\\t\\tvar attributes = (res.message || {});\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar attributes = {};\\r\\n\\t\\t\\t\\tfor (var i = 0, len = res.message.length; i < len; i++) {\\r\\n\\t\\t\\t\\t\\tattributes[res.message[i].field_name] = res.message[i];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif (printDebug) console.log(__(\\\"attributes ---- >\\\" ));\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif (printDebug) console.log(__(attributes));\\r\\n\\t\\t\\t\\tif (printDebug) console.log(__(\\\"< ---- attributes\\\" ));\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t//Pointeur sur grid\\r\\n\\t\\t\\t\\tvar grid = cur_frm.fields_dict[\\\"items\\\"].grid;\\r\\n\\t\\r\\n\\t\\t\\t\\tif (printDebug) console.log(__(\\\"grid.docfields.length:\\\" + grid.docfields.length));\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t$.each(grid.docfields, function(i, field) {\\r\\n\\t\\t\\t\\t\\t// debugger;\\r\\n\\t\\t\\t\\t\\tif (printDebug) console.log(__(\\\"field.fieldname :\\\" + field.fieldname ));\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\tif (typeof attributes[field.fieldname] !== 'undefined'){\\r\\n\\t\\t\\t\\t\\t\\tif (printDebug) console.log(__(\\\"attributes[field.fieldname].name : \\\" + attributes[field.fieldname].name ));\\r\\n\\t\\t\\t\\t\\t\\tfield.depends_on = \\\"eval:false\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\tif (attributes[field.fieldname].parent != null){\\r\\n\\t\\t\\t\\t\\t\\t\\tfield.depends_on = \\\"eval:true\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\tif (printDebug) console.log(__(\\\"attributes[field.fieldname].parent : \\\" + attributes[field.fieldname].parent ));\\r\\n\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t\\tvar field_value = frappe.model.get_value(row.doctype, row.name, field.fieldname);\\r\\n\\t\\t\\t\\t\\t\\t\\tif (!field_value){ \\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar first_value = frappe.utils.filter_dict(cur_frm.fields_dict[\\\"items\\\"].grid.docfields, {\\\"fieldname\\\": field.fieldname})[0].options[0][\\\"value\\\"]\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfrappe.model.set_value(row.doctype, row.name, field.fieldname, first_value);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tconsole.log(__(\\\"field_value : \\\" + field_value));\\t\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t//configurator_mode = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t/* if (typeof attributes[field.fieldname] !== 'undefined'){\\r\\n\\t\\t\\t\\t\\t\\tif (printDebug) console.log(__(\\\"if (typeof attributes[field.fieldname] !== 'undefined') \\\"));\\r\\n\\t\\t\\t\\t\\t\\tif (attributes[field.fieldname].parent != null){\\r\\n\\t\\t\\t\\t\\t\\t\\tfield.hidden_due_to_dependency = false;\\r\\n\\t\\t\\t\\t\\t\\t\\tif (printDebug) console.log(__(\\\"attributes[field.fieldname].parent : \\\" + attributes[field.fieldname].parent ));\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t} */\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t// renmai 2017-12-07\\r\\n\\t\\t\\t\\t\\trefresh_field(field);\\r\\n\\t\\t\\t\\t\\t// }\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t/* if (printDebug) console.log(__(attributes[j]));\\r\\n\\t\\t\\t\\t\\tif (grid_row.grid_form.fields_dict[attributes[j][0]]){\\r\\n\\t\\t\\t\\t\\t\\tgrid_row.grid_form.fields_dict[attributes[j][0]].set_value(attributes[j][1]);\\r\\n\\t\\t\\t\\t\\t} */\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t});\\r\\n\\r\\n\\t\\t\\t\\t//Reloader les valeurs par défaut suite aux changements\\r\\n\\t\\t\\t\\tif (reload_defaults)\\r\\n\\t\\t\\t\\t\\tAssignDefaultValues(printDebug, frm, cdt, cdn);\\r\\n\\r\\n\\t\\t\\t\\tif (refresh_items)\\r\\n\\t\\t\\t\\t\\trefresh_field(\\\"items\\\");\\r\\n\\r\\n\\t\\t\\t\\t//pour chaque attribut\\r\\n\\t\\t\\t\\t/* for (var j = 0; j < attributes.length; j++) {\\r\\n\\t\\t\\t\\t\\tif (printDebug) console.log(__(attributes[j]));\\r\\n\\t\\t\\t\\t\\tif (grid_row.grid_form.fields_dict[attributes[j][0]]){\\r\\n\\t\\t\\t\\t\\t\\tgrid_row.grid_form.fields_dict[attributes[j][0]].set_value(attributes[j][1]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t} */\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t/* var grid_row = cur_frm.open_grid_row();\\r\\n\\t\\t\\t\\t$.each(attributes, function(i, attribute) {\\r\\n\\t\\t\\t\\t// for (var j = 0; j < len(attributes); j++) {\\r\\n\\t\\t\\t\\t\\tif (attribute.parent != null) {\\r\\n\\t\\t\\t\\t\\t\\tif (printDebug) console.log(__(\\\"attribute.field_name : \\\" + attribute.field_name));\\t\\r\\n\\t\\t\\t\\t\\t\\tif (grid_row.grid_form.fields_dict[attribute.field_name] && cur_frm.cur_grid.grid_form.fields_dict[attribute.field_name].df.fieldtype == \\\"Select\\\"){\\r\\n\\t\\t\\t\\t\\t\\t\\tif (printDebug) console.log(__(\\\"grid_row.grid_form.fields_dict[attribute.field_name] : \\\" + grid_row.grid_form.fields_dict[attribute.field_name]));\\t\\r\\n\\t\\t\\t\\t\\t\\t\\tfrappe.model.set_value(row.doctype, row.name, attribute.field_name, cur_frm.cur_grid.grid_form.fields_dict[attribute.field_name].df.options[0].key);\\r\\n\\t\\t\\t\\t\\t\\t\\t//grid_row.grid_form.fields_dict[attribute.field_name].set_value(attribute[j][1]);\\r\\n\\t\\t\\t\\t\\t\\t}\\t\\r\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t}); */\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif (printDebug) console.log(__(\\\"CALL BACK get_all_attributes_fields END\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t});\\r\\n\\t}\\r\\n}\",\n \"function displayAllFields (none) {\\n loginAndSignUpDisplay(none, none)\\n displayContent('user_output', none)\\n displayContent('purchase_stat', none)\\n displayContent('new_product_form', none)\\n displayContent('home_page', none)\\n displayContent('admin_login_form', none)\\n displayContent('all_producer_accn_credentials', none)\\n }\",\n \"function showInfo() {\\n $('#user-name').text(curUser.first_name + ' ' + curUser.last_name);\\n $('#first-name').text(curUser.first_name);\\n $('#last-name').text(curUser.last_name);\\n $('#email').text(curUser.email);\\n $('#phone').text(curUser.phone_number);\\n }\",\n \"function show_more_field(type) {\\n if(type==='agent')\\n {\\n $('#agent_form').fadeIn();\\n }\\n else\\n {\\n $('#agent_form').fadeOut();\\n }\\n}\",\n \"function show_more_field(type) {\\n if(type==='agent')\\n {\\n $('#agent_form').fadeIn();\\n }\\n else\\n {\\n $('#agent_form').fadeOut();\\n }\\n}\",\n \"get availablefields() {\\r\\n return new Fields(this, \\\"availablefields\\\");\\r\\n }\",\n \"function showFields(langInd) {\\n for (var l = 0; l < langAttributes.length; l++) {\\n if (l === parseInt(langInd))\\n for (var i = 0; i < langAttributes[l].length; i++)\\n $(langAttributes[l][i].container).css('display', 'block');\\n else\\n for (var a = 0; a < langAttributes[l].length; a++)\\n $(langAttributes[l][a].container).css('display', 'none');\\n }\\n }\",\n \"function showEditRevenueInputFields(_line, _revenueLine) {\\n console.log('[debug] edit revenue options menu: ' + _line + ' --> ' + _revenueLine);\\n}\",\n \"function debugAttributes() {\\n Xrm.Page.ui.controls.forEach(function (control, index) {\\n var controlType = control.getControlType();\\n that.writeToConsole(control.getName() + \\\" - \\\" + control.getControlType());\\n });\\n }\",\n \"add(fieldTitleOrInternalName) {\\r\\n return this.clone(ViewFields_1, `addviewfield('${fieldTitleOrInternalName}')`).postCore();\\r\\n }\",\n \"function showDetails(demo){\\nconsole.log(`Name: ${demo.bookTitle}, price: ${demo.price} `)\\n}\",\n \"function getDetails(e, $row, id, record) {\\n $('#feature-title').text(record.title);\\n $('#feature-priority').text(record.client_priority);\\n $('#feature-target-date').text(record.target_date);\\n $('#feature-client').text(record.client);\\n $('#feature-product-area').text(record.product_area_name);\\n\\t$('#feature-description').text(record.description);\\n }\",\n \"renderFields() {\\n return _.map(confirmRegisterFields, ({ name, label, type }) => )\\n \\n }\",\n \"function showFields (data, version, fields) {\\n var o = {}\\n ;[data, version].forEach(function (s) {\\n Object.keys(s).forEach(function (k) {\\n o[k] = s[k]\\n })\\n })\\n return search(o, fields.split('.'), version.version, fields)\\n}\",\n \"displayInfo() {\\n\\t\\t\\tlet info = super.displayInfo() + ', разработчики: ' + this.getDevelopers() ;\\n\\t\\t\\tconsole.log( info );\\n\\t\\t\\treturn info\\n\\t\\t\\t}\",\n \"function isAdditionalInfoShowing() {\\n return profileStates.additionalInfo;\\n}\",\n \"function getFieldTrue(info) {\\n var arr = [];\\n if(info.fullname != \\\"\\\") {\\n arr.push(\\\"#help-register-customer\\\");\\n }\\n if(info.address != \\\"\\\") {\\n arr.push(\\\"#help-address-customer\\\");\\n }\\n if(info.phone != \\\"\\\") {\\n arr.push(\\\"#help-phone-customer\\\");\\n }\\n if(info.vaccineId != 0) {\\n arr.push(\\\"#help-vaccine-customer\\\");\\n }\\n if(info.quantity != \\\"\\\" || info.quantity != 0) {\\n arr.push(\\\"#help-quantity\\\");\\n }\\n return arr;\\n }\",\n \"function onOperation (fields, operation) {\\n for (var i=0; i div > div.DTE_Field.row.DTE_Field_Name_' + key);\\n if (el.length) {\\n //console.log(key); :: COLUMN NAME\\n //console.log(key + ' ' + operation + ' ' + fields[i][key][operation]);\\n if (fields[i][key][operation]) {\\n el.show();\\n } else {\\n if (fields[i][key][operation] === false) {\\n el.hide();\\n } else if (typeof fields[i][key][operation] === \\\"undefined\\\") {\\n if (el.hasClass('DTE_Field_Type_hidden') ) {\\n console.log('This column (not mentioned on the list) has to be hidden...');\\n } else {\\n el.show();\\n }\\n }\\n }\\n }\\n });\\n }\\n }\",\n \"renderFormFields() {\\n console.warn(\\\"renderFormFields() should be implemented in subclasses\\\");\\n }\",\n \"function showDetails(row){\\n\\tvar controller = View.controllers.get('abGbRptFpSrcCatCtrl');\\n\\tvar restriction = new Ab.view.Restriction();\\n\\trestriction.addClauses(controller.consoleRestriction);\\n\\tif(typeof(row) == \\\"object\\\" && typeof(row) != \\\"string\\\" && row != \\\"total_row\\\" ){\\n\\t\\tif(valueExistsNotEmpty(row[\\\"bl.site_id\\\"])){\\n\\t\\t\\trestriction.addClause(\\\"bl.site_id\\\", row[\\\"bl.site_id\\\"], \\\"=\\\", \\\"AND\\\", true);\\n\\t\\t}\\n\\t\\tif(valueExistsNotEmpty(row[\\\"gb_fp_totals.calc_year\\\"])){\\n\\t\\t\\trestriction.addClause(\\\"gb_fp_totals.calc_year\\\", row[\\\"gb_fp_totals.calc_year\\\"], \\\"=\\\", \\\"AND\\\", true);\\n\\t\\t}\\n\\t}\\n\\tcontroller.abGbRptFpSrcCat_bl.addParameter(\\\"isGroupPerArea\\\", controller.isGroupPerArea);\\n\\tcontroller.abGbRptFpSrcCat_bl.refresh(restriction);\\n\\tshowReportColumns(controller.abGbRptFpSrcCat_bl);\\n\\tcontroller.abGbRptFpSrcCat_tabs.selectTab(\\\"abGbRptFpSrcCat_bl_tab\\\");\\n}\",\n \"static fields () {\\n return { \\n id: this.attr(null), \\n brand: this.attr(''),\\n c_price: this.attr(''),\\n catalog_brand_id: this.attr(''),\\n catalog_cate_id: this.attr(''),\\n catalog_county_id: this.attr(''),\\n catalog_unit_id: this.attr(''),\\n code: this.attr(''),\\n county: this.attr(''),\\n created_at: this.attr(''),\\n d_price: this.attr(''),\\n e_price: this.attr(''), \\n m_price: this.attr(''),\\n name: this.attr(''),\\n nh_price: this.attr(''),\\n seq: this.attr(''),\\n sku: this.attr(''),\\n t_price: this.attr(''),\\n unit: this.attr(''),\\n updated_at: this.attr(''),\\n weight: this.attr(''),\\n shipping: this.attr(''), \\n qty: this.attr(''), \\n amount: this.attr(''), \\n profit: this.attr(''), \\n }\\n }\",\n \"print() {\\n for (let row of this._field) {\\n console.log(row.join(' '));\\n }\\n }\",\n \"function showCertificateFields() {\\n clearCertificateFields();\\n const item = $('hierarchy').selectedItem;\\n if (item && item.detail.payload.index !== undefined) {\\n chrome.send('requestCertificateFields', [item.detail.payload.index]);\\n }\\n }\",\n \"function showAddDiv() {\\n\\tshowActionDiv('add');\\n}\",\n \"getInfo() {\\n return `${this.firstName} ${this.lastName} is ${this.age} years old.`\\n }\",\n \"getDescription() {\\n return \\\"Nom : \\\"+this.nom+\\\"\\\\nAge : \\\"+this.age+\\\"\\\\nProfession : \\\"+this.profession;\\n }\",\n \"printAllAttributes()\\n {\\n return this.price+\\\" \\\"+this.quantity+\\\" \\\"+this.name\\n }\",\n \"function getFieldOptions(appName, factName, paramid, callback) {\\n //appName,fact, field, lookup,updateId, callback\\n $('table').remove();\\n quickforms.getMultiData(appName, factName, paramid, '1=1', '',\\n function (data) {\\n displayEditingPage(data, paramid);\\n });\\n }\",\n \"get hiddenFields() {\\n return Object.entries(this._schemaObj.properties)\\n .map(([name, prop]) => {\\n if (prop.hidden === true)\\n return name;\\n })\\n .filter(n => n);\\n }\",\n \"function onShowFieldBtnClicked(event)\\n\\t{\\n\\t\\tvar button = $(event.currentTarget);\\n\\t\\tvar fieldId = button.data('showField');\\n\\n\\t\\tthis.showingFieldView = true;\\n\\t\\tthis.selectedField = View.data.find(this.selectedInstance.fields, fieldId);\\n\\t\\tthis.sidebar.breadcrumbsView.add(this.selectedField.human_name, this, 'renderCollectionField');\\n\\t\\tthis.renderCollectionField();\\n\\t}\",\n \"function pubmedTxt(field, extra) {\\n var txt;\\n if (!extra) {\\n extra = '';\\n }\\n switch(field) {\\n case 'modalTitle':\\n txt = 'Add new PubMed Article';\\n break;\\n case 'inputLabel':\\n txt = 'Enter a PMID';\\n break;\\n case 'editLabel':\\n txt = 'Edit PMID';\\n break;\\n case 'inputButton':\\n txt = 'Retrieve PubMed Article';\\n break;\\n case 'resourceResponse':\\n txt = \\\"Select \\\\\\\"\\\" + extra + \\\"\\\\\\\" (below) if the following citation is correct; otherwise, edit the PMID (above) to retrieve a different article.\\\";\\n break;\\n }\\n return txt;\\n}\",\n \"_updatePreviewField(){\\n if(this._showingContacts && this._chosenContact !== null){\\n // Meh\\n this._displayName.value = this._chosenContact.firstName + \\\" \\\" + this._chosenContact.lastName;\\n }\\n else{\\n this._displayName.value = this._user.FirstName + \\\" \\\" + this._user.LastName;\\n }\\n }\",\n \"function popUpFormFieldPropertiesDialog(whichOne)\\n{\\n var commandFileName = \\\"ServerObject-\\\" + whichOne + \\\"Props.htm\\\";\\n var rowObj = _ColumnNames.getRowValue();\\n var fieldInfoObj = dwscripts.callCommand(commandFileName,rowObj.displayAs)\\n\\n // note: use the \\\"type\\\" property on the menuInfoObj to see which\\n // type of object was returned\\n \\n if (fieldInfoObj)\\n {\\n rowObj.displayAs = fieldInfoObj;\\n }\\n}\",\n \"function onShowModelFieldBtnClicked(event)\\n\\t{\\n\\t\\tvar fieldId = event.currentTarget.dataset.modelFieldId;\\n\\n\\t\\tthis.showModelFieldView(fieldId);\\n\\t}\",\n \"function giftDetails(newGift){\\r\\n\\r\\n\\t\\thideEdit();\\r\\n\\t\\tshowEdit();\\r\\n\\r\\n\\t\\t//create circle with icon if it is given for this misison\\r\\n\\t\\t$('.edit ul.mission-neutral').append($('
  • ' + (newGift.icon ? '' : \\\"\\\") + '
  • '))\\r\\n\\r\\n\\t\\t//creates empty form \\r\\n\\t\\t$('.edit').append(createEmptyForm());\\r\\n\\r\\n\\t\\t//if name is given show in the form\\r\\n\\t\\t$('input[name=\\\"newGiftName\\\"]').val(newGift.name ? newGift.name : \\\"\\\")\\r\\n\\r\\n\\t\\t//if points are given (which means it is user mission) show in the form \\r\\n\\t\\tif (newGift.hasOwnProperty('points')){\\r\\n\\t\\t\\t$('input[name=\\\"newGiftPoints\\\"]').val(newGift.points)\\r\\n\\t\\t\\t//for user mission save missionId\\r\\n\\t\\t\\t$('.edit li.circle-big').attr('name',newGift.id)\\r\\n\\r\\n\\t\\t\\t//for user mission show SAVE button\\r\\n\\t\\t\\t$('.edit').append($(''))\\r\\n\\t\\t\\t// and FINISH / DELETE button\\r\\n\\t\\t\\t$('.edit').append($(''))\\r\\n\\t\\t} else {\\r\\n\\t\\t\\t//for NOT user missions show ADD button\\r\\n\\t\\t\\t$('.edit').append($(''))\\r\\n\\t\\t}\\r\\n }\",\n \"function getAllFields(){\\n\\t\\t\\t\\n ModulesService.getModuleByName('users').then(function(response){\\n $scope.fields = response.fields;\\n $scope.id = response._id;\\n \\n $scope.fieldsLength = Object.size(response.fields);\\n \\n }).catch(function(err){\\n alert(err.msg_error);\\n });\\n }\",\n \"function addFieldRow(e) {\\n e.stopPropagation();\\n var $ul = getUl(this)\\n , id = $ul.attr('id')\\n , $tgl = getToggleField($ul);\\n $ul.append(getTemplate(id));\\n focusInput($ul);\\n if (!isChecked($tgl)) {\\n setToggleField($(this), true);\\n $ul.addClass('visible');\\n }\\n render();\\n}\",\n \"static get builderInfo() {\\n return {\\n title: 'textfield',\\n group: 'basic',\\n icon: 'fa fa-envelope-open',\\n weight: 70,\\n documentation: 'http://help.form.io/userguide/#table',\\n schema: CustomComponent.schema(),\\n };\\n }\",\n \"function remove_fields(link, is_new_record) {\\n $(link).closest(\\\"div.add_other\\\").children(\\\"p.add_other\\\").children(\\\"a\\\").show();\\n if(is_new_record){\\n $(link).closest(\\\".fields\\\").remove();\\n }\\n else{\\n $(link).prev(\\\"input[type=hidden]\\\").val(\\\"1\\\");\\n $(link).closest(\\\".fields\\\").hide();\\n }\\n}\",\n \"function showAddRow() {\\n resetTopping(); //Reset all items\\n $(\\\"div#student-add-row\\\").show();\\n}\",\n \"function us_showmoreform() {\\r\\n var i1 = document.getElementById('us_hiddenform');\\r\\n var a = document.getElementById('us_more');\\r\\n \\r\\n if (i1.getAttribute('class')) {\\r\\n i1.setAttribute('class','');\\r\\n a.innerHTML = '&#8722;';\\r\\n }\\r\\n else {\\r\\n i1.setAttribute('class','hidden');\\r\\n a.innerHTML = '+';\\r\\n }\\r\\n}\",\n \"function fieldLabel(field) { return [field, \\\"Label\\\"].join(\\\"\\\"); }\",\n \"function configureFields(){\\n\\n // Look at the modal's Category as well as user Categories\\n let cats = $filter('userCategories')($scope.categories, $scope.user) || [];\\n\\n if( !cats.includes($scope.category) ){\\n cats.push($scope.category);\\n }\\n\\n let fields = cats.map(cat => cat.editFields)\\n .reduce( (showFields, catFields) => {\\n catFields.forEach( f => {\\n if( !showFields.includes(f)){\\n showFields.push(f);\\n }\\n });\\n\\n return showFields;\\n }, []);\\n\\n $timeout(() => {\\n // Clear out fields\\n $scope.config.fields = {};\\n fields.forEach( col => $scope.config.fields['show_field_' + col] = true)\\n });\\n\\n return fields;\\n }\",\n \"function _ShowForeignKeyFields(manager, result, sourceColumns, targetColumns) {\\r\\n var sbSource = new Sys.StringBuilder();\\r\\n var sbTarget = new Sys.StringBuilder();\\r\\n\\r\\n $.each(result.Columns, function (index, value) {\\r\\n sbSource.append(String.format('', value.Name));\\r\\n sbTarget.append(String.format('', value.ReferencedColumn));\\r\\n });\\r\\n sourceColumns.html(sbSource.toString());\\r\\n targetColumns.html(sbTarget.toString());\\r\\n\\r\\n $('table#FKeyDefinition6 tbody#FKeyInfoFields6 tr td span.TargetFields').text(String.format(\\\"Fields ({0})\\\", result.ReferencedTable));\\r\\n}\",\n \"addNewline(){\\n // re-render formfield\\n // TODO : to fix\\n this.formFieldManage.applyConfigurationToformlyModel(this.configuration, this.wfFormFields, this.dataModel);\\n this.wfFormFieldsOnlyNeededProperties = angular.copy(this.wfFormFields);\\n }\",\n \"function Details() {\\r\\n}\",\n \"get qaLocatorNextFormFields() {\\n return `button ${this.CUSTOM_LABELS.geButtonBuilderNavFormFields}`;\\n }\",\n \"function populateDataFields() {}\",\n \"function getFieldList() {\\n var appId = kintone.app.getId();\\n kintone.api(\\n kintone.api.url('/k/v1/form', appIsGuest()),\\n 'GET',\\n {app: appId},\\n function(resp) { //success\\n var properties = resp.properties;\\n for (var i = 0; i < properties.length; i++) {\\n var property = properties[i];\\n switch (property.type) {\\n case 'SINGLE_LINE_TEXT':\\n // add option in select Box\\n addSelectOption('#itsunavi-address-feeld', property.label, property.code);\\n addSelectOption('#itsunavi-lat-feeld', property.label, property.code);\\n addSelectOption('#itsunavi-lon-feeld', property.label, property.code);\\n addSelectOption('#itsunavi-tooltip-title', property.label, property.code);\\n break;\\n case 'NUMBER':\\n // add option in select Box\\n addSelectOption('#itsunavi-lat-feeld', property.label, property.code);\\n addSelectOption('#itsunavi-lon-feeld', property.label, property.code);\\n addSelectOption('#itsunavi-tooltip-title', property.label, property.code);\\n break;\\n case 'SPACER':\\n addSelectOption('#itsunavi-space-feeld', property.elementId, property.elementId);\\n break;\\n default:\\n }\\n }\\n getCurrentConf();\\n },\\n function(resp) { //failed\\n alert('フォーム情報の取得に失敗しました\\\\nError: ' + resp.message);\\n }\\n );\\n }\",\n \"function FieldDetails() {\\n _classCallCheck(this, FieldDetails);\\n\\n FieldDetails.initialize(this);\\n }\",\n \"function showPrintTemplateInputs() {\\n $(\\\".printInput\\\").hide()\\n $('[data-templateid=\\\"' + $ddlPrintTemplate.val() + '\\\"]').fadeIn();\\n }\",\n \"getFields() {\\n const { expand } = this.state;\\n const {\\n form: { getFieldDecorator },\\n searchMapper: searchFields,\\n } = this.props;\\n\\n return searchFields.map(searchField => {\\n const { label, name, secondary, rules, initialValue } = searchField;\\n\\n return (\\n \\n \\n {getFieldDecorator(name, {\\n rules,\\n initialValue,\\n })(this.renderItem(searchField))}\\n \\n \\n );\\n });\\n }\",\n \"function showExtensionDetails(name) {\\n if ($('#extension_details').is(':visible') == false) {\\n $('#extension_details').slideDown();\\n }\\n //The 'extensions' dict is loaded onto pages that have it\\n //TODO: this is hacky and should be properly loaded in\\n extDetails = extensions[name]\\n\\n $('#ext_description').text(extDetails.Description)\\n $('#ext_author').text(extDetails.Author)\\n\\n}\",\n \"function debugDisplayMembers(obj) {\\n\\tvar getters = new Array();\\n\\tvar setters = new Array();\\n\\tvar others = new Array();\\n\\tvar sKey;\\n\\n\\tfor (var key in obj) {\\n\\t\\tsKey = key + \\\"\\\";\\n\\t\\tif (!((sKey.length > 0) && (sKey[0] == '_'))) {\\n\\t\\t\\tswitch (sKey.substr(0, 4)) {\\n\\t\\t\\t\\tcase 'get_':\\n\\t\\t\\t\\t\\tgetters.push(key);\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 'set_':\\n\\t\\t\\t\\t\\tsetters.push(key);\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tdefault:\\n\\t\\t\\t\\t\\tothers.push(key);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\tgetters.sort();\\n\\tsetters.sort();\\n\\tothers.sort();\\n\\n\\talert(others.join(\\\", \\\") + \\\"\\\\r\\\\n\\\\r\\\\n\\\" +\\n\\t\\tgetters.join(\\\", \\\") + \\\"\\\\r\\\\n\\\\r\\\\n\\\" +\\n\\t\\tsetters.join(\\\", \\\"));\\n}\",\n \"function displayCustomAttributes() {\\n let customAttributeArray = Object.keys(CUSTOM_QUALIFICATION_DATA);\\n let customAttributeHtml = \\\"\\\";\\n for (let i = 0; i < customAttributeArray.length; i++) {\\n customAttributeHtml = customAttributeHtml +\\n customAttributeArray[i]+\\\":\\\"+\\n \\\"\\\"+\\n \\\"
    \\\";\\n }\\n document.getElementById('customAttributes').innerHTML = customAttributeHtml;\\n}\",\n \"static modifyFields() {\\n return [\\n 'article_id',\\n 'user_id',\\n 'comment',\\n 'flagged',\\n ];\\n }\",\n \"add(fieldTitleOrInternalName) {\\n return spPost(this.clone(ViewFields, `addviewfield('${fieldTitleOrInternalName}')`));\\n }\",\n \"function us_showmoreform() {\\r\\n var i1 = document.getElementById('us_hiddenform');\\r\\n var a = document.getElementById('us_more');\\r\\n \\r\\n if (i1.getAttribute('class')) {\\r\\n i1.setAttribute('class','');\\r\\n a.innerHTML = '&#8722;';\\r\\n }\\r\\n else {\\r\\n i1.setAttribute('class','us_hidden');\\r\\n a.innerHTML = '+';\\r\\n }\\r\\n}\",\n \"showInfo() {\\n /*\\n 'super' is a access to the parent prototype methods store\\n OR call parent class method using super.methodName()\\n super.showInfo();\\n\\n AND add additional behavior to the created method\\n console.log('add new feature to the extended class method');\\n */\\n super.showInfo();\\n return `User is a ${this.developer} developer`;\\n }\",\n \"get fields() {\\r\\n return new SharePointQueryableCollection(this, \\\"fields\\\");\\r\\n }\",\n \"getFieldInfo() {\\n const info = super.getFieldInfo();\\n const ClassName = this.ele.fieldClass;\\n const ele = new ClassName(this.ele.props);\\n ele.setKey(this.key);\\n info.ele = ele.getFieldInfo();\\n return info;\\n }\",\n \"canShowDetailedInfo() {\\n return false;\\n }\",\n \"renderExtraFields() {\\r\\n if (this.props.formType === \\\"Sign Up\\\") return (\\r\\n <>\\r\\n \\r\\n \\r\\n\\r\\n \\r\\n \\r\\n\\r\\n \\r\\n \\r\\n \\r\\n );\\r\\n }\",\n \"renderInputFields() {\\n\\t\\tgetComponentElementById(this,'AdditionalInputFieldsWrapper').html(\\\"\\\");\\n\\t\\tthis.included_attribute_array.forEach(function(attribute) {\\n\\t\\t\\tlet wrapper_id = attribute+\\\"Wrapper\\\";\\n\\t\\t\\tlet wrapper_node = getComponentElementById(this,wrapper_id);\\n\\t\\t\\tif (!wrapper_node.length) {\\n\\t\\t\\t\\twrapper_node = this.addDynamicIncludedField(attribute);\\n\\t\\t\\t}\\n\\t\\t\\twrapper_node.show();\\n\\t\\t\\tlet entity_attribute_properties = data_model.getEntityAttributeProperties(this.entity_name,attribute);\\n\\t\\t\\tlet render_config_obj = {\\n\\t\\t\\t\\t...{\\n\\t\\t\\t\\t\\tWrapperId: this.getUid()+\\\"_\\\"+wrapper_id,\\n\\t\\t\\t\\t\\tFieldId: this.getUid()+\\\"_\\\"+attribute,\\n\\t\\t\\t\\t\\tMustValidate: (this.required_validation_array.indexOf(attribute) > -1)\\n\\t\\t\\t\\t},\\n\\t\\t\\t\\t...entity_attribute_properties};\\n\\t\\t\\tdx_renderer.renderInputField(render_config_obj);\\n\\n\\t\\t}.bind(this));\\n\\n\\t\\tthis.included_relationship_array.forEach(function(relationship) {\\n\\t\\t\\tlet wrapper_id = relationship+\\\"Wrapper\\\";\\n\\t\\t\\tlet wrapper_node = getComponentElementById(this,wrapper_id);\\n\\t\\t\\tif (!wrapper_node.length) {\\n\\t\\t\\t\\twrapper_node = this.addDynamicIncludedField(relationship);\\n\\t\\t\\t}\\n\\t\\t\\twrapper_node.show();\\n\\t\\t\\tlet entity_relationship_properties = data_model.getEntityRelationshipProperties(this.entity_name,relationship);\\n\\t\\t\\tlet render_config_obj = {\\n\\t\\t\\t\\t...{\\n\\t\\t\\t\\t\\tWrapperId: this.getUid()+\\\"_\\\"+wrapper_id,\\n\\t\\t\\t\\t\\tFieldId: this.getUid()+\\\"_\\\"+relationship,\\n\\t\\t\\t\\t\\tMustValidate: (this.required_validation_array.indexOf(relationship) > -1)\\n\\t\\t\\t\\t},\\n\\t\\t\\t\\t...entity_relationship_properties};\\n\\t\\t\\tdx_renderer.renderInputField(render_config_obj);\\n\\t\\t}.bind(this));\\n\\t}\",\n \"function editRestaurantInfoShow(){\\n\\t\\t$(\\\".restaurantInfoDetails\\\").hide();\\n\\t\\t$(\\\"#editrestaurantinfo\\\").show();\\n\\t}\",\n \"function hiddenFiledTemplate() {\\n return \\\"\\\";\\n}\",\n \"function getAllFields() {\\n return fields;\\n }\",\n \"function RequiredField() {\\n\\n }\"\n]"},"negative_scores":{"kind":"list like","value":["0.63581353","0.62687105","0.6215431","0.62147444","0.6098865","0.6083523","0.60084903","0.60084903","0.59657437","0.5959002","0.59469956","0.5934652","0.59211195","0.5872767","0.5866661","0.5839486","0.58375657","0.5815293","0.579804","0.5795084","0.5792606","0.57895356","0.57666826","0.5757593","0.57504296","0.5733056","0.57186884","0.5711667","0.5708691","0.5687637","0.5680816","0.56734663","0.5670671","0.5665921","0.5652317","0.56433046","0.563536","0.563536","0.56234944","0.5608488","0.559257","0.55845624","0.5556969","0.55560243","0.55548626","0.5539656","0.55258554","0.5525634","0.5524097","0.55227923","0.55113214","0.5508137","0.54948455","0.5493139","0.5480621","0.54663867","0.5465742","0.5460067","0.545807","0.54560447","0.5449616","0.544068","0.5440122","0.5434565","0.5425177","0.54103494","0.539816","0.5392733","0.5389089","0.5388148","0.53800434","0.53747076","0.5374618","0.537437","0.5372095","0.5369055","0.5365069","0.5358357","0.5356607","0.53543","0.5354233","0.53457224","0.5344647","0.53443336","0.53440356","0.5338174","0.5337303","0.53315085","0.53283304","0.5326813","0.532602","0.5323819","0.5313061","0.53105897","0.5309852","0.5303593","0.5296107","0.52939576","0.52908427","0.52887547","0.5282952"],"string":"[\n \"0.63581353\",\n \"0.62687105\",\n \"0.6215431\",\n \"0.62147444\",\n \"0.6098865\",\n \"0.6083523\",\n \"0.60084903\",\n \"0.60084903\",\n \"0.59657437\",\n \"0.5959002\",\n \"0.59469956\",\n \"0.5934652\",\n \"0.59211195\",\n \"0.5872767\",\n \"0.5866661\",\n \"0.5839486\",\n \"0.58375657\",\n \"0.5815293\",\n \"0.579804\",\n \"0.5795084\",\n \"0.5792606\",\n \"0.57895356\",\n \"0.57666826\",\n \"0.5757593\",\n \"0.57504296\",\n \"0.5733056\",\n \"0.57186884\",\n \"0.5711667\",\n \"0.5708691\",\n \"0.5687637\",\n \"0.5680816\",\n \"0.56734663\",\n \"0.5670671\",\n \"0.5665921\",\n \"0.5652317\",\n \"0.56433046\",\n \"0.563536\",\n \"0.563536\",\n \"0.56234944\",\n \"0.5608488\",\n \"0.559257\",\n \"0.55845624\",\n \"0.5556969\",\n \"0.55560243\",\n \"0.55548626\",\n \"0.5539656\",\n \"0.55258554\",\n \"0.5525634\",\n \"0.5524097\",\n \"0.55227923\",\n \"0.55113214\",\n \"0.5508137\",\n \"0.54948455\",\n \"0.5493139\",\n \"0.5480621\",\n \"0.54663867\",\n \"0.5465742\",\n \"0.5460067\",\n \"0.545807\",\n \"0.54560447\",\n \"0.5449616\",\n \"0.544068\",\n \"0.5440122\",\n \"0.5434565\",\n \"0.5425177\",\n \"0.54103494\",\n \"0.539816\",\n \"0.5392733\",\n \"0.5389089\",\n \"0.5388148\",\n \"0.53800434\",\n \"0.53747076\",\n \"0.5374618\",\n \"0.537437\",\n \"0.5372095\",\n \"0.5369055\",\n \"0.5365069\",\n \"0.5358357\",\n \"0.5356607\",\n \"0.53543\",\n \"0.5354233\",\n \"0.53457224\",\n \"0.5344647\",\n \"0.53443336\",\n \"0.53440356\",\n \"0.5338174\",\n \"0.5337303\",\n \"0.53315085\",\n \"0.53283304\",\n \"0.5326813\",\n \"0.532602\",\n \"0.5323819\",\n \"0.5313061\",\n \"0.53105897\",\n \"0.5309852\",\n \"0.5303593\",\n \"0.5296107\",\n \"0.52939576\",\n \"0.52908427\",\n \"0.52887547\",\n \"0.5282952\"\n]"},"document_score":{"kind":"string","value":"0.0"},"document_rank":{"kind":"string","value":"-1"}}},{"rowIdx":81349,"cells":{"query":{"kind":"string","value":"reverse the given velocity"},"document":{"kind":"string","value":"function reverse(o, p) { o[p] *= -1 }"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["function invertVelocity(axis)\n{\n\tif (axis == \"x\")\n\t{\n\t\tballVelocityX = ballVelocityX * -1;\n\t}\n\telse if (axis == \"y\")\n\t{\n\t\tballVelocityY = ballVelocityY * -1;\n\t}\n}","function vectorReverse(u) {\n var u1 = u[0];\n var u2 = u[1];\n var v = [-1*u1, -1*u2];\n return v; \n}","invert() {\n this.reverse = !this.reverse;\n this._applySpeed();\n }","Reverse() {\n\n }","get targetVelocity() {}","reverse() {}","reverseInPlace() { const a = this._radians0; this._radians0 = this._radians1; this._radians1 = a; }","set targetVelocity(value) {}","function resetVelocity(){\r\n Joey.velocityY += 1\r\n }","async reverse() {\n this.tl.pause();\n this.angle = 100;\n this._playShieldBounceSound();\n\n await gsap.to(this, {\n x: -50,\n y: 'random(-50,50)',\n duration: 1,\n });\n }","_reverseY() {\n this._dy = -this._dy;\n }","reverse() {\n return Point(\n 0 - this.x,\n 0 - this.y\n )\n }","back(length = this.length) {\n // Change the direction momentarily\n this.direction -= 180;\n // Use forward to avoid repeating code\n this.forward(toInt(length));\n // Restore the direction as it was before\n this.direction += 180;\n }","function flip(v) { return Shade(1).sub(v); }","reverse() {\n }","reverseInPlace() {\n if (this._points.length >= 2) {\n let i0 = 0;\n let i1 = this._points.length - 1;\n while (i0 < i1) {\n const a = this._points[i0];\n this._points[i1] = this._points[i0];\n this._points[i0] = a;\n i0++;\n i1--;\n }\n }\n }","reverseInPlace() { this._bcurve.reverseInPlace(); }","reverse() {\n const { _coords } = this\n const numCoords = _coords.length\n const numVertices = numCoords / 2\n let tmp\n\n for (let i = 0; i < numVertices; i += 2) {\n tmp = _coords[i]\n _coords[i] = _coords[numCoords - i - 2]\n _coords[numCoords - i - 2] = tmp\n\n tmp = _coords[i + 1]\n _coords[i + 1] = _coords[numCoords - i - 1]\n _coords[numCoords - i - 1] = tmp\n }\n }","downer(velocity = 0) {\n this.jumping = false;\n this.velocityY = velocity;\n }","turnRight() {\n this._currentLinearSpeed = 0;\n this._currentAngularSpeed = -this._angularSpeed;\n }","setVelocity(v) {\n\t\tif(!this.no_accelerations) {\n\t\t\tvar goal = 0;\n\t\t\tif(v >= 0) {\n\t\t\t\tgoal = Math.min(v, this.max_v)\n\t\t\t} else {\n\t\t\t\tgoal = Math.max(v, -this.max_v);\n\t\t\t}\n\n\t\t\tvar diff = goal - this.v;\n\t\t\tthis.a = diff*this.max_a;\n\t\t} else {\n\t\t\tthis.v = v;\n\t\t\tthis.a = 0;\n\t\t}\n\t\t\n\t}","update() {\n this.pos -= this.vel;\n }","function reverse(dir) {\r\n large_gear.direction = dir;\r\n }","_reverseX() {\n this._dx = -this._dx;\n }","function flip(vec) {\n\treturn new THREE.Vector2(vec.y, -vec.x);\n}","vel() {\n this.y += this.speed;\n }","ricochet() {\n\t\tif (this.bulletSpecial != 0){\n\t\t\tthis.bulletSpecial--;\n\t\t\tthis.velocity = this.velocity.scale(-1);\n\t\t};\n\t}","set zVelocity (val) {\n this._v = val;\n \n if(this.dash) {\n this.dash.speed = val;\n }\n }","slowVelocity() {\n if ( this.xVel > 0 ) {\n this.xVel -= 0.1;\n if ( this.xVel <= 0 ) {\n this.xVel = 0;\n this.inSlowDown = false;\n }\n }\n else if ( this.xVel < 0 ) {\n this.xVel += 0.1\n if ( this.xVel >= 0 ) {\n this.xVel = 0;\n this.inSlowDown = false;\n }\n }\n }","function Update()\n{\n\tvar xVel : float = rigidbody2D.velocity.x;\n\tif (xVel < 18 && xVel > -18 && xVel != 0)\n\t{\n\t\tif(xVel > 0)\n\t\t{\n\t\t\trigidbody2D.velocity.x = 20;\n\t\t}\n\t\telse\n\t\t{\n\t\t\trigidbody2D.velocity.x = -20;\n\t\t}\n\t//Debug.Log(\"Velocity Before: \" + xVel);\n\t//Debug.Log(\"Velocity After: \" + rigidbody2D.velocity.x);\n\t\n\t}\n\t\n\n\n}","function goBackward(rover) {\n switch (rover.direction) {\n case 'N':\n rover.position[0]--\n break;\n case 'E':\n rover.position[1]--\n break;\n case 'S':\n rover.position[0]++\n break;\n case 'W':\n rover.position[1]++\n break;\n };\n\t\tconsole.log(\"New Rover Position: [\" + rover.position[0] + \", \" + rover.position[1] + \"]\")\n}","get VelocityChange() {}","function invLerp(v1, v2, v) {\n return (v - v1) / (v2 - v1);\n}","inverseTransformVector(vec){\n let result = p5.Vector.sub(vec, this.position);\n\n result.rotate(-this.rotation);\n vec.div(this.scale);\n\n return result;\n }","knockEnemyBack(v){\n this.knockEnemy = true;\n this.hero.direction ? this.knockVelocity = v : this.knockVelocity = -v; //this line is too hacky,\n this.body.velocity.y = -60 * (10*Math.random());\n this.knockBackFor = this.setDelay(this.knockbackSet);\n this.animations.play('knock');\n // console.log('knockEnemy', this.game.time.now, this.knockBackFor, this.knockVelocity, this.knockingDistance);\n }","calculateVelocity() {\n this.velocityVector.addVectors(this.gravityVelocityVector, this.inertiaVelocityVector);\n if (params.showArrows) {\n this.velocityArrow = new THREE.ArrowHelper(this.velocityVector.clone().normalize(), this.mesh.position, this.velocityVector.length() / 1000 + this.r * 2, 0xff0000);\n scene.add(this.velocityArrow);\n }\n }","Trap() {\n this.m_vVelocity.Zero();\n }","reverseVariables() {\n\t\tthis._vars.reverse();\n\t\tfor (let i = 0; i < this._vars.length; ++i) {\n\t\t\tthis._vars[i].setIndex(i);\n\t\t}\n\t}","land() {\n this.velocity += 20; \n }","function reactionReverse () {\n direction = -direction; // Stromrichtung umkehren\n reset(); // Ausgangsstellung\n }","function inverti (wordToReverse) {\r\n var parolaInvertita = '';\r\n for (var i = wordToReverse.length - 1; i >= 0; i--) {\r\n parolaInvertita += wordToReverse[i];\r\n }\r\n return parolaInvertita;\r\n}","function h$fps_reverse(a_v, a_o, b_v, b_o, n) {\n if(n > 0) {\n var au8 = a_v.u8, bu8 = b_v.u8;\n for(var i=0;i 0) {\n var au8 = a_v.u8, bu8 = b_v.u8;\n for(var i=0;i 0) {\n var au8 = a_v.u8, bu8 = b_v.u8;\n for(var i=0;i 0) {\n var au8 = a_v.u8, bu8 = b_v.u8;\n for(var i=0;i 0) {\n var au8 = a_v.u8, bu8 = b_v.u8;\n for(var i=0;i 0) {\n var au8 = a_v.u8, bu8 = b_v.u8;\n for(var i=0;i>> 8 & 0xff] << 16 | REVERSE_TABLE[v >>> 16 & 0xff] << 8 | REVERSE_TABLE[v >>> 24 & 0xff];\n }","function reverse(input) {}","set VelocityChange(value) {}","verlet() {\n\t\tlet posTemp = new p5.Vector(this.pos.x, this.pos.y);\n\n\t\tthis.pos.x += (this.pos.x - this.posOld.x);\n\t\tthis.pos.y += (this.pos.y - this.posOld.y);\n\n\t\tthis.posOld.set(posTemp);\n\t}","function velocity_x (){\n return V * Math.cos(teta);\n }","function up_bounce() {\n ball.body.velocity.y = ball.body.velocity.y\n }","setVelocity(vel) {\n\n if (this.maxSpeed !== null) {\n\n // Magnitude squared\n let magnitudeSquared = (vel.x * vel.x + vel.y * vel.y);\n\n if (magnitudeSquared > this.maxSpeed * this.maxSpeed) {\n console.log(\"Velocity MAX POWER\");\n\n // Normalize vector\n vel = Game.Mathematics.normalizeVector(vel);\n\n // Set new velocity\n vel.x = this.maxSpeed * vel.x;\n vel.y = this.maxSpeed * vel.y;\n\n }\n\n }\n\n this.vel = vel;\n\n }","static lerp(v1, v2, t) {\n t = t < 0 ? 0 : t\n t = t > 1 ? 1 : t\n let out = []\n out[0] = v1.x + (v2.x - v1.x) * t\n out[1] = v1.y + (v2.y - v1.y) * t\n\n return new Vector2(out[0], out[1])\n }","function calcVelocity(angle, velocity) {\n // handling in between\n // /|\n // v/ | y\n // /o |\n // ____\n // x\n // x = cos (o) * v\n // y = sin (o) * v\n\n var newAngle = toRadians(angle);\n console.log(newAngle);\n var x = Math.cos(newAngle) * velocity;\n var y = Math.sin(newAngle) * velocity;\n return [x,y];\n}","velocityViewUnit2AU(vx, vy) {\n return {vx: vx / VELOCITY_LEN_SCALE, vy: vy / VELOCITY_LEN_SCALE};\n }","function reverseV(x) {\r\n var y=[];\r\n var lt=x.length;\r\n for (igo = 0; igo < lt; igo++) {\r\n y[igo] = x[lt-igo-1];\r\n }\r\n return y;\r\n}","setVelocity(direction, speed) {\n this.velocity = direction.normalize().mult(speed);\n this.speed = speed >= this.maxSpeed ? this.maxSpeed : speed;\n }","function Start () {\nGetComponent.().velocity.y = speed;\n\n\n}","updateVelocity(controller){\n this.vx = controller.vx;\n this.vy = controller.vy;\n }","get reversed() {\n return this.getReversed();\n }","reverse() {\n this.inverse = true\n this.play()\n\n var scope = this\n var reset = function() {\n scope.inverse = false\n\n scope.off('stop', reset)\n scope.off('pause', reset)\n }\n\n this.on('stop', reset)\n this.on('pause', reset)\n }","resta(vec){return new Vector(this.x-vec.x, this.y-vec.y, this.z-vec.z);}","static direction(_v1, _v2) {\r\n return new Vector2D(_v2.x - _v1.x, _v2.y - _v1.y);\r\n }","_O ({ position, velocity, speed }) {\n const [x, y] = position\n const { up, down, left, right } = this.directions(velocity)\n\n if (right && !down && x > 6 * WIDTH / 8 && y < HEIGHT / 2) {\n return this.right(velocity, speed)\n }\n\n if (right && down && x > 7 * WIDTH / 8 && y < HEIGHT / 2) {\n return this.right(velocity, speed)\n }\n\n if (down && !left && x > WIDTH / 2 && y > 6 * HEIGHT / 8) {\n return this.right(velocity, speed)\n }\n\n if (down && left && x > WIDTH / 2 && y > 7 * HEIGHT / 8) {\n return this.right(velocity, speed)\n }\n\n if (left && !up && x < 2 * WIDTH / 8 && y > HEIGHT / 2) {\n return this.right(velocity, speed)\n }\n\n if (left && up && x < WIDTH / 8 && y > HEIGHT / 2) {\n return this.right(velocity, speed)\n }\n\n return velocity\n }","get reversed(){\n\t\t\treturn this.getReversed();\n\t\t}","function playerJump() {\n player.body.velocity.y = -255;\n\n}","moveBackward () {\n this.update(this.deltaIndex(-1))\n }","down() {\n this.y += this.speed;\n this.comprobarLimitesBarra();\n }","backwards(speed) {\n if (speed === undefined) {\n this._speed = -100;\n } else {\n if (speed < 0 || speed > 100) {\n throw \"Speed must be between 0 and 100\"\n }\n this._speed = -speed;\n }\n this._applySpeed();\n }","reverse(ui) {\n // Flip all the dependency relationships.\n for (const cell of ui.quiver.reverse_dependencies_of(this)) {\n const dependencies = ui.quiver.dependencies.get(cell);\n dependencies.set(\n this,\n { source: \"target\", target: \"source\" }[dependencies.get(this)],\n );\n }\n\n // Reverse the label alignment and edge offset as well as any oriented styles.\n // Note that since we do this, the position of the edge will remain the same, which means\n // we don't need to rerender any of this edge's dependencies.\n this.options.label_alignment = {\n left: \"right\",\n centre: \"centre\",\n over: \"over\",\n right: \"left\",\n }[this.options.label_alignment];\n this.options.offset = -this.options.offset;\n if (this.options.style.name === \"arrow\") {\n const swap_sides = { top: \"bottom\", bottom: \"top\" };\n if (this.options.style.tail.name === \"hook\") {\n this.options.style.tail.side = swap_sides[this.options.style.tail.side];\n }\n if (this.options.style.head.name === \"harpoon\") {\n this.options.style.head.side = swap_sides[this.options.style.head.side];\n }\n }\n\n // Swap the `source` and `target`.\n [this.source, this.target] = [this.target, this.source];\n\n this.render(ui);\n }","onKeydown(event) {\n switch(event.key) {\n case this.upKey:\n this.vy = -this.speed\n break\n case this.downKey:\n this.vy = this.speed\n break\n }\n }","updateVelocity(time) {\n //acceleration factor to add to update the velocity vector\n var accelFactor = glMatrix.vec3.create();\n glMatrix.vec3.scale(this.v, this.v, Math.pow(this.drag, time));\n glMatrix.vec3.scale(accelFactor, this.a, time);\n glMatrix.vec3.add(this.v, this.v, accelFactor);\n }","function toggleVelocityAnimation(args){\n\tvar p = args[0];\n\tvar checked = args[1];\n\tviewerParams.animateVel[p] = false;\n\tif (checked){\n\t\tviewerParams.animateVel[p] = true;\n\t}\n}","setVelocity( vx, vy ){\n\t\tif ( this.vx == 0 && vx != 0){\n\t\t\tthis.updateVelocity( vx, vy);\n\t\t}else if ( this.vy == 0 && vy != 0 ){\n\t\t\tthis.updateVelocity( vx, vy);\n\t\t}\n\t}","*directionVerticalDown() {\n yield this.sendEvent({ type: 0x03, code: 0x01, value: 255 });\n }","invert() {\n this.polygons.forEach(p => p.flip());\n this.plane.flip();\n if (this.front !== null) {\n this.front.invert();\n }\n if (this.back !== null) {\n this.back.invert();\n }\n let temp = this.front;\n this.front = this.back;\n this.back = temp;\n }","reverse( x, y, oppositeDay ) {\n // this one is symmetric, don't need oppositeDay\n var str = this.target;\n var newStr = [];\n var pos;\n\n for (var i = 0; i < str.length; i++) {\n\n if (i < x) {\n newStr.push( str[i] );\n } else if (i > y) {\n newStr.push( str[i] );\n } else {\n for (var j=0; j <= y-x; j++, i++) {\n newStr.push( str[y-j] );\n }\n i--; // counteract outer loop\n }\n }\n this.target = newStr.join(\"\");\n }","reverse(length) {\n for (let i = 0; i < length / 2; i += 1) {\n const p1 = (this.position + i) % this.list.length;\n const p2 = (this.position - i + length - 1) % this.list.length;\n [this.list[p1], this.list[p2]] = [this.list[p2], this.list[p1]];\n }\n }","jump() {\n this.time = -this.terminalVelocity;\n }","function pushStorkyUp() {\n storkyVelocity = new THREE.Vector3(0, 1.1, 0);\n}","mirror(v) {\n // return v.plus(v.split(this).perp.scale(2).inv());\n let n = this.scale(2 * this.dot(v) / this.quad());\n return n.minus(v);\n }","turnRight() {\n this.direction--;\n this.direction = this.direction.mod(4);\n }","function reverseTranslate(newFrom){return $animateCss(target,{to:newFrom||from,addClass:options.transitionOutClass,removeClass:options.transitionInClass}).start();}","stop() {\n this._currentLinearSpeed = 0;\n this._currentAngularSpeed = 0;\n }","function get_my_direction() {\n var v, dir;\n\n v = new THREE.Vector3(0,0,-1);\n //v = WORLD.camera.matrixWorld.multiplyVector3(v); // r54\n v.applyMatrix4(WORLD.camera.matrixWorld); // r58\n\n //dir.sub(v).setLength(BULLET_VELOCITY); // r58\n dir = new THREE.Vector3(0,0,0);\n dir.copy(WORLD.player.mesh.position);\n\n //dir.subSelf(v); // r54\n dir.subVectors(dir, v); // r58\n //dir.sub(v);\n\n return dir;\n}","function backward() {\n const currProgress = parseInt(progressInp.value, 10);\n\n if ((currProgress - 2000) > 0) {\n progressInp.value = currProgress - 2000;\n } else {\n progressInp.value = 0;\n }\n\n updateDuration();\n updateReplay();\n}","jump() {\n\n if (this.alive == false)\n return; \n\n // Add a vertical velocity to the bird\n this.sprite.body.velocity.y = -350;\n\n // this.add.tween(this.bird).to({angle: -20}, 100).start(); \n let tween = this.game.tweens.add({\n targets: this.sprite,\n duration: 100,\n delay: 0,\n alpha: 1,\n repeat: 0,\n angle: -20\n });\n }","function turnVectorRight(vector) {\n var axis = new THREE.Vector3(0, -1, 0);\n var angle = 90 * (Math.PI / 180);\n let newVec = vector.clone();\n newVec.applyAxisAngle(axis, angle);\n return newVec;\n}","_R ({ position, velocity, speed }) {\n const [x, y] = position\n const { up, down, left, right } = this.directions(velocity)\n\n if (left && !up && !down && x < 7 * WIDTH / 8 && x > WIDTH / 2 && y > HEIGHT / 2) {\n return this.right(velocity, speed)\n }\n\n if (left && up && x < 6 * WIDTH / 8 && y > HEIGHT / 2) {\n return this.right(velocity, speed)\n }\n\n if (up && !left && x > WIDTH / 2 && y < 2 * HEIGHT / 8) {\n return this.left(velocity, speed)\n }\n\n if (up && left && x > WIDTH / 2 && y < HEIGHT / 8) {\n return this.left(velocity, speed)\n }\n\n if (left && !down && x < 3 * WIDTH / 8 && y < HEIGHT / 2) {\n return this.left(velocity, speed)\n }\n\n if (left && down && x < 2 * WIDTH / 8 && y < HEIGHT / 2) {\n return this.left(velocity, speed)\n }\n\n if (down && !left && !right && x < 2 * WIDTH / 2 && y > HEIGHT / 2) {\n return this.left(velocity, speed)\n }\n\n return velocity\n }","function velocity(){\n\tvar offset = $(\"#velo\").offset();\n\t$(\"#veloPlus\").css({ top: offset.top - 15, left: offset.left + 95, display: \"block\" }).animate({ opacity: 1.0 }, \"slow\");\n\t$(\"#veloPlus\").animate({ opacity: 0.0 }, \"slow\");\n\tballVelo++;\n\tx += dx;\n\ty += dy;\n\tpaddleVelo += 25;\n\trequestAnimationFrame(draw);\n}","reverse() {\n return exports.seq(this.toArray().reverse());\n }","invert() {\n this.addEffect(new Effects.Invert());\n }","function up(object){\n object.y -= speed;\n }","applyInverse(){\n scale(p5.Vector.div(new p5.Vector(1,1,1), this.scale));\n angleMode(RADIANS);\n rotate(-this.rotation);\n translate(p5.Vector.sub(new p5.Vector(0,0,0), this.position));\n }","function slideBackward() {\n if ($run.activeIndex > 0) {\n $run.activeIndex -= 1;\n } else if ($conf.cycle) {\n $run.activeIndex = ($conf.slides.length - 1);\n }\n\n alignToActiveSlide();\n }","deltaY() { return Math.sin(this.angle) * (this.speed); }","function reverse() {\r\n dir = -dir;\r\n\t\tif(dir > 0) {\r\n\t\t $('#direction').css({'background-image' : 'url(./assets/images/skins/'+settings.skin+'/'+settings.skin+'_reverse.png)'});\r\n\t\t}\r\n\t\t\r\n\t\tif(dir < 0) {\r\n\t\t $('#direction').css({'background-image' : 'url(./assets/images/skins/'+settings.skin+'/'+settings.skin+'_forward.png)'});\r\n\t\t}\r\n\t }","movementPattern(){\n if(this.y >= 250){\n this.body.setVelocityY(0);\n }\n }"],"string":"[\n \"function invertVelocity(axis)\\n{\\n\\tif (axis == \\\"x\\\")\\n\\t{\\n\\t\\tballVelocityX = ballVelocityX * -1;\\n\\t}\\n\\telse if (axis == \\\"y\\\")\\n\\t{\\n\\t\\tballVelocityY = ballVelocityY * -1;\\n\\t}\\n}\",\n \"function vectorReverse(u) {\\n var u1 = u[0];\\n var u2 = u[1];\\n var v = [-1*u1, -1*u2];\\n return v; \\n}\",\n \"invert() {\\n this.reverse = !this.reverse;\\n this._applySpeed();\\n }\",\n \"Reverse() {\\n\\n }\",\n \"get targetVelocity() {}\",\n \"reverse() {}\",\n \"reverseInPlace() { const a = this._radians0; this._radians0 = this._radians1; this._radians1 = a; }\",\n \"set targetVelocity(value) {}\",\n \"function resetVelocity(){\\r\\n Joey.velocityY += 1\\r\\n }\",\n \"async reverse() {\\n this.tl.pause();\\n this.angle = 100;\\n this._playShieldBounceSound();\\n\\n await gsap.to(this, {\\n x: -50,\\n y: 'random(-50,50)',\\n duration: 1,\\n });\\n }\",\n \"_reverseY() {\\n this._dy = -this._dy;\\n }\",\n \"reverse() {\\n return Point(\\n 0 - this.x,\\n 0 - this.y\\n )\\n }\",\n \"back(length = this.length) {\\n // Change the direction momentarily\\n this.direction -= 180;\\n // Use forward to avoid repeating code\\n this.forward(toInt(length));\\n // Restore the direction as it was before\\n this.direction += 180;\\n }\",\n \"function flip(v) { return Shade(1).sub(v); }\",\n \"reverse() {\\n }\",\n \"reverseInPlace() {\\n if (this._points.length >= 2) {\\n let i0 = 0;\\n let i1 = this._points.length - 1;\\n while (i0 < i1) {\\n const a = this._points[i0];\\n this._points[i1] = this._points[i0];\\n this._points[i0] = a;\\n i0++;\\n i1--;\\n }\\n }\\n }\",\n \"reverseInPlace() { this._bcurve.reverseInPlace(); }\",\n \"reverse() {\\n const { _coords } = this\\n const numCoords = _coords.length\\n const numVertices = numCoords / 2\\n let tmp\\n\\n for (let i = 0; i < numVertices; i += 2) {\\n tmp = _coords[i]\\n _coords[i] = _coords[numCoords - i - 2]\\n _coords[numCoords - i - 2] = tmp\\n\\n tmp = _coords[i + 1]\\n _coords[i + 1] = _coords[numCoords - i - 1]\\n _coords[numCoords - i - 1] = tmp\\n }\\n }\",\n \"downer(velocity = 0) {\\n this.jumping = false;\\n this.velocityY = velocity;\\n }\",\n \"turnRight() {\\n this._currentLinearSpeed = 0;\\n this._currentAngularSpeed = -this._angularSpeed;\\n }\",\n \"setVelocity(v) {\\n\\t\\tif(!this.no_accelerations) {\\n\\t\\t\\tvar goal = 0;\\n\\t\\t\\tif(v >= 0) {\\n\\t\\t\\t\\tgoal = Math.min(v, this.max_v)\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tgoal = Math.max(v, -this.max_v);\\n\\t\\t\\t}\\n\\n\\t\\t\\tvar diff = goal - this.v;\\n\\t\\t\\tthis.a = diff*this.max_a;\\n\\t\\t} else {\\n\\t\\t\\tthis.v = v;\\n\\t\\t\\tthis.a = 0;\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"update() {\\n this.pos -= this.vel;\\n }\",\n \"function reverse(dir) {\\r\\n large_gear.direction = dir;\\r\\n }\",\n \"_reverseX() {\\n this._dx = -this._dx;\\n }\",\n \"function flip(vec) {\\n\\treturn new THREE.Vector2(vec.y, -vec.x);\\n}\",\n \"vel() {\\n this.y += this.speed;\\n }\",\n \"ricochet() {\\n\\t\\tif (this.bulletSpecial != 0){\\n\\t\\t\\tthis.bulletSpecial--;\\n\\t\\t\\tthis.velocity = this.velocity.scale(-1);\\n\\t\\t};\\n\\t}\",\n \"set zVelocity (val) {\\n this._v = val;\\n \\n if(this.dash) {\\n this.dash.speed = val;\\n }\\n }\",\n \"slowVelocity() {\\n if ( this.xVel > 0 ) {\\n this.xVel -= 0.1;\\n if ( this.xVel <= 0 ) {\\n this.xVel = 0;\\n this.inSlowDown = false;\\n }\\n }\\n else if ( this.xVel < 0 ) {\\n this.xVel += 0.1\\n if ( this.xVel >= 0 ) {\\n this.xVel = 0;\\n this.inSlowDown = false;\\n }\\n }\\n }\",\n \"function Update()\\n{\\n\\tvar xVel : float = rigidbody2D.velocity.x;\\n\\tif (xVel < 18 && xVel > -18 && xVel != 0)\\n\\t{\\n\\t\\tif(xVel > 0)\\n\\t\\t{\\n\\t\\t\\trigidbody2D.velocity.x = 20;\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\trigidbody2D.velocity.x = -20;\\n\\t\\t}\\n\\t//Debug.Log(\\\"Velocity Before: \\\" + xVel);\\n\\t//Debug.Log(\\\"Velocity After: \\\" + rigidbody2D.velocity.x);\\n\\t\\n\\t}\\n\\t\\n\\n\\n}\",\n \"function goBackward(rover) {\\n switch (rover.direction) {\\n case 'N':\\n rover.position[0]--\\n break;\\n case 'E':\\n rover.position[1]--\\n break;\\n case 'S':\\n rover.position[0]++\\n break;\\n case 'W':\\n rover.position[1]++\\n break;\\n };\\n\\t\\tconsole.log(\\\"New Rover Position: [\\\" + rover.position[0] + \\\", \\\" + rover.position[1] + \\\"]\\\")\\n}\",\n \"get VelocityChange() {}\",\n \"function invLerp(v1, v2, v) {\\n return (v - v1) / (v2 - v1);\\n}\",\n \"inverseTransformVector(vec){\\n let result = p5.Vector.sub(vec, this.position);\\n\\n result.rotate(-this.rotation);\\n vec.div(this.scale);\\n\\n return result;\\n }\",\n \"knockEnemyBack(v){\\n this.knockEnemy = true;\\n this.hero.direction ? this.knockVelocity = v : this.knockVelocity = -v; //this line is too hacky,\\n this.body.velocity.y = -60 * (10*Math.random());\\n this.knockBackFor = this.setDelay(this.knockbackSet);\\n this.animations.play('knock');\\n // console.log('knockEnemy', this.game.time.now, this.knockBackFor, this.knockVelocity, this.knockingDistance);\\n }\",\n \"calculateVelocity() {\\n this.velocityVector.addVectors(this.gravityVelocityVector, this.inertiaVelocityVector);\\n if (params.showArrows) {\\n this.velocityArrow = new THREE.ArrowHelper(this.velocityVector.clone().normalize(), this.mesh.position, this.velocityVector.length() / 1000 + this.r * 2, 0xff0000);\\n scene.add(this.velocityArrow);\\n }\\n }\",\n \"Trap() {\\n this.m_vVelocity.Zero();\\n }\",\n \"reverseVariables() {\\n\\t\\tthis._vars.reverse();\\n\\t\\tfor (let i = 0; i < this._vars.length; ++i) {\\n\\t\\t\\tthis._vars[i].setIndex(i);\\n\\t\\t}\\n\\t}\",\n \"land() {\\n this.velocity += 20; \\n }\",\n \"function reactionReverse () {\\n direction = -direction; // Stromrichtung umkehren\\n reset(); // Ausgangsstellung\\n }\",\n \"function inverti (wordToReverse) {\\r\\n var parolaInvertita = '';\\r\\n for (var i = wordToReverse.length - 1; i >= 0; i--) {\\r\\n parolaInvertita += wordToReverse[i];\\r\\n }\\r\\n return parolaInvertita;\\r\\n}\",\n \"function h$fps_reverse(a_v, a_o, b_v, b_o, n) {\\n if(n > 0) {\\n var au8 = a_v.u8, bu8 = b_v.u8;\\n for(var i=0;i 0) {\\n var au8 = a_v.u8, bu8 = b_v.u8;\\n for(var i=0;i 0) {\\n var au8 = a_v.u8, bu8 = b_v.u8;\\n for(var i=0;i 0) {\\n var au8 = a_v.u8, bu8 = b_v.u8;\\n for(var i=0;i 0) {\\n var au8 = a_v.u8, bu8 = b_v.u8;\\n for(var i=0;i 0) {\\n var au8 = a_v.u8, bu8 = b_v.u8;\\n for(var i=0;i>> 8 & 0xff] << 16 | REVERSE_TABLE[v >>> 16 & 0xff] << 8 | REVERSE_TABLE[v >>> 24 & 0xff];\\n }\",\n \"function reverse(input) {}\",\n \"set VelocityChange(value) {}\",\n \"verlet() {\\n\\t\\tlet posTemp = new p5.Vector(this.pos.x, this.pos.y);\\n\\n\\t\\tthis.pos.x += (this.pos.x - this.posOld.x);\\n\\t\\tthis.pos.y += (this.pos.y - this.posOld.y);\\n\\n\\t\\tthis.posOld.set(posTemp);\\n\\t}\",\n \"function velocity_x (){\\n return V * Math.cos(teta);\\n }\",\n \"function up_bounce() {\\n ball.body.velocity.y = ball.body.velocity.y\\n }\",\n \"setVelocity(vel) {\\n\\n if (this.maxSpeed !== null) {\\n\\n // Magnitude squared\\n let magnitudeSquared = (vel.x * vel.x + vel.y * vel.y);\\n\\n if (magnitudeSquared > this.maxSpeed * this.maxSpeed) {\\n console.log(\\\"Velocity MAX POWER\\\");\\n\\n // Normalize vector\\n vel = Game.Mathematics.normalizeVector(vel);\\n\\n // Set new velocity\\n vel.x = this.maxSpeed * vel.x;\\n vel.y = this.maxSpeed * vel.y;\\n\\n }\\n\\n }\\n\\n this.vel = vel;\\n\\n }\",\n \"static lerp(v1, v2, t) {\\n t = t < 0 ? 0 : t\\n t = t > 1 ? 1 : t\\n let out = []\\n out[0] = v1.x + (v2.x - v1.x) * t\\n out[1] = v1.y + (v2.y - v1.y) * t\\n\\n return new Vector2(out[0], out[1])\\n }\",\n \"function calcVelocity(angle, velocity) {\\n // handling in between\\n // /|\\n // v/ | y\\n // /o |\\n // ____\\n // x\\n // x = cos (o) * v\\n // y = sin (o) * v\\n\\n var newAngle = toRadians(angle);\\n console.log(newAngle);\\n var x = Math.cos(newAngle) * velocity;\\n var y = Math.sin(newAngle) * velocity;\\n return [x,y];\\n}\",\n \"velocityViewUnit2AU(vx, vy) {\\n return {vx: vx / VELOCITY_LEN_SCALE, vy: vy / VELOCITY_LEN_SCALE};\\n }\",\n \"function reverseV(x) {\\r\\n var y=[];\\r\\n var lt=x.length;\\r\\n for (igo = 0; igo < lt; igo++) {\\r\\n y[igo] = x[lt-igo-1];\\r\\n }\\r\\n return y;\\r\\n}\",\n \"setVelocity(direction, speed) {\\n this.velocity = direction.normalize().mult(speed);\\n this.speed = speed >= this.maxSpeed ? this.maxSpeed : speed;\\n }\",\n \"function Start () {\\nGetComponent.().velocity.y = speed;\\n\\n\\n}\",\n \"updateVelocity(controller){\\n this.vx = controller.vx;\\n this.vy = controller.vy;\\n }\",\n \"get reversed() {\\n return this.getReversed();\\n }\",\n \"reverse() {\\n this.inverse = true\\n this.play()\\n\\n var scope = this\\n var reset = function() {\\n scope.inverse = false\\n\\n scope.off('stop', reset)\\n scope.off('pause', reset)\\n }\\n\\n this.on('stop', reset)\\n this.on('pause', reset)\\n }\",\n \"resta(vec){return new Vector(this.x-vec.x, this.y-vec.y, this.z-vec.z);}\",\n \"static direction(_v1, _v2) {\\r\\n return new Vector2D(_v2.x - _v1.x, _v2.y - _v1.y);\\r\\n }\",\n \"_O ({ position, velocity, speed }) {\\n const [x, y] = position\\n const { up, down, left, right } = this.directions(velocity)\\n\\n if (right && !down && x > 6 * WIDTH / 8 && y < HEIGHT / 2) {\\n return this.right(velocity, speed)\\n }\\n\\n if (right && down && x > 7 * WIDTH / 8 && y < HEIGHT / 2) {\\n return this.right(velocity, speed)\\n }\\n\\n if (down && !left && x > WIDTH / 2 && y > 6 * HEIGHT / 8) {\\n return this.right(velocity, speed)\\n }\\n\\n if (down && left && x > WIDTH / 2 && y > 7 * HEIGHT / 8) {\\n return this.right(velocity, speed)\\n }\\n\\n if (left && !up && x < 2 * WIDTH / 8 && y > HEIGHT / 2) {\\n return this.right(velocity, speed)\\n }\\n\\n if (left && up && x < WIDTH / 8 && y > HEIGHT / 2) {\\n return this.right(velocity, speed)\\n }\\n\\n return velocity\\n }\",\n \"get reversed(){\\n\\t\\t\\treturn this.getReversed();\\n\\t\\t}\",\n \"function playerJump() {\\n player.body.velocity.y = -255;\\n\\n}\",\n \"moveBackward () {\\n this.update(this.deltaIndex(-1))\\n }\",\n \"down() {\\n this.y += this.speed;\\n this.comprobarLimitesBarra();\\n }\",\n \"backwards(speed) {\\n if (speed === undefined) {\\n this._speed = -100;\\n } else {\\n if (speed < 0 || speed > 100) {\\n throw \\\"Speed must be between 0 and 100\\\"\\n }\\n this._speed = -speed;\\n }\\n this._applySpeed();\\n }\",\n \"reverse(ui) {\\n // Flip all the dependency relationships.\\n for (const cell of ui.quiver.reverse_dependencies_of(this)) {\\n const dependencies = ui.quiver.dependencies.get(cell);\\n dependencies.set(\\n this,\\n { source: \\\"target\\\", target: \\\"source\\\" }[dependencies.get(this)],\\n );\\n }\\n\\n // Reverse the label alignment and edge offset as well as any oriented styles.\\n // Note that since we do this, the position of the edge will remain the same, which means\\n // we don't need to rerender any of this edge's dependencies.\\n this.options.label_alignment = {\\n left: \\\"right\\\",\\n centre: \\\"centre\\\",\\n over: \\\"over\\\",\\n right: \\\"left\\\",\\n }[this.options.label_alignment];\\n this.options.offset = -this.options.offset;\\n if (this.options.style.name === \\\"arrow\\\") {\\n const swap_sides = { top: \\\"bottom\\\", bottom: \\\"top\\\" };\\n if (this.options.style.tail.name === \\\"hook\\\") {\\n this.options.style.tail.side = swap_sides[this.options.style.tail.side];\\n }\\n if (this.options.style.head.name === \\\"harpoon\\\") {\\n this.options.style.head.side = swap_sides[this.options.style.head.side];\\n }\\n }\\n\\n // Swap the `source` and `target`.\\n [this.source, this.target] = [this.target, this.source];\\n\\n this.render(ui);\\n }\",\n \"onKeydown(event) {\\n switch(event.key) {\\n case this.upKey:\\n this.vy = -this.speed\\n break\\n case this.downKey:\\n this.vy = this.speed\\n break\\n }\\n }\",\n \"updateVelocity(time) {\\n //acceleration factor to add to update the velocity vector\\n var accelFactor = glMatrix.vec3.create();\\n glMatrix.vec3.scale(this.v, this.v, Math.pow(this.drag, time));\\n glMatrix.vec3.scale(accelFactor, this.a, time);\\n glMatrix.vec3.add(this.v, this.v, accelFactor);\\n }\",\n \"function toggleVelocityAnimation(args){\\n\\tvar p = args[0];\\n\\tvar checked = args[1];\\n\\tviewerParams.animateVel[p] = false;\\n\\tif (checked){\\n\\t\\tviewerParams.animateVel[p] = true;\\n\\t}\\n}\",\n \"setVelocity( vx, vy ){\\n\\t\\tif ( this.vx == 0 && vx != 0){\\n\\t\\t\\tthis.updateVelocity( vx, vy);\\n\\t\\t}else if ( this.vy == 0 && vy != 0 ){\\n\\t\\t\\tthis.updateVelocity( vx, vy);\\n\\t\\t}\\n\\t}\",\n \"*directionVerticalDown() {\\n yield this.sendEvent({ type: 0x03, code: 0x01, value: 255 });\\n }\",\n \"invert() {\\n this.polygons.forEach(p => p.flip());\\n this.plane.flip();\\n if (this.front !== null) {\\n this.front.invert();\\n }\\n if (this.back !== null) {\\n this.back.invert();\\n }\\n let temp = this.front;\\n this.front = this.back;\\n this.back = temp;\\n }\",\n \"reverse( x, y, oppositeDay ) {\\n // this one is symmetric, don't need oppositeDay\\n var str = this.target;\\n var newStr = [];\\n var pos;\\n\\n for (var i = 0; i < str.length; i++) {\\n\\n if (i < x) {\\n newStr.push( str[i] );\\n } else if (i > y) {\\n newStr.push( str[i] );\\n } else {\\n for (var j=0; j <= y-x; j++, i++) {\\n newStr.push( str[y-j] );\\n }\\n i--; // counteract outer loop\\n }\\n }\\n this.target = newStr.join(\\\"\\\");\\n }\",\n \"reverse(length) {\\n for (let i = 0; i < length / 2; i += 1) {\\n const p1 = (this.position + i) % this.list.length;\\n const p2 = (this.position - i + length - 1) % this.list.length;\\n [this.list[p1], this.list[p2]] = [this.list[p2], this.list[p1]];\\n }\\n }\",\n \"jump() {\\n this.time = -this.terminalVelocity;\\n }\",\n \"function pushStorkyUp() {\\n storkyVelocity = new THREE.Vector3(0, 1.1, 0);\\n}\",\n \"mirror(v) {\\n // return v.plus(v.split(this).perp.scale(2).inv());\\n let n = this.scale(2 * this.dot(v) / this.quad());\\n return n.minus(v);\\n }\",\n \"turnRight() {\\n this.direction--;\\n this.direction = this.direction.mod(4);\\n }\",\n \"function reverseTranslate(newFrom){return $animateCss(target,{to:newFrom||from,addClass:options.transitionOutClass,removeClass:options.transitionInClass}).start();}\",\n \"stop() {\\n this._currentLinearSpeed = 0;\\n this._currentAngularSpeed = 0;\\n }\",\n \"function get_my_direction() {\\n var v, dir;\\n\\n v = new THREE.Vector3(0,0,-1);\\n //v = WORLD.camera.matrixWorld.multiplyVector3(v); // r54\\n v.applyMatrix4(WORLD.camera.matrixWorld); // r58\\n\\n //dir.sub(v).setLength(BULLET_VELOCITY); // r58\\n dir = new THREE.Vector3(0,0,0);\\n dir.copy(WORLD.player.mesh.position);\\n\\n //dir.subSelf(v); // r54\\n dir.subVectors(dir, v); // r58\\n //dir.sub(v);\\n\\n return dir;\\n}\",\n \"function backward() {\\n const currProgress = parseInt(progressInp.value, 10);\\n\\n if ((currProgress - 2000) > 0) {\\n progressInp.value = currProgress - 2000;\\n } else {\\n progressInp.value = 0;\\n }\\n\\n updateDuration();\\n updateReplay();\\n}\",\n \"jump() {\\n\\n if (this.alive == false)\\n return; \\n\\n // Add a vertical velocity to the bird\\n this.sprite.body.velocity.y = -350;\\n\\n // this.add.tween(this.bird).to({angle: -20}, 100).start(); \\n let tween = this.game.tweens.add({\\n targets: this.sprite,\\n duration: 100,\\n delay: 0,\\n alpha: 1,\\n repeat: 0,\\n angle: -20\\n });\\n }\",\n \"function turnVectorRight(vector) {\\n var axis = new THREE.Vector3(0, -1, 0);\\n var angle = 90 * (Math.PI / 180);\\n let newVec = vector.clone();\\n newVec.applyAxisAngle(axis, angle);\\n return newVec;\\n}\",\n \"_R ({ position, velocity, speed }) {\\n const [x, y] = position\\n const { up, down, left, right } = this.directions(velocity)\\n\\n if (left && !up && !down && x < 7 * WIDTH / 8 && x > WIDTH / 2 && y > HEIGHT / 2) {\\n return this.right(velocity, speed)\\n }\\n\\n if (left && up && x < 6 * WIDTH / 8 && y > HEIGHT / 2) {\\n return this.right(velocity, speed)\\n }\\n\\n if (up && !left && x > WIDTH / 2 && y < 2 * HEIGHT / 8) {\\n return this.left(velocity, speed)\\n }\\n\\n if (up && left && x > WIDTH / 2 && y < HEIGHT / 8) {\\n return this.left(velocity, speed)\\n }\\n\\n if (left && !down && x < 3 * WIDTH / 8 && y < HEIGHT / 2) {\\n return this.left(velocity, speed)\\n }\\n\\n if (left && down && x < 2 * WIDTH / 8 && y < HEIGHT / 2) {\\n return this.left(velocity, speed)\\n }\\n\\n if (down && !left && !right && x < 2 * WIDTH / 2 && y > HEIGHT / 2) {\\n return this.left(velocity, speed)\\n }\\n\\n return velocity\\n }\",\n \"function velocity(){\\n\\tvar offset = $(\\\"#velo\\\").offset();\\n\\t$(\\\"#veloPlus\\\").css({ top: offset.top - 15, left: offset.left + 95, display: \\\"block\\\" }).animate({ opacity: 1.0 }, \\\"slow\\\");\\n\\t$(\\\"#veloPlus\\\").animate({ opacity: 0.0 }, \\\"slow\\\");\\n\\tballVelo++;\\n\\tx += dx;\\n\\ty += dy;\\n\\tpaddleVelo += 25;\\n\\trequestAnimationFrame(draw);\\n}\",\n \"reverse() {\\n return exports.seq(this.toArray().reverse());\\n }\",\n \"invert() {\\n this.addEffect(new Effects.Invert());\\n }\",\n \"function up(object){\\n object.y -= speed;\\n }\",\n \"applyInverse(){\\n scale(p5.Vector.div(new p5.Vector(1,1,1), this.scale));\\n angleMode(RADIANS);\\n rotate(-this.rotation);\\n translate(p5.Vector.sub(new p5.Vector(0,0,0), this.position));\\n }\",\n \"function slideBackward() {\\n if ($run.activeIndex > 0) {\\n $run.activeIndex -= 1;\\n } else if ($conf.cycle) {\\n $run.activeIndex = ($conf.slides.length - 1);\\n }\\n\\n alignToActiveSlide();\\n }\",\n \"deltaY() { return Math.sin(this.angle) * (this.speed); }\",\n \"function reverse() {\\r\\n dir = -dir;\\r\\n\\t\\tif(dir > 0) {\\r\\n\\t\\t $('#direction').css({'background-image' : 'url(./assets/images/skins/'+settings.skin+'/'+settings.skin+'_reverse.png)'});\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tif(dir < 0) {\\r\\n\\t\\t $('#direction').css({'background-image' : 'url(./assets/images/skins/'+settings.skin+'/'+settings.skin+'_forward.png)'});\\r\\n\\t\\t}\\r\\n\\t }\",\n \"movementPattern(){\\n if(this.y >= 250){\\n this.body.setVelocityY(0);\\n }\\n }\"\n]"},"negative_scores":{"kind":"list like","value":["0.6928222","0.6587256","0.65199554","0.62969434","0.6155193","0.6111139","0.6028411","0.6022161","0.6018839","0.60057366","0.59929657","0.59702194","0.59670824","0.5954948","0.5945233","0.593444","0.5929564","0.5908246","0.5895618","0.5879419","0.586276","0.58056074","0.5775464","0.5773425","0.57053614","0.56992805","0.568957","0.56628215","0.5641335","0.5591444","0.55865586","0.5583541","0.5566509","0.5542653","0.5540367","0.5536215","0.551962","0.55175614","0.5492503","0.54817545","0.5467373","0.54514813","0.54514813","0.54514813","0.54514813","0.54514813","0.54514813","0.5444641","0.5443286","0.5438279","0.54382366","0.54373384","0.54312336","0.54296744","0.5429381","0.5417438","0.5413691","0.54101795","0.54097927","0.53962046","0.5394003","0.5392801","0.5384092","0.53781575","0.53698426","0.5354783","0.5350453","0.52791154","0.52711904","0.5270748","0.5269955","0.52634364","0.52583617","0.5246137","0.52441996","0.52397186","0.523676","0.52329105","0.5231873","0.5210484","0.5208388","0.52034533","0.5201244","0.5192884","0.5185339","0.5179801","0.51783407","0.5176566","0.5174377","0.51489633","0.5148263","0.5148137","0.5140228","0.5139575","0.51325876","0.51212037","0.51203567","0.5111101","0.50976187","0.50948185"],"string":"[\n \"0.6928222\",\n \"0.6587256\",\n \"0.65199554\",\n \"0.62969434\",\n \"0.6155193\",\n \"0.6111139\",\n \"0.6028411\",\n \"0.6022161\",\n \"0.6018839\",\n \"0.60057366\",\n \"0.59929657\",\n \"0.59702194\",\n \"0.59670824\",\n \"0.5954948\",\n \"0.5945233\",\n \"0.593444\",\n \"0.5929564\",\n \"0.5908246\",\n \"0.5895618\",\n \"0.5879419\",\n \"0.586276\",\n \"0.58056074\",\n \"0.5775464\",\n \"0.5773425\",\n \"0.57053614\",\n \"0.56992805\",\n \"0.568957\",\n \"0.56628215\",\n \"0.5641335\",\n \"0.5591444\",\n \"0.55865586\",\n \"0.5583541\",\n \"0.5566509\",\n \"0.5542653\",\n \"0.5540367\",\n \"0.5536215\",\n \"0.551962\",\n \"0.55175614\",\n \"0.5492503\",\n \"0.54817545\",\n \"0.5467373\",\n \"0.54514813\",\n \"0.54514813\",\n \"0.54514813\",\n \"0.54514813\",\n \"0.54514813\",\n \"0.54514813\",\n \"0.5444641\",\n \"0.5443286\",\n \"0.5438279\",\n \"0.54382366\",\n \"0.54373384\",\n \"0.54312336\",\n \"0.54296744\",\n \"0.5429381\",\n \"0.5417438\",\n \"0.5413691\",\n \"0.54101795\",\n \"0.54097927\",\n \"0.53962046\",\n \"0.5394003\",\n \"0.5392801\",\n \"0.5384092\",\n \"0.53781575\",\n \"0.53698426\",\n \"0.5354783\",\n \"0.5350453\",\n \"0.52791154\",\n \"0.52711904\",\n \"0.5270748\",\n \"0.5269955\",\n \"0.52634364\",\n \"0.52583617\",\n \"0.5246137\",\n \"0.52441996\",\n \"0.52397186\",\n \"0.523676\",\n \"0.52329105\",\n \"0.5231873\",\n \"0.5210484\",\n \"0.5208388\",\n \"0.52034533\",\n \"0.5201244\",\n \"0.5192884\",\n \"0.5185339\",\n \"0.5179801\",\n \"0.51783407\",\n \"0.5176566\",\n \"0.5174377\",\n \"0.51489633\",\n \"0.5148263\",\n \"0.5148137\",\n \"0.5140228\",\n \"0.5139575\",\n \"0.51325876\",\n \"0.51212037\",\n \"0.51203567\",\n \"0.5111101\",\n \"0.50976187\",\n \"0.50948185\"\n]"},"document_score":{"kind":"string","value":"0.56837505"},"document_rank":{"kind":"string","value":"27"}}},{"rowIdx":81350,"cells":{"query":{"kind":"string","value":"verify the current automata in display"},"document":{"kind":"string","value":"function verifyEditorAutomata() {\n const json = activeJSON();\n const testedString = editor2.getValue();\n if (json.type !== \"finite-automata\") {\n triggerToast(\"Erro\", \"Operação não suportada para os tipos de linguagem selecionados\")\n return;\n }\n\n const valid = verify(json, testedString);\n const title = valid ? \"Sucesso\" : \"Erro\";\n const neg = !valid ? \"não \" : \"\";\n const msg = `O autômato ${neg} reconhece a String`;\n triggerToast(title, msg);\n}"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["function _checkAi(){return true;}","function verification() {\r\n countTrue();\r\n if (choice == 'c') {\r\n render(complete);\r\n } else if (choice == 'l') {\r\n render(laziness);\r\n } else {\r\n render(mass);\r\n }\r\n }","function assertView() {\n \n\tswitch (currentView)\n\t{\n\t\tcase 0: // current view is \"Name\", we are at the beginning\n\t\t\tnameInput = document.getElementById(\"TeilnehmerNameInput\");\n\t\t\tstartHint = document.getElementById(\"nameHint\");\n\t\t\tunHighlightInput(nameInput);\n\t\t\thideHints(startHint);\n\n\t\t\tif (nameInput.value == \"\") {\n\t\t\t\thighlightInput(nameInput);\n\t\t\t\tnameInput.placeholder = \"Namen eingeben\";\n\n\t\t\t\tshowHints(startHint);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 1:\t// current view is \"Kriterien ordnen\"\n\t\t\treturn true;\n\t\t\tbreak;\n\t\tcase 2: // current view is \"Alternativen raten\"\n\t\t\treturn true;\n\t\t\tbreak;\n\t\tcase 3:\t// current view is \"Uebersicht\"\n\t\t\treturn true;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn true;\n\t}\n\treturn true;\n}","function revealAutomation() {\n reveal('automationActions');\n reveal('automation');\n $('#automateInt').click(buildAutomaton('intelligence'));\n $('#automateTraining').click(buildAutomaton('training'));\n $('#automateTinkering').click(buildAutomaton('tinkering'));\n $('#automateScavenging').click(buildAutomaton('scavenging'));\n}","checkResult() {\n const MAX_ANSWERS_LENGTH = 10;\n if (this.model.isDead()) {\n this.loose();\n } else if (this.model.defineAnswersLength() === MAX_ANSWERS_LENGTH) {\n this.win();\n } else {\n this.startGame();\n }\n }","function customValidation() {\n debugger;\n \n //Loop through each tactic\n for( var i = 0; i < campaignItem.get('tactics'); i++ ) {\n \n //Switch to the tactic tab\n var tacticLabel = '#tactic-'+(i+1);\n tacticCollectionView.switchTab(tacticLabel);\n \n //Retrieve the View for the currently selected Tactic Model\n var currentTactic = Number(tacticCollectionView.activeTab.slice(-2))-1; //Calculate the View that corresponds to the currently active tactic.\n var thisTacticView = tacticViews[currentTactic];\n \n //Alert user and exit if image files have not been uploaded.\n if( thisTacticView.model.attributes.creatives == \"\" ) {\n alert('Tactic #'+ (i+1) +' is missing the creatives (images) required to run the ad. Please click the \"Upload files...\" button and upload these images.');\n return false;\n }\n \n //Alert user and exit if hyperlocal target was selected but no lat/longs are provided\n if( thisTacticView.model.attributes.geoTarget == \"hyperlocal\" ) {\n if( thisTacticView.model.attributes.hyper_local_lat.length == 0 ) {\n alert('A hyperlocal target for tactic #'+ (i+1) +' has been selected, but no Lat/Long coordinates have been provided. Please submit an address to retrieve Lat/Long coordinates.');\n return false;\n }\n \n //Alert user and exit if geographical target was selected but no zip codes were provided\n } else {\n if( thisTacticView.model.attributes.zipcodes.length == 0 ) {\n alert('A geographical target for tactic #'+ (i+1) +' has been selected, but no zip codes have been provided. Please provide zip codes.');\n return false;\n }\n }\n \n }\n \n //Return true by default.\n return true;\n }","function attemptValidation( itcb ) {\n var fsmName = Y.doccirrus.schemas.activity.getDefaultFSMName();\n\n if( explanationsIsTemplate ){\n activity.explanations = explanationsArray.shift();\n }\n Y.doccirrus.fsm[fsmName].validate( user, options, activity, isTest, onValidateComplete );\n\n function onValidateComplete( err, result ) {\n newStatus = result;\n itcb( err );\n }\n }","checkDictationImeActive() {\n assertEquals(\n this.dictationEngineId,\n this.mockInputMethodPrivate.getCurrentInputMethodForTest());\n assertTrue(this.mockLanguageSettingsPrivate.hasInputMethod(\n this.dictationEngineId));\n }","function verify_result() {\n grid_end_time = Date.now();\n trial.grid_rt = grid_end_time - grid_start_time;\n\n document.getElementById(\"Verify_Test\").disabled = true;\n var index, tile_value, num_wrong=0;\n\n // count how many of user_input are hits, misses, false alarms\n // var hits=0, false_alarms=0, misses=0;\n for (var i = 0; i < user_input_tile_ids.length; i++) {\n tile_value = Number(user_input_tile_ids[i]);\n index = generated_tile_ids.indexOf(tile_value);\n\n if (index < 0) {\n trial.false_alarms += 1;\n } else {\n trial.hits += 1;\n }\n }\n trial.misses = generated_tile_ids.length - trial.hits;\n\n num_wrong = Math.max(trial.misses, trial.false_alarms);\n if (num_wrong == 0) {\n verdict = 'Right';\n change_score(1);\n } else if (num_wrong == 1) {\n verdict = 'Almost';\n change_score(0.5);\n } else {\n verdict = 'Not Quite';\n change_score(0);\n }\n\n ////////// display Right Almost or Wrong\n // purge everything except input_verdict\n // if (trial.cognitive_loading) {\n // jsPsych.pluginAPI.setTimeout(function() {\n // display_element.querySelector('#debriefing').style.display = 'none';\n // }, 0);\n jsPsych.pluginAPI.setTimeout(function() {\n display_element.querySelector('#board').style.display = 'none';\n }, 0);\n jsPsych.pluginAPI.setTimeout(function() {\n display_element.querySelector('#board-grid-text').style.display = 'none';\n }, 0);\n jsPsych.pluginAPI.setTimeout(function() {\n display_element.querySelector('#Verify_Test').style.display = 'none';\n }, 0);\n // jsPsych.pluginAPI.setTimeout(function() {\n // display_element.querySelector('#jspsych-html-button-response-prompt').style.display = 'none';\n // }, 0);\n // jsPsych.pluginAPI.setTimeout(function() {\n // display_element.querySelector('#jspsych-html-button-response-rating').style.display = 'none';\n // }, 0);\n // jsPsych.pluginAPI.setTimeout(function() {\n // display_element.querySelector('#verdict').style.display = 'block';\n // }, 0);\n // }\n //\n document.getElementById('input_verdict').innerHTML = verdict ;//+ \"
    score: \" + num_correct + \"
    num_total: \" + num_total;\n\n jsPsych.pluginAPI.setTimeout(end_trial, 1000); //verdict_feedback_time\n }","function checker () {\n\tfinalResult += exercises[pointer].studentAnswer;\n\t++pointer;\n\tif ( pointer == exercises.length ) {\n\t\talert(\"The exam is finished.\");\n\t\treturn 0;\n\t}\n\tnxtbtnContainer.style.display = \"none\";\n\tbuildAndShow();\n}","checkLoadingStatus(){\n\t\t\tif(this.substancesList.length && this.materialsList.length && this.measureUnitsList.length){\n\t\t\t\tthis.currentView = 'analyzes-monitor';\n\t\t\t\tthis.fetchAnalyzes();\n\t\t\t}\n\t\t}","function showAnalysis() {\n var analysis = document.getElementById('analysis');\n if (analysis) {\n analysis.style.display = 'block';\n var distractElem = document.getElementById('distractionsAnalysis');\n distractElem.innerHTML = `You were distracted a total of ${distractions} times.`;\n var pomosEstElem = document.getElementById('pomosEst');\n pomosEstElem.innerHTML = `You estimated that you would take ${totalPomos} pomos (${\n totalPomos * workingTime\n } mins).`;\n var pomosDoneElem = document.getElementById('pomosAnalysis');\n pomosDoneElem.innerHTML = `You actually took ${pomosFinished} pomos (${\n pomosFinished * workingTime\n } mins)!`;\n }\n}","function answerIsIncorrect () {\r\n feedbackForIncorrect();\r\n}","function hiddenCheck() {\n if (PlotService.hiddenVector.length > 0) {\n var vectorStr = PlotService.hiddenVector;\n // set calculator selections based on the vector string\n BaseDataFactory.setValues(vectorStr);\n TemporalDataFactory.setValues(vectorStr);\n EnvironDataFactory.setValues(vectorStr);\n vm.setScore(); // call 'main' function to compute scores and display\n\n console.log('baseSelect', vm.baseSelect);\n console.log('temporalSelect', vm.temportalSelect);\n console.log('environSelect', vm.environSelect);\n\n // check for Cve (Vuln) Id and set text/link in model for display\n vm.cveId = $sce.trustAsHtml(''); // default to nothing\n if (PlotService.hiddenCve.length > 0) {\n var cveId = PlotService.hiddenCve;\n // CVE ID will be displayed in a header as a link\n var href = '/vuln/detail/' + cveId;\n var link = '' + cveId + '';\n vm.cveId = $sce.trustAsHtml(link);\n }\n }\n }","function display() {\n\n doSanityCheck();\n initButtons();\n}","clickDisplay(){\n\n if(!this.__modelSelect.isSelectedModelReady()){\n alert(\"You Need To Choose A Ready Model First!!!\");\n return;\n }\n\n let idSelected = this.__modelSelect.getSelectedModel();\n if(idSelected == -1){\n alert(\"You Need To Choose Model First!!!\");\n return;\n }\n\n if(this.__resultData == null ) {\n alert(\"You Need To Upload A Result Data First!!!\");\n return;\n }\n\n //gets the anomaly from server (the response would display the resualt)\n this.__clientController.getAnomaly(idSelected, this.__resultData);\n }","function C012_AfterClass_Amanda_TestChange() {\n\tif (!ActorIsRestrained()) {\n\t\tif ((ActorGetValue(ActorLove) >= 10) || (ActorGetValue(ActorSubmission) >= 10) || Common_ActorIsOwned || Common_ActorIsLover) {\n\t\t\tif (Common_ActorIsOwned) OverridenIntroText = GetText(\"AcceptChangeFromMistress\");\n\t\t\telse \n\t\t\t\tif (Common_ActorIsLover) OverridenIntroText = GetText(\"AcceptChangeFromLover\");\n\t\t\t\telse OverridenIntroText = GetText(\"AcceptChange\");\n\t\t\tC012_AfterClass_Amanda_CurrentStage = 600;\n\t\t}\n\t\tC012_AfterClass_Amanda_GaggedAnswer();\n\t} else OverridenIntroText = GetText(\"CannotActWhileRestrained\");\n}","function validateInstructionChecks() {\n \n instructionChecks = $('#instr').serializeArray();\n\n var ok = true;\n var allanswers = true;\n if (instructionChecks.length < 2) {\n alert('Please complete all questions.');\n allanswers = false;\n \n \n } else {\n allanswers = true;\n for (var i = 0; i < instructionChecks.length; i++) {\n // check for incorrect responses\n if(instructionChecks[i].value === \"incorrect\") {\n alert('At least one answer was incorrect; please read the instructions and try again.');\n ok = false;\n break;\n }\n }\n }\n \n \n // goes to next section\n if (!allanswers) {\n showInstructionCheck;\n } else if(!ok) {\n showInstructions(); \n } else {\n hideElements();\n showDummyVignette(); \n }\n}","function showAns(show){\n if (display.innerText === '0'){\n ans.textContent = 'Ans = 0';\n } \n else if (show === 'first'){\n ans.textContent = `${calculator.numA} ${calculator.operator} ${calculator.numB} =`;\n }\n else if (show === 'second'){\n ans.textContent = `Ans = ${calculator.result}`;\n }\n}","function Claim()\r\n\t{\r\n\t\t//Show_Solution(Sudoku_Solution);\r\n\t\tfor(var i=0; i<3; i++)\r\n\t\t{\r\n\t\t\tfor(var j=0; j<3; j++)\r\n\t\t\t{\r\n\t\t\t\tif(Claiming(i,j))\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}","function checkVisibleLines () {\n\tif (allVisibleLinesJustified()) {\n\t\t$('#problemButton').show();\n\t\t$('#ruleInstructionsPartial').html('Correct! Click \\'Next Line\\' to continue.');\n\t}\n}","displayOption() {\n var tmp_show_option = false;\n for (let check_item of this.check_list) {\n if (check_item) {\n tmp_show_option = true;\n break;\n }\n }\n this.show_option = tmp_show_option;\n }","function checkAnswers() {\n\n}","validateAttributes() {\n return this\n .waitForElementVisible('@productSubtitle', 10000, () => {}, '[STEP] - Product Card Attributes (Brand/Author link) should be displayed')\n .assert.visible('@productSubtitle');\n }","check_if_passed() {\n const passed = this.text_area.value === this.text;\n if (!passed) {\n console.error(this.describe() + \" failed!\");\n }\n return passed;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","check_if_passed() {\n const passed = this.input_area.value === this.text;\n if (!passed) {\n console.error(this.describe() + \" failed!\");\n }\n return passed;\n }","function isComplete(area) {\n\tif (area.expert === undefined) area.expert = 0;\n\tif (area.advanced === undefined) area.advanced = 0;\n\tif (area.yearlySnowfall === undefined ) area.yearlySnowfall = 0;\n\treturn ( area.state && area.vertical && area.skiableAcres );\n}","function testAn() {\n j = this.id.substring(2);\n if (document.getElementById(\"an\" + j).innerText == aArr[j] + \" \" + data[qNum][\"a\"][j][\"aText\"] && data[qNum][\"a\"][j][\"isTrue\"] == true) {\n alert(\"right\");\n rightAn++;\n result();\n newQ();\n } else {\n alert(\"wrong\");\n newQ();\n }\n }","function verify_basin () {\n var p1 = $('

    Use this point?

    ' +\n '

    ' + '
    ' +\n '

    ' \n );\n\n prompt.html(p1);\n $(p1).find('#p1-yes').click(function (event) {\n event.preventDefault();\n select_model();\n });\n \n\t\t\n $(p1).find('#p1-no').click(function (event) {\n event.preventDefault();\n resetPrompt();\n // TODO: do I remove the basin from the display?\n });\n \n }","function theInterface(automata){\n automata.makeSet(\n {\n 'name': 'AutoBrowser'\n\n }, function(set){\n\n set.block.begins('init', function(){\n\n })\n\n set.block('visit', function(block){\n block.takes.url();\n block.outputs(automata.boolean);\n });\n\n set.block('collect', function(block){\n block.takes(\n automata\n .array\n .contains(automata.string)\n );\n });\n\n set.block('click', function(block){\n block.takes(automata.string)\n block.outputs(automata.boolean);\n });\n\n set.block('enter', function(block){\n /*\n * Here is an example of a block that can handle more than one type of input\n */\n block.takes( automata.tuple.matches( [automata.string, automata.string] );\n block.takes( automata.hash.maps(automata.string, automata.string));\n\n block.outputs(automata.boolean);\n });\n\n /*\n set.block('...',...)\n */\n\n });\n}","function showWhatToExpect() {\n $(\"#start-screen\").hide();\n $(\"#what-to-expect\").show();\n $(\"#tips\").hide();\n $(\"#question-display\").hide();\n $(\"#question-result-display\").hide();\n $(\"#test-result-display\").hide();\n }","function showInstructionChecks() {\n \n hideElements();\n $('#instructions').show();\n $('#instructions').load('html/instructionchecks.html'); \n $('#next').show();\n $('#next').click(validateInstructionChecks);\n}","function checkIfLinedUp() {\n\n if (nameAnswer.value.toLowerCase() === 'nominal' && ageAnswer.value.toLowerCase() === \"continuous\" && shoesizeAnswer.value.toLowerCase() === \"discrete\") {\n finishPuzzleOne.classList.toggle('hide');\n window.scrollTo(0,document.body.scrollHeight); //if they are all correct show the next button\n }\n }","@computed\n get isAppReady() {\n if (\n this.textElements.length != 0 &&\n this.activeDetailedAnnotations.length != 0 &&\n !isEmpty(this.activeLayoutedElements) &&\n this.activeTextGlyphs.length != 0 &&\n this.activeFilters.length != 0\n ) {\n return true;\n } else {\n return false;\n }\n }","isDeterministicComplete() {\r\n let isDeterministic = this.isDeterministic();\r\n if (!isDeterministic) return false;\r\n\r\n // Each pair (state, symbol) must have an image by transition function\r\n for (let index = 0; index < this.states.length; index++) {\r\n const state = this.states[index];\r\n for (const symbol of this.alphabet) {\r\n if (this.transition(state, symbol) == null)\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }","checkAns() {\n let rightCnt = this.computeScore();\n alert(rightCnt + \" out of \" + this.state.questionArray.length + \" are correct\");\n }","async vlidatePresenceOfElements () {\n await expect(await (await this.inputUsername).isDisplayed()).toBe(true);\n await expect(await (await this.inputPassword).isDisplayed()).toBe(true);\n // check if submit button is displayed or not\n await expect(await (await this.btnSubmit).isDisplayed()).toBe(true);\n // check if submit button is clickable or not\n await expect(await (await this.btnSubmit).isClickable()).toBe(true);\n }","function isTautology(results){\r\n for (var i= 0; i < results.length; i++) if (results[i] == 0) return false;\r\n return true;\r\n}","function show_verify_meta_modal() {\n // Save all inputs.\n save_proj();\n\n // Then, convert to proj object.\n convert_all_meta_inputs();\n\n // Verify.\n var check_meta_modal = $('#check_meta_modal');\n var choose_controls_modal = $('#choose_controls_modal');\n var valid = validate_all_meta_inputs(check_meta_modal);\n\n // Depending on whether or not all the input is valid,\n // show different modal.\n if (valid) {\n var new_modal = choose_controls_modal.clone();\n\n set_chars_details_to_samples();\n set_choose_controls_modal(new_modal, proj.factors);\n new_modal.modal('show');\n } else {\n check_meta_modal.modal('show');\n }\n}","function validateCheckForAffil(){\n if (!checkAffilName.value) {\n atmWindow.document.getElementById(\"checkAffilNameError_atm\").style.display = \"block\";\n } else {\n atmWindow.document.getElementById(\"checkAffilNameError_atm\").style.display = \"none\";\n checkForAffiliate(checkAffilName.value);\n }\n }","show() {\n this.printUi();\n this.rl.question(\"> \", term => {\n let matchingEntries = this.compareSearchWords(term, [\"go get milk\", \"something\", \"milk\", \"grab food\"]); //TODO connect to State**\n this.printResultsUi(term, matchingEntries);\n this.rl.question(\"Enter to return to the main screen. \", () => {\n const screen = new MainScreen(this.rl, this.state);\n screen.show();\n });\n });\n }","function elementSelectedAmbience(){\r\n\tvar choice = document.form.ambience.value;\r\n\tif(choice == \"Any\"){\r\n\t\tambience = \"InOut\" + \"\\n \";\r\n\t\tenglishAmbience= \"Indoors or Outdoors\";\r\n\t}\r\n\telse {\r\n\t\tambience = \"\" + choice + \"\" + \"\\n \";\r\n\t\tenglishAmbience = choice + \"doors\";\r\n\t}\r\n\tcreateRuleML();\r\n}","function checkInstruction() {\n if(allInstuctions.length>0){\n if (allInstuctions[allInstuctions.length - 1].questions.length === 0) {\n warningModal(eachInsMustHaveOneQ)\n } else {\n $('#modal-instruction').modal(\"show\");\n }\n }else {\n $('#modal-instruction').modal(\"show\");\n }\n \n}","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","function shouldCompute(cues) {\n for (var i = 0; i < cues.length; i++) {\n if (cues[i].hasBeenReset || !cues[i].displayState) {\n return true;\n }\n }\n return false;\n }","isDeterministic() {\r\n for (let index = 0; index < this.states.length; index++) {\r\n const state = this.states[index];\r\n for (const symbol of this.alphabet) {\r\n if (Array.isArray(this.transition(state, symbol)))\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }","function checkSituationValid() {\n\t\tvar list = document.getElementById(\"r4\");\n\t\tvar length = document.getElementById(\"situationArea\").value.length;\n\t\tif(length == 0) {\n\t\t\tsituationValid = true; //situationValid\n\t\t\t//alert(\"in situation: \"+originalStuaInfo);\n\t\t\tlist.innerHTML = originalStuaInfo; //originalStuaInfo\n\t\t\treturn;\n\t\t}\n\t\t//alert(\"in\");\n\t\tif(length <= 240) {\n\t\t\tlist.innerHTML = \"Perfect! totally \"+length+\" characters!\";\n\t\t\tsituationValid = true;\n\t\t} else {\n\t\t\tlist.innerHTML = \"Sorry! you have already written \"+length+\" characters. The length should be less than 240 characters\";\n\t\t\tsituationValid = false;\n\t\t}\n\t}","function theImplementation(automata){\n\n}","function shouldBeVisible() {\n return visibleValues > 1;\n}","hasNext() {\n //don't let the next display if there's (mandatory) choices to make\n if (this.hasChoices()) {return false;}\n let check = this.getNextLineIndex() || this.getNextDialogueIndex() || this.getNextSceneIndex();\n if (check) {return check;} else {return false;}\n }","function isDisplayed(pIndex){\n var lDisplay = ( pIsWizard ? pAttributeList[pIndex].showInWizard : true ),\n lValue,\n lDependingOnExpr,\n lIsMultiValue;\n\n // check if attribute should always be excluded (for example because of component type)\n if ( lDisplay && pAttributeList[pIndex].isExcluded === true ) {\n lDisplay = false;\n }\n\n // check ui type if available\n if ( lDisplay && pUiType && pAttributeList[pIndex].supportedUiTypes ) {\n lDisplay = ( apex.jQuery.inArray( pUiType, pAttributeList[pIndex].supportedUiTypes.split( \":\" )) !== -1 );\n }\n\n // check condition\n if ( lDisplay && pAttributeList[pIndex].dependingOnAttrSeq && pAttributeList[pIndex].dependingOnCondType) {\n\n // recursive call to check the whole dependency chain\n // Note: we have to use -1 because the array starts with 0\n lDisplay = isDisplayed(parseInt(pAttributeList[pIndex].dependingOnAttrSeq, 10)-1);\n // only if all parents are displayed, we check the current attribute as well\n if (lDisplay) {\n lValue = $v(lPrefix+pAttributeList[pIndex].dependingOnAttrSeq);\n lDependingOnExpr = pAttributeList[pIndex].dependingOnExpr;\n // Note: we have to use -1 because the array starts with 0 and dependingOnAttrSeq uses the original attribute seq\n // which starts with 1\n lIsMultiValue = pAttributeList[parseInt(pAttributeList[pIndex].dependingOnAttrSeq, 10)-1].type === \"CHECKBOXES\"?true:false;\n\n if (lIsMultiValue) {\n lValue = (lValue === \"\"?[]:lValue.split(\":\"));\n }\n\n switch (pAttributeList[pIndex].dependingOnCondType) {\n case 'EQUALS':\n if (lIsMultiValue) {\n lDisplay = (apex.jQuery.inArray(lDependingOnExpr, lValue) != -1);\n } else {\n lDisplay = (lValue === lDependingOnExpr);\n }\n break;\n case 'NOT_EQUALS':\n if (lIsMultiValue) {\n lDisplay = (apex.jQuery.inArray(lDependingOnExpr, lValue) === -1);\n } else {\n lDisplay = (lValue !== lDependingOnExpr);\n }\n break;\n case 'IN_LIST':\n lDependingOnExpr = lDependingOnExpr.split(',');\n if (lIsMultiValue) {\n lDisplay = false;\n // Check if any of the values in the value array equals any of\n // the values in the depending on expression array\n apex.jQuery.each(lValue, function(pIndex, pValue) {\n lDisplay = (apex.jQuery.inArray(pValue, lDependingOnExpr) !== -1);\n // If result is true, then exit iterator.\n if (lDisplay) { return false; };\n });\n } else {\n lDisplay = (apex.jQuery.inArray(lValue, lDependingOnExpr)!==-1);\n }\n break;\n case 'NOT_IN_LIST':\n lDependingOnExpr = lDependingOnExpr.split(',');\n if (lIsMultiValue) {\n lDisplay = true;\n // Check if any of the values in the value array do not\n // equal any the values in the depending on expression array.\n apex.jQuery.each(lValue, function(pIndex, pValue) {\n lDisplay = (apex.jQuery.inArray(pValue, lDependingOnExpr) === -1);\n if (!lDisplay) { return false; };\n });\n } else {\n lDisplay = (apex.jQuery.inArray(lValue, lDependingOnExpr)===-1);\n }\n break;\n case 'NULL':\n if (lIsMultiValue) {\n lDisplay = (lValue.length === 0);\n } else {\n lDisplay = !(lValue);\n }\n break;\n case 'NOT_NULL':\n if (lIsMultiValue) {\n lDisplay = (lValue.length > 0);\n } else {\n lDisplay = (lValue);\n }\n break;\n }\n } else if ( pAttributeList[pIndex].dependingOnAlwaysEval === false ) {\n lDisplay = true;\n }\n }\n return lDisplay;\n }","resultspage_check() {\r\n // funcao validar pagina de resultados\r\n cy.get(elements.wordSearched()).should('be.visible')\r\n cy.get(elements.quantityResult()).should('be.visible')\r\n cy.get(elements.orderingOptions()).should('be.visible')\r\n cy.get(elements.productPicture()).should('be.visible')\r\n }","function checkSequence(){\n\t console.log(\"checking\");\n\t if (JSON.stringify(pattern) === JSON.stringify(userPattern)){\n\t\t\telementScore.innerHTML ++;\n\t\t\tif(elementHigh.innerHTML < elementScore.innerHTML){\n\t\t\t elementHigh.innerHTML++;\n\t\t\t}\n\t/* The next level function is called if they are, if not end game.*/\t\n\t\t \n\t\t console.log(\"next\");\n\t nextLevel();\n\t }\n\t\telse {\n\t\t\n\t\t\tendGame();\n\t\t} \n }","function displayConstraint(bmp_id){\n\t\tif(bmp_id == \"4\" || bmp_id == \"7\" || bmp_id == \"6\"){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}","check_if_passed() {\n const passed = this.node.value === this.correct;\n if (!passed) {\n console.error(this.describe() + \" failed!\");\n }\n return passed;\n }","validateButtonsOnForm() {\n return this\n .waitForElementVisible('@faqForm')\n .assert.visible('@faqForm', 'Form is loaded')\n .waitForElementVisible('@noBtn')\n .assert.containsText('@noBtn', 'No')\n .waitForElementVisible('@yesBtn')\n .assert.containsText('@yesBtn', 'Yes');\n }","function showAttractionResults() {\n const attractions = document.getElementById('attraction-segment');\n attractions.style.display = 'block';\n }","function displayInterface() {\n \n if (questionCounter > 0) {\n let selectedQuestion = selectQuestion();\n console.log(questions.length + \"Before shift\")\n populateQuestion(selectedQuestion);\n populateAnswers(selectedQuestion);\n }\n}","function validateDatabaseChange()\r\n{\r\n\tdatabaseOK = true;\r\n\tvar dnaRecords = document.getElementById(\"DNARecords\");\r\n\t//walidacja kolejnych bazodanowych sekwencji\r\n\tfor (var i = 0; i < dnaRecords.rows.length; ++i) \r\n\t{\r\n\t\tif(!validateSequence(dnaRecords.rows[i].cells[0].firstChild.value))\r\n\t\t{\r\n\t\t\tdatabaseOK = false;\r\n\t\t\tbreak;\r\n\t\t} \r\n }\r\n}","isQnA(): boolean {\n return this.type === ClassificationResult.TYPE_QNA;\n }","function BusinessIntelligenceCheck(){}","function showAbsenceDetails(nr) {\nif (nr != undefined) {\nelementToCheck = nr;\t\n} else {\nelementToCheck = activeElement;\n}\ncontent = \"Abwesenheit\";\nactiveDataSet = studentList.find(dataset => dataset.absenceId == elementToCheck);\n//console.log(activeDataSet);\nif (activeDataSet['ende'] != activeDataSet['beginn']) {\ncontent += \" vom \" + formatDateDot(activeDataSet['beginn']) + \" bis \" +formatDateDot(activeDataSet['ende'])+'';\t\n} else {\ncontent += \" am \" + formatDateDot(activeDataSet['beginn']) + \"\";\t\n}\nanzeige = \"\";\nif (activeDataSet['adminMeldung'] != 0) {\nanzeige = \"Eintrag Sekretariat am: \" + formatDateDot(activeDataSet['adminMeldungDatum'])+'
    ';\t\n}\nif (activeDataSet['lehrerMeldung'] != \"0\") {\n\tif (teacherUser ==1) {\n\taddInfo = activeDataSet['lehrerMeldung'] + \" (\" + formatDateDot(activeDataSet['lehrerMeldungDatum'])+')
    ';\t\n\t} else {\n\taddInfo = \"Eintrag Lehrkraft (\" + formatDateDot(activeDataSet['lehrerMeldungDatum'])+')
    ';\t\n\t}\n\tanzeige += addInfo;\t\n}\nif (activeDataSet['elternMeldung'] != \"0\") {\nanzeige += \"Eintrag Eltern am: \" + formatDateDot(activeDataSet['elternMeldungDatum'])+'';\t\n}\nif (activeDataSet['kommentar'] != \"\") {\nanzeige += \"
    Kommentar: \" + activeDataSet['kommentar']+'';\t\n}\nif (activeDataSet['entschuldigt'] != \"0000-00-00\") {\nanzeige += \"Entschuldigung am: \" + formatDateDot(activeDataSet['entschuldigt'])+'';\t\n}\ncontent += '
    ' + anzeige;\n\nreturn content;\t\n}","performFullValidation() {\r\n const validateCompleted = this.state.pages[this.state.index].questions.map(\r\n (question, index) => {\r\n if (!question.required || question.questionType === \"Label\") {\r\n return true;\r\n }\r\n const answer = this.state.answerIndexes.find(\r\n ans => ans.page === this.state.index && ans.qIndex === index\r\n );\r\n if (!answer || answer.answer === \"\" || answer.answer === \"null\") {\r\n return false;\r\n }\r\n return true;\r\n }\r\n );\r\n this.setState({\r\n questionsAnswered: validateCompleted\r\n });\r\n }","function compareAO()\n{\n var alex = document.getElementById('alex');\n var olex = document.getElementById('olex');\n\n var aval = alex.value.split('\\n');\n var oval = olex.value.split('\\n');\n\n var identical = 0;\n var different = 0;\n\n var new_text = '';\n var cor_text = '';\n\n for(i=0;i ')[1];\n var o = oval[i];\n \n if(a != o){\n different += 1;\n new_text += ohg[i]+' > '+ o + ' ['+a+']\\n';\n }\n else{\n identical += 1;\n cor_text += ohg[i]+' > '+o+'\\n';\n }\n }\n var goods = parseInt(identical / (identical + different) * 100);\n var bads = parseInt(different / (identical + different) * 100);\n var total = identical + different;\n\n results = [goods];\n\n document.getElementById('olex').value = new_text;\n document.getElementById('clex').value = cor_text;\n document.getElementById('evalu').style.display = 'block';\n return [identical, different, goods, bads, total];\n}","function showParseTree() {\n // Hide the answers until the user generates a new expression.\n $(\".new-expression\").show();\n $(\".answers\").hide();\n var expression = $(\"#\"+TreeConstants.ROOT_TAG).text();\n // Show help if active.\n TreeConstructor.promptActive = false;\n var fn = partial(feedbackForAnswer, this.id);\n TreeConstructor.createParseTree(expression, TreeConstants.ROOT_TAG, fn);\n }","function explainPuzzle(){\n\tlet ed = display.explanationDisplay;\n\ted.innerHTML = underground.selected.explanationDisplay();\n}","function btnDisplay(){\n if(strValidation && motValidation && moodClickedValidation)\n btnToggle.style.display = 'block';\n}","function C012_AfterClass_Amanda_TestSubmit() {\n\tif (Common_PlayerOwner != \"\") {\n\t\tOverridenIntroText = GetText(\"AlreadyOwned\");\n\t} else {\n\t\tif (ActorIsRestrained()) {\n\t\t\tOverridenIntroText = GetText(\"UnrestrainFirst\");\n\t\t} else {\n\t\t\tif (ActorIsChaste()) {\n\t\t\t\tOverridenIntroText = GetText(\"UnchasteFirst\");\n\t\t\t} else {\n\t\t\t\tif (PlayerHasLockedInventory(\"Collar\")) {\n\t\t\t\t\tOverridenIntroText = GetText(\"PlayerUncollarFirst\");\t\t\t\t\t\n\t\t\t\t} else {\t\t\t\t\t\n\t\t\t\t\tif (Common_PlayerRestrained) {\n\t\t\t\t\t\tOverridenIntroText = GetText(\"PlayerUnrestrainFirst\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tC012_AfterClass_Amanda_CurrentStage = 330;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}","function verifierMot()\n{\n var lemot = \"\";\n for(let i=0; i= 3) {\r\n writeAward(\"No Instruction Needed\");\r\n payAMT(true,0.20); \r\n } else {\r\n payAMT(true,0.0); \r\n }\r\n \r\n// quit();\r\n \r\n}","function displayGuide() {\n my.html.guide.innerHTML = my.current.unit.guide\n }","function checkManipulate(param) {\n closeOption({});\n if (gw_com_api.getCRUD(\"frmData_MainA\") == \"none\") {\n gw_com_api.messageBox([{ text: \"NOMASTER\" }]);\n return false;\n }\n return true;\n}","verifySectorListIsDisplayed(){\n utils.verifyTheListOfElementsExists(jobsPageLocator.jobsPage.jobsSectorList,sectorList);\n }","function checkAll(){\n //verificam daca toate intrebarile au fost completate\n let ok=1;\n for(let i=0;i<=answersScoreArray.length;i++)\n if(answersScoreArray[i]===\"NULL\") {alert('Toate intrebarile sunt obligatorii! Reintoarce-te si completeaza intrebarea '+ (i+1) + \"!\"); ok=0; break}\n if(ok===1) show(score);\n}","function showInstructions() {\r\n\tconst INSTRUCTIONS = \"1. Identify the morphological boundaries. \" \r\n\t\t\t\t\t + \"When you mouse over the word, grey slashes will appear in the spaces between the letters, indicating possible morphological boundaries.

    \"\r\n\t\t\t\t\t + \"a. To mark a morphological boundary, click on the space where you think the boundary is using your mouse.

    \" \r\n\t\t\t\t\t + \"b. Once you've made your selection, click on the check button to see whether you've identified the boundaries correctly.

    \"\r\n\t\t\t\t\t + \"c. If you've selected your boundaries correctly, the morphological categories of the word's components will automatically appear above the word.\"\r\n\t\t\t\t\t + \"If you haven't, you will be given the opportunity to try again \"\r\n\t\t\t\t\t + \"(remember, after three tries, the program will provide the correct answer).\"; \r\n\tshowModal(INSTRUCTIONS, false);\r\n}","function checkIterationFormInfo(objData){\n\t\n\tif (objData.length < 16) {\n\t\talert(\"Please answer all questions before finishing the experiment\");\n\t\treturn false;\n\t}\n\n\tfor (var i = 0; i < objData.length; i++) {\n\t\tif (objData[i].value == \"\"){\n\t\t\talert(\"Please answer question: \" + objData[i].name);\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}","function check() {\n var enabled = true;\n if (!UI.GetValue(\"Misc\", \"JAVASCRIPT\", \"Script items\", \"Show Fixes\")) {\n var enabled = false;\n }\n UI.SetEnabled(\"MISC\", \"JAVASCRIPT\", \"Script items\", \"No FakeLag With Nades Out\", enabled);\n UI.SetEnabled(\"MISC\", \"JAVASCRIPT\", \"Script items\", \"No FakeLag With Revolver\", enabled);\n UI.SetEnabled(\"MISC\", \"JAVASCRIPT\", \"Script items\", \"No AA on knife fix\", enabled);\n if (UI.GetValue(\"Misc\", \"JAVASCRIPT\", \"Script items\", \"No FakeLag With Nades Out\") || GetValue(\"Misc\", \"JAVASCRIPT\", \"Script items\", \"No FakeLag With Revolver\")) {\n LagFix();\n }\n if (UI.GetValue(\"Misc\", \"JAVASCRIPT\", \"Script items\", \"No AA on knife fix\")) {\n knifeFix();\n }\n}","function C012_AfterClass_Amanda_TestDomme() {\n\tif (!ActorIsGagged()) {\n\t\tif (!Common_ActorIsOwned) {\n\t\t\tif (PlayerHasInventory(\"Collar\")) {\n\t\t\t\tif (ActorGetValue(ActorSubmission) >= 20) {\n\t\t\t\t\tif (!GameLogQuery(CurrentChapter, CurrentActor, \"EnslaveDone\")) {\n\t\t\t\t\t\tC012_AfterClass_Amanda_CurrentStage = 200;\n\t\t\t\t\t\tOverridenIntroText = \"\";\n\t\t\t\t\t\tLeaveIcon = \"\";\n\t\t\t\t\t\tGameLogAdd(\"EnslaveDone\");\n\t\t\t\t\t} else OverridenIntroText = GetText(\"EnslaveAlreadyTried\");\n\t\t\t\t}\n\t\t\t} else OverridenIntroText = GetText(\"CollarToEnslave\");\n\t\t} else OverridenIntroText = GetText(\"SubEnjoyBondage\");\n\t} else C012_AfterClass_Amanda_GaggedAnswer();\n}","function showTestingResults(state) {\n switch(state) {\n case 'device-error':\n document.getElementById('if-not-posible').classList.remove('is-hidden');\n document.getElementById('deviceError').classList.remove('is-hidden');\n break;\n case 'software-error':\n document.getElementById('if-not-posible').classList.remove('is-hidden');\n document.getElementById('softwareError').classList.remove('is-hidden');\n break;\n case 'hardware-error':\n document.getElementById('if-not-posible').classList.remove('is-hidden');\n document.getElementById('hardwareError').classList.remove('is-hidden');\n break;\n case 'all-right':\n document.getElementById('if-possible').classList.remove('is-hidden');\n my_init();\n break;\n } \n}","function show() {\n return vm.error == \"\";\n }","function validate() {\r\n\r\n\r\n \r\n // set the progress of the background\r\n progress.style.width = ++position * 100 / questions.length + 'vw'\r\n\r\n // if there is a new question, hide current and load next\r\n if (questions[position]) hideCurrent(putQuestion)\r\n else hideCurrent(done)\r\n \r\n \r\n\r\n }","function check(){\n\tvar correct = 0;\n\t\tfor(var i = 0; i < sequencePlayer.length; i++){\n\t\t\tif(sequencePlayer[i] == sequence[i]){\n\t\t\t\tcorrect++;\t\t\t\t\n\t\t\t}else{\n\t\t\t\tsound(soundLost);\n\t\t\t\ticonTimes();\n\t\t\t\tplusOn = true;\n\t\t\t}//else\n\t\t\t\t\n\t\t\tif((correct > 0) && (correct == sequence.length)){\n\t\t\t\tsound(soundGood);\n\t\t\t\ticonCheck();\n\t\t\t\tsequencePlayer = [];\n\t\t\t\tuseLife = false;\n\t\t\t\tchoices = document.getElementById(\"No\");\n\t\t\t\tchoices.innerHTML = click;\n\t\t\t\t\n\t\t\t\ton = false;\n\t\t\t\tplayOn = false;\n\t\t\t\tplusOn = true;\n\t\t\t\tnoLifemode = true;\n\t\t\t\t\n\t\t\t\tif(counter > highScore){\n\t\t\t\thighScore = counter;\n\t\t\t\t}\n\t\t\t}//if2\n\t\t}//for\n}//check()","function checkResultsCount() {\n // get all rules from ui\n var rules = document.getElementsByClassName('ruleEntry');\n // set up rules shown counter\n var resultsCounter = 0;\n // step trough all the rules\n for (var i = 0; i < rules.length; i++) {\n // if rule is shown increase repo shown counter\n if (rules[i].style.display != 'none') {\n resultsCounter++;\n }\n }\n // if rule shown counter is 0 (no rules displayed) show no rules found exception\n if (resultsCounter == 0) {\n document.getElementById('noEntries').style.display = 'block';\n // else hide exception\n } else {\n document.getElementById('noEntries').style.display = 'none';\n }\n}","function processAnswer(finalTestData) {\n\tlet userAnswer = editor.getValue();\n\tlet finalTest = finalTestData.data.attributes.finalText;\n\n\tcheckAnswer(userAnswer, finalTest);\n}","function verifierEquation(item,min,max,numberDisplay) {\n\t\n\tvar reponseUser = item.innerHTML;\n\tvar nbr1 = parseInt(document.getElementById(\"nbr1\").innerHTML);\n\tvar nbr2 = parseInt(document.getElementById(\"nbr2\").innerHTML);\n\tvar signe = document.getElementById(\"signe\").innerHTML;\n\t\n\tclearAnswer(numberDisplay);\n\t\n\tvar reponseEquation = calculEquation(nbr1,nbr2,signe);\n\t\n\tif (reponseUser == reponseEquation) {\n\t\t\n\t\tdisplayAfterGoodAnswer(reponseEquation)\n\t\t\n\t\tnumberGoodAnswer ++; \n\t\tnumberTotalAnswer ++;\n\t\t\n\t\tafficheNumberGoodAnswer();\n\t\t\n\t\tsetTimeout(load_game_mathEquation, 2000, signe,min,max,numberDisplay);\n\t}else {\n\n\t\tdisplayAfterBadAnswer(reponseEquation)\n\t\t \n\t\tnumberTotalAnswer ++;\n\t\t\t\n\t\tafficheNumberGoodAnswer();\n\t\t\n\t\tsetTimeout(load_game_mathEquation, 2000, signe,min,max,numberDisplay);\n\t}\t\n}","async function verifyAnonymity(page) {\n logger.info(\"Running anonymity tests..\", { category: \"stealthCheck\" });\n\n const intoliTest = await runIntoliTest(page);\n const antoineTest = await runAntoineVastelTest(page);\n\n logger.info(\"All tests ran succesfully\", { category: \"stealthCheck\" });\n\n return { intoliTest, antoineTest };\n}","function ko_check() {\n if (current_character.KO) {\n readNextToken();\n } else if (current_character === fighter) {\n $('#turnAnnouncer').html(\"It's FIGHTER'S turn!\");\n } else if (current_character === whiteMage) {\n $('#turnAnnouncer').html(\"It's WHITE MAGE'S turn!\");\n } else if (current_character === blackMage) {\n $('#turnAnnouncer').html(\"It's BLACK MAGE'S turn!\");\n } else if (current_character === titan) {\n $('#turnAnnouncer').html(\"The enemy is going to attack!\");\n }\n}","function checkIfDone(){\n\tif(remainingSlides === 0 | remainingSlides < 0){\n\t\tconsole.log(\"DONE\");\n\t\t$(\"#quiz\").css(\"display\", \"none\");\n\t\t$(\"#results\").css(\"display\", \"block\");\n\t\tvar totalAgainstNN = liked/totalSlides*100;\n\t\tif (totalAgainstNN >= 50.0){\n\t\t\t$(\"#foragainst\").text(\"for\");\n\t\t\t$(\"#foragainst2\").text(\"for\");\n\t\t\t$(\"#magicNum\").text(Math.round(totalAgainstNN));\n\t\t\t$(\"#folksAgainstNN\").css(\"display\", \"block\");\n\t\t} else {\n\t\t\t$(\"#foragainst\").text(\"against\");\n\t\t\t$(\"#foragainst2\").text(\"against\");\n\t\t\t$(\"#magicNum\").text(Math.round(100-totalAgainstNN));\n\t\t\t$(\"#folksForNN\").css(\"display\", \"block\");\n\t\t}\n\t}\n}","function showAbsenceDetails(nr) {\nif (nr != undefined) {\nelementToCheck = nr;\t\n} else {\nelementToCheck = activeElement;\n}\ncontent = \"Abwesenheit\";\nactiveDataSet = studentList.find(dataset => dataset.absenceId == elementToCheck);\n\nif (activeDataSet['ende'] != activeDataSet['beginn']) {\ncontent += \" vom \" + formatDateDot(activeDataSet['beginn']) + \" bis \" +formatDateDot(activeDataSet['ende'])+'';\t\n} else {\ncontent += \" am \" + formatDateDot(activeDataSet['beginn']) + \"\";\t\n}\nanzeige = \"\";\nif (activeDataSet['adminMeldung'] != 0) {\nanzeige = \"Eintrag Sekretariat am: \" + formatDateDot(activeDataSet['adminMeldungDatum'])+'
    ';\t\n}\nif (activeDataSet['beurlaubt'] == 0) {\n\tif (activeDataSet['lehrerMeldung'] != \"0\") {\n\tanzeige += \"Meldung Lehrer am: \" + formatDateDot(activeDataSet['lehrerMeldungDatum'])+'
    ';\t\n\t}\n\tif (activeDataSet['elternMeldung'] != \"0\") {\n\tanzeige += \"Eintrag Eltern am: \" + formatDateDot(activeDataSet['elternMeldungDatum'])+'';\t\n\t}\n\tif (activeDataSet['entschuldigt'] != \"0000-00-00\") {\n\tanzeige += \"Entschuldigung am: \" + formatDateDot(activeDataSet['entschuldigt'])+'';\t\n\t}\t\n}\nif (activeDataSet['kommentar'] != \"\") {\nanzeige += \"Kommentar: \" + activeDataSet['kommentar'];\t\n}\ncontent += '
    ' + anzeige;\n\nreturn content;\t\n}","function checkIfComplete(){\n\t\tif(isComplete == false){\n\t\t\tisComplete = true;\n\t\t} else {\n\t\t\tplace = ' SEGUNDO ';\n\t\t}\n\t}","check_if_passed() {\n const passed = this.text_node.textContent === this.correct;\n if (!passed) {\n console.error(this.describe() + \" failed! ('\" + this.text_node.textContent + \"' != '\" + this.correct + \"')\");\n }\n return passed;\n }"],"string":"[\n \"function _checkAi(){return true;}\",\n \"function verification() {\\r\\n countTrue();\\r\\n if (choice == 'c') {\\r\\n render(complete);\\r\\n } else if (choice == 'l') {\\r\\n render(laziness);\\r\\n } else {\\r\\n render(mass);\\r\\n }\\r\\n }\",\n \"function assertView() {\\n \\n\\tswitch (currentView)\\n\\t{\\n\\t\\tcase 0: // current view is \\\"Name\\\", we are at the beginning\\n\\t\\t\\tnameInput = document.getElementById(\\\"TeilnehmerNameInput\\\");\\n\\t\\t\\tstartHint = document.getElementById(\\\"nameHint\\\");\\n\\t\\t\\tunHighlightInput(nameInput);\\n\\t\\t\\thideHints(startHint);\\n\\n\\t\\t\\tif (nameInput.value == \\\"\\\") {\\n\\t\\t\\t\\thighlightInput(nameInput);\\n\\t\\t\\t\\tnameInput.placeholder = \\\"Namen eingeben\\\";\\n\\n\\t\\t\\t\\tshowHints(startHint);\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\n\\t\\t\\tbreak;\\n\\t\\tcase 1:\\t// current view is \\\"Kriterien ordnen\\\"\\n\\t\\t\\treturn true;\\n\\t\\t\\tbreak;\\n\\t\\tcase 2: // current view is \\\"Alternativen raten\\\"\\n\\t\\t\\treturn true;\\n\\t\\t\\tbreak;\\n\\t\\tcase 3:\\t// current view is \\\"Uebersicht\\\"\\n\\t\\t\\treturn true;\\n\\t\\t\\tbreak;\\n\\t\\tdefault:\\n\\t\\t\\treturn true;\\n\\t}\\n\\treturn true;\\n}\",\n \"function revealAutomation() {\\n reveal('automationActions');\\n reveal('automation');\\n $('#automateInt').click(buildAutomaton('intelligence'));\\n $('#automateTraining').click(buildAutomaton('training'));\\n $('#automateTinkering').click(buildAutomaton('tinkering'));\\n $('#automateScavenging').click(buildAutomaton('scavenging'));\\n}\",\n \"checkResult() {\\n const MAX_ANSWERS_LENGTH = 10;\\n if (this.model.isDead()) {\\n this.loose();\\n } else if (this.model.defineAnswersLength() === MAX_ANSWERS_LENGTH) {\\n this.win();\\n } else {\\n this.startGame();\\n }\\n }\",\n \"function customValidation() {\\n debugger;\\n \\n //Loop through each tactic\\n for( var i = 0; i < campaignItem.get('tactics'); i++ ) {\\n \\n //Switch to the tactic tab\\n var tacticLabel = '#tactic-'+(i+1);\\n tacticCollectionView.switchTab(tacticLabel);\\n \\n //Retrieve the View for the currently selected Tactic Model\\n var currentTactic = Number(tacticCollectionView.activeTab.slice(-2))-1; //Calculate the View that corresponds to the currently active tactic.\\n var thisTacticView = tacticViews[currentTactic];\\n \\n //Alert user and exit if image files have not been uploaded.\\n if( thisTacticView.model.attributes.creatives == \\\"\\\" ) {\\n alert('Tactic #'+ (i+1) +' is missing the creatives (images) required to run the ad. Please click the \\\"Upload files...\\\" button and upload these images.');\\n return false;\\n }\\n \\n //Alert user and exit if hyperlocal target was selected but no lat/longs are provided\\n if( thisTacticView.model.attributes.geoTarget == \\\"hyperlocal\\\" ) {\\n if( thisTacticView.model.attributes.hyper_local_lat.length == 0 ) {\\n alert('A hyperlocal target for tactic #'+ (i+1) +' has been selected, but no Lat/Long coordinates have been provided. Please submit an address to retrieve Lat/Long coordinates.');\\n return false;\\n }\\n \\n //Alert user and exit if geographical target was selected but no zip codes were provided\\n } else {\\n if( thisTacticView.model.attributes.zipcodes.length == 0 ) {\\n alert('A geographical target for tactic #'+ (i+1) +' has been selected, but no zip codes have been provided. Please provide zip codes.');\\n return false;\\n }\\n }\\n \\n }\\n \\n //Return true by default.\\n return true;\\n }\",\n \"function attemptValidation( itcb ) {\\n var fsmName = Y.doccirrus.schemas.activity.getDefaultFSMName();\\n\\n if( explanationsIsTemplate ){\\n activity.explanations = explanationsArray.shift();\\n }\\n Y.doccirrus.fsm[fsmName].validate( user, options, activity, isTest, onValidateComplete );\\n\\n function onValidateComplete( err, result ) {\\n newStatus = result;\\n itcb( err );\\n }\\n }\",\n \"checkDictationImeActive() {\\n assertEquals(\\n this.dictationEngineId,\\n this.mockInputMethodPrivate.getCurrentInputMethodForTest());\\n assertTrue(this.mockLanguageSettingsPrivate.hasInputMethod(\\n this.dictationEngineId));\\n }\",\n \"function verify_result() {\\n grid_end_time = Date.now();\\n trial.grid_rt = grid_end_time - grid_start_time;\\n\\n document.getElementById(\\\"Verify_Test\\\").disabled = true;\\n var index, tile_value, num_wrong=0;\\n\\n // count how many of user_input are hits, misses, false alarms\\n // var hits=0, false_alarms=0, misses=0;\\n for (var i = 0; i < user_input_tile_ids.length; i++) {\\n tile_value = Number(user_input_tile_ids[i]);\\n index = generated_tile_ids.indexOf(tile_value);\\n\\n if (index < 0) {\\n trial.false_alarms += 1;\\n } else {\\n trial.hits += 1;\\n }\\n }\\n trial.misses = generated_tile_ids.length - trial.hits;\\n\\n num_wrong = Math.max(trial.misses, trial.false_alarms);\\n if (num_wrong == 0) {\\n verdict = 'Right';\\n change_score(1);\\n } else if (num_wrong == 1) {\\n verdict = 'Almost';\\n change_score(0.5);\\n } else {\\n verdict = 'Not Quite';\\n change_score(0);\\n }\\n\\n ////////// display Right Almost or Wrong\\n // purge everything except input_verdict\\n // if (trial.cognitive_loading) {\\n // jsPsych.pluginAPI.setTimeout(function() {\\n // display_element.querySelector('#debriefing').style.display = 'none';\\n // }, 0);\\n jsPsych.pluginAPI.setTimeout(function() {\\n display_element.querySelector('#board').style.display = 'none';\\n }, 0);\\n jsPsych.pluginAPI.setTimeout(function() {\\n display_element.querySelector('#board-grid-text').style.display = 'none';\\n }, 0);\\n jsPsych.pluginAPI.setTimeout(function() {\\n display_element.querySelector('#Verify_Test').style.display = 'none';\\n }, 0);\\n // jsPsych.pluginAPI.setTimeout(function() {\\n // display_element.querySelector('#jspsych-html-button-response-prompt').style.display = 'none';\\n // }, 0);\\n // jsPsych.pluginAPI.setTimeout(function() {\\n // display_element.querySelector('#jspsych-html-button-response-rating').style.display = 'none';\\n // }, 0);\\n // jsPsych.pluginAPI.setTimeout(function() {\\n // display_element.querySelector('#verdict').style.display = 'block';\\n // }, 0);\\n // }\\n //\\n document.getElementById('input_verdict').innerHTML = verdict ;//+ \\\"
    score: \\\" + num_correct + \\\"
    num_total: \\\" + num_total;\\n\\n jsPsych.pluginAPI.setTimeout(end_trial, 1000); //verdict_feedback_time\\n }\",\n \"function checker () {\\n\\tfinalResult += exercises[pointer].studentAnswer;\\n\\t++pointer;\\n\\tif ( pointer == exercises.length ) {\\n\\t\\talert(\\\"The exam is finished.\\\");\\n\\t\\treturn 0;\\n\\t}\\n\\tnxtbtnContainer.style.display = \\\"none\\\";\\n\\tbuildAndShow();\\n}\",\n \"checkLoadingStatus(){\\n\\t\\t\\tif(this.substancesList.length && this.materialsList.length && this.measureUnitsList.length){\\n\\t\\t\\t\\tthis.currentView = 'analyzes-monitor';\\n\\t\\t\\t\\tthis.fetchAnalyzes();\\n\\t\\t\\t}\\n\\t\\t}\",\n \"function showAnalysis() {\\n var analysis = document.getElementById('analysis');\\n if (analysis) {\\n analysis.style.display = 'block';\\n var distractElem = document.getElementById('distractionsAnalysis');\\n distractElem.innerHTML = `You were distracted a total of ${distractions} times.`;\\n var pomosEstElem = document.getElementById('pomosEst');\\n pomosEstElem.innerHTML = `You estimated that you would take ${totalPomos} pomos (${\\n totalPomos * workingTime\\n } mins).`;\\n var pomosDoneElem = document.getElementById('pomosAnalysis');\\n pomosDoneElem.innerHTML = `You actually took ${pomosFinished} pomos (${\\n pomosFinished * workingTime\\n } mins)!`;\\n }\\n}\",\n \"function answerIsIncorrect () {\\r\\n feedbackForIncorrect();\\r\\n}\",\n \"function hiddenCheck() {\\n if (PlotService.hiddenVector.length > 0) {\\n var vectorStr = PlotService.hiddenVector;\\n // set calculator selections based on the vector string\\n BaseDataFactory.setValues(vectorStr);\\n TemporalDataFactory.setValues(vectorStr);\\n EnvironDataFactory.setValues(vectorStr);\\n vm.setScore(); // call 'main' function to compute scores and display\\n\\n console.log('baseSelect', vm.baseSelect);\\n console.log('temporalSelect', vm.temportalSelect);\\n console.log('environSelect', vm.environSelect);\\n\\n // check for Cve (Vuln) Id and set text/link in model for display\\n vm.cveId = $sce.trustAsHtml(''); // default to nothing\\n if (PlotService.hiddenCve.length > 0) {\\n var cveId = PlotService.hiddenCve;\\n // CVE ID will be displayed in a header as a link\\n var href = '/vuln/detail/' + cveId;\\n var link = '' + cveId + '';\\n vm.cveId = $sce.trustAsHtml(link);\\n }\\n }\\n }\",\n \"function display() {\\n\\n doSanityCheck();\\n initButtons();\\n}\",\n \"clickDisplay(){\\n\\n if(!this.__modelSelect.isSelectedModelReady()){\\n alert(\\\"You Need To Choose A Ready Model First!!!\\\");\\n return;\\n }\\n\\n let idSelected = this.__modelSelect.getSelectedModel();\\n if(idSelected == -1){\\n alert(\\\"You Need To Choose Model First!!!\\\");\\n return;\\n }\\n\\n if(this.__resultData == null ) {\\n alert(\\\"You Need To Upload A Result Data First!!!\\\");\\n return;\\n }\\n\\n //gets the anomaly from server (the response would display the resualt)\\n this.__clientController.getAnomaly(idSelected, this.__resultData);\\n }\",\n \"function C012_AfterClass_Amanda_TestChange() {\\n\\tif (!ActorIsRestrained()) {\\n\\t\\tif ((ActorGetValue(ActorLove) >= 10) || (ActorGetValue(ActorSubmission) >= 10) || Common_ActorIsOwned || Common_ActorIsLover) {\\n\\t\\t\\tif (Common_ActorIsOwned) OverridenIntroText = GetText(\\\"AcceptChangeFromMistress\\\");\\n\\t\\t\\telse \\n\\t\\t\\t\\tif (Common_ActorIsLover) OverridenIntroText = GetText(\\\"AcceptChangeFromLover\\\");\\n\\t\\t\\t\\telse OverridenIntroText = GetText(\\\"AcceptChange\\\");\\n\\t\\t\\tC012_AfterClass_Amanda_CurrentStage = 600;\\n\\t\\t}\\n\\t\\tC012_AfterClass_Amanda_GaggedAnswer();\\n\\t} else OverridenIntroText = GetText(\\\"CannotActWhileRestrained\\\");\\n}\",\n \"function validateInstructionChecks() {\\n \\n instructionChecks = $('#instr').serializeArray();\\n\\n var ok = true;\\n var allanswers = true;\\n if (instructionChecks.length < 2) {\\n alert('Please complete all questions.');\\n allanswers = false;\\n \\n \\n } else {\\n allanswers = true;\\n for (var i = 0; i < instructionChecks.length; i++) {\\n // check for incorrect responses\\n if(instructionChecks[i].value === \\\"incorrect\\\") {\\n alert('At least one answer was incorrect; please read the instructions and try again.');\\n ok = false;\\n break;\\n }\\n }\\n }\\n \\n \\n // goes to next section\\n if (!allanswers) {\\n showInstructionCheck;\\n } else if(!ok) {\\n showInstructions(); \\n } else {\\n hideElements();\\n showDummyVignette(); \\n }\\n}\",\n \"function showAns(show){\\n if (display.innerText === '0'){\\n ans.textContent = 'Ans = 0';\\n } \\n else if (show === 'first'){\\n ans.textContent = `${calculator.numA} ${calculator.operator} ${calculator.numB} =`;\\n }\\n else if (show === 'second'){\\n ans.textContent = `Ans = ${calculator.result}`;\\n }\\n}\",\n \"function Claim()\\r\\n\\t{\\r\\n\\t\\t//Show_Solution(Sudoku_Solution);\\r\\n\\t\\tfor(var i=0; i<3; i++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var j=0; j<3; j++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(Claiming(i,j))\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t}\",\n \"function checkVisibleLines () {\\n\\tif (allVisibleLinesJustified()) {\\n\\t\\t$('#problemButton').show();\\n\\t\\t$('#ruleInstructionsPartial').html('Correct! Click \\\\'Next Line\\\\' to continue.');\\n\\t}\\n}\",\n \"displayOption() {\\n var tmp_show_option = false;\\n for (let check_item of this.check_list) {\\n if (check_item) {\\n tmp_show_option = true;\\n break;\\n }\\n }\\n this.show_option = tmp_show_option;\\n }\",\n \"function checkAnswers() {\\n\\n}\",\n \"validateAttributes() {\\n return this\\n .waitForElementVisible('@productSubtitle', 10000, () => {}, '[STEP] - Product Card Attributes (Brand/Author link) should be displayed')\\n .assert.visible('@productSubtitle');\\n }\",\n \"check_if_passed() {\\n const passed = this.text_area.value === this.text;\\n if (!passed) {\\n console.error(this.describe() + \\\" failed!\\\");\\n }\\n return passed;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"check_if_passed() {\\n const passed = this.input_area.value === this.text;\\n if (!passed) {\\n console.error(this.describe() + \\\" failed!\\\");\\n }\\n return passed;\\n }\",\n \"function isComplete(area) {\\n\\tif (area.expert === undefined) area.expert = 0;\\n\\tif (area.advanced === undefined) area.advanced = 0;\\n\\tif (area.yearlySnowfall === undefined ) area.yearlySnowfall = 0;\\n\\treturn ( area.state && area.vertical && area.skiableAcres );\\n}\",\n \"function testAn() {\\n j = this.id.substring(2);\\n if (document.getElementById(\\\"an\\\" + j).innerText == aArr[j] + \\\" \\\" + data[qNum][\\\"a\\\"][j][\\\"aText\\\"] && data[qNum][\\\"a\\\"][j][\\\"isTrue\\\"] == true) {\\n alert(\\\"right\\\");\\n rightAn++;\\n result();\\n newQ();\\n } else {\\n alert(\\\"wrong\\\");\\n newQ();\\n }\\n }\",\n \"function verify_basin () {\\n var p1 = $('

    Use this point?

    ' +\\n '

    ' + '
    ' +\\n '

    ' \\n );\\n\\n prompt.html(p1);\\n $(p1).find('#p1-yes').click(function (event) {\\n event.preventDefault();\\n select_model();\\n });\\n \\n\\t\\t\\n $(p1).find('#p1-no').click(function (event) {\\n event.preventDefault();\\n resetPrompt();\\n // TODO: do I remove the basin from the display?\\n });\\n \\n }\",\n \"function theInterface(automata){\\n automata.makeSet(\\n {\\n 'name': 'AutoBrowser'\\n\\n }, function(set){\\n\\n set.block.begins('init', function(){\\n\\n })\\n\\n set.block('visit', function(block){\\n block.takes.url();\\n block.outputs(automata.boolean);\\n });\\n\\n set.block('collect', function(block){\\n block.takes(\\n automata\\n .array\\n .contains(automata.string)\\n );\\n });\\n\\n set.block('click', function(block){\\n block.takes(automata.string)\\n block.outputs(automata.boolean);\\n });\\n\\n set.block('enter', function(block){\\n /*\\n * Here is an example of a block that can handle more than one type of input\\n */\\n block.takes( automata.tuple.matches( [automata.string, automata.string] );\\n block.takes( automata.hash.maps(automata.string, automata.string));\\n\\n block.outputs(automata.boolean);\\n });\\n\\n /*\\n set.block('...',...)\\n */\\n\\n });\\n}\",\n \"function showWhatToExpect() {\\n $(\\\"#start-screen\\\").hide();\\n $(\\\"#what-to-expect\\\").show();\\n $(\\\"#tips\\\").hide();\\n $(\\\"#question-display\\\").hide();\\n $(\\\"#question-result-display\\\").hide();\\n $(\\\"#test-result-display\\\").hide();\\n }\",\n \"function showInstructionChecks() {\\n \\n hideElements();\\n $('#instructions').show();\\n $('#instructions').load('html/instructionchecks.html'); \\n $('#next').show();\\n $('#next').click(validateInstructionChecks);\\n}\",\n \"function checkIfLinedUp() {\\n\\n if (nameAnswer.value.toLowerCase() === 'nominal' && ageAnswer.value.toLowerCase() === \\\"continuous\\\" && shoesizeAnswer.value.toLowerCase() === \\\"discrete\\\") {\\n finishPuzzleOne.classList.toggle('hide');\\n window.scrollTo(0,document.body.scrollHeight); //if they are all correct show the next button\\n }\\n }\",\n \"@computed\\n get isAppReady() {\\n if (\\n this.textElements.length != 0 &&\\n this.activeDetailedAnnotations.length != 0 &&\\n !isEmpty(this.activeLayoutedElements) &&\\n this.activeTextGlyphs.length != 0 &&\\n this.activeFilters.length != 0\\n ) {\\n return true;\\n } else {\\n return false;\\n }\\n }\",\n \"isDeterministicComplete() {\\r\\n let isDeterministic = this.isDeterministic();\\r\\n if (!isDeterministic) return false;\\r\\n\\r\\n // Each pair (state, symbol) must have an image by transition function\\r\\n for (let index = 0; index < this.states.length; index++) {\\r\\n const state = this.states[index];\\r\\n for (const symbol of this.alphabet) {\\r\\n if (this.transition(state, symbol) == null)\\r\\n return false;\\r\\n }\\r\\n }\\r\\n\\r\\n return true;\\r\\n }\",\n \"checkAns() {\\n let rightCnt = this.computeScore();\\n alert(rightCnt + \\\" out of \\\" + this.state.questionArray.length + \\\" are correct\\\");\\n }\",\n \"async vlidatePresenceOfElements () {\\n await expect(await (await this.inputUsername).isDisplayed()).toBe(true);\\n await expect(await (await this.inputPassword).isDisplayed()).toBe(true);\\n // check if submit button is displayed or not\\n await expect(await (await this.btnSubmit).isDisplayed()).toBe(true);\\n // check if submit button is clickable or not\\n await expect(await (await this.btnSubmit).isClickable()).toBe(true);\\n }\",\n \"function isTautology(results){\\r\\n for (var i= 0; i < results.length; i++) if (results[i] == 0) return false;\\r\\n return true;\\r\\n}\",\n \"function show_verify_meta_modal() {\\n // Save all inputs.\\n save_proj();\\n\\n // Then, convert to proj object.\\n convert_all_meta_inputs();\\n\\n // Verify.\\n var check_meta_modal = $('#check_meta_modal');\\n var choose_controls_modal = $('#choose_controls_modal');\\n var valid = validate_all_meta_inputs(check_meta_modal);\\n\\n // Depending on whether or not all the input is valid,\\n // show different modal.\\n if (valid) {\\n var new_modal = choose_controls_modal.clone();\\n\\n set_chars_details_to_samples();\\n set_choose_controls_modal(new_modal, proj.factors);\\n new_modal.modal('show');\\n } else {\\n check_meta_modal.modal('show');\\n }\\n}\",\n \"function validateCheckForAffil(){\\n if (!checkAffilName.value) {\\n atmWindow.document.getElementById(\\\"checkAffilNameError_atm\\\").style.display = \\\"block\\\";\\n } else {\\n atmWindow.document.getElementById(\\\"checkAffilNameError_atm\\\").style.display = \\\"none\\\";\\n checkForAffiliate(checkAffilName.value);\\n }\\n }\",\n \"show() {\\n this.printUi();\\n this.rl.question(\\\"> \\\", term => {\\n let matchingEntries = this.compareSearchWords(term, [\\\"go get milk\\\", \\\"something\\\", \\\"milk\\\", \\\"grab food\\\"]); //TODO connect to State**\\n this.printResultsUi(term, matchingEntries);\\n this.rl.question(\\\"Enter to return to the main screen. \\\", () => {\\n const screen = new MainScreen(this.rl, this.state);\\n screen.show();\\n });\\n });\\n }\",\n \"function elementSelectedAmbience(){\\r\\n\\tvar choice = document.form.ambience.value;\\r\\n\\tif(choice == \\\"Any\\\"){\\r\\n\\t\\tambience = \\\"InOut\\\" + \\\"\\\\n \\\";\\r\\n\\t\\tenglishAmbience= \\\"Indoors or Outdoors\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\tambience = \\\"\\\" + choice + \\\"\\\" + \\\"\\\\n \\\";\\r\\n\\t\\tenglishAmbience = choice + \\\"doors\\\";\\r\\n\\t}\\r\\n\\tcreateRuleML();\\r\\n}\",\n \"function checkInstruction() {\\n if(allInstuctions.length>0){\\n if (allInstuctions[allInstuctions.length - 1].questions.length === 0) {\\n warningModal(eachInsMustHaveOneQ)\\n } else {\\n $('#modal-instruction').modal(\\\"show\\\");\\n }\\n }else {\\n $('#modal-instruction').modal(\\\"show\\\");\\n }\\n \\n}\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"function shouldCompute(cues) {\\n for (var i = 0; i < cues.length; i++) {\\n if (cues[i].hasBeenReset || !cues[i].displayState) {\\n return true;\\n }\\n }\\n return false;\\n }\",\n \"isDeterministic() {\\r\\n for (let index = 0; index < this.states.length; index++) {\\r\\n const state = this.states[index];\\r\\n for (const symbol of this.alphabet) {\\r\\n if (Array.isArray(this.transition(state, symbol)))\\r\\n return false;\\r\\n }\\r\\n }\\r\\n\\r\\n return true;\\r\\n }\",\n \"function checkSituationValid() {\\n\\t\\tvar list = document.getElementById(\\\"r4\\\");\\n\\t\\tvar length = document.getElementById(\\\"situationArea\\\").value.length;\\n\\t\\tif(length == 0) {\\n\\t\\t\\tsituationValid = true; //situationValid\\n\\t\\t\\t//alert(\\\"in situation: \\\"+originalStuaInfo);\\n\\t\\t\\tlist.innerHTML = originalStuaInfo; //originalStuaInfo\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t//alert(\\\"in\\\");\\n\\t\\tif(length <= 240) {\\n\\t\\t\\tlist.innerHTML = \\\"Perfect! totally \\\"+length+\\\" characters!\\\";\\n\\t\\t\\tsituationValid = true;\\n\\t\\t} else {\\n\\t\\t\\tlist.innerHTML = \\\"Sorry! you have already written \\\"+length+\\\" characters. The length should be less than 240 characters\\\";\\n\\t\\t\\tsituationValid = false;\\n\\t\\t}\\n\\t}\",\n \"function theImplementation(automata){\\n\\n}\",\n \"function shouldBeVisible() {\\n return visibleValues > 1;\\n}\",\n \"hasNext() {\\n //don't let the next display if there's (mandatory) choices to make\\n if (this.hasChoices()) {return false;}\\n let check = this.getNextLineIndex() || this.getNextDialogueIndex() || this.getNextSceneIndex();\\n if (check) {return check;} else {return false;}\\n }\",\n \"function isDisplayed(pIndex){\\n var lDisplay = ( pIsWizard ? pAttributeList[pIndex].showInWizard : true ),\\n lValue,\\n lDependingOnExpr,\\n lIsMultiValue;\\n\\n // check if attribute should always be excluded (for example because of component type)\\n if ( lDisplay && pAttributeList[pIndex].isExcluded === true ) {\\n lDisplay = false;\\n }\\n\\n // check ui type if available\\n if ( lDisplay && pUiType && pAttributeList[pIndex].supportedUiTypes ) {\\n lDisplay = ( apex.jQuery.inArray( pUiType, pAttributeList[pIndex].supportedUiTypes.split( \\\":\\\" )) !== -1 );\\n }\\n\\n // check condition\\n if ( lDisplay && pAttributeList[pIndex].dependingOnAttrSeq && pAttributeList[pIndex].dependingOnCondType) {\\n\\n // recursive call to check the whole dependency chain\\n // Note: we have to use -1 because the array starts with 0\\n lDisplay = isDisplayed(parseInt(pAttributeList[pIndex].dependingOnAttrSeq, 10)-1);\\n // only if all parents are displayed, we check the current attribute as well\\n if (lDisplay) {\\n lValue = $v(lPrefix+pAttributeList[pIndex].dependingOnAttrSeq);\\n lDependingOnExpr = pAttributeList[pIndex].dependingOnExpr;\\n // Note: we have to use -1 because the array starts with 0 and dependingOnAttrSeq uses the original attribute seq\\n // which starts with 1\\n lIsMultiValue = pAttributeList[parseInt(pAttributeList[pIndex].dependingOnAttrSeq, 10)-1].type === \\\"CHECKBOXES\\\"?true:false;\\n\\n if (lIsMultiValue) {\\n lValue = (lValue === \\\"\\\"?[]:lValue.split(\\\":\\\"));\\n }\\n\\n switch (pAttributeList[pIndex].dependingOnCondType) {\\n case 'EQUALS':\\n if (lIsMultiValue) {\\n lDisplay = (apex.jQuery.inArray(lDependingOnExpr, lValue) != -1);\\n } else {\\n lDisplay = (lValue === lDependingOnExpr);\\n }\\n break;\\n case 'NOT_EQUALS':\\n if (lIsMultiValue) {\\n lDisplay = (apex.jQuery.inArray(lDependingOnExpr, lValue) === -1);\\n } else {\\n lDisplay = (lValue !== lDependingOnExpr);\\n }\\n break;\\n case 'IN_LIST':\\n lDependingOnExpr = lDependingOnExpr.split(',');\\n if (lIsMultiValue) {\\n lDisplay = false;\\n // Check if any of the values in the value array equals any of\\n // the values in the depending on expression array\\n apex.jQuery.each(lValue, function(pIndex, pValue) {\\n lDisplay = (apex.jQuery.inArray(pValue, lDependingOnExpr) !== -1);\\n // If result is true, then exit iterator.\\n if (lDisplay) { return false; };\\n });\\n } else {\\n lDisplay = (apex.jQuery.inArray(lValue, lDependingOnExpr)!==-1);\\n }\\n break;\\n case 'NOT_IN_LIST':\\n lDependingOnExpr = lDependingOnExpr.split(',');\\n if (lIsMultiValue) {\\n lDisplay = true;\\n // Check if any of the values in the value array do not\\n // equal any the values in the depending on expression array.\\n apex.jQuery.each(lValue, function(pIndex, pValue) {\\n lDisplay = (apex.jQuery.inArray(pValue, lDependingOnExpr) === -1);\\n if (!lDisplay) { return false; };\\n });\\n } else {\\n lDisplay = (apex.jQuery.inArray(lValue, lDependingOnExpr)===-1);\\n }\\n break;\\n case 'NULL':\\n if (lIsMultiValue) {\\n lDisplay = (lValue.length === 0);\\n } else {\\n lDisplay = !(lValue);\\n }\\n break;\\n case 'NOT_NULL':\\n if (lIsMultiValue) {\\n lDisplay = (lValue.length > 0);\\n } else {\\n lDisplay = (lValue);\\n }\\n break;\\n }\\n } else if ( pAttributeList[pIndex].dependingOnAlwaysEval === false ) {\\n lDisplay = true;\\n }\\n }\\n return lDisplay;\\n }\",\n \"resultspage_check() {\\r\\n // funcao validar pagina de resultados\\r\\n cy.get(elements.wordSearched()).should('be.visible')\\r\\n cy.get(elements.quantityResult()).should('be.visible')\\r\\n cy.get(elements.orderingOptions()).should('be.visible')\\r\\n cy.get(elements.productPicture()).should('be.visible')\\r\\n }\",\n \"function checkSequence(){\\n\\t console.log(\\\"checking\\\");\\n\\t if (JSON.stringify(pattern) === JSON.stringify(userPattern)){\\n\\t\\t\\telementScore.innerHTML ++;\\n\\t\\t\\tif(elementHigh.innerHTML < elementScore.innerHTML){\\n\\t\\t\\t elementHigh.innerHTML++;\\n\\t\\t\\t}\\n\\t/* The next level function is called if they are, if not end game.*/\\t\\n\\t\\t \\n\\t\\t console.log(\\\"next\\\");\\n\\t nextLevel();\\n\\t }\\n\\t\\telse {\\n\\t\\t\\n\\t\\t\\tendGame();\\n\\t\\t} \\n }\",\n \"function displayConstraint(bmp_id){\\n\\t\\tif(bmp_id == \\\"4\\\" || bmp_id == \\\"7\\\" || bmp_id == \\\"6\\\"){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\treturn true;\\n\\t}\",\n \"check_if_passed() {\\n const passed = this.node.value === this.correct;\\n if (!passed) {\\n console.error(this.describe() + \\\" failed!\\\");\\n }\\n return passed;\\n }\",\n \"validateButtonsOnForm() {\\n return this\\n .waitForElementVisible('@faqForm')\\n .assert.visible('@faqForm', 'Form is loaded')\\n .waitForElementVisible('@noBtn')\\n .assert.containsText('@noBtn', 'No')\\n .waitForElementVisible('@yesBtn')\\n .assert.containsText('@yesBtn', 'Yes');\\n }\",\n \"function showAttractionResults() {\\n const attractions = document.getElementById('attraction-segment');\\n attractions.style.display = 'block';\\n }\",\n \"function displayInterface() {\\n \\n if (questionCounter > 0) {\\n let selectedQuestion = selectQuestion();\\n console.log(questions.length + \\\"Before shift\\\")\\n populateQuestion(selectedQuestion);\\n populateAnswers(selectedQuestion);\\n }\\n}\",\n \"function validateDatabaseChange()\\r\\n{\\r\\n\\tdatabaseOK = true;\\r\\n\\tvar dnaRecords = document.getElementById(\\\"DNARecords\\\");\\r\\n\\t//walidacja kolejnych bazodanowych sekwencji\\r\\n\\tfor (var i = 0; i < dnaRecords.rows.length; ++i) \\r\\n\\t{\\r\\n\\t\\tif(!validateSequence(dnaRecords.rows[i].cells[0].firstChild.value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tdatabaseOK = false;\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t} \\r\\n }\\r\\n}\",\n \"isQnA(): boolean {\\n return this.type === ClassificationResult.TYPE_QNA;\\n }\",\n \"function BusinessIntelligenceCheck(){}\",\n \"function showAbsenceDetails(nr) {\\nif (nr != undefined) {\\nelementToCheck = nr;\\t\\n} else {\\nelementToCheck = activeElement;\\n}\\ncontent = \\\"Abwesenheit\\\";\\nactiveDataSet = studentList.find(dataset => dataset.absenceId == elementToCheck);\\n//console.log(activeDataSet);\\nif (activeDataSet['ende'] != activeDataSet['beginn']) {\\ncontent += \\\" vom \\\" + formatDateDot(activeDataSet['beginn']) + \\\" bis \\\" +formatDateDot(activeDataSet['ende'])+'';\\t\\n} else {\\ncontent += \\\" am \\\" + formatDateDot(activeDataSet['beginn']) + \\\"\\\";\\t\\n}\\nanzeige = \\\"\\\";\\nif (activeDataSet['adminMeldung'] != 0) {\\nanzeige = \\\"Eintrag Sekretariat am: \\\" + formatDateDot(activeDataSet['adminMeldungDatum'])+'
    ';\\t\\n}\\nif (activeDataSet['lehrerMeldung'] != \\\"0\\\") {\\n\\tif (teacherUser ==1) {\\n\\taddInfo = activeDataSet['lehrerMeldung'] + \\\" (\\\" + formatDateDot(activeDataSet['lehrerMeldungDatum'])+')
    ';\\t\\n\\t} else {\\n\\taddInfo = \\\"Eintrag Lehrkraft (\\\" + formatDateDot(activeDataSet['lehrerMeldungDatum'])+')
    ';\\t\\n\\t}\\n\\tanzeige += addInfo;\\t\\n}\\nif (activeDataSet['elternMeldung'] != \\\"0\\\") {\\nanzeige += \\\"Eintrag Eltern am: \\\" + formatDateDot(activeDataSet['elternMeldungDatum'])+'';\\t\\n}\\nif (activeDataSet['kommentar'] != \\\"\\\") {\\nanzeige += \\\"
    Kommentar: \\\" + activeDataSet['kommentar']+'';\\t\\n}\\nif (activeDataSet['entschuldigt'] != \\\"0000-00-00\\\") {\\nanzeige += \\\"Entschuldigung am: \\\" + formatDateDot(activeDataSet['entschuldigt'])+'';\\t\\n}\\ncontent += '
    ' + anzeige;\\n\\nreturn content;\\t\\n}\",\n \"performFullValidation() {\\r\\n const validateCompleted = this.state.pages[this.state.index].questions.map(\\r\\n (question, index) => {\\r\\n if (!question.required || question.questionType === \\\"Label\\\") {\\r\\n return true;\\r\\n }\\r\\n const answer = this.state.answerIndexes.find(\\r\\n ans => ans.page === this.state.index && ans.qIndex === index\\r\\n );\\r\\n if (!answer || answer.answer === \\\"\\\" || answer.answer === \\\"null\\\") {\\r\\n return false;\\r\\n }\\r\\n return true;\\r\\n }\\r\\n );\\r\\n this.setState({\\r\\n questionsAnswered: validateCompleted\\r\\n });\\r\\n }\",\n \"function compareAO()\\n{\\n var alex = document.getElementById('alex');\\n var olex = document.getElementById('olex');\\n\\n var aval = alex.value.split('\\\\n');\\n var oval = olex.value.split('\\\\n');\\n\\n var identical = 0;\\n var different = 0;\\n\\n var new_text = '';\\n var cor_text = '';\\n\\n for(i=0;i ')[1];\\n var o = oval[i];\\n \\n if(a != o){\\n different += 1;\\n new_text += ohg[i]+' > '+ o + ' ['+a+']\\\\n';\\n }\\n else{\\n identical += 1;\\n cor_text += ohg[i]+' > '+o+'\\\\n';\\n }\\n }\\n var goods = parseInt(identical / (identical + different) * 100);\\n var bads = parseInt(different / (identical + different) * 100);\\n var total = identical + different;\\n\\n results = [goods];\\n\\n document.getElementById('olex').value = new_text;\\n document.getElementById('clex').value = cor_text;\\n document.getElementById('evalu').style.display = 'block';\\n return [identical, different, goods, bads, total];\\n}\",\n \"function showParseTree() {\\n // Hide the answers until the user generates a new expression.\\n $(\\\".new-expression\\\").show();\\n $(\\\".answers\\\").hide();\\n var expression = $(\\\"#\\\"+TreeConstants.ROOT_TAG).text();\\n // Show help if active.\\n TreeConstructor.promptActive = false;\\n var fn = partial(feedbackForAnswer, this.id);\\n TreeConstructor.createParseTree(expression, TreeConstants.ROOT_TAG, fn);\\n }\",\n \"function explainPuzzle(){\\n\\tlet ed = display.explanationDisplay;\\n\\ted.innerHTML = underground.selected.explanationDisplay();\\n}\",\n \"function btnDisplay(){\\n if(strValidation && motValidation && moodClickedValidation)\\n btnToggle.style.display = 'block';\\n}\",\n \"function C012_AfterClass_Amanda_TestSubmit() {\\n\\tif (Common_PlayerOwner != \\\"\\\") {\\n\\t\\tOverridenIntroText = GetText(\\\"AlreadyOwned\\\");\\n\\t} else {\\n\\t\\tif (ActorIsRestrained()) {\\n\\t\\t\\tOverridenIntroText = GetText(\\\"UnrestrainFirst\\\");\\n\\t\\t} else {\\n\\t\\t\\tif (ActorIsChaste()) {\\n\\t\\t\\t\\tOverridenIntroText = GetText(\\\"UnchasteFirst\\\");\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tif (PlayerHasLockedInventory(\\\"Collar\\\")) {\\n\\t\\t\\t\\t\\tOverridenIntroText = GetText(\\\"PlayerUncollarFirst\\\");\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t} else {\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tif (Common_PlayerRestrained) {\\n\\t\\t\\t\\t\\t\\tOverridenIntroText = GetText(\\\"PlayerUnrestrainFirst\\\");\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\tC012_AfterClass_Amanda_CurrentStage = 330;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\",\n \"function verifierMot()\\n{\\n var lemot = \\\"\\\";\\n for(let i=0; i= 3) {\\r\\n writeAward(\\\"No Instruction Needed\\\");\\r\\n payAMT(true,0.20); \\r\\n } else {\\r\\n payAMT(true,0.0); \\r\\n }\\r\\n \\r\\n// quit();\\r\\n \\r\\n}\",\n \"function displayGuide() {\\n my.html.guide.innerHTML = my.current.unit.guide\\n }\",\n \"function checkManipulate(param) {\\n closeOption({});\\n if (gw_com_api.getCRUD(\\\"frmData_MainA\\\") == \\\"none\\\") {\\n gw_com_api.messageBox([{ text: \\\"NOMASTER\\\" }]);\\n return false;\\n }\\n return true;\\n}\",\n \"verifySectorListIsDisplayed(){\\n utils.verifyTheListOfElementsExists(jobsPageLocator.jobsPage.jobsSectorList,sectorList);\\n }\",\n \"function checkAll(){\\n //verificam daca toate intrebarile au fost completate\\n let ok=1;\\n for(let i=0;i<=answersScoreArray.length;i++)\\n if(answersScoreArray[i]===\\\"NULL\\\") {alert('Toate intrebarile sunt obligatorii! Reintoarce-te si completeaza intrebarea '+ (i+1) + \\\"!\\\"); ok=0; break}\\n if(ok===1) show(score);\\n}\",\n \"function showInstructions() {\\r\\n\\tconst INSTRUCTIONS = \\\"1. Identify the morphological boundaries. \\\" \\r\\n\\t\\t\\t\\t\\t + \\\"When you mouse over the word, grey slashes will appear in the spaces between the letters, indicating possible morphological boundaries.

    \\\"\\r\\n\\t\\t\\t\\t\\t + \\\"a. To mark a morphological boundary, click on the space where you think the boundary is using your mouse.

    \\\" \\r\\n\\t\\t\\t\\t\\t + \\\"b. Once you've made your selection, click on the check button to see whether you've identified the boundaries correctly.

    \\\"\\r\\n\\t\\t\\t\\t\\t + \\\"c. If you've selected your boundaries correctly, the morphological categories of the word's components will automatically appear above the word.\\\"\\r\\n\\t\\t\\t\\t\\t + \\\"If you haven't, you will be given the opportunity to try again \\\"\\r\\n\\t\\t\\t\\t\\t + \\\"(remember, after three tries, the program will provide the correct answer).\\\"; \\r\\n\\tshowModal(INSTRUCTIONS, false);\\r\\n}\",\n \"function checkIterationFormInfo(objData){\\n\\t\\n\\tif (objData.length < 16) {\\n\\t\\talert(\\\"Please answer all questions before finishing the experiment\\\");\\n\\t\\treturn false;\\n\\t}\\n\\n\\tfor (var i = 0; i < objData.length; i++) {\\n\\t\\tif (objData[i].value == \\\"\\\"){\\n\\t\\t\\talert(\\\"Please answer question: \\\" + objData[i].name);\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\\n\\treturn true;\\n}\",\n \"function check() {\\n var enabled = true;\\n if (!UI.GetValue(\\\"Misc\\\", \\\"JAVASCRIPT\\\", \\\"Script items\\\", \\\"Show Fixes\\\")) {\\n var enabled = false;\\n }\\n UI.SetEnabled(\\\"MISC\\\", \\\"JAVASCRIPT\\\", \\\"Script items\\\", \\\"No FakeLag With Nades Out\\\", enabled);\\n UI.SetEnabled(\\\"MISC\\\", \\\"JAVASCRIPT\\\", \\\"Script items\\\", \\\"No FakeLag With Revolver\\\", enabled);\\n UI.SetEnabled(\\\"MISC\\\", \\\"JAVASCRIPT\\\", \\\"Script items\\\", \\\"No AA on knife fix\\\", enabled);\\n if (UI.GetValue(\\\"Misc\\\", \\\"JAVASCRIPT\\\", \\\"Script items\\\", \\\"No FakeLag With Nades Out\\\") || GetValue(\\\"Misc\\\", \\\"JAVASCRIPT\\\", \\\"Script items\\\", \\\"No FakeLag With Revolver\\\")) {\\n LagFix();\\n }\\n if (UI.GetValue(\\\"Misc\\\", \\\"JAVASCRIPT\\\", \\\"Script items\\\", \\\"No AA on knife fix\\\")) {\\n knifeFix();\\n }\\n}\",\n \"function C012_AfterClass_Amanda_TestDomme() {\\n\\tif (!ActorIsGagged()) {\\n\\t\\tif (!Common_ActorIsOwned) {\\n\\t\\t\\tif (PlayerHasInventory(\\\"Collar\\\")) {\\n\\t\\t\\t\\tif (ActorGetValue(ActorSubmission) >= 20) {\\n\\t\\t\\t\\t\\tif (!GameLogQuery(CurrentChapter, CurrentActor, \\\"EnslaveDone\\\")) {\\n\\t\\t\\t\\t\\t\\tC012_AfterClass_Amanda_CurrentStage = 200;\\n\\t\\t\\t\\t\\t\\tOverridenIntroText = \\\"\\\";\\n\\t\\t\\t\\t\\t\\tLeaveIcon = \\\"\\\";\\n\\t\\t\\t\\t\\t\\tGameLogAdd(\\\"EnslaveDone\\\");\\n\\t\\t\\t\\t\\t} else OverridenIntroText = GetText(\\\"EnslaveAlreadyTried\\\");\\n\\t\\t\\t\\t}\\n\\t\\t\\t} else OverridenIntroText = GetText(\\\"CollarToEnslave\\\");\\n\\t\\t} else OverridenIntroText = GetText(\\\"SubEnjoyBondage\\\");\\n\\t} else C012_AfterClass_Amanda_GaggedAnswer();\\n}\",\n \"function showTestingResults(state) {\\n switch(state) {\\n case 'device-error':\\n document.getElementById('if-not-posible').classList.remove('is-hidden');\\n document.getElementById('deviceError').classList.remove('is-hidden');\\n break;\\n case 'software-error':\\n document.getElementById('if-not-posible').classList.remove('is-hidden');\\n document.getElementById('softwareError').classList.remove('is-hidden');\\n break;\\n case 'hardware-error':\\n document.getElementById('if-not-posible').classList.remove('is-hidden');\\n document.getElementById('hardwareError').classList.remove('is-hidden');\\n break;\\n case 'all-right':\\n document.getElementById('if-possible').classList.remove('is-hidden');\\n my_init();\\n break;\\n } \\n}\",\n \"function show() {\\n return vm.error == \\\"\\\";\\n }\",\n \"function validate() {\\r\\n\\r\\n\\r\\n \\r\\n // set the progress of the background\\r\\n progress.style.width = ++position * 100 / questions.length + 'vw'\\r\\n\\r\\n // if there is a new question, hide current and load next\\r\\n if (questions[position]) hideCurrent(putQuestion)\\r\\n else hideCurrent(done)\\r\\n \\r\\n \\r\\n\\r\\n }\",\n \"function check(){\\n\\tvar correct = 0;\\n\\t\\tfor(var i = 0; i < sequencePlayer.length; i++){\\n\\t\\t\\tif(sequencePlayer[i] == sequence[i]){\\n\\t\\t\\t\\tcorrect++;\\t\\t\\t\\t\\n\\t\\t\\t}else{\\n\\t\\t\\t\\tsound(soundLost);\\n\\t\\t\\t\\ticonTimes();\\n\\t\\t\\t\\tplusOn = true;\\n\\t\\t\\t}//else\\n\\t\\t\\t\\t\\n\\t\\t\\tif((correct > 0) && (correct == sequence.length)){\\n\\t\\t\\t\\tsound(soundGood);\\n\\t\\t\\t\\ticonCheck();\\n\\t\\t\\t\\tsequencePlayer = [];\\n\\t\\t\\t\\tuseLife = false;\\n\\t\\t\\t\\tchoices = document.getElementById(\\\"No\\\");\\n\\t\\t\\t\\tchoices.innerHTML = click;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\ton = false;\\n\\t\\t\\t\\tplayOn = false;\\n\\t\\t\\t\\tplusOn = true;\\n\\t\\t\\t\\tnoLifemode = true;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\tif(counter > highScore){\\n\\t\\t\\t\\thighScore = counter;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}//if2\\n\\t\\t}//for\\n}//check()\",\n \"function checkResultsCount() {\\n // get all rules from ui\\n var rules = document.getElementsByClassName('ruleEntry');\\n // set up rules shown counter\\n var resultsCounter = 0;\\n // step trough all the rules\\n for (var i = 0; i < rules.length; i++) {\\n // if rule is shown increase repo shown counter\\n if (rules[i].style.display != 'none') {\\n resultsCounter++;\\n }\\n }\\n // if rule shown counter is 0 (no rules displayed) show no rules found exception\\n if (resultsCounter == 0) {\\n document.getElementById('noEntries').style.display = 'block';\\n // else hide exception\\n } else {\\n document.getElementById('noEntries').style.display = 'none';\\n }\\n}\",\n \"function processAnswer(finalTestData) {\\n\\tlet userAnswer = editor.getValue();\\n\\tlet finalTest = finalTestData.data.attributes.finalText;\\n\\n\\tcheckAnswer(userAnswer, finalTest);\\n}\",\n \"function verifierEquation(item,min,max,numberDisplay) {\\n\\t\\n\\tvar reponseUser = item.innerHTML;\\n\\tvar nbr1 = parseInt(document.getElementById(\\\"nbr1\\\").innerHTML);\\n\\tvar nbr2 = parseInt(document.getElementById(\\\"nbr2\\\").innerHTML);\\n\\tvar signe = document.getElementById(\\\"signe\\\").innerHTML;\\n\\t\\n\\tclearAnswer(numberDisplay);\\n\\t\\n\\tvar reponseEquation = calculEquation(nbr1,nbr2,signe);\\n\\t\\n\\tif (reponseUser == reponseEquation) {\\n\\t\\t\\n\\t\\tdisplayAfterGoodAnswer(reponseEquation)\\n\\t\\t\\n\\t\\tnumberGoodAnswer ++; \\n\\t\\tnumberTotalAnswer ++;\\n\\t\\t\\n\\t\\tafficheNumberGoodAnswer();\\n\\t\\t\\n\\t\\tsetTimeout(load_game_mathEquation, 2000, signe,min,max,numberDisplay);\\n\\t}else {\\n\\n\\t\\tdisplayAfterBadAnswer(reponseEquation)\\n\\t\\t \\n\\t\\tnumberTotalAnswer ++;\\n\\t\\t\\t\\n\\t\\tafficheNumberGoodAnswer();\\n\\t\\t\\n\\t\\tsetTimeout(load_game_mathEquation, 2000, signe,min,max,numberDisplay);\\n\\t}\\t\\n}\",\n \"async function verifyAnonymity(page) {\\n logger.info(\\\"Running anonymity tests..\\\", { category: \\\"stealthCheck\\\" });\\n\\n const intoliTest = await runIntoliTest(page);\\n const antoineTest = await runAntoineVastelTest(page);\\n\\n logger.info(\\\"All tests ran succesfully\\\", { category: \\\"stealthCheck\\\" });\\n\\n return { intoliTest, antoineTest };\\n}\",\n \"function ko_check() {\\n if (current_character.KO) {\\n readNextToken();\\n } else if (current_character === fighter) {\\n $('#turnAnnouncer').html(\\\"It's FIGHTER'S turn!\\\");\\n } else if (current_character === whiteMage) {\\n $('#turnAnnouncer').html(\\\"It's WHITE MAGE'S turn!\\\");\\n } else if (current_character === blackMage) {\\n $('#turnAnnouncer').html(\\\"It's BLACK MAGE'S turn!\\\");\\n } else if (current_character === titan) {\\n $('#turnAnnouncer').html(\\\"The enemy is going to attack!\\\");\\n }\\n}\",\n \"function checkIfDone(){\\n\\tif(remainingSlides === 0 | remainingSlides < 0){\\n\\t\\tconsole.log(\\\"DONE\\\");\\n\\t\\t$(\\\"#quiz\\\").css(\\\"display\\\", \\\"none\\\");\\n\\t\\t$(\\\"#results\\\").css(\\\"display\\\", \\\"block\\\");\\n\\t\\tvar totalAgainstNN = liked/totalSlides*100;\\n\\t\\tif (totalAgainstNN >= 50.0){\\n\\t\\t\\t$(\\\"#foragainst\\\").text(\\\"for\\\");\\n\\t\\t\\t$(\\\"#foragainst2\\\").text(\\\"for\\\");\\n\\t\\t\\t$(\\\"#magicNum\\\").text(Math.round(totalAgainstNN));\\n\\t\\t\\t$(\\\"#folksAgainstNN\\\").css(\\\"display\\\", \\\"block\\\");\\n\\t\\t} else {\\n\\t\\t\\t$(\\\"#foragainst\\\").text(\\\"against\\\");\\n\\t\\t\\t$(\\\"#foragainst2\\\").text(\\\"against\\\");\\n\\t\\t\\t$(\\\"#magicNum\\\").text(Math.round(100-totalAgainstNN));\\n\\t\\t\\t$(\\\"#folksForNN\\\").css(\\\"display\\\", \\\"block\\\");\\n\\t\\t}\\n\\t}\\n}\",\n \"function showAbsenceDetails(nr) {\\nif (nr != undefined) {\\nelementToCheck = nr;\\t\\n} else {\\nelementToCheck = activeElement;\\n}\\ncontent = \\\"Abwesenheit\\\";\\nactiveDataSet = studentList.find(dataset => dataset.absenceId == elementToCheck);\\n\\nif (activeDataSet['ende'] != activeDataSet['beginn']) {\\ncontent += \\\" vom \\\" + formatDateDot(activeDataSet['beginn']) + \\\" bis \\\" +formatDateDot(activeDataSet['ende'])+'';\\t\\n} else {\\ncontent += \\\" am \\\" + formatDateDot(activeDataSet['beginn']) + \\\"\\\";\\t\\n}\\nanzeige = \\\"\\\";\\nif (activeDataSet['adminMeldung'] != 0) {\\nanzeige = \\\"Eintrag Sekretariat am: \\\" + formatDateDot(activeDataSet['adminMeldungDatum'])+'
    ';\\t\\n}\\nif (activeDataSet['beurlaubt'] == 0) {\\n\\tif (activeDataSet['lehrerMeldung'] != \\\"0\\\") {\\n\\tanzeige += \\\"Meldung Lehrer am: \\\" + formatDateDot(activeDataSet['lehrerMeldungDatum'])+'
    ';\\t\\n\\t}\\n\\tif (activeDataSet['elternMeldung'] != \\\"0\\\") {\\n\\tanzeige += \\\"Eintrag Eltern am: \\\" + formatDateDot(activeDataSet['elternMeldungDatum'])+'';\\t\\n\\t}\\n\\tif (activeDataSet['entschuldigt'] != \\\"0000-00-00\\\") {\\n\\tanzeige += \\\"Entschuldigung am: \\\" + formatDateDot(activeDataSet['entschuldigt'])+'';\\t\\n\\t}\\t\\n}\\nif (activeDataSet['kommentar'] != \\\"\\\") {\\nanzeige += \\\"Kommentar: \\\" + activeDataSet['kommentar'];\\t\\n}\\ncontent += '
    ' + anzeige;\\n\\nreturn content;\\t\\n}\",\n \"function checkIfComplete(){\\n\\t\\tif(isComplete == false){\\n\\t\\t\\tisComplete = true;\\n\\t\\t} else {\\n\\t\\t\\tplace = ' SEGUNDO ';\\n\\t\\t}\\n\\t}\",\n \"check_if_passed() {\\n const passed = this.text_node.textContent === this.correct;\\n if (!passed) {\\n console.error(this.describe() + \\\" failed! ('\\\" + this.text_node.textContent + \\\"' != '\\\" + this.correct + \\\"')\\\");\\n }\\n return passed;\\n }\"\n]"},"negative_scores":{"kind":"list like","value":["0.5910028","0.5820131","0.5729723","0.5710434","0.56639796","0.56508213","0.5616431","0.5499719","0.5447277","0.5445098","0.54385877","0.5430272","0.54191184","0.5417161","0.541713","0.5388745","0.5355606","0.5343009","0.53365827","0.5327624","0.5322725","0.5310115","0.52940434","0.5291848","0.5288364","0.5261933","0.524847","0.5227953","0.52274364","0.5220843","0.52183074","0.52181774","0.52144223","0.5212761","0.5209653","0.52089196","0.5200811","0.5187177","0.5171124","0.51556104","0.51423216","0.5139949","0.5139283","0.5126061","0.512201","0.512201","0.512201","0.512201","0.512201","0.5118805","0.5118805","0.5118805","0.5118805","0.5118805","0.51146275","0.509476","0.5093573","0.50893426","0.50891215","0.5088681","0.50885427","0.5086255","0.50829196","0.50813925","0.5078751","0.50537795","0.5052317","0.50511557","0.5050656","0.5044242","0.5030571","0.5027812","0.50272757","0.5024347","0.50170714","0.5013227","0.5012527","0.5005607","0.50041753","0.500119","0.5000841","0.49963325","0.49945635","0.4990778","0.49867406","0.49865144","0.49824858","0.49810696","0.49810618","0.49800512","0.49776012","0.49735418","0.49733546","0.49721706","0.49710923","0.4969756","0.49667186","0.49580342","0.49543908","0.4941836"],"string":"[\n \"0.5910028\",\n \"0.5820131\",\n \"0.5729723\",\n \"0.5710434\",\n \"0.56639796\",\n \"0.56508213\",\n \"0.5616431\",\n \"0.5499719\",\n \"0.5447277\",\n \"0.5445098\",\n \"0.54385877\",\n \"0.5430272\",\n \"0.54191184\",\n \"0.5417161\",\n \"0.541713\",\n \"0.5388745\",\n \"0.5355606\",\n \"0.5343009\",\n \"0.53365827\",\n \"0.5327624\",\n \"0.5322725\",\n \"0.5310115\",\n \"0.52940434\",\n \"0.5291848\",\n \"0.5288364\",\n \"0.5261933\",\n \"0.524847\",\n \"0.5227953\",\n \"0.52274364\",\n \"0.5220843\",\n \"0.52183074\",\n \"0.52181774\",\n \"0.52144223\",\n \"0.5212761\",\n \"0.5209653\",\n \"0.52089196\",\n \"0.5200811\",\n \"0.5187177\",\n \"0.5171124\",\n \"0.51556104\",\n \"0.51423216\",\n \"0.5139949\",\n \"0.5139283\",\n \"0.5126061\",\n \"0.512201\",\n \"0.512201\",\n \"0.512201\",\n \"0.512201\",\n \"0.512201\",\n \"0.5118805\",\n \"0.5118805\",\n \"0.5118805\",\n \"0.5118805\",\n \"0.5118805\",\n \"0.51146275\",\n \"0.509476\",\n \"0.5093573\",\n \"0.50893426\",\n \"0.50891215\",\n \"0.5088681\",\n \"0.50885427\",\n \"0.5086255\",\n \"0.50829196\",\n \"0.50813925\",\n \"0.5078751\",\n \"0.50537795\",\n \"0.5052317\",\n \"0.50511557\",\n \"0.5050656\",\n \"0.5044242\",\n \"0.5030571\",\n \"0.5027812\",\n \"0.50272757\",\n \"0.5024347\",\n \"0.50170714\",\n \"0.5013227\",\n \"0.5012527\",\n \"0.5005607\",\n \"0.50041753\",\n \"0.500119\",\n \"0.5000841\",\n \"0.49963325\",\n \"0.49945635\",\n \"0.4990778\",\n \"0.49867406\",\n \"0.49865144\",\n \"0.49824858\",\n \"0.49810696\",\n \"0.49810618\",\n \"0.49800512\",\n \"0.49776012\",\n \"0.49735418\",\n \"0.49733546\",\n \"0.49721706\",\n \"0.49710923\",\n \"0.4969756\",\n \"0.49667186\",\n \"0.49580342\",\n \"0.49543908\",\n \"0.4941836\"\n]"},"document_score":{"kind":"string","value":"0.70362014"},"document_rank":{"kind":"string","value":"0"}}},{"rowIdx":81351,"cells":{"query":{"kind":"string","value":"get current location data"},"document":{"kind":"string","value":"function getWeatherByCoords(position) {\n let apiKey = \"0ae703064e17d8cb6a410a5138e15a28\";\n let apiUrl = \"https://api.openweathermap.org/data/2.5/weather?\";\n let lat = position.coords.latitude;\n let lon = position.coords.longitude;\n\n axios\n .get(`${apiUrl}lat=${lat}&lon=${lon}&appid=${apiKey}&units=metric`)\n .then(showTemperature);\n}"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["function getLocation() {\n\t\tTitanium.Geolocation.getCurrentPosition( updatePosition );\n\t}","function getcurentposition() {\n\tnavigator.geolocation.getCurrentPosition(GeoOnSuccess, GeoOnError, {enableHighAccuracy: true});\n}","function getLocation() {\n\tif (navigator.geolocation) {\n\t\tnavigator.geolocation.getCurrentPosition(postLocation, showError);\n\t}\n}","function getLocation() {\n return location;\n }","function getCurrentLocation() {\n lat = localStorage.getItem(\"lat\");\n long = localStorage.getItem(\"long\");\n if (!lat || !long)\n window.navigator.geolocation.getCurrentPosition(processLocation);\n else getWeatherData();\n}","function GetLocation(){\n\tif(navigator.geolocation){\n\t\tnavigator.geolocation.getCurrentPosition(setLocation);\n\t}\n}","function getBrowserGeoLoc(){\n getLocation();\n showPosition();\n }","function getLoc() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(success, getError);\n }\n\n else {\n console.log(\"Geolocation is not supported by this browser\");\n defaultLoc();\n }\n}","function GetCurrentLocation() {\n // chek deafault user coordinates\n if (Modernizr.geolocation) {\n navigator.geolocation.getCurrentPosition(success, options);\n var options = {\n enableHighAccuracy: true,\n timeout: 5000,\n maximumAge: 0\n };\n function success(pos) {\n var crd = pos.coords;\n // transfer current user coordinates to default\n window.centerLat = crd.latitude;\n window.centerLng = crd.longitude;\n }\n } else {\n console.log('location error');\n }\n} // GetCurrentLocation","static getCurrentLocLS(){\r\n let loc = {\r\n city : 'Toronto',\r\n country : 'CA'\r\n };\r\n\r\n if (localStorage.getItem('currLocation')) {\r\n return (JSON.parse(localStorage.getItem('currLocation')));\r\n } else {\r\n return (loc)\r\n } \r\n }","function getLocation() {\n navigator.geolocation.getCurrentPosition(function(position) {\n lat = position.coords.latitude;\n lon = position.coords.longitude;\n console.log('lat =' + lat + ', lon =' + lon);\n });\n }","function getLocation() {\n var currentLon = \"\";\n var currentLat = \"lat=\";\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function(loc) {\n //set currentLon & currentLat\n currentLon += loc.coords.longitude;\n currentLat += loc.coords.latitude;\n //fucntions called built on longitude and latitude location\n buildApi(currentLon, currentLat);\n //drawCoords(currentLon, currentLat);\n });\n } else {\n alert(\"You're lost and we can't find you.\");\n }\n }","function getLocation(){\n\t\t\tif(navigator.geolocation){\n\t\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tdisplayCoords.innerHTML=\"Geolocation API not supported by your browser\";\n\t\t\t}\n\t\t\t\n\t\t}","function getGeoLocation(){\n //Getting current position \n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function(position) {\n var pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n this.currentPosMark = new google.maps.Marker({\n position: pos,\n map: this.map,\n icon: this.iconTypes['beachFlag'],\n animation: google.maps.Animation.DROP,\n title: 'You are here!'\n });\n infoWindow.setPosition(pos);\n infoWindow.setContent('You are here');\n //infoWindow.open(map);\n map.setCenter(pos);\n }, function() {\n handleLocationError(true, infoWindow, this.map.getCenter());\n });\n } else {\n // Browser doesn't support Geolocation\n handleLocationError(false, infoWindow, this.map.getCenter());\n }\n }","getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(objGeolocation.bundleObj, objGeolocation.handelError)\n } else {\n console.log('Geolocation is not supported by this browser');\n }\n }","function geoloc() {\n let coords = navigator.geolocation.getCurrentPosition((pos) => {\n coords = pos;\n let lat = coords.coords.latitude;\n let long = coords.coords.longitude;\n ll = `?_ll=${lat},${long}`;\n document.querySelector(\".change-hour h1 span\").textContent = \"ma position\";\n getDatas(process);\n });\n}","function getCurrentLocation() {\n\tif (!navigator.geolocation) {\n\t\talert(\"GeoLocation is not supported by browser.\");\n\t\treturn;\n\t}\n\treturn navigator.geolocation.getCurrentPosition(coordinates,\n\t\tdisplayErrorMessage);\n}","function getGeoLoc() {\n\n //check if browser can get geolocation\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (pos) {\n //get lat ang lng as obj\n var lat = pos.coords.latitude;\n var lng = pos.coords.longitude;\n\n getData(lat, lng);\n //alert when error happens\n }, function (error) {\n alert('There was an error: ' + error.message);\n });\n }\n }","function getLocation() {\n var geolocation = navigator.geolocation;\n geolocation.getCurrentPosition(showLocation);\n }","getLocation() {\n return this._executeAfterInitialWait(() => this.currently.getLocation());\n }","function getLocation() {\n return findLocation(getStatus());\n}","function currentLocationWeather() {\n // get user's location from the browser\n navigator.geolocation.getCurrentPosition(geolocSuccess, geolocError);\n}","function getGeoData() {\n\n //determine if the handset has client side geo location capabilities\n if(geo_position_js.init()){\n\tgeo_position_js.getCurrentPosition(\n\t\t\t\t\t function(data){\n\t\t\t\t\t \n\t\t\t\t\t LATITUDE = data.coords.latitude;\n\t\t\t\t\t LONGITUDE = data.coords.longitude;\n\n\t\t\t\t\t },\n\n\t\t\t\t\t function(data){\n\t\t\t\t\t alert('could not retrieve geo data');\n\t\t\t\t\t }\n\t\t\t\t\t );\n }\n else{\n\talert(\"Functionality not available\");\n }\n\n\n\n}","function loadCurrentLoc() {\r\n // show loader\r\n showLoaderAndCleanElements();\r\n\r\n function getPosition() {\r\n return new Promise((resolve, reject) =>\r\n navigator.geolocation.getCurrentPosition(resolve, reject)\r\n );\r\n }\r\n getPosition()\r\n .then((position) => position.coords)\r\n .then((coords) => {\r\n // fetching data - current location\r\n fetchWeatherData(\r\n `https://api.openweathermap.org/data/2.5/weather?lat=${coords.latitude}&lon=${coords.longitude}&units=metric&appid=30c174ec2ba71f992035ddbd346caad7`\r\n );\r\n })\r\n .catch((err) => {\r\n // if user denies geolocation data show weather for London\r\n fetchWeatherData(\r\n `https://api.openweathermap.org/data/2.5/weather?q=London&units=metric&appid=30c174ec2ba71f992035ddbd346caad7`\r\n );\r\n console.error(err.message);\r\n });\r\n}","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(createMap);\n } \n }","getLocationInfo(){\n return this.map.getLocationInfo();\n }","function _getLocation() {\n if (navigator.geolocation) {\n App.Modules.GPS.state=STATES.ON;\n navigator.geolocation.getCurrentPosition(_getLocation_return);\n } else {\n App.Modules.GPS.state=STATES.NOT_SUPPORTED;\n _dispatchUpdateCallbacks( );\n }\n }","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n }\n}","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n }\n}","function getLocation() {\n navigator.geolocation.getCurrentPosition(displayLocation, locationError);\n}","function getLocation() {\n\t\tif (navigator.geolocation) {\n\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);\n\t\t} else {\n\t\t\tconsole.log('No location detected');\n\t\t}\n\t}","function getLocation(location) {\n lat = location.coords.latitude;\n lng = location.coords.longitude;\n }","function getCurrentLocation(){\r\n\tnavigator.geolocation.getCurrentPosition(onSuccess, onError,{ timeout: 5000,enableHighAccuracy: true });\r\n}","function getlocation() {\n \tconsole.log(\"Entering getLocation()\");\n \tif(navigator.geolocation){\n\t\t\tnavigator.geolocation.getCurrentPosition(\n\t\t\tdisplayCurrentLocation,\n\t\t\tdisplayError,\n\t\t\t{ \n\t\t\t\tmaximumAge: 3000, \n\t\t\t\ttimeout: 5000, \n\t\t\t\tenableHighAccuracy: true \n\t\t\t});\n\t\t}else{\n\t\t\t//console.log(\"Oops, no geolocation support\");\n\t\t} \n \t//console.log(\"Exiting getLocation()\");\n }","function getCurrentLocation() {\n \n function success(position) {\n //if permission granted set call [setAddress()] to convert lat and long to street adresss\n lat = position.coords.latitude;\n lon = position.coords.longitude;\n setAddress();\n }\n function denied() {\n // if permission is denied set Ticket Master queries to defualt to \"Washington\"(city) and DC (state)\n // console.log('Unable to retrieve your location');\n searchAddress=\"\";\n searchCity = \"Washington\";\n searchState = \"DC\";\n startPoint = searchCity + \", \" + searchState;\n // Call to main to set defualts other than location [setTime() default && setCategory() defualt]\n main();\n }\n if (!navigator.geolocation) {\n // console.log('Geolocation is not supported by your browser');\n } else {\n // console.log('Locating…');\n navigator.geolocation.getCurrentPosition(success, denied);\n }\n }","function getUserLocation() {\n\tif (navigator.geolocation) {\n\t\tnavigator.geolocation.getCurrentPosition(showUserPosition);\n\t} \n}","function getLocation() {\n // Make sure browser supports this feature\n if (navigator.geolocation) {\n // Provide our showPosition() function to getCurrentPosition\n console.log(navigator.geolocation.getCurrentPosition(showPosition));\n }\n else {\n alert(\"Geolocation is not supported by this browser.\");\n }\n }","function processData(){\n navigator.geolocation.getCurrentPosition(onsuccess, onerror);\n}","function getLocation() {\n navigator.geolocation.getCurrentPosition(geoCallback, onError);\n}","function getLocation() {\n\tif (window.navigator.geolocation) {\n\t\twindow.navigator.geolocation.getCurrentPosition(showPosition);\n\t} else {\n\t\tshowPosition(DEFAULT_POSITION);\n\t}\n}","function getLoc() {\n\n\tif (!navigator.geolocation) {\n\n\t geolocate.innerHTML = 'Geolocation is not available';\n\n\t} else {\n\t \n\t map.locate();\n\n\t console.log(map.locate());\n\t}\n}","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n }\n}","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n }\n}","function getLocation() {\n if (navigator.geolocation) {\n // Nest showPosition inside getLocation\n navigator.geolocation.getCurrentPosition(showPosition);\n } else {\n console.log(\"Geolocation is not supported by this browser.\");\n }\n }","function getLocation(){\r\n if (locationUser) {\r\n locationUser.getCurrentPosition(showPosition);\r\n } else {\r\n return 'Geolocation is not supported by this browser.';\r\n }\r\n}","function obtainGeolocation(){\n window.navigator.geolocation.getCurrentPosition(localitation);\n }","function getPlayerLocation() {\n\t\tTitanium.Geolocation.getCurrentPosition( updatePlayerPosition );\n\t}","get location() {\n\t\treturn this.__location;\n\t}","get location() {\n\t\treturn this.__location;\n\t}","get location() {\n\t\treturn this.__location;\n\t}","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n } else { \n x.innerHTML = \"Geolocation is not supported by this browser.\";\n }\n }","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(getPositionSuccess, getPositionError, getPositionOptions);\n }\n\telse {\n\t\talertify.error(\"Geolocation is not supported for this browser.\");\n\t}\n}","getCurrentLocationInfo(latlng) {\n if (this.settings.useGoogleGeoApi) {\n this._googlePlacesService.getGeoLatLngDetail(latlng).then((result) => {\n if (result) {\n this.setRecentLocation(result);\n }\n this.gettingCurrentLocationFlag = false;\n });\n }\n else {\n this._googlePlacesService.getLatLngDetail(this.settings.geoLatLangServiceUrl, latlng.lat, latlng.lng).then((result) => {\n if (result) {\n result = this.extractServerList(this.settings.serverResponseatLangHierarchy, result);\n this.setRecentLocation(result);\n }\n this.gettingCurrentLocationFlag = false;\n });\n }\n }","getLocation() {\n return this.origin;\n }","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n } else {\n x.innerHTML = \"Geolocation is not supported by this browser.\";\n }\n }","function getLocation() {\n\t if (navigator.geolocation) {\n\t navigator.geolocation.getCurrentPosition(getWeather);\n\t } else {\n\t alert(\"Geolocation is not supported by this browser.\");\n\t }\n\t}","function getCurrentLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n setLocation(position.coords.latitude, position.coords.longitude);\n },\n function (error) {\n console.log(\"Something went wrong: \", error);\n setLocation(DEFAULT_LAT, DEFAULT_LONG);\n },\n {\n timeout:(5 * 1000),\n maximumAge:(1000 * 60 * 15),\n enableHighAccuracy:true\n }\n );\n }\n }","function getLocation(location) {\n\t lat = location.coords.latitude;\n\t lng = location.coords.longitude;\n\t\tgetVenues();\n\t}","get location () {\n\t\treturn this._location;\n\t}","function getUsersCurrentLocation() {\n\n if (window.navigator && window.navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(success);\n } else {\n console.log(\"Geolocation is not supported by this browser.\");\n }\n\n function success(position) {\n\n console.log(position.coords.latitude + position.coords.longitude);\n\n var currentImg = {\n url: \"./Assets/Images/currentLocationMarker.png\", // url\n scaledSize: new google.maps.Size(40, 50), // scaled size\n origin: new google.maps.Point(0,0), // origin\n anchor: new google.maps.Point(0, 0) // anchor\n };\n\n var userLatLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\n new google.maps.Marker({\n position: userLatLng,\n title: 'Me',\n map: map,\n icon: currentImg\n });\n }\n}","function getLocation() {\n if (navigator.geolocation) {\n let newLocation = navigator.geolocation.getCurrentPosition(function (\n position\n ) {\n lat = position.coords.latitude;\n long = position.coords.longitude;\n console.log(position);\n console.log(lat);\n console.log(long);\n });\n }\n}","function getLocation() {\n window.navigator.geolocation.getCurrentPosition((location) => {\n userLat = location.coords.latitude;\n userLon = location.coords.longitude;\n checkParkCoord();\n })\n }","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n } else {\n location.innerHTML = \"Geolocation is not supported by this browser.\";\n }\n }","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(recordPosition);\n } else { \n x.innerHTML = \"Geolocation is not supported by this browser.\";\n }\n}","function getGeoLocation() {\n showPage('results');\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function(returnedPosition) {\n let position = {};\n position.longitude = returnedPosition.coords.longitude;\n position.latitude = returnedPosition.coords.latitude;\n getCityByLocation(position);\n });\n }\n}","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(setPosition);\n } else {\n console.log(\"Geolocation is not supported by this browser.\");\n }\n }","function getLocation() {\n     if (navigator.geolocation) {\n // showPosition is a reference to a JS function below\n         navigator.geolocation.getCurrentPosition(showPosition);\n     }\n }","function getLocalizacao() {\r\n \r\n if(navigator.geolocation){ \r\n navigator.geolocation.getCurrentPosition(mapSetup);\r\n }\r\n}","async getLocation() {\n const location = await Location.getCurrentPositionAsync({ enableHighAccuracy: true });\n return {\n \"latitude\": location.coords.latitude, \n \"longitude\": location.coords.longitude, \n \"latitudeDelta\": 0.04,\n \"longitudeDelta\": 0.05 \n };\n }","function getLocation(){\n\tvar geolocation = navigator.geolocation;\n\t\tconsole.log(geolocation);\n\tgeolocation.getCurrentPosition(showLocation,errorHandler);\n\tconsole.log(geolocation);\n}","getPlaceLocationInfo(selectedData) {\n if (this.settings.useGoogleGeoApi) {\n this._googlePlacesService.getGeoPlaceDetail(selectedData.place_id).then((data) => {\n if (data) {\n this.setRecentLocation(data);\n }\n });\n }\n else {\n this._googlePlacesService.getPlaceDetails(this.settings.geoLocDetailServerUrl, selectedData.place_id).then((result) => {\n if (result) {\n result = this.extractServerList(this.settings.serverResponseDetailHierarchy, result);\n this.setRecentLocation(result);\n }\n });\n }\n }","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition, showLocationError);\n \n } else { \n showMessage('Cannot acquire location','Geolocation is not supported by this browser.');\n ga('send', 'event', mode + '-getLocation', 'failure', 'failure');\n }\n}","function getCoords(location) {\n const latitude = location.coords.latitude;\n const longitude = location.coords.longitude;\n const id = \"location1\";\n\n fetchCurrentWeather(latitude, longitude, id);\n}","function getLocation() {\n\tif (navigator.geolocation) {\n\t\t// 1. Get current position and set latitude and longitude accordingly\n\t\tnavigator.geolocation.getCurrentPosition((data) => {\n\t\t\tconst { latitude, longitude } = data.coords;\n\n\t\t\t// 2. Make GET request based on geolocation info and set HTML content based on response\n\t\t\tfetchWeather(latitude, longitude);\n\t\t});\n\t} else {\n\t\tmessage.innerHTML = 'Geolocation is not supported by this browser.';\n\t}\n}","function getCurrentLocation() {\n // var location;\n\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function(pos) {\n var location = {\n lat: pos.coords.latitude,\n lng: pos.coords.longitude\n };\n\n return location;\n }, handleError);\n } else {\n displayErrorMessage(\"Geolocation failed, using default coordinates.\");\n return defaultCoords;\n }\n\n function handleError(error) {\n switch (error.code) {\n case error.PERMISSION_DENIED:\n displayErrorMessage(\"User denied the request for Geolocation.\");\n break;\n case error.POSITION_UNAVAILABLE:\n displayErrorMessage(\"Location information is unavailable.\");\n break;\n case error.TIMEOUT:\n displayErrorMessage(\"The request to get user location timed out.\");\n break;\n case error.UNKNOWN_ERROR:\n displayErrorMessage(\"An unknown error occurred.\");\n break;\n }\n }\n}","function getLocation() {\n if (navigator.geolocation) {\n console.log(\"Geo Location enabled\");\n navigator.geolocation.getCurrentPosition(success, error, options);\n } else {\n console.log(\"Geo Location not supported by browser\");\n }\n }","function getGeoLocation() {\n \"use strict\";\n var cords = [];\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n cords.push(position.coords.latitude);\n cords.push(position.coords.longitude);\n //When you take them, use them to find the weather\n getWeatherFromCords(cords);\n });\n }\n}","function getLocation(entry) {\n return entry.getValue('location');\n }","function getCurrentPosition(callback) {\n\t//Import sensor for your location\n\t// document.write(\"\");\n\n\n\tvar currentposition = new google.maps.LatLng(0.0, 0.0);\n\tif (navigator.geolocation) {\n\t\tnavigator.geolocation.getCurrentPosition (function(pos) {\n\t\t\treverseGeocodeAddress(pos.coords.latitude, pos.coords.longitude, function(address) {\n\t\t\t\tcallback(address);\n\t\t\t});\n\t\t});\n\t} else {\n\t\tcallback(currentposition);\n\t}\n}","function getLocation() {\n\tif(navigator.geolocation) {\n\t\tnavigator.geolocation.getCurrentPosition(geoPosition, geoError, {enableHighAccuracy:true, timeout:30000, maximumAge:60000 }\n);\n\t} else {\n\t\tgeoError();\n\t}\n}","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition, error);\n } else {\n x.innerHTML = \"Geolocation is not supported by this browser.\";\n }\n}","function getCurrentGeoPosition() {\r\n if(navigator.geolocation) {\r\n navigator.geolocation.getCurrentPosition(function (position) {\r\n fetchWeatherDataGeo(position.coords.latitude, position.coords.longitude);\r\n });\r\n } else {\r\n alert('Your browser does not support Geolocation API!');\r\n }\r\n}","function getBrowserLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n } else {\n console.log(\"Get Browser Location error\");\n };\n}","function currentCoord() {\n\treturn game_data.village.coord;\n}","function getLocation() {\n console.log('start getLocation');\n\tif(navigator.geolocation) {\n\t\tnavigator.geolocation.getCurrentPosition(\n\t\t\tfunction (position) {\n\t\t\t\t//do succes handling\n\t\t\t\tshowPosition(position)\n\t\t\t},\n\t\t\tfunction errorCallback(error) {\n\t\t\t\t//do error handling\n\t\t\t\tmsg = locationError(error)\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t\t{\n\t\t\t\tmaximumAge: 0,\n\t\t\t\ttimeout: 5000,\n\t\t\t\tenableHighAccuracy: true\n\t\t\t}\n\t\t);\n\t}\n}","function getUserLocation() {\r\n\t// Global variable\r\n\r\n\tif (navigator.geolocation) {\r\n\t\tnavigator.geolocation.getCurrentPosition(showPosition, showError);\r\n\t} else {\r\n\t\tuserLocation.innerHTML = \"Your browser does not support this feature.\";\r\n\t}\r\n}","function getLocation(){\n\tconsole.log('Getting Users Location...');\n\n\tnavigator.geolocation.getCurrentPosition(function(position){\n\t\tconsole.log(1111111111111111);\n\t\tvar lat = position.coords.latitude;\n\t\tvar lon = position.coords.longitude;\n\t\tvar city = '';\n\t\tvar state = '';\n\t\tvar html = '';\n\n\t\t$.ajax({\n\t\t\turl: 'https://maps.googleapis.com/maps/api/geocode/json?latlng='+lat+','+lon,\n\t\t\tdatatype: 'jsonp',\n\t\t\tsuccess: function(response){\n\t\t\t\tcity = response.results[0].address_components[2].long_name;\n\t\t\t\tstate = response.results[0].address_components[4].short_name;\n\n\t\t\t\thtml = '

    '+city+', '+state+'

    ';\n\n\t\t\t\t$('#myLocation').html(html);\n\n\t\t\t\t// Get Weather Info\n\t\t\t\tgetWeather(city, state);\n\n\t\t\t\t$('#show_more_weather').click(function(e){\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t// Close Dropdown Menu\n\t\t\t\t$('.navbar-toggle').click();\n\n\t\t\t\t\tgetMoreWeather(city, state);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}, function(err){\n\t\tconsole.warn('ERROR(' + err.code + '): ' + err.message);\n\t});\n}","function get_current_location(callback) {\r\n if (navigator.geolocation) \r\n {\r\n // Location callback\r\n navigator.geolocation.getCurrentPosition(function (position) { \r\n var latitude=position.coords.latitude;\r\n var longitude=position.coords.longitude;\r\n if (callback != undefined) {\r\n callback(latitude, longitude);\r\n }\r\n }, function () {\r\n // Error callback\r\n alert('Your position is unavailable at this time.');\r\n });\r\n }\r\n}","function getLocation()\n {\n if(navigator.geolocation)\n {\n geoLoc = navigator.geolocation;\n watchID = geoLoc.watchPosition(showLocation, errorHandler);\n }\n else\n {\n console.log(\"sorry, browser does not support geolocation!\");\n }\n }","getLocation() {\n navigator.geolocation.getCurrentPosition((position) => {\n this.setState({lat: position.coords.latitude, lon: position.coords.longitude});\n // if successful, proceed to make API request\n this.getCurrent();\n }, (error) => this.setState({errorMessage: error}))\n }","function getLocation() {\r\n\tif(navigator.geolocation) {\r\n\t\tnavigator.geolocation.getCurrentPosition(storePosition);\r\n\t} else {\r\n\t\t$('#location').html('Not supported.');\r\n\t}\t\t\r\n}","function getLocation()\n {\n if (navigator.geolocation)\n {\n navigator.geolocation.getCurrentPosition(showPosition,showError);\n }\n else{x.innerHTML=\"Geolocation is not supported by this browser.\";}\n }","getBrowserLocation(callback) {\n navigator.geolocation.getCurrentPosition(locationData => {\n let userLocation = this.props.userLocation;\n\n if (locationData && locationData.coords) {\n const {\n longitude,\n latitude,\n } = locationData.coords;\n\n userLocation = [latitude, longitude];\n }\n\n callback(userLocation);\n });\n }","function onGeolocationSuccess(position) { \n currentLat = position.coords.latitude;\n currentLong = position.coords.longitude;\n}","function getLocationForCurrentManager(index) {\n return managerData[currentManager].locations[index];\n }","function getCurrentWeather() {\n \tvar dataObj = {\n \t\tlat: '',\n \t\tlon: '',\n \t\tAPPID: '923ac7c7344b6f742666617a0e4bd311',\n \t\tunits: 'metric'\n \t}\n }","function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n } else {\n x.innerHTML = \"Geolocation is not supported by this browser.\";\n }\n}","function getLocalWeather() {\n navigator.geolocation.getCurrentPosition(showPosition);\n}","function naviPosition() {\n navigator.geolocation.getCurrentPosition(getCoordinates);\n}","function getLocationData() {\n const url = 'https://ipinfo.io/json?token=08f12254167956';\n return fetch(url).then((result) => result.json());\n}","function getData() {\n navigator.geolocation.getCurrentPosition(function(position) {\n // Gets the latitude and longitude coordinates and displays them to the user\n let latitude = position.coords.latitude;\n let longitude = position.coords.longitude;\n coordinatesElem.innerHTML = \"Latitude: \" + latitude.toString().substring(0, 10) + \"
    Longitude: \" + longitude.toString().substring(0, 10);\n getElevation(latitude, longitude);\n });\n}"],"string":"[\n \"function getLocation() {\\n\\t\\tTitanium.Geolocation.getCurrentPosition( updatePosition );\\n\\t}\",\n \"function getcurentposition() {\\n\\tnavigator.geolocation.getCurrentPosition(GeoOnSuccess, GeoOnError, {enableHighAccuracy: true});\\n}\",\n \"function getLocation() {\\n\\tif (navigator.geolocation) {\\n\\t\\tnavigator.geolocation.getCurrentPosition(postLocation, showError);\\n\\t}\\n}\",\n \"function getLocation() {\\n return location;\\n }\",\n \"function getCurrentLocation() {\\n lat = localStorage.getItem(\\\"lat\\\");\\n long = localStorage.getItem(\\\"long\\\");\\n if (!lat || !long)\\n window.navigator.geolocation.getCurrentPosition(processLocation);\\n else getWeatherData();\\n}\",\n \"function GetLocation(){\\n\\tif(navigator.geolocation){\\n\\t\\tnavigator.geolocation.getCurrentPosition(setLocation);\\n\\t}\\n}\",\n \"function getBrowserGeoLoc(){\\n getLocation();\\n showPosition();\\n }\",\n \"function getLoc() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(success, getError);\\n }\\n\\n else {\\n console.log(\\\"Geolocation is not supported by this browser\\\");\\n defaultLoc();\\n }\\n}\",\n \"function GetCurrentLocation() {\\n // chek deafault user coordinates\\n if (Modernizr.geolocation) {\\n navigator.geolocation.getCurrentPosition(success, options);\\n var options = {\\n enableHighAccuracy: true,\\n timeout: 5000,\\n maximumAge: 0\\n };\\n function success(pos) {\\n var crd = pos.coords;\\n // transfer current user coordinates to default\\n window.centerLat = crd.latitude;\\n window.centerLng = crd.longitude;\\n }\\n } else {\\n console.log('location error');\\n }\\n} // GetCurrentLocation\",\n \"static getCurrentLocLS(){\\r\\n let loc = {\\r\\n city : 'Toronto',\\r\\n country : 'CA'\\r\\n };\\r\\n\\r\\n if (localStorage.getItem('currLocation')) {\\r\\n return (JSON.parse(localStorage.getItem('currLocation')));\\r\\n } else {\\r\\n return (loc)\\r\\n } \\r\\n }\",\n \"function getLocation() {\\n navigator.geolocation.getCurrentPosition(function(position) {\\n lat = position.coords.latitude;\\n lon = position.coords.longitude;\\n console.log('lat =' + lat + ', lon =' + lon);\\n });\\n }\",\n \"function getLocation() {\\n var currentLon = \\\"\\\";\\n var currentLat = \\\"lat=\\\";\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(function(loc) {\\n //set currentLon & currentLat\\n currentLon += loc.coords.longitude;\\n currentLat += loc.coords.latitude;\\n //fucntions called built on longitude and latitude location\\n buildApi(currentLon, currentLat);\\n //drawCoords(currentLon, currentLat);\\n });\\n } else {\\n alert(\\\"You're lost and we can't find you.\\\");\\n }\\n }\",\n \"function getLocation(){\\n\\t\\t\\tif(navigator.geolocation){\\n\\t\\t\\t\\tnavigator.geolocation.getCurrentPosition(showPosition);\\n\\t\\t\\t}\\n\\t\\t\\telse{\\n\\t\\t\\t\\tdisplayCoords.innerHTML=\\\"Geolocation API not supported by your browser\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t}\",\n \"function getGeoLocation(){\\n //Getting current position \\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(function(position) {\\n var pos = {\\n lat: position.coords.latitude,\\n lng: position.coords.longitude\\n };\\n this.currentPosMark = new google.maps.Marker({\\n position: pos,\\n map: this.map,\\n icon: this.iconTypes['beachFlag'],\\n animation: google.maps.Animation.DROP,\\n title: 'You are here!'\\n });\\n infoWindow.setPosition(pos);\\n infoWindow.setContent('You are here');\\n //infoWindow.open(map);\\n map.setCenter(pos);\\n }, function() {\\n handleLocationError(true, infoWindow, this.map.getCenter());\\n });\\n } else {\\n // Browser doesn't support Geolocation\\n handleLocationError(false, infoWindow, this.map.getCenter());\\n }\\n }\",\n \"getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(objGeolocation.bundleObj, objGeolocation.handelError)\\n } else {\\n console.log('Geolocation is not supported by this browser');\\n }\\n }\",\n \"function geoloc() {\\n let coords = navigator.geolocation.getCurrentPosition((pos) => {\\n coords = pos;\\n let lat = coords.coords.latitude;\\n let long = coords.coords.longitude;\\n ll = `?_ll=${lat},${long}`;\\n document.querySelector(\\\".change-hour h1 span\\\").textContent = \\\"ma position\\\";\\n getDatas(process);\\n });\\n}\",\n \"function getCurrentLocation() {\\n\\tif (!navigator.geolocation) {\\n\\t\\talert(\\\"GeoLocation is not supported by browser.\\\");\\n\\t\\treturn;\\n\\t}\\n\\treturn navigator.geolocation.getCurrentPosition(coordinates,\\n\\t\\tdisplayErrorMessage);\\n}\",\n \"function getGeoLoc() {\\n\\n //check if browser can get geolocation\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(function (pos) {\\n //get lat ang lng as obj\\n var lat = pos.coords.latitude;\\n var lng = pos.coords.longitude;\\n\\n getData(lat, lng);\\n //alert when error happens\\n }, function (error) {\\n alert('There was an error: ' + error.message);\\n });\\n }\\n }\",\n \"function getLocation() {\\n var geolocation = navigator.geolocation;\\n geolocation.getCurrentPosition(showLocation);\\n }\",\n \"getLocation() {\\n return this._executeAfterInitialWait(() => this.currently.getLocation());\\n }\",\n \"function getLocation() {\\n return findLocation(getStatus());\\n}\",\n \"function currentLocationWeather() {\\n // get user's location from the browser\\n navigator.geolocation.getCurrentPosition(geolocSuccess, geolocError);\\n}\",\n \"function getGeoData() {\\n\\n //determine if the handset has client side geo location capabilities\\n if(geo_position_js.init()){\\n\\tgeo_position_js.getCurrentPosition(\\n\\t\\t\\t\\t\\t function(data){\\n\\t\\t\\t\\t\\t \\n\\t\\t\\t\\t\\t LATITUDE = data.coords.latitude;\\n\\t\\t\\t\\t\\t LONGITUDE = data.coords.longitude;\\n\\n\\t\\t\\t\\t\\t },\\n\\n\\t\\t\\t\\t\\t function(data){\\n\\t\\t\\t\\t\\t alert('could not retrieve geo data');\\n\\t\\t\\t\\t\\t }\\n\\t\\t\\t\\t\\t );\\n }\\n else{\\n\\talert(\\\"Functionality not available\\\");\\n }\\n\\n\\n\\n}\",\n \"function loadCurrentLoc() {\\r\\n // show loader\\r\\n showLoaderAndCleanElements();\\r\\n\\r\\n function getPosition() {\\r\\n return new Promise((resolve, reject) =>\\r\\n navigator.geolocation.getCurrentPosition(resolve, reject)\\r\\n );\\r\\n }\\r\\n getPosition()\\r\\n .then((position) => position.coords)\\r\\n .then((coords) => {\\r\\n // fetching data - current location\\r\\n fetchWeatherData(\\r\\n `https://api.openweathermap.org/data/2.5/weather?lat=${coords.latitude}&lon=${coords.longitude}&units=metric&appid=30c174ec2ba71f992035ddbd346caad7`\\r\\n );\\r\\n })\\r\\n .catch((err) => {\\r\\n // if user denies geolocation data show weather for London\\r\\n fetchWeatherData(\\r\\n `https://api.openweathermap.org/data/2.5/weather?q=London&units=metric&appid=30c174ec2ba71f992035ddbd346caad7`\\r\\n );\\r\\n console.error(err.message);\\r\\n });\\r\\n}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(createMap);\\n } \\n }\",\n \"getLocationInfo(){\\n return this.map.getLocationInfo();\\n }\",\n \"function _getLocation() {\\n if (navigator.geolocation) {\\n App.Modules.GPS.state=STATES.ON;\\n navigator.geolocation.getCurrentPosition(_getLocation_return);\\n } else {\\n App.Modules.GPS.state=STATES.NOT_SUPPORTED;\\n _dispatchUpdateCallbacks( );\\n }\\n }\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n }\\n}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n }\\n}\",\n \"function getLocation() {\\n navigator.geolocation.getCurrentPosition(displayLocation, locationError);\\n}\",\n \"function getLocation() {\\n\\t\\tif (navigator.geolocation) {\\n\\t\\t\\tnavigator.geolocation.getCurrentPosition(showPosition);\\n\\t\\t} else {\\n\\t\\t\\tconsole.log('No location detected');\\n\\t\\t}\\n\\t}\",\n \"function getLocation(location) {\\n lat = location.coords.latitude;\\n lng = location.coords.longitude;\\n }\",\n \"function getCurrentLocation(){\\r\\n\\tnavigator.geolocation.getCurrentPosition(onSuccess, onError,{ timeout: 5000,enableHighAccuracy: true });\\r\\n}\",\n \"function getlocation() {\\n \\tconsole.log(\\\"Entering getLocation()\\\");\\n \\tif(navigator.geolocation){\\n\\t\\t\\tnavigator.geolocation.getCurrentPosition(\\n\\t\\t\\tdisplayCurrentLocation,\\n\\t\\t\\tdisplayError,\\n\\t\\t\\t{ \\n\\t\\t\\t\\tmaximumAge: 3000, \\n\\t\\t\\t\\ttimeout: 5000, \\n\\t\\t\\t\\tenableHighAccuracy: true \\n\\t\\t\\t});\\n\\t\\t}else{\\n\\t\\t\\t//console.log(\\\"Oops, no geolocation support\\\");\\n\\t\\t} \\n \\t//console.log(\\\"Exiting getLocation()\\\");\\n }\",\n \"function getCurrentLocation() {\\n \\n function success(position) {\\n //if permission granted set call [setAddress()] to convert lat and long to street adresss\\n lat = position.coords.latitude;\\n lon = position.coords.longitude;\\n setAddress();\\n }\\n function denied() {\\n // if permission is denied set Ticket Master queries to defualt to \\\"Washington\\\"(city) and DC (state)\\n // console.log('Unable to retrieve your location');\\n searchAddress=\\\"\\\";\\n searchCity = \\\"Washington\\\";\\n searchState = \\\"DC\\\";\\n startPoint = searchCity + \\\", \\\" + searchState;\\n // Call to main to set defualts other than location [setTime() default && setCategory() defualt]\\n main();\\n }\\n if (!navigator.geolocation) {\\n // console.log('Geolocation is not supported by your browser');\\n } else {\\n // console.log('Locating…');\\n navigator.geolocation.getCurrentPosition(success, denied);\\n }\\n }\",\n \"function getUserLocation() {\\n\\tif (navigator.geolocation) {\\n\\t\\tnavigator.geolocation.getCurrentPosition(showUserPosition);\\n\\t} \\n}\",\n \"function getLocation() {\\n // Make sure browser supports this feature\\n if (navigator.geolocation) {\\n // Provide our showPosition() function to getCurrentPosition\\n console.log(navigator.geolocation.getCurrentPosition(showPosition));\\n }\\n else {\\n alert(\\\"Geolocation is not supported by this browser.\\\");\\n }\\n }\",\n \"function processData(){\\n navigator.geolocation.getCurrentPosition(onsuccess, onerror);\\n}\",\n \"function getLocation() {\\n navigator.geolocation.getCurrentPosition(geoCallback, onError);\\n}\",\n \"function getLocation() {\\n\\tif (window.navigator.geolocation) {\\n\\t\\twindow.navigator.geolocation.getCurrentPosition(showPosition);\\n\\t} else {\\n\\t\\tshowPosition(DEFAULT_POSITION);\\n\\t}\\n}\",\n \"function getLoc() {\\n\\n\\tif (!navigator.geolocation) {\\n\\n\\t geolocate.innerHTML = 'Geolocation is not available';\\n\\n\\t} else {\\n\\t \\n\\t map.locate();\\n\\n\\t console.log(map.locate());\\n\\t}\\n}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n }\\n}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n }\\n}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n // Nest showPosition inside getLocation\\n navigator.geolocation.getCurrentPosition(showPosition);\\n } else {\\n console.log(\\\"Geolocation is not supported by this browser.\\\");\\n }\\n }\",\n \"function getLocation(){\\r\\n if (locationUser) {\\r\\n locationUser.getCurrentPosition(showPosition);\\r\\n } else {\\r\\n return 'Geolocation is not supported by this browser.';\\r\\n }\\r\\n}\",\n \"function obtainGeolocation(){\\n window.navigator.geolocation.getCurrentPosition(localitation);\\n }\",\n \"function getPlayerLocation() {\\n\\t\\tTitanium.Geolocation.getCurrentPosition( updatePlayerPosition );\\n\\t}\",\n \"get location() {\\n\\t\\treturn this.__location;\\n\\t}\",\n \"get location() {\\n\\t\\treturn this.__location;\\n\\t}\",\n \"get location() {\\n\\t\\treturn this.__location;\\n\\t}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n } else { \\n x.innerHTML = \\\"Geolocation is not supported by this browser.\\\";\\n }\\n }\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(getPositionSuccess, getPositionError, getPositionOptions);\\n }\\n\\telse {\\n\\t\\talertify.error(\\\"Geolocation is not supported for this browser.\\\");\\n\\t}\\n}\",\n \"getCurrentLocationInfo(latlng) {\\n if (this.settings.useGoogleGeoApi) {\\n this._googlePlacesService.getGeoLatLngDetail(latlng).then((result) => {\\n if (result) {\\n this.setRecentLocation(result);\\n }\\n this.gettingCurrentLocationFlag = false;\\n });\\n }\\n else {\\n this._googlePlacesService.getLatLngDetail(this.settings.geoLatLangServiceUrl, latlng.lat, latlng.lng).then((result) => {\\n if (result) {\\n result = this.extractServerList(this.settings.serverResponseatLangHierarchy, result);\\n this.setRecentLocation(result);\\n }\\n this.gettingCurrentLocationFlag = false;\\n });\\n }\\n }\",\n \"getLocation() {\\n return this.origin;\\n }\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n } else {\\n x.innerHTML = \\\"Geolocation is not supported by this browser.\\\";\\n }\\n }\",\n \"function getLocation() {\\n\\t if (navigator.geolocation) {\\n\\t navigator.geolocation.getCurrentPosition(getWeather);\\n\\t } else {\\n\\t alert(\\\"Geolocation is not supported by this browser.\\\");\\n\\t }\\n\\t}\",\n \"function getCurrentLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(function (position) {\\n setLocation(position.coords.latitude, position.coords.longitude);\\n },\\n function (error) {\\n console.log(\\\"Something went wrong: \\\", error);\\n setLocation(DEFAULT_LAT, DEFAULT_LONG);\\n },\\n {\\n timeout:(5 * 1000),\\n maximumAge:(1000 * 60 * 15),\\n enableHighAccuracy:true\\n }\\n );\\n }\\n }\",\n \"function getLocation(location) {\\n\\t lat = location.coords.latitude;\\n\\t lng = location.coords.longitude;\\n\\t\\tgetVenues();\\n\\t}\",\n \"get location () {\\n\\t\\treturn this._location;\\n\\t}\",\n \"function getUsersCurrentLocation() {\\n\\n if (window.navigator && window.navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(success);\\n } else {\\n console.log(\\\"Geolocation is not supported by this browser.\\\");\\n }\\n\\n function success(position) {\\n\\n console.log(position.coords.latitude + position.coords.longitude);\\n\\n var currentImg = {\\n url: \\\"./Assets/Images/currentLocationMarker.png\\\", // url\\n scaledSize: new google.maps.Size(40, 50), // scaled size\\n origin: new google.maps.Point(0,0), // origin\\n anchor: new google.maps.Point(0, 0) // anchor\\n };\\n\\n var userLatLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\\n new google.maps.Marker({\\n position: userLatLng,\\n title: 'Me',\\n map: map,\\n icon: currentImg\\n });\\n }\\n}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n let newLocation = navigator.geolocation.getCurrentPosition(function (\\n position\\n ) {\\n lat = position.coords.latitude;\\n long = position.coords.longitude;\\n console.log(position);\\n console.log(lat);\\n console.log(long);\\n });\\n }\\n}\",\n \"function getLocation() {\\n window.navigator.geolocation.getCurrentPosition((location) => {\\n userLat = location.coords.latitude;\\n userLon = location.coords.longitude;\\n checkParkCoord();\\n })\\n }\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n } else {\\n location.innerHTML = \\\"Geolocation is not supported by this browser.\\\";\\n }\\n }\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(recordPosition);\\n } else { \\n x.innerHTML = \\\"Geolocation is not supported by this browser.\\\";\\n }\\n}\",\n \"function getGeoLocation() {\\n showPage('results');\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(function(returnedPosition) {\\n let position = {};\\n position.longitude = returnedPosition.coords.longitude;\\n position.latitude = returnedPosition.coords.latitude;\\n getCityByLocation(position);\\n });\\n }\\n}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(setPosition);\\n } else {\\n console.log(\\\"Geolocation is not supported by this browser.\\\");\\n }\\n }\",\n \"function getLocation() {\\n     if (navigator.geolocation) {\\n // showPosition is a reference to a JS function below\\n         navigator.geolocation.getCurrentPosition(showPosition);\\n     }\\n }\",\n \"function getLocalizacao() {\\r\\n \\r\\n if(navigator.geolocation){ \\r\\n navigator.geolocation.getCurrentPosition(mapSetup);\\r\\n }\\r\\n}\",\n \"async getLocation() {\\n const location = await Location.getCurrentPositionAsync({ enableHighAccuracy: true });\\n return {\\n \\\"latitude\\\": location.coords.latitude, \\n \\\"longitude\\\": location.coords.longitude, \\n \\\"latitudeDelta\\\": 0.04,\\n \\\"longitudeDelta\\\": 0.05 \\n };\\n }\",\n \"function getLocation(){\\n\\tvar geolocation = navigator.geolocation;\\n\\t\\tconsole.log(geolocation);\\n\\tgeolocation.getCurrentPosition(showLocation,errorHandler);\\n\\tconsole.log(geolocation);\\n}\",\n \"getPlaceLocationInfo(selectedData) {\\n if (this.settings.useGoogleGeoApi) {\\n this._googlePlacesService.getGeoPlaceDetail(selectedData.place_id).then((data) => {\\n if (data) {\\n this.setRecentLocation(data);\\n }\\n });\\n }\\n else {\\n this._googlePlacesService.getPlaceDetails(this.settings.geoLocDetailServerUrl, selectedData.place_id).then((result) => {\\n if (result) {\\n result = this.extractServerList(this.settings.serverResponseDetailHierarchy, result);\\n this.setRecentLocation(result);\\n }\\n });\\n }\\n }\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition, showLocationError);\\n \\n } else { \\n showMessage('Cannot acquire location','Geolocation is not supported by this browser.');\\n ga('send', 'event', mode + '-getLocation', 'failure', 'failure');\\n }\\n}\",\n \"function getCoords(location) {\\n const latitude = location.coords.latitude;\\n const longitude = location.coords.longitude;\\n const id = \\\"location1\\\";\\n\\n fetchCurrentWeather(latitude, longitude, id);\\n}\",\n \"function getLocation() {\\n\\tif (navigator.geolocation) {\\n\\t\\t// 1. Get current position and set latitude and longitude accordingly\\n\\t\\tnavigator.geolocation.getCurrentPosition((data) => {\\n\\t\\t\\tconst { latitude, longitude } = data.coords;\\n\\n\\t\\t\\t// 2. Make GET request based on geolocation info and set HTML content based on response\\n\\t\\t\\tfetchWeather(latitude, longitude);\\n\\t\\t});\\n\\t} else {\\n\\t\\tmessage.innerHTML = 'Geolocation is not supported by this browser.';\\n\\t}\\n}\",\n \"function getCurrentLocation() {\\n // var location;\\n\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(function(pos) {\\n var location = {\\n lat: pos.coords.latitude,\\n lng: pos.coords.longitude\\n };\\n\\n return location;\\n }, handleError);\\n } else {\\n displayErrorMessage(\\\"Geolocation failed, using default coordinates.\\\");\\n return defaultCoords;\\n }\\n\\n function handleError(error) {\\n switch (error.code) {\\n case error.PERMISSION_DENIED:\\n displayErrorMessage(\\\"User denied the request for Geolocation.\\\");\\n break;\\n case error.POSITION_UNAVAILABLE:\\n displayErrorMessage(\\\"Location information is unavailable.\\\");\\n break;\\n case error.TIMEOUT:\\n displayErrorMessage(\\\"The request to get user location timed out.\\\");\\n break;\\n case error.UNKNOWN_ERROR:\\n displayErrorMessage(\\\"An unknown error occurred.\\\");\\n break;\\n }\\n }\\n}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n console.log(\\\"Geo Location enabled\\\");\\n navigator.geolocation.getCurrentPosition(success, error, options);\\n } else {\\n console.log(\\\"Geo Location not supported by browser\\\");\\n }\\n }\",\n \"function getGeoLocation() {\\n \\\"use strict\\\";\\n var cords = [];\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(function (position) {\\n cords.push(position.coords.latitude);\\n cords.push(position.coords.longitude);\\n //When you take them, use them to find the weather\\n getWeatherFromCords(cords);\\n });\\n }\\n}\",\n \"function getLocation(entry) {\\n return entry.getValue('location');\\n }\",\n \"function getCurrentPosition(callback) {\\n\\t//Import sensor for your location\\n\\t// document.write(\\\"\\\");\\n\\n\\n\\tvar currentposition = new google.maps.LatLng(0.0, 0.0);\\n\\tif (navigator.geolocation) {\\n\\t\\tnavigator.geolocation.getCurrentPosition (function(pos) {\\n\\t\\t\\treverseGeocodeAddress(pos.coords.latitude, pos.coords.longitude, function(address) {\\n\\t\\t\\t\\tcallback(address);\\n\\t\\t\\t});\\n\\t\\t});\\n\\t} else {\\n\\t\\tcallback(currentposition);\\n\\t}\\n}\",\n \"function getLocation() {\\n\\tif(navigator.geolocation) {\\n\\t\\tnavigator.geolocation.getCurrentPosition(geoPosition, geoError, {enableHighAccuracy:true, timeout:30000, maximumAge:60000 }\\n);\\n\\t} else {\\n\\t\\tgeoError();\\n\\t}\\n}\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition, error);\\n } else {\\n x.innerHTML = \\\"Geolocation is not supported by this browser.\\\";\\n }\\n}\",\n \"function getCurrentGeoPosition() {\\r\\n if(navigator.geolocation) {\\r\\n navigator.geolocation.getCurrentPosition(function (position) {\\r\\n fetchWeatherDataGeo(position.coords.latitude, position.coords.longitude);\\r\\n });\\r\\n } else {\\r\\n alert('Your browser does not support Geolocation API!');\\r\\n }\\r\\n}\",\n \"function getBrowserLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n } else {\\n console.log(\\\"Get Browser Location error\\\");\\n };\\n}\",\n \"function currentCoord() {\\n\\treturn game_data.village.coord;\\n}\",\n \"function getLocation() {\\n console.log('start getLocation');\\n\\tif(navigator.geolocation) {\\n\\t\\tnavigator.geolocation.getCurrentPosition(\\n\\t\\t\\tfunction (position) {\\n\\t\\t\\t\\t//do succes handling\\n\\t\\t\\t\\tshowPosition(position)\\n\\t\\t\\t},\\n\\t\\t\\tfunction errorCallback(error) {\\n\\t\\t\\t\\t//do error handling\\n\\t\\t\\t\\tmsg = locationError(error)\\n\\t\\t\\t\\talert(msg)\\n\\t\\t\\t},\\n\\t\\t\\t{\\n\\t\\t\\t\\tmaximumAge: 0,\\n\\t\\t\\t\\ttimeout: 5000,\\n\\t\\t\\t\\tenableHighAccuracy: true\\n\\t\\t\\t}\\n\\t\\t);\\n\\t}\\n}\",\n \"function getUserLocation() {\\r\\n\\t// Global variable\\r\\n\\r\\n\\tif (navigator.geolocation) {\\r\\n\\t\\tnavigator.geolocation.getCurrentPosition(showPosition, showError);\\r\\n\\t} else {\\r\\n\\t\\tuserLocation.innerHTML = \\\"Your browser does not support this feature.\\\";\\r\\n\\t}\\r\\n}\",\n \"function getLocation(){\\n\\tconsole.log('Getting Users Location...');\\n\\n\\tnavigator.geolocation.getCurrentPosition(function(position){\\n\\t\\tconsole.log(1111111111111111);\\n\\t\\tvar lat = position.coords.latitude;\\n\\t\\tvar lon = position.coords.longitude;\\n\\t\\tvar city = '';\\n\\t\\tvar state = '';\\n\\t\\tvar html = '';\\n\\n\\t\\t$.ajax({\\n\\t\\t\\turl: 'https://maps.googleapis.com/maps/api/geocode/json?latlng='+lat+','+lon,\\n\\t\\t\\tdatatype: 'jsonp',\\n\\t\\t\\tsuccess: function(response){\\n\\t\\t\\t\\tcity = response.results[0].address_components[2].long_name;\\n\\t\\t\\t\\tstate = response.results[0].address_components[4].short_name;\\n\\n\\t\\t\\t\\thtml = '

    '+city+', '+state+'

    ';\\n\\n\\t\\t\\t\\t$('#myLocation').html(html);\\n\\n\\t\\t\\t\\t// Get Weather Info\\n\\t\\t\\t\\tgetWeather(city, state);\\n\\n\\t\\t\\t\\t$('#show_more_weather').click(function(e){\\n\\t\\t\\t\\t\\te.preventDefault();\\n\\n\\t\\t\\t\\t// Close Dropdown Menu\\n\\t\\t\\t\\t$('.navbar-toggle').click();\\n\\n\\t\\t\\t\\t\\tgetMoreWeather(city, state);\\n\\t\\t\\t\\t});\\n\\t\\t\\t}\\n\\t\\t});\\n\\t}, function(err){\\n\\t\\tconsole.warn('ERROR(' + err.code + '): ' + err.message);\\n\\t});\\n}\",\n \"function get_current_location(callback) {\\r\\n if (navigator.geolocation) \\r\\n {\\r\\n // Location callback\\r\\n navigator.geolocation.getCurrentPosition(function (position) { \\r\\n var latitude=position.coords.latitude;\\r\\n var longitude=position.coords.longitude;\\r\\n if (callback != undefined) {\\r\\n callback(latitude, longitude);\\r\\n }\\r\\n }, function () {\\r\\n // Error callback\\r\\n alert('Your position is unavailable at this time.');\\r\\n });\\r\\n }\\r\\n}\",\n \"function getLocation()\\n {\\n if(navigator.geolocation)\\n {\\n geoLoc = navigator.geolocation;\\n watchID = geoLoc.watchPosition(showLocation, errorHandler);\\n }\\n else\\n {\\n console.log(\\\"sorry, browser does not support geolocation!\\\");\\n }\\n }\",\n \"getLocation() {\\n navigator.geolocation.getCurrentPosition((position) => {\\n this.setState({lat: position.coords.latitude, lon: position.coords.longitude});\\n // if successful, proceed to make API request\\n this.getCurrent();\\n }, (error) => this.setState({errorMessage: error}))\\n }\",\n \"function getLocation() {\\r\\n\\tif(navigator.geolocation) {\\r\\n\\t\\tnavigator.geolocation.getCurrentPosition(storePosition);\\r\\n\\t} else {\\r\\n\\t\\t$('#location').html('Not supported.');\\r\\n\\t}\\t\\t\\r\\n}\",\n \"function getLocation()\\n {\\n if (navigator.geolocation)\\n {\\n navigator.geolocation.getCurrentPosition(showPosition,showError);\\n }\\n else{x.innerHTML=\\\"Geolocation is not supported by this browser.\\\";}\\n }\",\n \"getBrowserLocation(callback) {\\n navigator.geolocation.getCurrentPosition(locationData => {\\n let userLocation = this.props.userLocation;\\n\\n if (locationData && locationData.coords) {\\n const {\\n longitude,\\n latitude,\\n } = locationData.coords;\\n\\n userLocation = [latitude, longitude];\\n }\\n\\n callback(userLocation);\\n });\\n }\",\n \"function onGeolocationSuccess(position) { \\n currentLat = position.coords.latitude;\\n currentLong = position.coords.longitude;\\n}\",\n \"function getLocationForCurrentManager(index) {\\n return managerData[currentManager].locations[index];\\n }\",\n \"function getCurrentWeather() {\\n \\tvar dataObj = {\\n \\t\\tlat: '',\\n \\t\\tlon: '',\\n \\t\\tAPPID: '923ac7c7344b6f742666617a0e4bd311',\\n \\t\\tunits: 'metric'\\n \\t}\\n }\",\n \"function getLocation() {\\n if (navigator.geolocation) {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n } else {\\n x.innerHTML = \\\"Geolocation is not supported by this browser.\\\";\\n }\\n}\",\n \"function getLocalWeather() {\\n navigator.geolocation.getCurrentPosition(showPosition);\\n}\",\n \"function naviPosition() {\\n navigator.geolocation.getCurrentPosition(getCoordinates);\\n}\",\n \"function getLocationData() {\\n const url = 'https://ipinfo.io/json?token=08f12254167956';\\n return fetch(url).then((result) => result.json());\\n}\",\n \"function getData() {\\n navigator.geolocation.getCurrentPosition(function(position) {\\n // Gets the latitude and longitude coordinates and displays them to the user\\n let latitude = position.coords.latitude;\\n let longitude = position.coords.longitude;\\n coordinatesElem.innerHTML = \\\"Latitude: \\\" + latitude.toString().substring(0, 10) + \\\"
    Longitude: \\\" + longitude.toString().substring(0, 10);\\n getElevation(latitude, longitude);\\n });\\n}\"\n]"},"negative_scores":{"kind":"list like","value":["0.7286039","0.71908706","0.7152735","0.7148169","0.71307313","0.71043324","0.70790267","0.7006134","0.70034903","0.69885075","0.6959577","0.69345903","0.69285995","0.69171876","0.69151944","0.6887525","0.68814385","0.687113","0.6867752","0.685529","0.684924","0.6847105","0.682634","0.6818246","0.6816404","0.6808469","0.67942727","0.6763613","0.6763613","0.67581564","0.67475086","0.6742615","0.6741078","0.67400753","0.6734819","0.67293316","0.67254466","0.67104155","0.6708208","0.6692651","0.6656188","0.665414","0.665414","0.66462326","0.6635713","0.6618191","0.66159606","0.6612908","0.6612908","0.6612908","0.6604945","0.65958416","0.65937114","0.659371","0.6584274","0.6582565","0.65810597","0.65789247","0.6577561","0.6575673","0.6560815","0.65583247","0.65466726","0.6546254","0.6539495","0.653513","0.6532235","0.65285397","0.6528476","0.6528466","0.65251553","0.6519608","0.6516291","0.65121174","0.6493354","0.6483183","0.64799076","0.64770854","0.6475159","0.6474833","0.6466848","0.6463735","0.64584476","0.6443202","0.6442102","0.64409035","0.6433926","0.64297867","0.6422798","0.64214975","0.6415381","0.6411697","0.6408743","0.6402133","0.63996196","0.6392085","0.63853663","0.63849556","0.6379446","0.6376656","0.63753766"],"string":"[\n \"0.7286039\",\n \"0.71908706\",\n \"0.7152735\",\n \"0.7148169\",\n \"0.71307313\",\n \"0.71043324\",\n \"0.70790267\",\n \"0.7006134\",\n \"0.70034903\",\n \"0.69885075\",\n \"0.6959577\",\n \"0.69345903\",\n \"0.69285995\",\n \"0.69171876\",\n \"0.69151944\",\n \"0.6887525\",\n \"0.68814385\",\n \"0.687113\",\n \"0.6867752\",\n \"0.685529\",\n \"0.684924\",\n \"0.6847105\",\n \"0.682634\",\n \"0.6818246\",\n \"0.6816404\",\n \"0.6808469\",\n \"0.67942727\",\n \"0.6763613\",\n \"0.6763613\",\n \"0.67581564\",\n \"0.67475086\",\n \"0.6742615\",\n \"0.6741078\",\n \"0.67400753\",\n \"0.6734819\",\n \"0.67293316\",\n \"0.67254466\",\n \"0.67104155\",\n \"0.6708208\",\n \"0.6692651\",\n \"0.6656188\",\n \"0.665414\",\n \"0.665414\",\n \"0.66462326\",\n \"0.6635713\",\n \"0.6618191\",\n \"0.66159606\",\n \"0.6612908\",\n \"0.6612908\",\n \"0.6612908\",\n \"0.6604945\",\n \"0.65958416\",\n \"0.65937114\",\n \"0.659371\",\n \"0.6584274\",\n \"0.6582565\",\n \"0.65810597\",\n \"0.65789247\",\n \"0.6577561\",\n \"0.6575673\",\n \"0.6560815\",\n \"0.65583247\",\n \"0.65466726\",\n \"0.6546254\",\n \"0.6539495\",\n \"0.653513\",\n \"0.6532235\",\n \"0.65285397\",\n \"0.6528476\",\n \"0.6528466\",\n \"0.65251553\",\n \"0.6519608\",\n \"0.6516291\",\n \"0.65121174\",\n \"0.6493354\",\n \"0.6483183\",\n \"0.64799076\",\n \"0.64770854\",\n \"0.6475159\",\n \"0.6474833\",\n \"0.6466848\",\n \"0.6463735\",\n \"0.64584476\",\n \"0.6443202\",\n \"0.6442102\",\n \"0.64409035\",\n \"0.6433926\",\n \"0.64297867\",\n \"0.6422798\",\n \"0.64214975\",\n \"0.6415381\",\n \"0.6411697\",\n \"0.6408743\",\n \"0.6402133\",\n \"0.63996196\",\n \"0.6392085\",\n \"0.63853663\",\n \"0.63849556\",\n \"0.6379446\",\n \"0.6376656\",\n \"0.63753766\"\n]"},"document_score":{"kind":"string","value":"0.0"},"document_rank":{"kind":"string","value":"-1"}}},{"rowIdx":81352,"cells":{"query":{"kind":"string","value":"const testDiv=dom.find('test')[0]const test2=dom.find('test2')[0] console.log(testDiv)/console.log(dom.find('.red',test2)[0])"},"document":{"kind":"string","value":"parent(node) {\n return node.parentNode\n }"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["function findDiv(obj){\n\twhile(obj.nodeName != 'DIV'){\n\t\t\tobj = obj.nextSibling;\n\t}\n\treturn obj;\n}","function findOneChild(test, nodes) {\n return nodes.find(test);\n }","function getDivFromId(html){\n var foundDive = '';\n return div;\n}","function getEl (mix,arr) {\n\tlet result = document.querySelectorAll(mix);\n\tif (result.length < 2 && arr != \"1\") {\n\t\treturn result[0];\n\t}\n\treturn result;\n}","findChild(el, query) {\n const matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;\n return Array.prototype.filter.call(el.children, child => matches.call(child, query))[0];\n }","function findOneChild(test, nodes) {\n return nodes.find(test);\n}","function findOneChild(test, nodes) {\n return nodes.find(test);\n}","function findOneChild(test, nodes) {\n return nodes.find(test);\n}","function findOneChild(test, nodes) {\n return nodes.find(test);\n}","function findOneChild(test, nodes) {\n return nodes.find(test);\n}","function findOneChild(test, nodes) {\n return nodes.find(test);\n}","function findOneChild(test, nodes) {\n return nodes.find(test);\n}","function findOneChild(test, nodes) {\n return nodes.find(test);\n}","function myDOM4() {\n var x = document.querySelectorAll(\"p.demo17\");\n document.getElementById(\"demo16\").innerHTML =\n \"The first paragraph(index 0) with class='demo17': \" + x[0].innerHTML;\n}","findChild(el, query) {\n const matches =\n el.matches ||\n el.webkitMatchesSelector ||\n el.mozMatchesSelector ||\n el.msMatchesSelector;\n return Array.prototype.filter.call(el.children, child =>\n matches.call(child, query)\n )[0];\n }","function deepestChild(){\n return document.querySelectorAll('div#grand-node div')[3];\n }","function $(q, root, single, context) {\r\n\t\troot = root || document;\r\n\t\tcontext = context || root;\r\n\t\tif (q[0] == '#')\r\n\t\t\treturn root.getElementById(q.substr(1));\r\n\t\telse if (q.match(/^\\/|^\\.\\//)) {\r\n\t\t\tif (single)\r\n\t\t\t\treturn root.evaluate(q, context, null, 9, null).singleNodeValue;\r\n\t\t\tvar arr = [];\r\n\t\t\tvar xpr = root.evaluate(q, context, null, 7, null);\r\n\t\t\tfor ( var i = 0, l = xpr.snapshotLength; i < l; i++)\r\n\t\t\t\tarr.push(xpr.snapshotItem(i));\r\n\t\t\treturn arr;\r\n\t\t} else if (q[0] == '.')\r\n\t\t\treturn root.getElementsByClassName(q.substr(1));\r\n\t\treturn root.getElementsByTagName(q);\r\n\t}","getElem(jqOrElem) {\n if (jqOrElem instanceof $) {\n return jqOrElem[0];\n } else {\n return jqOrElem;\n }\n }","function __getReal($dom, $attr, $value) {\r\n while (($dom != null) && ($dom.tagName != \"BODY\")) {\r\n if ($dom.getAttribute($attr) == $value) {\r\n return $dom;\r\n }\r\n $dom = $dom.parentElement;\r\n }\r\n return null;\r\n}","function _(elm) { return document.querySelector(elm); }","function findDottedPersonElementsByClass(str) {\n\tvar personElements = findDottedPerson().children; //returns all the children elements of the dotted div\n\tfor (let element of personElements) {\n\t\tif (element.classList.contains(str)) {\n\t\t\tvar targetElement = element;\n\t\t}\n\t} return targetElement;\n}","function nestedTarget(){\n return document.querySelector('#nested .target')\n }","function findContainer() {\n if (guid) {\n $container = $j('.jive-content-rating[data-guid=\"'+ guid +'\"]');\n } else {\n $container = $j('#jive-content-rating');\n }\n }","function getPosition(div, oldelement) {\n var position;\n\n for (let i = 0; i < div.childElementCount; i++) {\n if (div.children[i] == oldelement) {\n position = i\n //console.log(div.children[i])\n }\n }\n\n return position;\n}","function q (el) {\n if (typeof el === 'string') return document.querySelector(el)\n else if (typeof el === 'object' && el[0]) return el[0]\n else return el\n}","function $(query){\n var q = document.querySelectorAll(query);\n return q.length > 1 ? q : q[0];\n}","function div(content){ return elem(\"div\", content); }","function div(content){ return elem(\"div\", content); }","function test3() {\n console.log($('li:first(\"new\")'));\n}","function query(el){if(typeof el==='string'){var selected=document.querySelector(el);if(!selected){\"development\"!=='production'&&warn('Cannot find element: '+el);return document.createElement('div');}return selected;}else{return el;}}","function query(el){if(typeof el==='string'){var selected=document.querySelector(el);if(!selected){\"development\"!=='production'&&warn('Cannot find element: '+el);return document.createElement('div');}return selected;}else{return el;}}","function findReact(dom) {\r\n\t\treturn dom[Object.keys(dom).find(a=>a.startsWith(\"__reactInternalInstance$\"))].return.stateNode;\r\n\t}","function domFind(el, tag) {\n tag = tag.toLowerCase();\n var nodes = el.childNodes, i = 0, n = nodes.length;\n for (; i 0) {\n elem = findOne(test, checked.children);\n }\n }\n return elem;\n }","function testFunction(node){\n console.log(`${node.nodeName} tag with ${node.childNodes.length} children and style: ${node.style}`);\n return;\n}","function getDom(el) {\n return document.querySelector(el)\n}","function domFind(el, tag) {\n tag = tag.toLowerCase();\n var nodes = el.childNodes, i = 0, n = nodes.length;\n for (; i {\n return '[data-element=\"' + name + '\"]';\n })\n .join(' ');\n\n return container.querySelector(selector);\n }","_getDomFromElement(element) {\n if (element.dom) {\n return element.dom;\n }\n\n if (element.element) {\n // console.log('Legacy ui.Element passed to pcui.Container', this.class, element.class);\n return element.element;\n }\n\n return element;\n }","function findOne(test, nodes, recurse = true) {\n let elem = null;\n for (let i = 0; i < nodes.length && !elem; i++) {\n const node = nodes[i];\n if (!node_isTag(node)) {\n continue;\n }\n else if (test(node)) {\n elem = node;\n }\n else if (recurse && node.children.length > 0) {\n elem = findOne(test, node.children, true);\n }\n }\n return elem;\n}","function queryFromDom(selector){\n var current = $paper.find('img#'+lastSelected);\n\n console.log(selector,\n current,\n current.attr(\"id\"),\n current.attr(\"width\"),\n current.position()\n );\n }","function Dom(seletor) {\n this.element = document.querySelector(seletor);\n}","function findOne(test, nodes, recurse) {\n if (recurse === void 0) { recurse = true; }\n var elem = null;\n for (var i = 0; i < nodes.length && !elem; i++) {\n var checked = nodes[i];\n if (!tagtypes.isTag(checked)) {\n continue;\n }\n else if (test(checked)) {\n elem = checked;\n }\n else if (recurse && checked.children.length > 0) {\n elem = findOne(test, checked.children);\n }\n }\n return elem;\n}","findElement(selector) {\n return document.querySelector(selector);\n }","function findOne(test, nodes, recurse) {\n if (recurse === void 0) { recurse = true; }\n var elem = null;\n for (var i = 0; i < nodes.length && !elem; i++) {\n var checked = nodes[i];\n if (!tagtypes_1.isTag(checked)) {\n continue;\n }\n else if (test(checked)) {\n elem = checked;\n }\n else if (recurse && checked.children.length > 0) {\n elem = findOne(test, checked.children);\n }\n }\n return elem;\n}","function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default().findDOMNode(node);\n}","function dqs(ele) {\n return document.querySelector(`#${ele}`);\n }","function getDOMElements(){\r\n return {\r\n squares: Array.from(document.querySelectorAll(\".grid div\")),\r\n firstSquare: function(){ return this.squares[30] },\r\n squaresInActiveGameplace: Array.from(grid.querySelectorAll(\".activegameplace\")),\r\n firstSquareInRow: document.querySelectorAll(\".first-in-row\"),\r\n lastSquareInRow: document.querySelectorAll(\".last-in-row\"),\r\n music: document.getElementById(\"myAudio\")\r\n }\r\n}","function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}","function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}","querySelector (query) {\n query = query.toUpperCase()\n const iterator = new YXmlTreeWalker(this, element => element.nodeName === query)\n const next = iterator.next()\n if (next.done) {\n return null\n } else {\n return next.value\n }\n }","function $(id){const el=document.getElementById(id);return el?assertInstanceof(el,HTMLElement):null}","function find(id){\n var elem = document.getElementById(id);\n return elem;\n}","function Parsedata(data){\r\n// PAGE==>CHEERIO\r\n let $ = cheerio.load(data);\r\n// SELECTOR SE SELECT THING ==> .TEXT()==> gIVE CONCATENATED STRING OF SELECTED TAG\r\n // let text=$(\"title\").text();\r\n// GIVE THE ARRAY OF WHOLE LASS MATCHES \r\n let Commentarr=$(\".d-flex.match-comment-padder.align-items-center .match-comment-long-text\");\r\n \r\n let text=$(Commentarr[0]).text();\r\n\r\n console.log(text);\r\n}","function usingQuerySelectorAll() {\n var nestedDivs = document.querySelectorAll('div > div');\n printInElement('Using query selection: ' + nestedDivs.length, true);\n}","function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode(node);\n}","function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n \"debug\" !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n }","function findOne(test, nodes, recurse) {\n if (recurse === void 0) { recurse = true; }\n var elem = null;\n for (var i = 0; i < nodes.length && !elem; i++) {\n var checked = nodes[i];\n if (!domhandler_1.isTag(checked)) {\n continue;\n }\n else if (test(checked)) {\n elem = checked;\n }\n else if (recurse && checked.children.length > 0) {\n elem = findOne(test, checked.children);\n }\n }\n return elem;\n}","function findOne(test, nodes, recurse) {\n if (recurse === void 0) { recurse = true; }\n var elem = null;\n for (var i = 0; i < nodes.length && !elem; i++) {\n var checked = nodes[i];\n if (!domhandler_1.isTag(checked)) {\n continue;\n }\n else if (test(checked)) {\n elem = checked;\n }\n else if (recurse && checked.children.length > 0) {\n elem = findOne(test, checked.children);\n }\n }\n return elem;\n}","function findOne(test, nodes, recurse) {\n if (recurse === void 0) { recurse = true; }\n var elem = null;\n for (var i = 0; i < nodes.length && !elem; i++) {\n var checked = nodes[i];\n if (!domhandler_1.isTag(checked)) {\n continue;\n }\n else if (test(checked)) {\n elem = checked;\n }\n else if (recurse && checked.children.length > 0) {\n elem = findOne(test, checked.children);\n }\n }\n return elem;\n}","function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}","function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}","findChild(tagName) {\n const children = this.getChildren()\n for (let i = 0; i < children.length; i++) {\n const child = children[i]\n if (child.type === tagName) return child\n }\n }","function secondElement(event){\n const q = event.parentElement;\n var nodes = Array.prototype.slice.call( q.children );\n var nodeIndex = nodes.indexOf(event);\n var sibling;\n if(q.nextElementSibling){\n sibling = q.nextElementSibling;\n }\n if(q.previousElementSibling){\n sibling = q.previousElementSibling;\n }\n return sibling.children[nodeIndex];\n console.log(sibling.children[nodeIndex]);\n\n}","function findDOMNode$2(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}","function $(selector){\n return document.querySelector(selector); \n }","function findColorHTML() {\n let colorToChange = HEXvalue.innerHTML.substring(18, 24);\n console.log(111, colorToChange);\n fetch(`https://www.thecolorapi.com/id?hex=${colorToChange}`)\n .then((response) => {\n return response.json();\n })\n .then((data) => {\n console.log(117, data.hex.value.toLowerCase());\n colorSecondDiv(data);\n setTimeout(function () {\n colorSecondDiv;\n }, 100);\n return data;\n });\n}","function getValue(dom) {\n document.querySelector(`${dom}`).value;\n}","function query(el) {\n\t if (typeof el === 'string') {\n\t var selected = document.querySelector(el);\n\t if (!selected) {\n\t process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\n\t return document.createElement('div');\n\t }\n\t return selected;\n\t } else {\n\t return el;\n\t }\n\t}"],"string":"[\n \"function findDiv(obj){\\n\\twhile(obj.nodeName != 'DIV'){\\n\\t\\t\\tobj = obj.nextSibling;\\n\\t}\\n\\treturn obj;\\n}\",\n \"function findOneChild(test, nodes) {\\n return nodes.find(test);\\n }\",\n \"function getDivFromId(html){\\n var foundDive = '';\\n return div;\\n}\",\n \"function getEl (mix,arr) {\\n\\tlet result = document.querySelectorAll(mix);\\n\\tif (result.length < 2 && arr != \\\"1\\\") {\\n\\t\\treturn result[0];\\n\\t}\\n\\treturn result;\\n}\",\n \"findChild(el, query) {\\n const matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;\\n return Array.prototype.filter.call(el.children, child => matches.call(child, query))[0];\\n }\",\n \"function findOneChild(test, nodes) {\\n return nodes.find(test);\\n}\",\n \"function findOneChild(test, nodes) {\\n return nodes.find(test);\\n}\",\n \"function findOneChild(test, nodes) {\\n return nodes.find(test);\\n}\",\n \"function findOneChild(test, nodes) {\\n return nodes.find(test);\\n}\",\n \"function findOneChild(test, nodes) {\\n return nodes.find(test);\\n}\",\n \"function findOneChild(test, nodes) {\\n return nodes.find(test);\\n}\",\n \"function findOneChild(test, nodes) {\\n return nodes.find(test);\\n}\",\n \"function findOneChild(test, nodes) {\\n return nodes.find(test);\\n}\",\n \"function myDOM4() {\\n var x = document.querySelectorAll(\\\"p.demo17\\\");\\n document.getElementById(\\\"demo16\\\").innerHTML =\\n \\\"The first paragraph(index 0) with class='demo17': \\\" + x[0].innerHTML;\\n}\",\n \"findChild(el, query) {\\n const matches =\\n el.matches ||\\n el.webkitMatchesSelector ||\\n el.mozMatchesSelector ||\\n el.msMatchesSelector;\\n return Array.prototype.filter.call(el.children, child =>\\n matches.call(child, query)\\n )[0];\\n }\",\n \"function deepestChild(){\\n return document.querySelectorAll('div#grand-node div')[3];\\n }\",\n \"function $(q, root, single, context) {\\r\\n\\t\\troot = root || document;\\r\\n\\t\\tcontext = context || root;\\r\\n\\t\\tif (q[0] == '#')\\r\\n\\t\\t\\treturn root.getElementById(q.substr(1));\\r\\n\\t\\telse if (q.match(/^\\\\/|^\\\\.\\\\//)) {\\r\\n\\t\\t\\tif (single)\\r\\n\\t\\t\\t\\treturn root.evaluate(q, context, null, 9, null).singleNodeValue;\\r\\n\\t\\t\\tvar arr = [];\\r\\n\\t\\t\\tvar xpr = root.evaluate(q, context, null, 7, null);\\r\\n\\t\\t\\tfor ( var i = 0, l = xpr.snapshotLength; i < l; i++)\\r\\n\\t\\t\\t\\tarr.push(xpr.snapshotItem(i));\\r\\n\\t\\t\\treturn arr;\\r\\n\\t\\t} else if (q[0] == '.')\\r\\n\\t\\t\\treturn root.getElementsByClassName(q.substr(1));\\r\\n\\t\\treturn root.getElementsByTagName(q);\\r\\n\\t}\",\n \"getElem(jqOrElem) {\\n if (jqOrElem instanceof $) {\\n return jqOrElem[0];\\n } else {\\n return jqOrElem;\\n }\\n }\",\n \"function __getReal($dom, $attr, $value) {\\r\\n while (($dom != null) && ($dom.tagName != \\\"BODY\\\")) {\\r\\n if ($dom.getAttribute($attr) == $value) {\\r\\n return $dom;\\r\\n }\\r\\n $dom = $dom.parentElement;\\r\\n }\\r\\n return null;\\r\\n}\",\n \"function _(elm) { return document.querySelector(elm); }\",\n \"function findDottedPersonElementsByClass(str) {\\n\\tvar personElements = findDottedPerson().children; //returns all the children elements of the dotted div\\n\\tfor (let element of personElements) {\\n\\t\\tif (element.classList.contains(str)) {\\n\\t\\t\\tvar targetElement = element;\\n\\t\\t}\\n\\t} return targetElement;\\n}\",\n \"function nestedTarget(){\\n return document.querySelector('#nested .target')\\n }\",\n \"function findContainer() {\\n if (guid) {\\n $container = $j('.jive-content-rating[data-guid=\\\"'+ guid +'\\\"]');\\n } else {\\n $container = $j('#jive-content-rating');\\n }\\n }\",\n \"function getPosition(div, oldelement) {\\n var position;\\n\\n for (let i = 0; i < div.childElementCount; i++) {\\n if (div.children[i] == oldelement) {\\n position = i\\n //console.log(div.children[i])\\n }\\n }\\n\\n return position;\\n}\",\n \"function q (el) {\\n if (typeof el === 'string') return document.querySelector(el)\\n else if (typeof el === 'object' && el[0]) return el[0]\\n else return el\\n}\",\n \"function $(query){\\n var q = document.querySelectorAll(query);\\n return q.length > 1 ? q : q[0];\\n}\",\n \"function div(content){ return elem(\\\"div\\\", content); }\",\n \"function div(content){ return elem(\\\"div\\\", content); }\",\n \"function test3() {\\n console.log($('li:first(\\\"new\\\")'));\\n}\",\n \"function query(el){if(typeof el==='string'){var selected=document.querySelector(el);if(!selected){\\\"development\\\"!=='production'&&warn('Cannot find element: '+el);return document.createElement('div');}return selected;}else{return el;}}\",\n \"function query(el){if(typeof el==='string'){var selected=document.querySelector(el);if(!selected){\\\"development\\\"!=='production'&&warn('Cannot find element: '+el);return document.createElement('div');}return selected;}else{return el;}}\",\n \"function findReact(dom) {\\r\\n\\t\\treturn dom[Object.keys(dom).find(a=>a.startsWith(\\\"__reactInternalInstance$\\\"))].return.stateNode;\\r\\n\\t}\",\n \"function domFind(el, tag) {\\n tag = tag.toLowerCase();\\n var nodes = el.childNodes, i = 0, n = nodes.length;\\n for (; i 0) {\\n elem = findOne(test, checked.children);\\n }\\n }\\n return elem;\\n }\",\n \"function testFunction(node){\\n console.log(`${node.nodeName} tag with ${node.childNodes.length} children and style: ${node.style}`);\\n return;\\n}\",\n \"function getDom(el) {\\n return document.querySelector(el)\\n}\",\n \"function domFind(el, tag) {\\n tag = tag.toLowerCase();\\n var nodes = el.childNodes, i = 0, n = nodes.length;\\n for (; i {\\n return '[data-element=\\\"' + name + '\\\"]';\\n })\\n .join(' ');\\n\\n return container.querySelector(selector);\\n }\",\n \"_getDomFromElement(element) {\\n if (element.dom) {\\n return element.dom;\\n }\\n\\n if (element.element) {\\n // console.log('Legacy ui.Element passed to pcui.Container', this.class, element.class);\\n return element.element;\\n }\\n\\n return element;\\n }\",\n \"function findOne(test, nodes, recurse = true) {\\n let elem = null;\\n for (let i = 0; i < nodes.length && !elem; i++) {\\n const node = nodes[i];\\n if (!node_isTag(node)) {\\n continue;\\n }\\n else if (test(node)) {\\n elem = node;\\n }\\n else if (recurse && node.children.length > 0) {\\n elem = findOne(test, node.children, true);\\n }\\n }\\n return elem;\\n}\",\n \"function queryFromDom(selector){\\n var current = $paper.find('img#'+lastSelected);\\n\\n console.log(selector,\\n current,\\n current.attr(\\\"id\\\"),\\n current.attr(\\\"width\\\"),\\n current.position()\\n );\\n }\",\n \"function Dom(seletor) {\\n this.element = document.querySelector(seletor);\\n}\",\n \"function findOne(test, nodes, recurse) {\\n if (recurse === void 0) { recurse = true; }\\n var elem = null;\\n for (var i = 0; i < nodes.length && !elem; i++) {\\n var checked = nodes[i];\\n if (!tagtypes.isTag(checked)) {\\n continue;\\n }\\n else if (test(checked)) {\\n elem = checked;\\n }\\n else if (recurse && checked.children.length > 0) {\\n elem = findOne(test, checked.children);\\n }\\n }\\n return elem;\\n}\",\n \"findElement(selector) {\\n return document.querySelector(selector);\\n }\",\n \"function findOne(test, nodes, recurse) {\\n if (recurse === void 0) { recurse = true; }\\n var elem = null;\\n for (var i = 0; i < nodes.length && !elem; i++) {\\n var checked = nodes[i];\\n if (!tagtypes_1.isTag(checked)) {\\n continue;\\n }\\n else if (test(checked)) {\\n elem = checked;\\n }\\n else if (recurse && checked.children.length > 0) {\\n elem = findOne(test, checked.children);\\n }\\n }\\n return elem;\\n}\",\n \"function findDOMNode(node) {\\n if (node instanceof HTMLElement) {\\n return node;\\n }\\n\\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default().findDOMNode(node);\\n}\",\n \"function dqs(ele) {\\n return document.querySelector(`#${ele}`);\\n }\",\n \"function getDOMElements(){\\r\\n return {\\r\\n squares: Array.from(document.querySelectorAll(\\\".grid div\\\")),\\r\\n firstSquare: function(){ return this.squares[30] },\\r\\n squaresInActiveGameplace: Array.from(grid.querySelectorAll(\\\".activegameplace\\\")),\\r\\n firstSquareInRow: document.querySelectorAll(\\\".first-in-row\\\"),\\r\\n lastSquareInRow: document.querySelectorAll(\\\".last-in-row\\\"),\\r\\n music: document.getElementById(\\\"myAudio\\\")\\r\\n }\\r\\n}\",\n \"function findDOMNode(node) {\\n if (node instanceof HTMLElement) {\\n return node;\\n }\\n\\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\\n}\",\n \"function findDOMNode(node) {\\n if (node instanceof HTMLElement) {\\n return node;\\n }\\n\\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\\n}\",\n \"querySelector (query) {\\n query = query.toUpperCase()\\n const iterator = new YXmlTreeWalker(this, element => element.nodeName === query)\\n const next = iterator.next()\\n if (next.done) {\\n return null\\n } else {\\n return next.value\\n }\\n }\",\n \"function $(id){const el=document.getElementById(id);return el?assertInstanceof(el,HTMLElement):null}\",\n \"function find(id){\\n var elem = document.getElementById(id);\\n return elem;\\n}\",\n \"function Parsedata(data){\\r\\n// PAGE==>CHEERIO\\r\\n let $ = cheerio.load(data);\\r\\n// SELECTOR SE SELECT THING ==> .TEXT()==> gIVE CONCATENATED STRING OF SELECTED TAG\\r\\n // let text=$(\\\"title\\\").text();\\r\\n// GIVE THE ARRAY OF WHOLE LASS MATCHES \\r\\n let Commentarr=$(\\\".d-flex.match-comment-padder.align-items-center .match-comment-long-text\\\");\\r\\n \\r\\n let text=$(Commentarr[0]).text();\\r\\n\\r\\n console.log(text);\\r\\n}\",\n \"function usingQuerySelectorAll() {\\n var nestedDivs = document.querySelectorAll('div > div');\\n printInElement('Using query selection: ' + nestedDivs.length, true);\\n}\",\n \"function findDOMNode(node) {\\n if (node instanceof HTMLElement) {\\n return node;\\n }\\n\\n return react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode(node);\\n}\",\n \"function query (el) {\\n if (typeof el === 'string') {\\n var selected = document.querySelector(el);\\n if (!selected) {\\n \\\"debug\\\" !== 'production' && warn(\\n 'Cannot find element: ' + el\\n );\\n return document.createElement('div')\\n }\\n return selected\\n } else {\\n return el\\n }\\n }\",\n \"function findOne(test, nodes, recurse) {\\n if (recurse === void 0) { recurse = true; }\\n var elem = null;\\n for (var i = 0; i < nodes.length && !elem; i++) {\\n var checked = nodes[i];\\n if (!domhandler_1.isTag(checked)) {\\n continue;\\n }\\n else if (test(checked)) {\\n elem = checked;\\n }\\n else if (recurse && checked.children.length > 0) {\\n elem = findOne(test, checked.children);\\n }\\n }\\n return elem;\\n}\",\n \"function findOne(test, nodes, recurse) {\\n if (recurse === void 0) { recurse = true; }\\n var elem = null;\\n for (var i = 0; i < nodes.length && !elem; i++) {\\n var checked = nodes[i];\\n if (!domhandler_1.isTag(checked)) {\\n continue;\\n }\\n else if (test(checked)) {\\n elem = checked;\\n }\\n else if (recurse && checked.children.length > 0) {\\n elem = findOne(test, checked.children);\\n }\\n }\\n return elem;\\n}\",\n \"function findOne(test, nodes, recurse) {\\n if (recurse === void 0) { recurse = true; }\\n var elem = null;\\n for (var i = 0; i < nodes.length && !elem; i++) {\\n var checked = nodes[i];\\n if (!domhandler_1.isTag(checked)) {\\n continue;\\n }\\n else if (test(checked)) {\\n elem = checked;\\n }\\n else if (recurse && checked.children.length > 0) {\\n elem = findOne(test, checked.children);\\n }\\n }\\n return elem;\\n}\",\n \"function findDOMNode(node) {\\n if (node instanceof HTMLElement) {\\n return node;\\n }\\n\\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\\n}\",\n \"function findDOMNode(node) {\\n if (node instanceof HTMLElement) {\\n return node;\\n }\\n\\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\\n}\",\n \"findChild(tagName) {\\n const children = this.getChildren()\\n for (let i = 0; i < children.length; i++) {\\n const child = children[i]\\n if (child.type === tagName) return child\\n }\\n }\",\n \"function secondElement(event){\\n const q = event.parentElement;\\n var nodes = Array.prototype.slice.call( q.children );\\n var nodeIndex = nodes.indexOf(event);\\n var sibling;\\n if(q.nextElementSibling){\\n sibling = q.nextElementSibling;\\n }\\n if(q.previousElementSibling){\\n sibling = q.previousElementSibling;\\n }\\n return sibling.children[nodeIndex];\\n console.log(sibling.children[nodeIndex]);\\n\\n}\",\n \"function findDOMNode$2(node) {\\n if (node instanceof HTMLElement) {\\n return node;\\n }\\n\\n return ReactDOM.default.findDOMNode(node);\\n}\",\n \"function $(selector){\\n return document.querySelector(selector); \\n }\",\n \"function findColorHTML() {\\n let colorToChange = HEXvalue.innerHTML.substring(18, 24);\\n console.log(111, colorToChange);\\n fetch(`https://www.thecolorapi.com/id?hex=${colorToChange}`)\\n .then((response) => {\\n return response.json();\\n })\\n .then((data) => {\\n console.log(117, data.hex.value.toLowerCase());\\n colorSecondDiv(data);\\n setTimeout(function () {\\n colorSecondDiv;\\n }, 100);\\n return data;\\n });\\n}\",\n \"function getValue(dom) {\\n document.querySelector(`${dom}`).value;\\n}\",\n \"function query(el) {\\n\\t if (typeof el === 'string') {\\n\\t var selected = document.querySelector(el);\\n\\t if (!selected) {\\n\\t process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\\n\\t return document.createElement('div');\\n\\t }\\n\\t return selected;\\n\\t } else {\\n\\t return el;\\n\\t }\\n\\t}\"\n]"},"negative_scores":{"kind":"list like","value":["0.58055466","0.5766705","0.57636005","0.57591295","0.5710178","0.5706812","0.5706812","0.5706812","0.5706812","0.5706812","0.5706812","0.56580675","0.56580675","0.56344193","0.54981434","0.54804426","0.5472307","0.54700834","0.546232","0.5446266","0.54427654","0.54402876","0.5427727","0.541248","0.539148","0.53897876","0.537274","0.537274","0.53661317","0.5351778","0.5351778","0.53506297","0.5348374","0.53469086","0.53420866","0.5314549","0.5288349","0.5279189","0.5272565","0.52566814","0.52455884","0.5244035","0.5232379","0.5231922","0.5231922","0.5212754","0.5203057","0.52011687","0.518758","0.51819056","0.5174109","0.5174109","0.51718277","0.51610965","0.5152507","0.5147123","0.514398","0.51239157","0.5106576","0.51061594","0.5088166","0.50878245","0.50878245","0.50822","0.5082014","0.5082014","0.50778985","0.50700456","0.50665843","0.5063425","0.50621176","0.50466067","0.50382245","0.5036791","0.5033289","0.5033173","0.502714","0.5025517","0.5023312","0.5021674","0.50143564","0.50143564","0.5008952","0.50061846","0.49919567","0.49904618","0.49876362","0.4977364","0.49712488","0.49633","0.49633","0.49633","0.49632868","0.49632868","0.49627376","0.49568585","0.49568453","0.49525595","0.495147","0.49492532","0.4944221"],"string":"[\n \"0.58055466\",\n \"0.5766705\",\n \"0.57636005\",\n \"0.57591295\",\n \"0.5710178\",\n \"0.5706812\",\n \"0.5706812\",\n \"0.5706812\",\n \"0.5706812\",\n \"0.5706812\",\n \"0.5706812\",\n \"0.56580675\",\n \"0.56580675\",\n \"0.56344193\",\n \"0.54981434\",\n \"0.54804426\",\n \"0.5472307\",\n \"0.54700834\",\n \"0.546232\",\n \"0.5446266\",\n \"0.54427654\",\n \"0.54402876\",\n \"0.5427727\",\n \"0.541248\",\n \"0.539148\",\n \"0.53897876\",\n \"0.537274\",\n \"0.537274\",\n \"0.53661317\",\n \"0.5351778\",\n \"0.5351778\",\n \"0.53506297\",\n \"0.5348374\",\n \"0.53469086\",\n \"0.53420866\",\n \"0.5314549\",\n \"0.5288349\",\n \"0.5279189\",\n \"0.5272565\",\n \"0.52566814\",\n \"0.52455884\",\n \"0.5244035\",\n \"0.5232379\",\n \"0.5231922\",\n \"0.5231922\",\n \"0.5212754\",\n \"0.5203057\",\n \"0.52011687\",\n \"0.518758\",\n \"0.51819056\",\n \"0.5174109\",\n \"0.5174109\",\n \"0.51718277\",\n \"0.51610965\",\n \"0.5152507\",\n \"0.5147123\",\n \"0.514398\",\n \"0.51239157\",\n \"0.5106576\",\n \"0.51061594\",\n \"0.5088166\",\n \"0.50878245\",\n \"0.50878245\",\n \"0.50822\",\n \"0.5082014\",\n \"0.5082014\",\n \"0.50778985\",\n \"0.50700456\",\n \"0.50665843\",\n \"0.5063425\",\n \"0.50621176\",\n \"0.50466067\",\n \"0.50382245\",\n \"0.5036791\",\n \"0.5033289\",\n \"0.5033173\",\n \"0.502714\",\n \"0.5025517\",\n \"0.5023312\",\n \"0.5021674\",\n \"0.50143564\",\n \"0.50143564\",\n \"0.5008952\",\n \"0.50061846\",\n \"0.49919567\",\n \"0.49904618\",\n \"0.49876362\",\n \"0.4977364\",\n \"0.49712488\",\n \"0.49633\",\n \"0.49633\",\n \"0.49633\",\n \"0.49632868\",\n \"0.49632868\",\n \"0.49627376\",\n \"0.49568585\",\n \"0.49568453\",\n \"0.49525595\",\n \"0.495147\",\n \"0.49492532\",\n \"0.4944221\"\n]"},"document_score":{"kind":"string","value":"0.0"},"document_rank":{"kind":"string","value":"-1"}}},{"rowIdx":81353,"cells":{"query":{"kind":"string","value":"THE END OF DOCUMENT.READY()"},"document":{"kind":"string","value":"function say() {\n console.log(\"ok\");\n return false;\n}"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["function pageDocReady () {\n\n}","pageReady() {}","function DOMReady() {\n }","onPageReady () {}","onReady() {}","function onLoadComplete () {\n // ready = true;\n}","function ready() {\n if (!isReady) {\n triggerEvent(document, \"ready\");\n isReady = true;\n }\n }","ready() { }","ready() { }","ready() { }","ready() { }","ready() { }","ready() { }","ready() { }","ready() { }","function readyCallBack() {\n}","function onReady() {\n\t// TODO\n}","static ready() { }","function init() {\n documentReady(documentLoaded);\n}","function initOnDomReady() {}","onloadend() {}","function pageFullyLoaded () {}","function documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }","function completed( event ) {\n\t // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\t if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {\n\t detach();\n\t ready();\n\t }\n\t }","function readyStateChange()\n {\n if (document.readyState === \"complete\")\n {\n ready();\n }\n }","ready() {}","ready() {}","ready() {}","onload() {}","function edgtfOnDocumentReady() {\n\t edgtfSearchSlideFromHB();\n }","function setReady() {\n debug.log( arguments.callee.name );\n // Hacky-hacky for Linkinus 2.2 / iOS.\n location.href = 'linkinus-style://styleDidFinishLoading';\n \n scroller.setReady();\n overlay.setReady();\n \n //spam(); // Uncomment for scroll debugging.\n}","sendPageReady() {}","function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener || event.type === \"load\" || document.readyState === \"complete\") {\n detach();\n jQuery.ready();\n }\n }","function mkdfOnDocumentReady() {\n mkdfCompareHolder();\n mkdfCompareHolderScroll();\n mkdfHandleAddToCompare();\n }","function pageReady() {\n legacySupport();\n initSliders();\n }","function edgtfOnDocumentReady() {\n\t edgtfSearchSlideFromWT();\n }","ready() {\r\n\t\tsuper.ready();\r\n\t}","function onLoad()\n{}","function onDOMReady() {\n // Make sure that the DOM is not already loaded\n if (isReady) return;\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if (!document.body) return setTimeout(onDOMReady, 0);\n // Remember that the DOM is ready\n isReady = true;\n // Make sure this is always async and then finishin init\n setTimeout(function() {\n app._finishInit();\n }, 0);\n }","function edgtfOnDocumentReady() {\n edgtfHeaderBehaviour();\n edgtfSideArea();\n edgtfSideAreaScroll();\n edgtfFullscreenMenu();\n edgtfInitMobileNavigation();\n edgtfMobileHeaderBehavior();\n edgtfSetDropDownMenuPosition();\n edgtfDropDownMenu(); \n edgtfSearch();\n }","function pageLoaded() {\n\n\t\tvar elHeader = document.getElementsByTagName('header')[0];\n\n\t\telHeader.addEventListener(animationEvent, removeFOUT);\n\n\t\tfunction removeFOUT() {\n\n\t\t\tclassie.add(elHTML, 'ready');\n\t\t\telHeader.removeEventListener(animationEvent, removeFOUT);\n\n\t\t}\n\n\t}","function onloadHandler(){\n console.info(\"Nick Cage is ready!\");\n // where the magic happens\n replaceAllElements();\n }","function pageReady() {\n svg4everybody();\n initScrollMonitor();\n initModals();\n }","function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener || window.event.type === \"load\" || document.readyState === \"complete\") {\n detach();\n jQuery.ready();\n }\n }","function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}","function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}","function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}","function readyHandler() {\n\t\t\tif (!eventUtils.domLoaded) {\n\t\t\t\teventUtils.domLoaded = true;\n\t\t\t\tcallback(event);\n\t\t\t}\n\t\t}","function qodefOnDocumentReady() {\n qodefInitQuantityButtons();\n qodefInitButtonLoading();\n qodefInitSelect2();\n\t qodefInitSingleProductLightbox();\n }","function onDocumentRedy() {\n\t//Init\n\tinitWS();\n\t\n//\tinitButtons();\n//\tupdateButtons();\n//\tsetInterval(updateButtons, 3000);\n\n}","function onLoadComplete() {\n}","onEnterDOM() {}","function init() {\n // THIS IS THE CODE THAT WILL BE EXECUTED ONCE THE WEBPAGE LOADS\n }","function domReady() {\n // Make sure that the DOM is not already loaded\n if (!isReady) {\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if ( !doc.body ) {\n return setTimeout( domReady, 1 );\n }\n // Remember that the DOM is ready\n isReady = true;\n // If there are functions bound, to execute\n domReadyCallback();\n // Execute all of them\n }\n} // /ready()","function mkdfOnDocumentReady() {\n\t\tmkdfInitFullScreenSections();\n\t}","function mkdfOnDocumentReady() {\n mkdfPropertyAddToWishlist();\n mkdfShowHideEnquiryForm();\n mkdfSubmitEnquiryForm();\n mkdfAddEditProperty();\n mkdfMortgageCalculator();\n mkdfDeleteProperty();\n }","function ready(callback){\n // in case the document is already rendered\n if (document.readyState!='loading') callback();\n // modern browsers\n else if (document.addEventListener) document.addEventListener('DOMContentLoaded', callback);\n // IE <= 8\n else document.attachEvent('onreadystatechange', function(){\n if (document.readyState=='complete') callback();\n });\n}","function edgtfOnDocumentReady() {\n\t\tedgtfButton().init();\n\t}","function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}","function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}","function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}","function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}","function eltdfOnDocumentReady() {\n eltdfQuestionHint();\n eltdfQuestionCheck();\n eltdfQuestionChange();\n eltdfQuestionAnswerChange();\n }","function pageReady() {\n\tupdateUUID();\n\tadaptButtons();\n}","function completed() {\n\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener ||\n window.event.type === \"load\" ||\n document.readyState === \"complete\" ) {\n\n detach();\n jQuery.ready();\n }\n }","function qodeOnDocumentReady() {\n \tqodeInitNewsShortcodesFilter();\n qodeNewsInitFitVids();\n qodeInitSelfHostedVideoAudioPlayer();\n qodeSelfHostedVideoSize();\n }","function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n}","function ready() {\r\n if (!readyFired) {\r\n // this must be set to true before we start calling callbacks\r\n readyFired = true;\r\n for (var i = 0; i < readyList.length; i++) {\r\n // if a callback here happens to add new ready handlers,\r\n // the docReady() function will see that it already fired\r\n // and will schedule the callback to run right after\r\n // this event loop finishes so all handlers will still execute\r\n // in order and no new ones will be added to the readyList\r\n // while we are processing the list\r\n readyList[i].fn.call(window, readyList[i].ctx);\r\n }\r\n // allow any closures held by these functions to free\r\n readyList = [];\r\n }\r\n }","function $w_completed() {\r\n\tconsole.log(\"$w_completed\");\r\n\tif ($d.addEventListener || event.type === \"load\" || $d.readyState === \"complete\" ) {\r\n\t\t$w_detach();\r\n\t\tif(!Whaty.isReady){\r\n\t\t\tconsole.log(\"Whaty.isReady---:\"+Whaty.isReady);\r\n\t\t\tWhaty.isReady = true;\r\n\t\t\t$w_init();\r\n\t\t}\r\n\t}\r\n}","function init()\n {\n $(document).on(\"loaded:everything\", runAll);\n }","function qodefOnDocumentReady() {\n\t\tqodefInitItemShowcase();\n\t}","onLoad() { }","function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called","function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called","function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called","function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called","function completed() {\n\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener ||\n window.event.type === \"load\" ||\n document.readyState === \"complete\") {\n\n detach();\n jQuery.ready();\n }\n }","function completed() {\n\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if (document.addEventListener ||\n window.event.type === \"load\" ||\n document.readyState === \"complete\") {\n\n detach();\n jQuery.ready();\n }\n }","function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n }","function mkdfOnDocumentReady() {\n\t\tmkdfScrollingImage();\n\t}","function onPageLoaded() {\n}","function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }","onLoad() {}","function whenDocumentReady(callback, doc) {\r\n if (!isDocumentReady(doc)) {\r\n var checkReady = function() {\r\n if (doc.readyState === 'complete' || \r\n doc.readyState === requiredReadyState) {\r\n doc.removeEventListener(READY_EVENT, checkReady);\r\n whenDocumentReady(callback, doc);\r\n }\r\n }\r\n doc.addEventListener(READY_EVENT, checkReady);\r\n } else if (callback) {\r\n callback();\r\n }\r\n}","function completed() {\r\n\r\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\r\n\t\tif (document.addEventListener ||\r\n\t\t\twindow.event.type === \"load\" ||\r\n\t\t\tdocument.readyState === \"complete\") {\r\n\r\n\t\t\tdetach();\r\n\t\t\tjQuery.ready();\r\n\t\t}\r\n\t}","function pageReady() {\n legacySupport();\n\n updateHeaderActiveClass();\n initHeaderScroll();\n\n setLogDefaultState();\n setStepsClasses();\n _window.on('resize', debounce(setStepsClasses, 200))\n\n initMasks();\n initValidations();\n initSelectric();\n initDatepicker();\n\n _window.on('resize', debounce(setBreakpoint, 200))\n }","function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n}","function eltdfOnDocumentReady() {\n eltdfHeaderBehaviour();\n eltdfSideArea();\n eltdfSideAreaScroll();\n eltdfFullscreenMenu();\n eltdfInitDividedHeaderMenu();\n eltdfInitMobileNavigation();\n eltdfMobileHeaderBehavior();\n eltdfSetDropDownMenuPosition();\n eltdfDropDownMenu();\n eltdfSearch();\n eltdfVerticalMenu().init();\n }","onLoad () {}","function audioEditorDocumentReady() {\n audioEditorDocumentReadyPreview();\n audioEditorDocumentReadyCutters();\n audioEditorDocumentReadyGeneral();\n}","function mkdOnDocumentReady() {\n\t mkdIconWithHover().init();\n\t mkdIEversion();\n\t mkdInitAnchor().init();\n\t mkdInitBackToTop();\n\t mkdBackButtonShowHide();\n\t mkdInitSelfHostedVideoPlayer();\n\t mkdSelfHostedVideoSize();\n\t mkdFluidVideo();\n\t mkdOwlSlider();\n\t mkdPreloadBackgrounds();\n\t mkdPrettyPhoto();\n mkdInitCustomMenuDropdown();\n }","ready() {\r\n\t\t// Override this\r\n\t\tthis.updateTitle();\r\n\t}","function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }","function ready() {\n if (!readyFired) {\n // this must be set to true before we start calling callbacks\n readyFired = true;\n for (var i = 0; i < readyList.length; i++) {\n // if a callback here happens to add new ready handlers,\n // the docReady() function will see that it already fired\n // and will schedule the callback to run right after\n // this event loop finishes so all handlers will still execute\n // in order and no new ones will be added to the readyList\n // while we are processing the list\n readyList[i].fn.call(window, readyList[i].ctx);\n }\n // allow any closures held by these functions to free\n readyList = [];\n }\n }","function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n}","function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n}","function completed() {\n // readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n if ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\n detach();\n jQuery.ready();\n }\n}","ready() {\n this._root = this._createRoot();\n super.ready();\n this._firstRendered();\n }","function cb_contentLoaded(cb) {}","function init() {\n //called when document is fully loaded; your \"main method\"\n}","function imageEditorDocumentReady() {\n imageEditorDocumentReadyGeneral();\n imageEditorDocumentReadyCrop();\n imageEditorDocumentReadyTexts();\n imageEditorDocumentReadyUndo();\n}"],"string":"[\n \"function pageDocReady () {\\n\\n}\",\n \"pageReady() {}\",\n \"function DOMReady() {\\n }\",\n \"onPageReady () {}\",\n \"onReady() {}\",\n \"function onLoadComplete () {\\n // ready = true;\\n}\",\n \"function ready() {\\n if (!isReady) {\\n triggerEvent(document, \\\"ready\\\");\\n isReady = true;\\n }\\n }\",\n \"ready() { }\",\n \"ready() { }\",\n \"ready() { }\",\n \"ready() { }\",\n \"ready() { }\",\n \"ready() { }\",\n \"ready() { }\",\n \"ready() { }\",\n \"function readyCallBack() {\\n}\",\n \"function onReady() {\\n\\t// TODO\\n}\",\n \"static ready() { }\",\n \"function init() {\\n documentReady(documentLoaded);\\n}\",\n \"function initOnDomReady() {}\",\n \"onloadend() {}\",\n \"function pageFullyLoaded () {}\",\n \"function documentReadyFunction() {\\n onPageLoadOrResize();\\n onPageLoad();\\n }\",\n \"function completed( event ) {\\n\\t // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n\\t if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {\\n\\t detach();\\n\\t ready();\\n\\t }\\n\\t }\",\n \"function readyStateChange()\\n {\\n if (document.readyState === \\\"complete\\\")\\n {\\n ready();\\n }\\n }\",\n \"ready() {}\",\n \"ready() {}\",\n \"ready() {}\",\n \"onload() {}\",\n \"function edgtfOnDocumentReady() {\\n\\t edgtfSearchSlideFromHB();\\n }\",\n \"function setReady() {\\n debug.log( arguments.callee.name );\\n // Hacky-hacky for Linkinus 2.2 / iOS.\\n location.href = 'linkinus-style://styleDidFinishLoading';\\n \\n scroller.setReady();\\n overlay.setReady();\\n \\n //spam(); // Uncomment for scroll debugging.\\n}\",\n \"sendPageReady() {}\",\n \"function completed() {\\n // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n if (document.addEventListener || event.type === \\\"load\\\" || document.readyState === \\\"complete\\\") {\\n detach();\\n jQuery.ready();\\n }\\n }\",\n \"function mkdfOnDocumentReady() {\\n mkdfCompareHolder();\\n mkdfCompareHolderScroll();\\n mkdfHandleAddToCompare();\\n }\",\n \"function pageReady() {\\n legacySupport();\\n initSliders();\\n }\",\n \"function edgtfOnDocumentReady() {\\n\\t edgtfSearchSlideFromWT();\\n }\",\n \"ready() {\\r\\n\\t\\tsuper.ready();\\r\\n\\t}\",\n \"function onLoad()\\n{}\",\n \"function onDOMReady() {\\n // Make sure that the DOM is not already loaded\\n if (isReady) return;\\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\\n if (!document.body) return setTimeout(onDOMReady, 0);\\n // Remember that the DOM is ready\\n isReady = true;\\n // Make sure this is always async and then finishin init\\n setTimeout(function() {\\n app._finishInit();\\n }, 0);\\n }\",\n \"function edgtfOnDocumentReady() {\\n edgtfHeaderBehaviour();\\n edgtfSideArea();\\n edgtfSideAreaScroll();\\n edgtfFullscreenMenu();\\n edgtfInitMobileNavigation();\\n edgtfMobileHeaderBehavior();\\n edgtfSetDropDownMenuPosition();\\n edgtfDropDownMenu(); \\n edgtfSearch();\\n }\",\n \"function pageLoaded() {\\n\\n\\t\\tvar elHeader = document.getElementsByTagName('header')[0];\\n\\n\\t\\telHeader.addEventListener(animationEvent, removeFOUT);\\n\\n\\t\\tfunction removeFOUT() {\\n\\n\\t\\t\\tclassie.add(elHTML, 'ready');\\n\\t\\t\\telHeader.removeEventListener(animationEvent, removeFOUT);\\n\\n\\t\\t}\\n\\n\\t}\",\n \"function onloadHandler(){\\n console.info(\\\"Nick Cage is ready!\\\");\\n // where the magic happens\\n replaceAllElements();\\n }\",\n \"function pageReady() {\\n svg4everybody();\\n initScrollMonitor();\\n initModals();\\n }\",\n \"function completed() {\\n // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n if (document.addEventListener || window.event.type === \\\"load\\\" || document.readyState === \\\"complete\\\") {\\n detach();\\n jQuery.ready();\\n }\\n }\",\n \"function readyHandler() {\\n\\t\\t\\tif (!eventUtils.domLoaded) {\\n\\t\\t\\t\\teventUtils.domLoaded = true;\\n\\t\\t\\t\\tcallback(event);\\n\\t\\t\\t}\\n\\t\\t}\",\n \"function readyHandler() {\\n\\t\\t\\tif (!eventUtils.domLoaded) {\\n\\t\\t\\t\\teventUtils.domLoaded = true;\\n\\t\\t\\t\\tcallback(event);\\n\\t\\t\\t}\\n\\t\\t}\",\n \"function readyHandler() {\\n\\t\\t\\tif (!eventUtils.domLoaded) {\\n\\t\\t\\t\\teventUtils.domLoaded = true;\\n\\t\\t\\t\\tcallback(event);\\n\\t\\t\\t}\\n\\t\\t}\",\n \"function readyHandler() {\\n\\t\\t\\tif (!eventUtils.domLoaded) {\\n\\t\\t\\t\\teventUtils.domLoaded = true;\\n\\t\\t\\t\\tcallback(event);\\n\\t\\t\\t}\\n\\t\\t}\",\n \"function qodefOnDocumentReady() {\\n qodefInitQuantityButtons();\\n qodefInitButtonLoading();\\n qodefInitSelect2();\\n\\t qodefInitSingleProductLightbox();\\n }\",\n \"function onDocumentRedy() {\\n\\t//Init\\n\\tinitWS();\\n\\t\\n//\\tinitButtons();\\n//\\tupdateButtons();\\n//\\tsetInterval(updateButtons, 3000);\\n\\n}\",\n \"function onLoadComplete() {\\n}\",\n \"onEnterDOM() {}\",\n \"function init() {\\n // THIS IS THE CODE THAT WILL BE EXECUTED ONCE THE WEBPAGE LOADS\\n }\",\n \"function domReady() {\\n // Make sure that the DOM is not already loaded\\n if (!isReady) {\\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\\n if ( !doc.body ) {\\n return setTimeout( domReady, 1 );\\n }\\n // Remember that the DOM is ready\\n isReady = true;\\n // If there are functions bound, to execute\\n domReadyCallback();\\n // Execute all of them\\n }\\n} // /ready()\",\n \"function mkdfOnDocumentReady() {\\n\\t\\tmkdfInitFullScreenSections();\\n\\t}\",\n \"function mkdfOnDocumentReady() {\\n mkdfPropertyAddToWishlist();\\n mkdfShowHideEnquiryForm();\\n mkdfSubmitEnquiryForm();\\n mkdfAddEditProperty();\\n mkdfMortgageCalculator();\\n mkdfDeleteProperty();\\n }\",\n \"function ready(callback){\\n // in case the document is already rendered\\n if (document.readyState!='loading') callback();\\n // modern browsers\\n else if (document.addEventListener) document.addEventListener('DOMContentLoaded', callback);\\n // IE <= 8\\n else document.attachEvent('onreadystatechange', function(){\\n if (document.readyState=='complete') callback();\\n });\\n}\",\n \"function edgtfOnDocumentReady() {\\n\\t\\tedgtfButton().init();\\n\\t}\",\n \"function loadComplete() {\\n if (++docsLoaded == 1) {\\n setUpPageStatus = 'complete';\\n }\\n}\",\n \"function loadComplete() {\\n if (++docsLoaded == 1) {\\n setUpPageStatus = 'complete';\\n }\\n}\",\n \"function loadComplete() {\\n if (++docsLoaded == 1) {\\n setUpPageStatus = 'complete';\\n }\\n}\",\n \"function loadComplete() {\\n if (++docsLoaded == 1) {\\n setUpPageStatus = 'complete';\\n }\\n}\",\n \"function eltdfOnDocumentReady() {\\n eltdfQuestionHint();\\n eltdfQuestionCheck();\\n eltdfQuestionChange();\\n eltdfQuestionAnswerChange();\\n }\",\n \"function pageReady() {\\n\\tupdateUUID();\\n\\tadaptButtons();\\n}\",\n \"function completed() {\\n\\n // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n if ( document.addEventListener ||\\n window.event.type === \\\"load\\\" ||\\n document.readyState === \\\"complete\\\" ) {\\n\\n detach();\\n jQuery.ready();\\n }\\n }\",\n \"function qodeOnDocumentReady() {\\n \\tqodeInitNewsShortcodesFilter();\\n qodeNewsInitFitVids();\\n qodeInitSelfHostedVideoAudioPlayer();\\n qodeSelfHostedVideoSize();\\n }\",\n \"function ready() {\\n if (!readyFired) {\\n // this must be set to true before we start calling callbacks\\n readyFired = true;\\n for (var i = 0; i < readyList.length; i++) {\\n // if a callback here happens to add new ready handlers,\\n // the docReady() function will see that it already fired\\n // and will schedule the callback to run right after\\n // this event loop finishes so all handlers will still execute\\n // in order and no new ones will be added to the readyList\\n // while we are processing the list\\n readyList[i].fn.call(window, readyList[i].ctx);\\n }\\n // allow any closures held by these functions to free\\n readyList = [];\\n }\\n}\",\n \"function ready() {\\r\\n if (!readyFired) {\\r\\n // this must be set to true before we start calling callbacks\\r\\n readyFired = true;\\r\\n for (var i = 0; i < readyList.length; i++) {\\r\\n // if a callback here happens to add new ready handlers,\\r\\n // the docReady() function will see that it already fired\\r\\n // and will schedule the callback to run right after\\r\\n // this event loop finishes so all handlers will still execute\\r\\n // in order and no new ones will be added to the readyList\\r\\n // while we are processing the list\\r\\n readyList[i].fn.call(window, readyList[i].ctx);\\r\\n }\\r\\n // allow any closures held by these functions to free\\r\\n readyList = [];\\r\\n }\\r\\n }\",\n \"function $w_completed() {\\r\\n\\tconsole.log(\\\"$w_completed\\\");\\r\\n\\tif ($d.addEventListener || event.type === \\\"load\\\" || $d.readyState === \\\"complete\\\" ) {\\r\\n\\t\\t$w_detach();\\r\\n\\t\\tif(!Whaty.isReady){\\r\\n\\t\\t\\tconsole.log(\\\"Whaty.isReady---:\\\"+Whaty.isReady);\\r\\n\\t\\t\\tWhaty.isReady = true;\\r\\n\\t\\t\\t$w_init();\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\",\n \"function init()\\n {\\n $(document).on(\\\"loaded:everything\\\", runAll);\\n }\",\n \"function qodefOnDocumentReady() {\\n\\t\\tqodefInitItemShowcase();\\n\\t}\",\n \"onLoad() { }\",\n \"function completed(){document.removeEventListener(\\\"DOMContentLoaded\\\",completed);window.removeEventListener(\\\"load\\\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called\",\n \"function completed(){document.removeEventListener(\\\"DOMContentLoaded\\\",completed);window.removeEventListener(\\\"load\\\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called\",\n \"function completed(){document.removeEventListener(\\\"DOMContentLoaded\\\",completed);window.removeEventListener(\\\"load\\\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called\",\n \"function completed(){document.removeEventListener(\\\"DOMContentLoaded\\\",completed);window.removeEventListener(\\\"load\\\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called\",\n \"function completed() {\\n\\n // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n if (document.addEventListener ||\\n window.event.type === \\\"load\\\" ||\\n document.readyState === \\\"complete\\\") {\\n\\n detach();\\n jQuery.ready();\\n }\\n }\",\n \"function completed() {\\n\\n // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n if (document.addEventListener ||\\n window.event.type === \\\"load\\\" ||\\n document.readyState === \\\"complete\\\") {\\n\\n detach();\\n jQuery.ready();\\n }\\n }\",\n \"function completed() {\\n // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n if ( document.addEventListener || event.type === \\\"load\\\" || document.readyState === \\\"complete\\\" ) {\\n detach();\\n jQuery.ready();\\n }\\n }\",\n \"function mkdfOnDocumentReady() {\\n\\t\\tmkdfScrollingImage();\\n\\t}\",\n \"function onPageLoaded() {\\n}\",\n \"function ready() {\\n if (!readyFired) {\\n // this must be set to true before we start calling callbacks\\n readyFired = true;\\n for (var i = 0; i < readyList.length; i++) {\\n // if a callback here happens to add new ready handlers,\\n // the docReady() function will see that it already fired\\n // and will schedule the callback to run right after\\n // this event loop finishes so all handlers will still execute\\n // in order and no new ones will be added to the readyList\\n // while we are processing the list\\n readyList[i].fn.call(window, readyList[i].ctx);\\n }\\n // allow any closures held by these functions to free\\n readyList = [];\\n }\\n }\",\n \"onLoad() {}\",\n \"function whenDocumentReady(callback, doc) {\\r\\n if (!isDocumentReady(doc)) {\\r\\n var checkReady = function() {\\r\\n if (doc.readyState === 'complete' || \\r\\n doc.readyState === requiredReadyState) {\\r\\n doc.removeEventListener(READY_EVENT, checkReady);\\r\\n whenDocumentReady(callback, doc);\\r\\n }\\r\\n }\\r\\n doc.addEventListener(READY_EVENT, checkReady);\\r\\n } else if (callback) {\\r\\n callback();\\r\\n }\\r\\n}\",\n \"function completed() {\\r\\n\\r\\n\\t\\t// readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\r\\n\\t\\tif (document.addEventListener ||\\r\\n\\t\\t\\twindow.event.type === \\\"load\\\" ||\\r\\n\\t\\t\\tdocument.readyState === \\\"complete\\\") {\\r\\n\\r\\n\\t\\t\\tdetach();\\r\\n\\t\\t\\tjQuery.ready();\\r\\n\\t\\t}\\r\\n\\t}\",\n \"function pageReady() {\\n legacySupport();\\n\\n updateHeaderActiveClass();\\n initHeaderScroll();\\n\\n setLogDefaultState();\\n setStepsClasses();\\n _window.on('resize', debounce(setStepsClasses, 200))\\n\\n initMasks();\\n initValidations();\\n initSelectric();\\n initDatepicker();\\n\\n _window.on('resize', debounce(setBreakpoint, 200))\\n }\",\n \"function ready() {\\n if (!readyFired) {\\n // this must be set to true before we start calling callbacks\\n readyFired = true;\\n for (var i = 0; i < readyList.length; i++) {\\n // if a callback here happens to add new ready handlers,\\n // the docReady() function will see that it already fired\\n // and will schedule the callback to run right after\\n // this event loop finishes so all handlers will still execute\\n // in order and no new ones will be added to the readyList\\n // while we are processing the list\\n readyList[i].fn.call(window, readyList[i].ctx);\\n }\\n // allow any closures held by these functions to free\\n readyList = [];\\n }\\n}\",\n \"function eltdfOnDocumentReady() {\\n eltdfHeaderBehaviour();\\n eltdfSideArea();\\n eltdfSideAreaScroll();\\n eltdfFullscreenMenu();\\n eltdfInitDividedHeaderMenu();\\n eltdfInitMobileNavigation();\\n eltdfMobileHeaderBehavior();\\n eltdfSetDropDownMenuPosition();\\n eltdfDropDownMenu();\\n eltdfSearch();\\n eltdfVerticalMenu().init();\\n }\",\n \"onLoad () {}\",\n \"function audioEditorDocumentReady() {\\n audioEditorDocumentReadyPreview();\\n audioEditorDocumentReadyCutters();\\n audioEditorDocumentReadyGeneral();\\n}\",\n \"function mkdOnDocumentReady() {\\n\\t mkdIconWithHover().init();\\n\\t mkdIEversion();\\n\\t mkdInitAnchor().init();\\n\\t mkdInitBackToTop();\\n\\t mkdBackButtonShowHide();\\n\\t mkdInitSelfHostedVideoPlayer();\\n\\t mkdSelfHostedVideoSize();\\n\\t mkdFluidVideo();\\n\\t mkdOwlSlider();\\n\\t mkdPreloadBackgrounds();\\n\\t mkdPrettyPhoto();\\n mkdInitCustomMenuDropdown();\\n }\",\n \"ready() {\\r\\n\\t\\t// Override this\\r\\n\\t\\tthis.updateTitle();\\r\\n\\t}\",\n \"function ready() {\\n if (!readyFired) {\\n // this must be set to true before we start calling callbacks\\n readyFired = true;\\n for (var i = 0; i < readyList.length; i++) {\\n // if a callback here happens to add new ready handlers,\\n // the docReady() function will see that it already fired\\n // and will schedule the callback to run right after\\n // this event loop finishes so all handlers will still execute\\n // in order and no new ones will be added to the readyList\\n // while we are processing the list\\n readyList[i].fn.call(window, readyList[i].ctx);\\n }\\n // allow any closures held by these functions to free\\n readyList = [];\\n }\\n }\",\n \"function ready() {\\n if (!readyFired) {\\n // this must be set to true before we start calling callbacks\\n readyFired = true;\\n for (var i = 0; i < readyList.length; i++) {\\n // if a callback here happens to add new ready handlers,\\n // the docReady() function will see that it already fired\\n // and will schedule the callback to run right after\\n // this event loop finishes so all handlers will still execute\\n // in order and no new ones will be added to the readyList\\n // while we are processing the list\\n readyList[i].fn.call(window, readyList[i].ctx);\\n }\\n // allow any closures held by these functions to free\\n readyList = [];\\n }\\n }\",\n \"function completed() {\\n // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n if ( document.addEventListener || event.type === \\\"load\\\" || document.readyState === \\\"complete\\\" ) {\\n detach();\\n jQuery.ready();\\n }\\n}\",\n \"function completed() {\\n // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n if ( document.addEventListener || event.type === \\\"load\\\" || document.readyState === \\\"complete\\\" ) {\\n detach();\\n jQuery.ready();\\n }\\n}\",\n \"function completed() {\\n // readyState === \\\"complete\\\" is good enough for us to call the dom ready in oldIE\\n if ( document.addEventListener || event.type === \\\"load\\\" || document.readyState === \\\"complete\\\" ) {\\n detach();\\n jQuery.ready();\\n }\\n}\",\n \"ready() {\\n this._root = this._createRoot();\\n super.ready();\\n this._firstRendered();\\n }\",\n \"function cb_contentLoaded(cb) {}\",\n \"function init() {\\n //called when document is fully loaded; your \\\"main method\\\"\\n}\",\n \"function imageEditorDocumentReady() {\\n imageEditorDocumentReadyGeneral();\\n imageEditorDocumentReadyCrop();\\n imageEditorDocumentReadyTexts();\\n imageEditorDocumentReadyUndo();\\n}\"\n]"},"negative_scores":{"kind":"list like","value":["0.7816856","0.7520798","0.7399275","0.73742586","0.719712","0.71568376","0.71178716","0.71035826","0.71035826","0.71035826","0.71035826","0.71035826","0.71035826","0.71035826","0.71035826","0.7045191","0.7019945","0.6991388","0.6991286","0.6967816","0.6944398","0.693279","0.6930231","0.6888961","0.68239","0.6806155","0.6806155","0.6806155","0.6798873","0.67882353","0.6763206","0.6759213","0.67563176","0.67362523","0.67075044","0.67029107","0.67013866","0.66825753","0.66474247","0.66406274","0.66352457","0.66315025","0.6628601","0.66268474","0.6605401","0.6605401","0.6605401","0.6605401","0.6600669","0.6596197","0.6591326","0.65791625","0.65783674","0.6576442","0.6575247","0.6573761","0.6571042","0.6567659","0.6546816","0.6546816","0.6546816","0.6546816","0.65409315","0.6533924","0.6531099","0.6522324","0.6521728","0.6519321","0.6510049","0.65095264","0.65094215","0.6509298","0.6506786","0.6506786","0.6506786","0.6506786","0.6504327","0.6504327","0.6502448","0.6493498","0.6486083","0.6483975","0.64834696","0.64833","0.64811","0.6471816","0.64697903","0.6467162","0.64655787","0.6452174","0.64472","0.64406145","0.6436225","0.6436225","0.64351666","0.6429145","0.6429145","0.6424981","0.64208674","0.6408737","0.6389336"],"string":"[\n \"0.7816856\",\n \"0.7520798\",\n \"0.7399275\",\n \"0.73742586\",\n \"0.719712\",\n \"0.71568376\",\n \"0.71178716\",\n \"0.71035826\",\n \"0.71035826\",\n \"0.71035826\",\n \"0.71035826\",\n \"0.71035826\",\n \"0.71035826\",\n \"0.71035826\",\n \"0.71035826\",\n \"0.7045191\",\n \"0.7019945\",\n \"0.6991388\",\n \"0.6991286\",\n \"0.6967816\",\n \"0.6944398\",\n \"0.693279\",\n \"0.6930231\",\n \"0.6888961\",\n \"0.68239\",\n \"0.6806155\",\n \"0.6806155\",\n \"0.6806155\",\n \"0.6798873\",\n \"0.67882353\",\n \"0.6763206\",\n \"0.6759213\",\n \"0.67563176\",\n \"0.67362523\",\n \"0.67075044\",\n \"0.67029107\",\n \"0.67013866\",\n \"0.66825753\",\n \"0.66474247\",\n \"0.66406274\",\n \"0.66352457\",\n \"0.66315025\",\n \"0.6628601\",\n \"0.66268474\",\n \"0.6605401\",\n \"0.6605401\",\n \"0.6605401\",\n \"0.6605401\",\n \"0.6600669\",\n \"0.6596197\",\n \"0.6591326\",\n \"0.65791625\",\n \"0.65783674\",\n \"0.6576442\",\n \"0.6575247\",\n \"0.6573761\",\n \"0.6571042\",\n \"0.6567659\",\n \"0.6546816\",\n \"0.6546816\",\n \"0.6546816\",\n \"0.6546816\",\n \"0.65409315\",\n \"0.6533924\",\n \"0.6531099\",\n \"0.6522324\",\n \"0.6521728\",\n \"0.6519321\",\n \"0.6510049\",\n \"0.65095264\",\n \"0.65094215\",\n \"0.6509298\",\n \"0.6506786\",\n \"0.6506786\",\n \"0.6506786\",\n \"0.6506786\",\n \"0.6504327\",\n \"0.6504327\",\n \"0.6502448\",\n \"0.6493498\",\n \"0.6486083\",\n \"0.6483975\",\n \"0.64834696\",\n \"0.64833\",\n \"0.64811\",\n \"0.6471816\",\n \"0.64697903\",\n \"0.6467162\",\n \"0.64655787\",\n \"0.6452174\",\n \"0.64472\",\n \"0.64406145\",\n \"0.6436225\",\n \"0.6436225\",\n \"0.64351666\",\n \"0.6429145\",\n \"0.6429145\",\n \"0.6424981\",\n \"0.64208674\",\n \"0.6408737\",\n \"0.6389336\"\n]"},"document_score":{"kind":"string","value":"0.0"},"document_rank":{"kind":"string","value":"-1"}}},{"rowIdx":81354,"cells":{"query":{"kind":"string","value":"Sets and stores a set of preferenes in the PortletPreferences"},"document":{"kind":"string","value":"function pag_setPreferences(setPrefsUrl, namespace, storePrefsUrl) {\n\n // Make the request from the arguments\n var args = pag_setPreferences.arguments;\n var postRequest = \"namespace=\" + encodeURIComponent(namespace);\n for (var i = 3; i < args.length; i += 2) {\n postRequest += \"&name=\" + encodeURIComponent(args[i]);\n postRequest += \"&value=\" + encodeURIComponent(args[i + 1]);\n }\n\n // Create and send an AJAX request to set the preferences\n var request = pag_newRequest();\n request.open(\"POST\", setPrefsUrl, false);\n request.setRequestHeader('Content-Type',\n 'application/x-www-form-urlencoded');\n request.send(postRequest);\n\n // If there is an error, alert us to it\n if (request.status != 200) {\n alert(\"Error setting preferences: \" + request.status);\n } else {\n\n // Make an AJAX request to store the preferences permanently\n request.open(\"POST\", storePrefsUrl, false);\n request.send(\"\");\n if (request.status != 200) {\n alert(\"Error storing preferences: \" + request.status);\n }\n }\n}"},"metadata":{"kind":"string","value":"{\n \"objective\": {\n \"self\": [],\n \"paired\": [],\n \"triplet\": [\n [\n \"query\",\n \"document\",\n \"negatives\"\n ]\n ]\n }\n}"},"negatives":{"kind":"list like","value":["function startPreferences(){\n preferences.set(to_json({\n\t\t\"list\": [\"n\", \"s\", \"o\", \"l1\", \"t1\", \"c1\", \"v\"],\n \"enterprise\": [\"n\", \"s\", \"o\", \"l1\", \"t1\", \"c1\", \"v\"],\n\t\t \"followUp\": [\"ABE.MC\",\"ABG.MC\",\"ACS.MC\",\"ACX.MC\",\"ANA.MC\",\"BBVA.MC\",\"BIBE.MC\",\"BKT.MC\",\"BME.MC\",\"BTL.MC\",\"BTO.MC\",\"CIN.MC\",\"CRI.MC\",\"ELE.MC\",\"ENG.MC\",\"FCC.MC\",\"FER.MC\",\"GAM.MC\",\"GAS.MC\",\"GRF.MC\",\"IBLA.MC\",\"IBR.MC\",\"IDR.MC\",\"ITX.MC\",\"MAP.MC\",\"MTS.MC\",\"OHL\",\"POP.MC\",\"REE.MC\",\"REP.MC\",\"SAB.MC\",\"SAN.MC\",\"SYV.MC\",\"TEF.MC\",\"TRE.MC\"]\n }));\n}","function savePreferences(){\n var tab0 = panelSettings.getTabByIndex(tabsIndexSettings[\"MarketEnterprise\"]);\n var tab1 = panelSettings.getTabByIndex(tabsIndexSettings[\"EnterpriseInformation\"]);\n\tvar tab2 = panelSettings.getTabByIndex(tabsIndexSettings[\"FollowUp\"]);\n //var tab2 = panelSettings.getTabByIndex(1);\n \n // Salvamos las preferencias de la primera pestaña\n var listRight = tab0.__context[\"listRight\"];\n dictPreferences = {}\n var listAux = ['n', 's'];\n \n for (var i = 0; i < listRight.length; i++) \n listAux[listAux.length] = listRight[i][0];\n \n dictPreferences[\"list\"] = listAux;\n \n // Salvamos las preferencias de la segunda pestaña\n var listRight = tab1.__context[\"listRight\"];\n var listAux = ['n', 's'];\n \n for (var i = 0; i < listRight.length; i++) \n listAux[listAux.length] = listRight[i][0];\n \n\tdictPreferences[\"enterprise\"] = listAux;\n\t\n\tvar listRight = tab2.__context[\"listRight\"];\n\tvar listAux = [];\n\t\n\tfor(var i=0; i < listRight.length; i++)\n\t\tlistAux[listAux.length] = listRight[i][0];\n\t\n \tdictPreferences[\"followUp\"] = listAux;\n preferences.set(to_json(dictPreferences));\n \n\tvar currentTab = panelMain.getTabByIndex(0);\n\tcurrentTab[\"__context\"] = {};\n\tcurrentTab.__context[\"type\"] = 1;\n\tcurrentTab.__context[\"symbols\"] = dictPreferences.followUp;\n\tcurrentTab.__context[\"tags\"] = dictPreferences.list;\n\t\n // Volvemos a la pantalla principal\n displayAlternativeInfo();\n}","function loadRecommendedPreferences(all) {\n \tfor (var key in recommendedPreferences) {\n \t\tif (!all && /customstyle|actions/.test(key))\n \t\t\tcontinue;\n\n \t\t/*if (Object.isObject(recommendedPreferences[key]))\n \t\t\tpref.setPref(key, Object.union(recommendedPreferences[key], pref.getPref(key)));\n \t\telse*/\n \t\t\tpref.setPref(key, recommendedPreferences[key]);\n \t}\n\n \tcheckActions(true);\n\n \tlog.info(\"prefs:\",\n \t\t\"Some preferences are (re)setted to recommended values.\"\n \t);\n }","changePreferences(newPreferences){\n this.preferences = newPreferences;\n }","function setPreferencesOnLocalStore(){\n \n kony.store.setItem(\"preferences\", preferencesArray);\n alert(\"Preferences stored successfully: \" + JSON.stringify(kony.store.getItem(\"preferences\")));\n \n}","function setFromUserPreferences() {\n var origin = UserPreferences.getPreference('origin');\n var destination = UserPreferences.getPreference('destination');\n\n if (origin && origin.location) {\n typeaheads.origin.setValue(UserPreferences.getPreference('originText'));\n } else {\n typeaheads.origin.setValue('');\n }\n\n if (destination && destination.location) {\n typeaheads.destination.setValue(UserPreferences.getPreference('destinationText'));\n } else {\n typeaheads.destination.setValue('');\n }\n }","function setDefaultPrefs() {\r\n console.debug(\"setDefaultPrefs CP1\");\r\n let branch = Services.prefs.getDefaultBranch(PREF_BRANCH);\r\n for (let key of Object.keys(PREFS)) {\r\n let val = PREFS[key];\r\n console.debug(\"setDefaultPrefs CP2: key=\" + key + \" val=\" + val);\r\n switch (typeof val) {\r\n case \"boolean\":\r\n branch.setBoolPref(key, val);\r\n break;\r\n case \"string\":\r\n branch.setCharPref(key, val);\r\n break;\r\n }\r\n }\r\n}","getPreferencesProperties() {\n return this.artboardPreferenceProperties.concat(this.preferenceProperties.slice());\n }","function SetPreferences(prefId,prefName,udmName,enttdiv,pageType,caption,recordId,userId) \n{\n\tif(!prefId)prefId='';\n\tif(!prefName)prefName='';\n\tif(!udmName)udmName='';\n\tif(!enttdiv)enttdiv='';\n\tif(!pageType)pageType='';\n\tif(!caption)caption='';\n\tif(!recordId)recordId='';\n\tif(!userId)userId='';\n\tif(recordId&&(recordId.indexOf(\".\")>0))\n\t{\n recordId=recordId.replace(/\\,/g,\"\");\n\trecordId=recordId.split(\".\");\n recordId=recordId[0];\n\t}\n var queryString = \"prefId=\" + prefId + \"&prefName=\" + prefName + \"&udmName=\" + udmName + \"&enttdiv=\" + enttdiv + \"&pageType=\" + pageType + \"&caption=\" + caption +\"&recordId=\" + recordId+\"&userId=\" + userId;\n\tmainUrl=zcServletPrefix+\"/custom/JSON/system/changePageLayout.html?\" + queryString;\n\tsetUpPageParameters(mainUrl);\n}","function savePreferences(prefs) {\n let userProps = PropertiesService.getUserProperties();\n for (let key in prefs)\n userProps.setProperty(key, prefs[key]);\n}","function savePrefs()\n{\n let preferences = collatePrefs( prefs );\n browser.storage.local.set({\"preferences\": preferences});\n}","function loadPreferences() {\r\n var xpath = 'id(\"fap_prefs\")//input';\r\n var nodo;\r\n var iterator = findNodes(d, xpath);\r\n while ((nodo = iterator.iterateNext()) != null) {\r\n var valor = getPreference(nodo.name, \"undefined\");\r\n switch (nodo.type) {\r\n case \"checkbox\":nodo.checked = (valor != \"undefined\") ? valor : nodo.checked; break;\r\n //case \"text\":nodo.value = (valor != \"undefined\") ? valor : \"\";break;\r\n case \"radio\":nodo.checked = (valor != \"undefined\") ? (nodo.value == valor) : (nodo.value == \"default\");break;\r\n }\r\n }\r\n }","function loadPreferencesOnStartup() {\n\t\tthis.language = this.setLanguage();\n\t\tthis.dictionary = window['lang_' + this.language];\n\t\tthis.routingLanguage = this.setRoutingLanguage();\n\t\tthis.distanceUnit = this.setDistanceUnit();\n\t\tthis.version = this.setVersion();\n\n\t\t//return GET variables that have to be applied to other objects\n\t\treturn readGetVars();\n\t}","getPreferencesProperties() {\n return this.preferenceProperties.slice();\n }","function lc_savePreferences(prefs){\r\n if(!GM_setValue) return;\r\n for(opt in prefs){\r\n // prefs we do not save\r\n if(/^(debug|styles)$/.test(opt)) continue;\r\n if(typeof prefs[opt] == 'object'){\r\n // loop through objects (as in lc_Prefs.accel.altKey)\r\n for(oopt in prefs[opt]){\r\n GM_setValue(oopt, prefs[opt][oopt]);\r\n }\r\n }else{\r\n GM_setValue(opt, prefs[opt]);\r\n }\r\n }\r\n}","function load_all_preferences() {\n // load the domains\n load_domains();\n // load the main options\n load_main_options();\n}","function setPref(id,p) {\n\n\tif (id === \"mtd_core_theme\") {\n\t\treturn;\n\t}\n\n\tif (exists(store)) {\n\t\tstore.set(id,p);\n\t} else {\n\t\tlocalStorage.setItem(id,p);\n\t}\n\n\tif (debugStorageSys)\n\t\tconsole.log(\"setPref \"+id+\" to \"+p);\n}","function showUserPreferences(compagnia, clima, mezzo, viaggio){\r\n\tif(compagnia != -1) //Se non è specificata, lasciamo il più\r\n\t\tmodifyPreference(COMPAGNIA, compagnia);\r\n\tif(clima != -1)\r\n\t\tmodifyPreference(CLIMA, clima);\r\n\tif(mezzo != -1)\r\n\t\tmodifyPreference(MEZZO, mezzo);\r\n\tif(viaggio != -1) \r\n\t\tmodifyPreference(VIAGGIO, viaggio);\r\n}","function loadUserPreferences(){\n\t\toptions = getUserPreferences();\n\t}","function setUserPreferences(version, language, routingLanguage, distanceUnit) {\n\t\t\t//setting version\n\t\t\tvar container = $('#extendedVersionPrefs').get(0);\n\t\t\tcontainer = container.options;\n\t\t\tfor (var i = 0; i < list.version.length; i++) {\n\t\t\t\tif (list.version[i] === version) {\n\t\t\t\t\t//set selected = true\n\t\t\t\t\tcontainer[i].selected = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//setting language\n\t\t\tcontainer = $('#languagePrefs').get(0);\n\t\t\tcontainer = container.options;\n\t\t\tfor (var i = 0; i < list.languages.length; i++) {\n\t\t\t\tif (list.languages[i] === language) {\n\t\t\t\t\t//set selected = true\n\t\t\t\t\tcontainer[i].selected = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//setting routingLanguage\n\t\t\tcontainer = $('#routingLanguagePrefs').get(0);\n\t\t\tcontainer = container.options;\n\t\t\tfor (var i = 0; i < list.routingLanguages.length; i++) {\n\t\t\t\tif (list.routingLanguages[i] === routingLanguage) {\n\t\t\t\t\t//set selected = true\n\t\t\t\t\tcontainer[i].selected = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//setting distanceUnit\n\t\t\tcontainer = $('#unitPrefs').get(0);\n\t\t\tcontainer = container.options;\n\t\t\tfor (var i = 0; i < list.distanceUnitsPreferences.length; i++) {\n\t\t\t\tif (list.distanceUnitsPreferences[i] === distanceUnit) {\n\t\t\t\t\t//set selected = true\n\t\t\t\t\tcontainer[i].selected = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}","function setPreference(preference){\n \n for (var i = 0; i < preferencesArray.length; i++) {\n \n \tif (preferencesArray[i] == preference){\n preferencesArray.splice(i, 1);\n return;\n }\n \n }\n \n preferencesArray.push(preference);\n \n return;\n \n}","function loadPreferencePopupData() {\n\t\t//versions\n\t\tvar container = $('#extendedVersionPrefs');\n\t\tfor (var i = 0; i < list.version.length; i++) {\n\t\t\tvar optionElement = new Element('option', {\n\t\t\t\t'value' : i\n\t\t\t});\n\t\t\tif (i == 0) {\n\t\t\t\toptionElement.selected = true;\n\t\t\t}\n\t\t\t$(optionElement).html(p.translate(list.version[i]));\n\t\t\tcontainer.append(optionElement);\n\t\t}\n\t\t//languages\n\t\tcontainer = $('#languagePrefs');\n\t\tfor (var i = 0; i < list.languages.length; i++) {\n\t\t\tvar optionElement = new Element('option', {\n\t\t\t\t'value' : i\n\t\t\t});\n\t\t\tif (i == 0) {\n\t\t\t\toptionElement.selected = true;\n\t\t\t}\n\t\t\t$(optionElement).html(p.translate(list.languages[i]));\n\t\t\tcontainer.append(optionElement);\n\t\t}\n\n\t\t//routing languages\n\t\tcontainer = $('#routingLanguagePrefs');\n\t\tfor (var i = 0; i < list.routingLanguages.length; i++) {\n\t\t\tvar optionElement = new Element('option', {\n\t\t\t\t'value' : i\n\t\t\t});\n\t\t\tif (i == 0) {\n\t\t\t\toptionElement.selected = true;\n\t\t\t}\n\t\t\t$(optionElement).html(p.translate(list.routingLanguages[i]));\n\t\t\tcontainer.append(optionElement);\n\t\t}\n\n\t\t//distance units\n\t\tcontainer = $('#unitPrefs');\n\t\tfor (var i = 0; i < list.distanceUnitsPreferences.length; i++) {\n\t\t\tvar optionElement = new Element('option', {\n\t\t\t\t'value' : i\n\t\t\t});\n\t\t\tif (i == 0) {\n\t\t\t\toptionElement.selected = true;\n\t\t\t}\n\t\t\t$(optionElement).html(list.distanceUnitsInPopup[i]);\n\t\t\tcontainer.append(optionElement);\n\t\t}\n\t}","function setPreferencesForm(npsetObject) {\n\n\tif (npsetObject.hasOwnProperty('token') && npsetObject.hasOwnProperty('preferences')) {\n\t// The needs and preferences object has a property 'token' and a property 'preferences'\n\n\t\tif (npsetObject['token'] == \"\") {\n\t\t\t// The preferences object is empty and the token is an empty string\n\n\t\t\t/*console.log('set of needs and preferences not stored locally');\n\t\t\tinputFormDiv.style.display = 'block';\n\t\t\tlogInfoDiv.style.display = 'none';\n\n\t\t\ttokenInput.focus();*/\n\t\t\t// chrome.tts.speak(\"Welcome to Cloud For All. Press TAB for options.\");\n\n\t\t} else {\n\t\t\t// Either the token is a valid string or there are actual preferences \n\t\t\tconsole.log('set of needs and preferences stored locally');\n\t\t \n\t\t\t// The preferences object is not empty\n\t\t\tvar preferences = npsetObject['preferences'];\n\t\t\n\t\t\tif (preferences.hasOwnProperty(\"fontSize\")) {\n\t\t\t\tconsole.log(\"FontSize: \" + preferences[\"fontSize\"]);\n\t\t\t\tvar fontSize = preferences[\"fontSize\"];\n\t\t\t\tif(fontSize == \"M\")\n\t\t\t\t{\n\t\t\t\t\tfontSizeHandler(\"M\", \"\", 435, false);\n\t\t\t\t\tfontSizeNormal.checked = true;\n\t\t\t\t} \n\t\t\t\telse if(fontSize == \"L\")\n\t\t\t\t{\n\t\t\t\t\tfontSizeHandler(\"L\", \"large-cp\", 500, false);\n\t\t\t\t\tfontSizeLarge.checked = true;\n\t\t\t\t} \n\t\t\t\telse if(fontSize == \"XL\")\n\t\t\t\t{\n\t\t\t\t\tfontSizeHandler(\"XL\", \"x-large-cp\", 580, false);\n\t\t\t\t\tfontSizeXLarge.checked = true;\n\t\t\t\t} \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfontSizeHandler(\"M\", \"\", 435, false);\n\t\t\t\tfontSizeNormal.checked = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (preferences.hasOwnProperty(\"fontFace\")) {\n\t\t\t\tconsole.log(\n\t\t\t\t\t\"FONT FACE: \" +\n\t\t\t\t\tpreferences[\"fontFace\"]\n\t\t\t\t);\n\t\t\t\tfontFaceSelect.value = preferences[\"fontFace\"];\n\t\t\t}\n\t\t\t\n\t\t\tif (preferences.hasOwnProperty(\"magnification\")) {\n\t\t\t\tconsole.log(\n\t\t\t\t\t\"MAGNIFICATION: \" +\n\t\t\t\t\tpreferences[\"magnification\"]\n\t\t\t\t);\n\t\t\t\tvar zoomDisplayValue = preferences[\"magnification\"];\n\t\t\t\tzoomDisplayValue = zoomDisplayValue.toFixed(2) * 100;\n\t\t\t\tzoomDisplay.value = zoomDisplayValue + \"%\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tzoomDisplay.value = \"100%\";\n\t\t\t}\n\t\t\t\n\t\t\tif (preferences.hasOwnProperty(\"lineheight\")) {\n\t\t\t\tconsole.log(\n\t\t\t\t\t\"LINEHEIGHT: \" +\n\t\t\t\t\tpreferences[\"lineheight\"]\n\t\t\t\t);\n\t\t\t\tvar lineheightDisplayValue = preferences[\"lineheight\"];\n\t\t\t\tlineheightDisplayValue = lineheightDisplayValue.toFixed(2) * 100;\n\t\t\t\tlinespaceDisplay.value = lineheightDisplayValue + \"%\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlinespaceDisplay.value = \"100%\";\n\t\t\t}\n\t\t\t\t\n\t\t\t//if(!zoomEnableCkecbox.checked) zoomLevel.disabled = true;\n\n\t\t\tif (preferences.hasOwnProperty(\"highContrastEnabled\") && preferences[\"highContrastEnabled\"] == true && preferences.hasOwnProperty(\"backgroundColour\") && preferences.hasOwnProperty(\"foregroundColour\")) {\n\t\t\t\tvar background = preferences[\"backgroundColour\"];\n\t\t\t\tvar foreground = preferences[\"foregroundColour\"];\n\t\t\t\t\n\t\t\t\tif(background == \"#000000\" && foreground == \"#FFFFFF\")\n\t\t\t\t{\n\t\t\t\t\thighContrastWhiteBlack.checked = true;\n\t\t\t\t\thighContrastHandler(\"#000000\", \"#FFFFFF\", \"wbcp\", false);\n\t\t\t\t} \n\t\t\t\telse if(background == \"#FFFFFF\" && foreground == \"#000000\")\n\t\t\t\t{\n\t\t\t\t\thighContrastBlackWhite.checked = true;\n\t\t\t\t\thighContrastHandler(\"#FFFFFF\", \"#000000\", \"bwcp\", false);\n\t\t\t\t} \n\t\t\t\telse if(background == \"#000000\" && foreground == \"#FFFF00\")\n\t\t\t\t{\n\t\t\t\t\thighContrastYellowBlack.checked = true;\n\t\t\t\t\thighContrastHandler(\"#000000\", \"#FFFF00\", \"ybcp\", false);\n\t\t\t\t} \n\t\t\t\telse if(background == \"#FFFF00\" && foreground == \"#000000\")\n\t\t\t\t{\n\t\t\t\t\thighContrastBlackYellow.checked = true;\n\t\t\t\t\thighContrastHandler(\"#FFFF00\", \"#000000\", \"bycp\", false);\n\t\t\t\t} \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnoHighContrast.checked = true;\n\t\t\t\t\thighContrastHandler(\"\", \"\", \"\", false);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnoHighContrast.checked = true;\n\t\t\t\thighContrastHandler(\"\", \"\", \"\", false);\n\t\t\t}\n\n\t\t\tif (preferences.hasOwnProperty(\"invertColours\") && preferences[\"invertColours\"] == true) {\n\t\t\t\tconsole.log(\n\t\t\t\t\t\"INVERT COLORS: \" +\n\t\t\t\t\tpreferences[\"invertColours\"]\n\t\t\t\t);\n\t\t\t\tvar inverted = preferences[\"invertColours\"];\n\t\t\t\tinvertColours.checked = inverted;\n\t\t\t\tif(inverted) invertColorHandler(false);\n\t\t\t}\n\t\t\t\n\t\t\tif (preferences.hasOwnProperty(\"synonyms\")) {\n\t\t\t\tconsole.log(\n\t\t\t\t\t\"SYNONYMS: \" +\n\t\t\t\t\tpreferences[\"synonyms\"]\n\t\t\t\t);\n\t\t\t\tvar synonyms = preferences[\"synonyms\"];\n\t\t\t\tinvertColours.checked = synonyms;\n\t\t\t}\n\t\t\t\n\t\t\tif (preferences.hasOwnProperty(\"cursorSize\")) {\n\t\t\t\tconsole.log(\"CursorSize: \" + preferences[\"cursorSize\"]);\n\t\t\t\tvar fontSize = preferences[\"cursorSize\"];\n\t\t\t\tif(fontSize == \"normal\")\n\t\t\t\t{\n\t\t\t\t\tcursorSizeNormal.checked = true;\n\t\t\t\t\thtmlNode.removeAttribute('cs');\n\t\t\t\t} \n\t\t\t\telse if(fontSize == \"large\")\n\t\t\t\t{\n\t\t\t\t\tcursorSizeLarge.checked = true;\n\t\t\t\t\thtmlNode.setAttribute('cs', \"large-cp\");\n\t\t\t\t} \n\t\t\t\telse if(fontSize == \"x-large\")\n\t\t\t\t{\n\t\t\t\t\tcursorSizeXLarge.checked = true;\n\t\t\t\t\thtmlNode.setAttribute('cs', \"x-large-cp\");\n\t\t\t\t} \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursorSizeNormal.checked = true;\n\t\t\t\thtmlNode.removeAttribute('cs');\n\t\t\t}\n\t\t\n\t\t} // The preferences object is empty and the token is an empty string\n\t} else {\n\t// The preferences object lacks the token property or the preferences property\n\tconsole.log('The JSON object is not well built');\n\t} \n}","function loadDefaultPreferences() {\n \tfor (var key in defaultPreferences) {\n \t\t// Skip this ones.\n \t\tif (/firstrun|version|updatechecktime/.test(key))\n \t\t\tcontinue;\n\n \t\tpref.setPref(key, defaultPreferences[key]);\n \t}\n\n \tlog.info(\"prefs:\",\n \t\t\"Preferences are (re)setted to default values.\"\n \t);\n }","function _ConvertePericias() {\n for (var i = 0; i < gEntradas.pericias.length; ++i) {\n var pericia_personagem = gPersonagem.pericias.lista[gEntradas.pericias[i].chave];\n pericia_personagem.pontos = gEntradas.pericias[i].pontos;\n pericia_personagem.complemento = 'complemento' in gEntradas.pericias[i] ? gEntradas.pericias[i].complemento : '';\n }\n}","_setPersistedViewSettings() {\n this.settings.setPreferences();\n }","function setFromUserPreferences() {\n var origin = UserPreferences.getPreference('origin');\n var destination = UserPreferences.getPreference('destination');\n var tourMode = UserPreferences.getPreference('tourMode');\n\n if (origin && origin.location) {\n directions.origin = [origin.location.y, origin.location.x];\n } else if (tourMode === 'tour') {\n // Support using browser history to return to a tour without an origin set\n directions.origin = null;\n directionsFormControl.setStoredLocation('origin', null);\n }\n\n if (destination && destination.location) {\n directions.destination = [destination.location.y, destination.location.x];\n }\n\n if (tabControl.isTabShowing(tabControl.TABS.DIRECTIONS)) {\n // get nearby places if no destination has been set yet, or get directions\n // Fetch tour destinations on tour directions page (re)load\n if (tourMode && destination) {\n showSpinner();\n Places.queryPlaces(null, destination.address).then(function(data) {\n tour = null;\n if (tourMode === 'tour' && data.tours && data.tours.length) {\n tour = _.find(data.tours, function(tour) {\n return tour.name === destination.address;\n });\n if (tour) {\n // Match format of Typeahead response\n tour.id = 'tour_' + tour.id;\n }\n // Reset the tour to update map with user edits to the destinations/order\n tourListControl.resetTour(tour.id);\n } else if (tourMode === 'event' && data.events && data.events.length) {\n tour = data.events[0];\n // Go directly to route for single-destination events\n if (tour.destinations && tour.destinations.length === 1) {\n UserPreferences.setPreference('tourMode', false);\n tour = null;\n tourListControl.resetTour();\n onTypeaheadSelectDone('destination', [data.events[0]]);\n return;\n }\n }\n if (tour) {\n $(options.selectors.reverseButton).hide();\n onTypeaheadSelectDone('destination', tour.destinations);\n } else {\n console.error('Failed to find destinations for tour ' + destination.address);\n planTripOrShowPlaces();\n }\n }).fail(function(error) {\n console.error('Error querying for tour destinations:');\n console.error(error);\n planTripOrShowPlaces();\n });\n } else {\n $(options.selectors.reverseButton).show();\n // Not a tour; go to plan route\n planTripOrShowPlaces();\n }\n } else {\n // explore tab visible\n clearItineraries();\n showPlaces(true);\n }\n }","getPreferencesData() {\n var data = {};\n var property = \"\";\n var properties = this.getPreferencesProperties();\n var numOfProperties = properties.length;\n\n for (var i=0;i 0) {\n settings = '{' + settings.join(',') + '}';\n $.cookie('4cat', settings, {\n expires: 30,\n path: options.cookiePath,\n domain: options.cookieDomain\n });\n }\n else {\n $.cookie('4cat', null, {\n path: options.cookiePath,\n domain: options.cookieDomain\n });\n }\n }","function createPreferences()\n{\n var prefContainer = document.createElement('div');\n prefContainer.className = 'extra';\n prefContainer.id = common.apiname + '-settings';\n prefContainer.innerHTML = '
    ' + common.locale.header + '
    ';\n\n for (var name in common.settings)\n {\n if (common.locale[name])\n {\n $(prefContainer).append(createPreferenceElement(name));\n }\n }\n\n return prefContainer;\n}","function loadPreferences() {\n return PropertiesService.getUserProperties().getProperties();\n}","getPreferencesData() {\n var properties = this.getPreferencesProperties();\n var numberOfProperties = properties.length;\n var data = new UserGlobalPreferences();\n var property;\n\n for (var i=0;i= 3) {\n if(storedValue) {\n this.settings.profiles[this.settings.current] = storedValue;\n } else { // if no storedvalue is provided set the default value\n this.settings.profiles[this.settings.current] = this.defautStoredValue;\n }\n } else { // if we are on a predefined profile, set to no profile\n this.settings.current = 0;\n }\n this.readUserPref();\n };\n\n /**\n * Read browser cookies and save each user preference into the user\n * preference stackv3.\n */\n this.readUserPref = function () {\n if(this.settings.current.length <=1) {\n this.decode(this.predefinedSettings[this.settings.current]);\n } else {\n this.decode(this.settings.profiles[this.settings.current]);\n }\n this.finish = true;\n };\n\n\n /**\n * get the current saved pref ass the numerical string to be compared to current setting in the stack\n */\n this.getCurrentPref = function () {\n if(this.settings.current.length <=1) {\n return this.predefinedSettings[this.settings.current];\n } else {\n return this.settings.profiles[this.settings.current];\n }\n };\n\n /**\n * Wait for callback completed and user preference stackv3 updated\n * @return {Boolean} true if user preference is loaded, false otherwise.\n */\n this.isUserPrefLoaded = function () {\n return this.finish;\n };\n}","function saveSettings() {\n // debug('Saved');\n localStorage.setItem('autoTrimpSettings', JSON.stringify(autoTrimpSettings));\n}","function saveChoices(map) {\n var pn = getPlayerNameFromCharpane();\n if (pn) {\n var s = '';\n for (var cnum in map) {\n s += cnum+':'+map[cnum]+';';\n }\n //GM_log('setting map to: '+s);\n GM_setValue(pn+'_ncactionbar_choices',s);\n }\n}","function setSavedOptions() {\n log('Getting saved options.');\n GM_setValue(\"opt_loggingEnabled\", opt_loggingEnabled);\n GM_setValue(\"opt_hidefedded\", opt_hidefedded);\n GM_setValue(\"opt_hidefallen\", opt_hidefallen);\n GM_setValue(\"opt_hidetravel\", opt_hidetravel);\n GM_setValue(\"opt_showcaymans\", opt_showcaymans);\n GM_setValue(\"opt_hidehosp\", opt_hidehosp);\n GM_setValue(\"opt_disabled\", opt_disabled);\n }","function getPreferences() {\n return settings.get('preferences');\n}","function saveSettings(){\n\n showMenu();\n\n for (key in settingTmp){\n if (settingTmp.hasOwnProperty(key)){\n setting[key] = settingTmp[key];\n }\n }\n\n PopupModule.hide();\n }","function loadPageVariables() {\n var tmp = JSON.parse(localStorage.getItem('autoTrimpSettings'));\n if (tmp !== null) {\n autoTrimpSettings = tmp;\n }\n}","function retrieveAndSetPreference(){\n if(typeof(Storage) !== \"undefined\") { //Check if the browser supports local storage\n if(localStorage.guddi_ca_xkcd_user_preference){\n var userPreferenceRetrieved = JSON.parse(localStorage.getItem(\"guddi_ca_xkcd_user_preference\"));\n totWords.value = userPreferenceRetrieved[0];\n totSpChars.value = userPreferenceRetrieved[1];\n totNumbers.value = userPreferenceRetrieved[2];\n useSeparator.value = userPreferenceRetrieved[3];\n wordCase.value = userPreferenceRetrieved[4];\n savePreference.checked = userPreferenceRetrieved[5];\n } //End of inner IF\n } else {\n console.log(\"Error log: Web local storage is not supported in this browser!\");\n }//End of outer IF\n }","function setupLivePrefs(IDs) {\n var localIDs = {};\n IDs.forEach(function (id) {\n localIDs[id] = true;\n updateElement(id).addEventListener(\"change\", function () {\n prefs.set(this.id, isCheckbox(this) ? this.checked : this.value);\n });\n });\n chrome.runtime.onMessage.addListener(function (request) {\n if (request.prefName in localIDs) {\n updateElement(request.prefName);\n }\n });\n\n function updateElement(id) {\n var el = document.getElementById(id);\n el[isCheckbox(el) ? \"checked\" : \"value\"] = prefs.get(id);\n el.dispatchEvent(new Event(\"change\", {bubbles: true, cancelable: true}));\n return el;\n }\n}","function storeSettingsVariables() {\n $.each(userscriptSettings, function (key, set) {\n var isEnabled = $(\"#\" + set.id).prop(\"checked\");\n var setting = {\n name: set.id,\n value: isEnabled\n };\n Database.update(Database.Table.Settings, setting, undefined, function () {\n })\n });\n}","function storeSettingsVariables() {\n $.each(userscriptSettings, function (key, set) {\n var isEnabled = $(\"#\" + set.id).prop(\"checked\");\n var setting = {\n name: set.id,\n value: isEnabled\n };\n Database.update(Database.Table.Settings, setting, undefined, function () {\n })\n });\n}","async function load_Prefs() {\r\n let prefs = await browser.storage.local.get(\"Prefs\");\r\n let settings = prefs.Prefs;\r\n if (settings != null && settings != undefined){\r\n for (let key of Object.keys(settings)){\r\n let elem = document.getElementById(key);\r\n if (!elem) {\r\n continue;\r\n }\r\n if (elem.type == \"checkbox\") {\r\n elem.checked = settings[key];\r\n } else {\r\n elem.value = settings[key];\r\n }\r\n }\r\n }else{\r\n resetValues();\r\n }\r\n update_shown_Values();\r\n}","function handleSaveUserPreferences() {\n\t\t\tvar version = $('#extendedVersionPrefs').find(\":selected\").text();\n\t\t\tvar language = $('#languagePrefs').find(\":selected\").text();\n\t\t\tvar routingLanguage = $('#routingLanguagePrefs').find(\":selected\").text();\n\t\t\tvar distanceUnit = $('#unitPrefs').find(\":selected\").text();\n\n\t\t\t//version: one of list.version\n\t\t\tversion = preferences.reverseTranslate(version);\n\n\t\t\t//language: one of list.languages\n\t\t\tlanguage = preferences.reverseTranslate(language);\n\n\t\t\t//routing language: one of list.routingLanguages\n\t\t\troutingLanguage = preferences.reverseTranslate(routingLanguage);\n\n\t\t\t//units: one of list.distanceUnitsInPopup\n\t\t\tdistanceUnit = distanceUnit.split(' / ');\n\t\t\tfor (var i = 0; i < distanceUnit.length; i++) {\n\t\t\t\tfor (var j = 0; j < list.distanceUnitsPreferences.length; j++) {\n\t\t\t\t\tif (distanceUnit[i] === list.distanceUnitsPreferences[j]) {\n\t\t\t\t\t\tdistanceUnit = list.distanceUnitsPreferences[j];\n\t\t\t\t\t\ti = distanceUnit.length;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttheInterface.emit('ui:saveUserPreferences', {\n\t\t\t\tversion : version,\n\t\t\t\tlanguage : language,\n\t\t\t\troutingLanguage : routingLanguage,\n\t\t\t\tdistanceUnit : distanceUnit\n\t\t\t});\n\n\t\t\t//hide preferences window\n\t\t\t$('#sitePrefsModal').modal('hide');\n\t\t}","function saveSettings(){\n\t\tvar checkboxes = document.querySelectorAll('.accordion-header input[type=\"checkbox\"]');\n\t\tvar toSave = {};\n\t\t[].forEach.call(checkboxes,\tfunction (el) {\n\t\t\tvar id = el.parentNode.id;\n\t\t\tvar checked = el.checked;\n\t\t\ttoSave[id] = checked;\n\t\t});\n\t\t// console.log(\"Saving block preferences\", toSave);\n\t\tlocalStorage['__' + language + '_hidden_blocks'] = JSON.stringify(toSave);\n\t}","function getPortalPreferences(portalPrefCb) {\n\t\tif (!Ext.isEmpty(userLogin)) {\n\t\t\tvar portalPrefSuccess = function (response) {\n\t\t\t\tif (Ext.isEmpty(response.responseText)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tvar json = Ext.decode(response.responseText);\n\t\t\t\t\tif (!Ext.isEmpty(json.language)) {\n\t\t\t\t\t\tthis.app.language = json.language;\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t return;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tvar filePath = \"/\" + DEFAULT_PREFERENCES_FOLDER + '/portal';\n\n\t\t\tuserStorage.get(\"portal\", filePath, this, portalPrefSuccess,\n\t\t\t\t\tExt.emptyFn, portalPrefCb);\n\t\t} else {\n\t\t\tportalPrefCb.call(this);\n\t\t}\n\n\t}","function saveUserPreference(){\n if(savePreference.checked){\n if(typeof(Storage) !== \"undefined\") { //Check if the browser supports local storage\n var userPreference = [totWords.value,totSpChars.value,totNumbers.value,useSeparator.value,wordCase.value,savePreference.value];\n localStorage.setItem(\"guddi_ca_xkcd_user_preference\", JSON.stringify(userPreference));\n } else {\n console.log(\"Error log: Web local storage is not supported in this browser!\");\n }//End of inner IF\n } else{\n localStorage.clear();\n } //End of outer IF\n } //End of saveUserPreference() function","function _saveUserOptions () {\n var data = {\n mode: selected_travel_mode,\n latlng: visitor_location,\n location: current_visitor_location\n };\n var save = $.cookie('map_options', data, {expires: 7, path: '/'});\n }","function setPreference(articleIndex, likeOrNotString) {\n\tlocalStorage.setItem('likeArticle' + articleIndex.toString(), likeOrNotString);\n}","set dietPreference(dietPreference) {\n\t\tif (Array.isArray(dietPreference)) {\n\t\t\tthis._dietPreference = dietPreference.map((i) => new CodeableConcept(i));\n\t\t} else {\n\t\t\tthis._dietPreference = [new CodeableConcept(dietPreference)];\n\t\t}\n\t}","function save_options() {\n// var select = document.getElementById(\"color\");\n// var color = select.children[select.selectedIndex].value;\n// localStorage[\"favorite_color\"] = color;\n \t\n \tfor( i in pOptions){\n \t\tif(typeof(pOptions[i].def)=='boolean')\n \t\t\tlocalStorage[i] = document.getElementById(i).checked;\n \t\telse\n \t\t\tlocalStorage[i] = document.getElementById(i).value;\n \t}\n\t\n\t\n\t//localStorage[\"hqthumbs\"] = document.getElementById(\"hqthumbs\").checked;\n\t//localStorage[\"showCurrentTab\"] = document.getElementById(\"showCurrentTab\").checked;\n\t//localStorage[\"maxhistory\"] = document.getElementById(\"maxhistory\").value;\n\t\n\t\n // Update status to let user know options were saved.\n var status = document.getElementById(\"status\");\n Cr.empty(status).appendChild(Cr.txt(\"Options Saved.\"));\n setTimeout(function() {\n Cr.empty(status);\n }, 750);\n \n chrome.runtime.sendMessage({greeting: \"reloadprefs\"}, function(response) { });\n}","updatePrefs() {\n Sanitizer.prefs.setIntPref(\"timeSpan\", this.selectedTimespan);\n\n // Now manually set the prefs from their corresponding preference elements.\n let sanitizeItemList = document.querySelectorAll(\n \"#historyGroup > [preference]\"\n );\n for (let prefItem of sanitizeItemList) {\n let prefName = prefItem.getAttribute(\"preference\");\n Services.prefs.setBoolPref(prefName, prefItem.checked);\n }\n }","function addBranchSettings (preferences) {\n var filePath = 'platforms/ios/' + preferences.projectName + '/' + preferences.projectName + '-Info.plist'\n var xml = readPlist(filePath)\n var obj = convertXmlToObject(xml)\n\n obj = appendPlist(obj, preferences)\n obj = correctPlistBlanks(obj)\n xml = convertObjectToXml(obj)\n writePList(filePath, xml)\n }","function comparePrefs() {\n \tvar version = pref.getItem(\"version\"),\n \t\tdefs = Object.union(defaultPreferences, hiddenPreferences);\n \tif (version && String.natcmp(version, extVersion) < 0) {\n \t\texportPreferences();\n \t\tcheckOldStructure();\n\n \t\tpref.setPref(\"style\", defaultPreferences.style);\n \t\tpref.setPref(\"localisedStrings\", defaultPreferences.localisedStrings);\n \t\tpref.setPref(\"videoFormat\", defaultPreferences.videoFormat);\n \t}\n\n \tlog.info(\"prefs:\",\n \t\t\"Comparing preferences structure.\"\n \t);\n\n \tvar changes = compareStructure(defs);\n \tvar changedItems = changes.wrong.concat(changes.missing.filter(function (item) { return !/^actions\\./.test(item); }));\n\n \t// If there are changes restore them from recommended preferences.\n \tif (changedItems.length) {\n \t\tdefs = Object.union(recommendedPreferences, defs);\n\n \t\tchangedItems.forEach(function (item) {\n \t\t \n \t\t\tvar key = item.split('.');\n \t\t\tvar newPref = defs[key[0]];\n\n \t\t\tif (key[1]) {\n \t\t\t\tnewPref = pref.getPref(key[0]);\n \t\t\t\tnewPref[key[1]] = defs[key[0]][key[1]];\n \t\t\t}\n\n \t\t\tpref.setPref(key[0], newPref);\n \t\t});\n\n \t\tlog.warn(\"prefs:\",\n \t\t\t\"Preferences structure is changed outside of the extension. Changes are set to recommended preferences.\",\n \t\t\t\"Changed items are:\",\n \t\t\tchangedItems.join(\", \") + '.'\n \t\t);\n \t}\n \telse {\n \t\tlog.info(\"prefs:\",\n \t\t\t\"Preferences structure is OK.\"\n \t\t);\n \t}\n\n \tcheckActions();\n }","function setPolls(_polls) {\n polls = Object.values(_polls);\n}","function loadPageVariables() {\r\n \"use strict\";\r\n var tmp = JSON.parse(localStorage.getItem('TrimpzSettings'));\r\n if (tmp !== null) {\r\n trimpzSettings = tmp;\r\n }\r\n}","function loadOptionsIntoelements() {\n for (var option in elements.options)\n {\n var dataStoreValue = localStorage['sunjer_option_' + option];\n if (dataStoreValue) {\n if (dataStoreValue == \"true\" || dataStoreValue == \"false\")\n elements.options[option] = (dataStoreValue == 'true');\n else\n elements.options[option] = dataStoreValue;\n }\n else\n localStorage['sunjer_option_' + option] = elements.options[option];\n }\n}","function configureSettings() {\n // Load all the saved settings into the preferences object.\n PREF_OBJ.load();\n return true;\n}","function saveSettings() {\n\tlocalStorage.setItem (\"favs\", favs.join (','));\n\tlocalStorage.setItem (\"mode\", \"\"+mode);\n}","function addBranchSettings(preferences) {\n const filePath = `platforms/ios/${preferences.projectName}/${\n preferences.projectName\n }-Info.plist`;\n let xml = readPlist(filePath);\n let obj = convertXmlToObject(xml);\n\n obj = appendPlist(obj, preferences);\n obj = correctPlistBlanks(obj);\n xml = convertObjectToXml(obj);\n writePList(filePath, xml);\n }","storeStyles( pStyles ){\r\n \r\n var props = pStyles;\r\n var prefs = {\r\n fontFamily : props.fontFamily,\r\n fontSize : props.fontSize,\r\n lineHeight: props.lineHeight,\r\n margin : props.margin,\r\n theme : props.theme \r\n };\r\n \r\n window.localStorage.setItem(this.localStorageKey,\r\n JSON.stringify( prefs ));\r\n }","function sanitizePreferences(preferences) {\n return preferences.map((preference) => {\n return {\n dataType: preference.dataType,\n colour: preference.colour,\n visualization: preference.visualization\n }\n });\n}","function updateUserPreferences(atts) {\n\t\t\tif (preferences.version == atts.version && preferences.language == atts.language && preferences.routingLanguage == atts.routingLanguage && preferences.distanceUnit == atts.distanceUnit) {\n\t\t\t\t//nothing changed...\n\t\t\t} else {\n\t\t\t\tupdateCookies(preferences.versionIdx, atts.version);\n\t\t\t\tupdateCookies(preferences.languageIdx, atts.language);\n\t\t\t\tupdateCookies(preferences.routingLanguageIdx, atts.routingLanguage);\n\t\t\t\tupdateCookies(preferences.distanceUnitIdx, atts.distanceUnit);\n\n\t\t\t\t//reload page to apply changed preferences (e.g. other site language)\n\t\t\t\tpreferences.reloadWithPerma();\n\t\t\t}\n\t\t}","setPstate () {\r\n const O = this;\r\n if (O.is_multi && (O.is_floating || settings.okCancelInMulti)) {\r\n O.Pstate = [];\r\n // assuming that find returns elements in tree order\r\n O.E.find('option').each((i, e) => { if (e.selected) O.Pstate.push(i); });\r\n }\r\n }","function setPref(peopleObject, fruitObject){\n let people = keys(peopleObject)\n\n people.forEach( val => {\n let fruitInd = returnRandomIndex(fruitObject)\n peopleObject[val].setFruitPreference(fruitObject, fruitInd)\n })\n}","getPreferencesProperties(userProperties = false) {\n if (userProperties) {\n var userArray = this.preferenceProperties.slice();\n userArray = userArray.filter(x => !this.nonUserProperties.includes(x) )\n return userArray;\n }\n return this.preferenceProperties.slice();\n }","function createPreferencesRoutes () {\n router.route('/preferences/:org')\n .get(handler.getPreferences())\n .put(handler.updatePreferences())\n}","get prefs() {\n if (!this._prefs) {\n this._prefs = new PrefBranch(null, \"\", \"\");\n this._prefs._initializeRoot();\n }\n return this._prefs;\n }","function setProveedores(){\r\n localStorage.setItem('LSProveedores', JSON.stringify(proveedores));\r\n}","function setPrefs(feed,editOb,BW, prefs){\r\n\t//aŅadir al div de edit\r\n\teditArea=\"
    \";\r\n\t//para cada preferencia del widget\r\n \t$.each( feed, function(i,item){\r\n\t\t// segun los tipos de preferencias\r\n\t\tswitch (item.type) {\r\n\t\t\tcase \"range\"://rango de valores\r\n\t\t\t\teditArea = editArea + item.label+'

    ';\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"text\"://rango de valores\r\n\t\t\t\tif (item.defaultValue == undefined)\r\n\t\t\t\t\titem.defaultValue = '';\r\n\r\n\t\t\t\teditArea = editArea + item.label+'

    ';\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"list\"://lista de valores\r\n\t\t\t\topList='

    \"\r\n\t\t\t\teditArea = editArea + item.label+ opList;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"boolean\"://checkbox\r\n\t\t\t\tvar checked= '';\r\n\t\t\t\tif (prefs[item.name] != undefined && \r\n\t\t\t\t\t(prefs[item.name] == 'true' || prefs[item.name] == 'on' || prefs[item.name] == 1))\r\n\t\t\t\t\tchecked = 'checked=\"checked\"';\r\n\t\t\t\telse if(item.defaultValue == \"true\") checked=\"checked\";\r\n\t\t\t\teditArea= editArea +''+ item.label +'
    ';\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"hidden\"://oculto\r\n\t\t\t\t//no hacemos nada\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t});\r\n\t//link para aceptar los cambios\r\n\t//editArea = editArea + 'Send';\r\n\teditArea = editArea + '
    ';\r\n\teditObj.append(editArea);\r\n\t//agregamos una funcion javascript a este link\r\n\teditObj.children().children('.myWidget-sender').click( function(){\r\n\t\tvar thisObj=$(this).parent();\r\n\t\tvar prefs='{';\r\n\t\tvar cid = thisObj.parent().parent().parent().attr('id').substring(9);\r\n\t\tthisObj.children(\"input[type!='checkbox']\").each( function(){\r\n\t\t\t//si es un input\r\n\t\t\tprefs = prefs + '\"' + $(this).attr(\"name\") + '\":\"' + $(this).val()+'\", ';\r\n\t\t});\r\n\t\tthisObj.children(\"input[type='checkbox']:checked\").each( function(){\r\n\t\t\t//si es un checkbox seleccionado\r\n\t\t\tprefs = prefs + '\"' + $(this).attr(\"name\") + '\":\"true\", ';\r\n\t\t});\r\n\t\tthisObj.children(\"input[type='checkbox']:not(:checked)\").each( function(){\r\n\t\t\t//si es un checkbox no seleccionado\r\n\t\t\tprefs = prefs + '\"' + $(this).attr(\"name\") + '\":\"false\", ';\r\n\t\t});\r\n\t\tthisObj.children(\"select\").each( function(){\r\n\t\t\t//si es un select\r\n\t\t\tif($(this).val())\r\n\t\t\t\tprefs = prefs + '\"' + $(this).attr(\"name\") + '\":\"' + $(this).val()+'\", ';\r\n\t\t});\r\n\t\tprefs=prefs.substring(0,prefs.length - 2);\r\n\t\tprefs = prefs + '}';\r\n\r\n\t\tvar tehform = $.parseJSON(prefs);\r\n var o = {};\r\n\t\t$.each(tehform, function(key, value) { \r\n\t\t\to[\"widgetparams[\" + key + \"]\"] = value || '';\r\n\t\t});\r\n\r\n\t\t$.ajax({\r\n\t\t\turl: \"/containers/\" + cid + \"/save_preferences.js\",\r\n\t\t\ttype: \"POST\",\r\n\t\t\tdataType: \"json\",\r\n\t\t\tdata: $.param(o),\r\n\t\t\tsuccess: function (data) {\r\n\t\t\t\tif (data['success'] == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tBW.setPreferencesValues($.parseJSON(prefs));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn false;\r\n\t});\r\n }","function saveSettings() {\n\n chrome.storage.local.set({\n\n words: wordArray,\n pages: pagesArray\n\n }, function() {\n\n \t//**********************************\n\t// OPTIONS SAVED INTO LOCAL STORAGE\n\t//**********************************\n\n });\n\n}","function saveSettings() {\r\n \"use strict\";\r\n localStorage.setItem('TrimpzSettings', JSON.stringify(trimpzSettings));\r\n}","function setDefaults() {\n\tconfig.all = {\n\t\ttitleStyle: {\n\t\t\t'font-src': 'http://fonts.googleapis.com/css?family=Chango',\n\t\t\t'font-family': 'Chango, cursive',\n\t\t\t'color': '#000000',\n\t\t\t'font-size': '48px'\n\t\t},\n\t\ttimerStyle: {\n\t\t\t'background-color': '#32cd32',\n\t\t\t'font-src': 'http://fonts.googleapis.com/css?family=Chango',\n\t\t\t'font-family': 'Chango, cursive',\n\t\t\t'color': '#000000',\n\t\t\t'font-size': '48px'\n\t\t},\n\t\ttimers: [],\n\t\twindowSettings: {\n\t\t\twidth: 650,\n\t\t\theight: 350\n\t\t},\n\t\tusername: '',\n\t\tpassword: '',\n\t\tchannel: '',\n\t\tidInc: 0,\n\t\tactiveID: null\n\t}\n}","function setValues (values) {\n $('#autoprefixer-settings-visualCascade').prop('checked', values.visualCascade);\n\n $dialog.find('#autoprefixer-settings-browsers').html(TemplateEngine.render(settingsDialogBrowser, {\n browsers: Preferences.get('browsers')\n }));\n }","function writePrefsCookies() {\n\t\tvar exdate = new Date();\n\t\t//cookie expires in 30 days\n\t\texdate.setDate(exdate.getDate() + 30);\n\n\t\tdocument.cookie = prefNames[this.languageIdx] + \"=\" + escape(this.language) + \";expires=\" + exdate.toUTCString();\n\t\tdocument.cookie = prefNames[this.routingLanguageIdx] + \"=\" + escape(this.routingLanguage) + \";expires=\" + exdate.toUTCString();\n\t\tdocument.cookie = prefNames[this.distanceUnitIdx] + \"=\" + escape(this.distanceUnit) + \";expires=\" + exdate.toUTCString();\n\t\tdocument.cookie = prefNames[this.versionIdx] + \"=\" + escape(this.version) + \";expires=\" + exdate.toUTCString();\n\n\t\tcookiesAvailable = true;\n\t}","function readPreferences() {\n setTimeout(window.sizeToContent, 0);\n\n gStrbundle = $(\"strings\");\n var prefs = Components.classes[\"@mozilla.org/preferences-service;1\"].getService(Components.interfaces.nsIPrefService);\n gPrefs = prefs.getBranch(\"fireftp.\");\n\n try {\n var asciiFiles = gPrefs.getComplexValue(\"asciifiles\", Components.interfaces.nsISupportsString).data.split(\",\");\n\n for (var x = 0; x < asciiFiles.length && asciiFiles[x] != \"\"; ++x) {\n $('asciilist').appendItem(asciiFiles[x], asciiFiles[x]);\n gPrefAsciiFiles.push(asciiFiles[x]);\n }\n\n } catch (ex) { }\n}","function restore_options() {\n // Use default value color = 'red' and likesColor = true.\n chrome.storage.sync.get({\n preferredName: '',\n investmentUrl: '',\n donationUrl: ''\n }, function(items) {\n $('#preferred-name').val(items.preferredName)\n $('#investment-url').val(items.investmentUrl)\n $('#donation-url').val(items.donationUrl)\n });\n}","function createPreferencesWindow() {\n //Define the preferences window\n prefWindow = new BrowserWindow({\n width: 850,\n height: 600,\n minWidth: 735,\n minHeight: 500,\n title: 'Preferences',\n icon: path.join(__dirname, 'assets/icons/app_icon.png'),\n frame: false,\n trasparent: true,\n darkTheme: true\n });\n\n //load the preferences file\n prefWindow.loadURL(`file://${__dirname}/preferences.html`);\n\n // Emitted when the window is closed.\n prefWindow.on('closed', () => {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n prefWindow = null;\n });\n}","function willChangePreferences () {\n\t//log (\"onWillChangePreferences ()\");\n\t\n\tselectedTheme\t\t= preferences.theme.value;\n\toldUserLocation\t= preferences.userLocation.value;\n\toldCityName\t\t\t= preferences.cityName.value;\n\t\n\twidget.onPreferencesCancelled = preferencesCancelled;\n\t\n\tsaveWindowPosition();\n}","function loadOptions() {\n\n\t\tvar preferences = controller.getPreferences();\n\n\t\tvar domainParts = preferences.domain.split(\"/\");\n\t\tvar domain = String.format(\"{0}//{1}\", domainParts[0], domainParts[2]);\n\n\t\t$(\"#domain\").val(domain);\n\t\t$(\"#interval\").val(preferences.interval / 1000);\n\t\t$(\"#notificationUsers\").val(preferences.notificationUsers);\n\t\t$(\"#changeset\").val(preferences.changeset);\n\n\t}","function cargarPreferencias(){\n // obteniendo un elmeneto del localStorage;\n var colorGuardado = localStorage.getItem(\"color\");\n var nombreGuardado = localStorage.getItem(\"nombre\");\n var apellidoGuardado = localStorage.getItem(\"apellido\");\n if(colorGuardado && nombreGuardado && apellidoGuardado){\n body.style.backgroundColor = colorGuardado;\n inputApellido.value = apellidoGuardado;\n inputNombre.value = nombreGuardado;\n inputColor.value = colorGuardado;\n }else{\n console.log(\"No habia un color favorito preconfigurado\");\n }\n }","function setPrefString(absolutePrefPath, value){\r\n \r\n //and the top level (as using the absolute path)\r\n \r\n Services.prefs.setStringPref(absolutePrefPath, value);\n \r\n}","function setFromLocal () {\n _.each(settings, (v, k) => {\n var value = localStorage.getItem(k);\n if (value) {\n settings[k] = JSON.parse(value);\n }\n });\n}","function updateStoredSettings() {\n let settings = {}\n document.querySelectorAll('div[class^=\"gymContent\"] input[type=\"checkbox\"]').forEach(checkbox => settings[checkbox.name] = checkbox.checked);\n\n GM_setValue('gymTabHiderSettings', settings);\n}","set props(p) {\n props = p;\n }","function initialiseStoredSettings() {\n let storedSettings = GM_getValue('gymTabHiderSettings', {});\n for (let stat in storedSettings)\n if (storedSettings[stat]) {\n document.querySelector(`input[type=\"checkbox\"][id=${stat}]`).checked = true;\n \n let trainBox = document.querySelector(`li[class^=\"${stat}\"] div[class^=\"inputWrapper\"]`).parentElement;\n trainBox.style['pointer-events'] = 'none';\n trainBox.style.opacity = '0.5';\n }\n}","async function setLanguagePairs() {\n let defaultClient = LiltNode.ApiClient.instance;\n // Configure API key authorization: ApiKeyAuth\n let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];\n let APIKey = window.localStorage.getItem(\"LILTAPIKEY\");\n if (!APIKey) {\n handleError(\"No API Key Found\");\n return;\n }\n ApiKeyAuth.apiKey = APIKey;\n let BasicAuth = defaultClient.authentications['BasicAuth'];\n BasicAuth.username = APIKey;\n BasicAuth.password = APIKey;\n\n let apiMemoryInstance = new LiltNode.MemoriesApi();\n let apiLanguageInstance = new LiltNode.LanguagesApi();\n\n let memories = await apiMemoryInstance.getMemory();\n let languages = await apiLanguageInstance.getLanguages();\n let dict = languages.code_to_name;\n\n let languagePairs = new Set();\n for (let i = 0; i < memories.length; i++) {\n let memory = memories[i];\n let src = dict[memory.srclang];\n let trg = dict[memory.trglang];\n languagePairs.add(src + \" to \" + trg);\n let cached = window.localStorage.getItem(memory.srclang + memory.trglang + \"LiltMemory\");\n if (cached !== null) {\n memoriesDict[src + \" to \" + trg] = [memory.srclang, memory.trglang, cached];\n } else {\n memoriesDict[src + \" to \" + trg] = [memory.srclang, memory.trglang, memory.id];\n }\n }\n\n let options = \"\"\n for (let pair of languagePairs) {\n let splitPair = pair.split(\" to \");\n\n if (languagePairs.has(splitPair[1] + \" to \" + splitPair[0])) {\n options += '